tpBluetoothDiscovery类
ExternUtils
2025-07-05
介绍
蓝牙扫描,可以用于扫描周围的蓝牙
基础信息
头文件: | include <tpBluetoothDiscovery.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 类型
enum tpDiscoveryInquiryType {
TP_DISCOVER_INQU_AUTO, TP_DISCOVER_INQU_CLASSIC, TP_DISCOVER_INQU_LOW_ENERGY
}
信号
信号名称 | 参数 | 描述 |
---|---|---|
bluetoothDeviceRemove | tpString | |
bluetoothDeviceAdd | tpBluetoothDevice & |
Public 成员函数
tpBluetoothDiscovery(const char *local) | ||
---|---|---|
tpBluetoothDiscovery(const tpString &local) | ||
~tpBluetoothDiscovery() | ||
start() | 开始扫描 | |
stop() | 停止扫描 | |
setInquiryType(tpDiscoveryInquiryType type) | 设置扫描蓝牙的类型 | |
setRssiThreshold(int value) | 设置蓝牙扫描的rssi阈值 | |
tpList< tpBluetoothDevice * > | getDeviceList() | 获取蓝牙扫描的设备列表 |
setTimeout(uint32_t ms) | 设置扫描超时时间(应用于低功耗) | |
onDeviceAdd(const void *remote) | ||
onDeviceRemove(const void *remote) |
成员枚举类型说明
enum tpBluetoothDiscovery::tpDiscoveryInquiryType
名称 | 值 | 描述 |
---|---|---|
TP_DISCOVER_INQU_AUTO | 0 | |
TP_DISCOVER_INQU_CLASSIC | 1 | |
TP_DISCOVER_INQU_LOW_ENERGY | 2 |
成员函数说明
tpBluetoothDiscovery::tpBluetoothDiscovery(const char *local)
暂无注释...
tpBluetoothDiscovery::tpBluetoothDiscovery(const tpString &local)
暂无注释...
tpBluetoothDiscovery::~tpBluetoothDiscovery()
暂无注释...
void tpBluetoothDiscovery::start()
点击查看...
开始扫描
void tpBluetoothDiscovery::stop()
点击查看...
停止扫描
int tpBluetoothDiscovery::setInquiryType(tpDiscoveryInquiryType type)
点击查看...
设置扫描蓝牙的类型
返回值:
linebreak
int tpBluetoothDiscovery::setRssiThreshold(int value)
点击查看...
设置蓝牙扫描的rssi阈值
返回值:
linebreak
tpList< tpBluetoothDevice * > tpBluetoothDiscovery::getDeviceList()
点击查看...
获取蓝牙扫描的设备列表
返回值:
linebreak
int tpBluetoothDiscovery::setTimeout(uint32_t ms)
点击查看...
设置扫描超时时间(应用于低功耗)
返回值:
linebreak