QLowEnergyAdvertisingParameters::AddressInfo Class

class QLowEnergyAdvertisingParameters::AddressInfo

QLowEnergyAdvertisingParameters::AddressInfo 定义了白名单的元素。更多

公共函数

AddressInfo()
AddressInfo(const QBluetoothAddress &addr, QLowEnergyController::RemoteAddressType type)

公共变量

QBluetoothAddress address
QLowEnergyController::RemoteAddressType type
bool operator!=(const QLowEnergyAdvertisingParameters::AddressInfo &a, const QLowEnergyAdvertisingParameters::AddressInfo &b)
bool operator==(const QLowEnergyAdvertisingParameters::AddressInfo &a, const QLowEnergyAdvertisingParameters::AddressInfo &b)

详细说明

QLowEnergyAdvertisingParameters::AddressInfo 实例列表传递给QLowEnergyAdvertisingParameters::setWhiteList() 。白名单用于限制有权限与外设交互的设备。允许的交互类型由QLowEnergyAdvertisingParameters::FilterPolicy 定义。

另请参阅 QLowEnergyAdvertisingParameters::whiteList() 。

成员函数文档

AddressInfo::AddressInfo()

构造一个默认的 AddressInfo 实例。

默认情况下,AddressInfo::type 成员设置为QLowEnergyController::PublicAddressAddressInfo::address 成员的地址为空。

AddressInfo::AddressInfo(const QBluetoothAddress &addr, QLowEnergyController::RemoteAddressType type)

构建一个新的 AddressInfo 实例。addr 代表远程设备的蓝牙地址,type 代表地址的性质。

成员变量文档

QBluetoothAddress AddressInfo::address

这是远程设备的蓝牙地址。

QLowEnergyController::RemoteAddressType AddressInfo::type

地址类型(公共或私有)。AddressInfo 默认构造函数将此值初始化为QLowEnergyController::PublicAddress

相关非成员

bool operator!=(const QLowEnergyAdvertisingParameters::AddressInfo &a, const QLowEnergyAdvertisingParameters::AddressInfo &b)

如果ab 的公共状态不相等,则返回true ,否则返回false

bool operator==(const QLowEnergyAdvertisingParameters::AddressInfo &a, const QLowEnergyAdvertisingParameters::AddressInfo &b)

如果ab 的公共状态相等,则返回true ,否则返回false

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.