QBluetoothUuid Class
QBluetoothUuid 类为每个蓝牙服务生成一个 UUID。更多
Header: | #include <QBluetoothUuid> |
qmake: | QT += bluetooth |
Inherits: | QUuid |
公共类型
enum class | CharacteristicType { AerobicHeartRateLowerLimit, AerobicHeartRateUpperLimit, AerobicThreshold, Age, AnaerobicHeartRateLowerLimit, …, WindChill } |
enum class | DescriptorType { CharacteristicExtendedProperties, CharacteristicUserDescription, ClientCharacteristicConfiguration, ServerCharacteristicConfiguration, CharacteristicPresentationFormat, …, UnknownDescriptorType } |
enum class | ProtocolUuid { Sdp, Udp, Rfcomm, Tcp, TcsBin, …, L2cap } |
enum class | ServiceClassUuid { ServiceDiscoveryServer, BrowseGroupDescriptor, PublicBrowseGroup, SerialPort, LANAccessUsingPPP, …, ContinuousGlucoseMonitoring } |
公共函数
QBluetoothUuid() | |
QBluetoothUuid(QBluetoothUuid::CharacteristicType uuid) | |
QBluetoothUuid(QBluetoothUuid::DescriptorType uuid) | |
QBluetoothUuid(QBluetoothUuid::ProtocolUuid uuid) | |
QBluetoothUuid(QBluetoothUuid::ServiceClassUuid uuid) | |
QBluetoothUuid(const QUuid &uuid) | |
QBluetoothUuid(quint16 uuid) | |
QBluetoothUuid(quint32 uuid) | |
(since 6.6) | QBluetoothUuid(QUuid::Id128Bytes uuid, QSysInfo::Endian order) |
QBluetoothUuid(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian) | |
int | minimumSize() const |
(since 6.6) CBUUID * | toCBUUID() const |
quint16 | toUInt16(bool *ok = nullptr) const |
quint32 | toUInt32(bool *ok = nullptr) const |
quint128 | toUInt128(QSysInfo::Endian order = QSysInfo::BigEndian) const |
静态公共成员
QString | characteristicToString(QBluetoothUuid::CharacteristicType uuid) |
QString | descriptorToString(QBluetoothUuid::DescriptorType uuid) |
(since 6.6) QBluetoothUuid | fromCBUUID(CBUUID *cbUuid) |
QString | protocolToString(QBluetoothUuid::ProtocolUuid uuid) |
(since Qt 5.4) QString | serviceClassToString(QBluetoothUuid::ServiceClassUuid uuid) |
相关非成员
bool | operator!=(const QBluetoothUuid &a, const QBluetoothUuid &b) |
bool | operator==(const QBluetoothUuid &a, const QBluetoothUuid &b) |
成员类型文档
enum class QBluetoothUuid::CharacteristicType
该枚举是蓝牙低功耗服务特性类 UUID 的便利类型。必要时,该类型的值将隐式转换为QBluetoothUuid 。详细类型说明可在bluetooth.org 上找到。
常量 | 值 | 说明 |
---|---|---|
QBluetoothUuid::CharacteristicType::AerobicHeartRateLowerLimit | 0x2a7e | 用户运动时提高耐力的心率下限。 |
QBluetoothUuid::CharacteristicType::AerobicHeartRateUpperLimit | 0x2a84 | 用户运动时提高耐力的心率上限。 |
QBluetoothUuid::CharacteristicType::AerobicThreshold | 0x2a7f | 该特征表示第一个代谢阈值。 |
QBluetoothUuid::CharacteristicType::Age | 0x2a80 | 该特征表示用户的年龄。 |
QBluetoothUuid::CharacteristicType::AnaerobicHeartRateLowerLimit | 0x2a81 | 用户在运动时提高无氧耐受力的心率下限。 |
QBluetoothUuid::CharacteristicType::AnaerobicHeartRateUpperLimit | 0x2a82 | 用户在运动时提高无氧耐受力的心率上限。 |
QBluetoothUuid::CharacteristicType::AnaerobicThreshold | 0x2a83 | 该特性说明了第二代谢阈值。 |
QBluetoothUuid::CharacteristicType::AlertCategoryID | 0x2a43 | 警报/信息类别。 |
QBluetoothUuid::CharacteristicType::AlertCategoryIDBitMask | 0x2a42 | 警报/信息类别。 |
QBluetoothUuid::CharacteristicType::AlertLevel | 0x2a06 | 设备发出警报的级别。如果在警报响起时更改了该级别,新级别将生效。 |
QBluetoothUuid::CharacteristicType::AlertNotificationControlPoint | 0x2a44 | 警报通知服务器的控制点。客户端可以在此写入命令,请求服务器提供多种功能。 |
QBluetoothUuid::CharacteristicType::AlertStatus | 0x2a3f | 警报状态特性定义警报的状态。 |
QBluetoothUuid::CharacteristicType::ApparentWindDirection | 0x2a73 | 该特性显示视风向。视风向是运动中的观察者所感受到的风向。该特性以相对于观察者航向的顺时针角度表示风向。 |
QBluetoothUuid::CharacteristicType::ApparentWindSpeed | 0x2a72 | 该特性以米/秒为单位显示视风速。观察者在运动中感受到的风速。 |
QBluetoothUuid::CharacteristicType::Appearance | 0x2a01 | 该设备的外观。数值由类别(10 位)和子类别(6 位)组成。 |
QBluetoothUuid::CharacteristicType::BarometricPressureTrend | 0x2aa3 | 该特性显示气压的变化趋势。 |
QBluetoothUuid::CharacteristicType::BatteryLevel | 0x2a19 | 电池的当前电量。100% 表示完全充电,0% 表示完全放电。 |
QBluetoothUuid::CharacteristicType::BloodPressureFeature | 0x2a49 | 血压特征特性用于描述血压传感器支持的特征。 |
QBluetoothUuid::CharacteristicType::BloodPressureMeasurement | 0x2a35 | 血压测量特性是一个长度可变的结构,包含一个标志字段、一个血压测量复合值字 段,以及由标志字段内容决定的时间戳、脉搏率和用户 ID 等附加字段。 |
QBluetoothUuid::CharacteristicType::BodyCompositionFeature | 0x2a9b | 该特征描述了 BodyCompositionMeasurement 特征中的可用功能。 |
QBluetoothUuid::CharacteristicType::BodyCompositionMeasurement | 0x2a9c | 该特征描述了身体成分,如肌肉百分比或身体水分质量。 |
QBluetoothUuid::CharacteristicType::BodySensorLocation | 0x2a38 | 身体传感器位置特征描述传感器在身体上的位置(例如:胸部、手指或手)。 |
QBluetoothUuid::CharacteristicType::BootKeyboardInputReport | 0x2a22 | 引导键盘输入报告特征用于在引导协议模式下运行的 HID 主机和与引导键盘相对应的 HID 服务之间传输固定格式和长度的输入报告数据。 |
QBluetoothUuid::CharacteristicType::BootKeyboardOutputReport | 0x2a32 | 启动键盘输出报告特性用于在启动协议模式下运行的 HID 主机和与启动键盘相对应的 HID 服务之间传输固定格式和长度的输出报告数据。 |
QBluetoothUuid::CharacteristicType::BootMouseInputReport | 0x2a33 | 引导鼠标输入报告特性用于在引导协议模式下运行的 HID 主机和与引导鼠标相对应的 HID 服务之间传输固定格式和长度的输入报告数据。 |
QBluetoothUuid::CharacteristicType::CSCFeature | 0x2a5c | CSC(骑行速度和步频)特性用于描述服务器支持的特性。 |
QBluetoothUuid::CharacteristicType::CSCMeasurement | 0x2a5b | CSC 测量特性(CSC 指骑行速度和步频)是一个长度可变的结构,包含一个标志字段,并根据标志字段的内容,可能包含一个或多个附加字段,如下表所示。 |
QBluetoothUuid::CharacteristicType::CurrentTime | 0x2a2b | 当前时间特性显示与 ExactTime256 特性相同的信息,以及有关时区、DST 和所采用的更新方法的信息。 |
QBluetoothUuid::CharacteristicType::CyclingPowerControlPoint | 0x2a66 | 循环功率控制点特性用于请求在接收设备上执行特定功能。 |
QBluetoothUuid::CharacteristicType::CyclingPowerFeature | 0x2a65 | CP 特性用于报告设备支持的特性列表。 |
QBluetoothUuid::CharacteristicType::CyclingPowerMeasurement | 0x2a63 | 循环功率测量特性是一个长度可变的结构,包含一个标志字段和一个瞬时功率字段,并可根据标志字段的内容包含一个或多个附加字段,如下表所示。 |
QBluetoothUuid::CharacteristicType::CyclingPowerVector | 0x2a64 | 循环功率矢量(Cycling Power Vector)特性是一个长度可变的结构,包含一个标志(Flags)字段,并可根据标志字段的内容包含一个或多个附加字段,如下表所示。 |
QBluetoothUuid::CharacteristicType::DatabaseChangeIncrement | 0x2a99 | |
QBluetoothUuid::CharacteristicType::DateOfBirth | 0x2a85 | 该特征表示用户的出生日期。 |
QBluetoothUuid::CharacteristicType::DateOfThresholdAssessment | 0x2a86 | |
QBluetoothUuid::CharacteristicType::DateTime | 0x2a08 | 日期时间特性用于表示时间。 |
QBluetoothUuid::CharacteristicType::DayDateTime | 0x2a0a | 日期时间特征表示日期、时间和星期。 |
QBluetoothUuid::CharacteristicType::DayOfWeek | 0x2a09 | 星期特征描述一周中的哪一天(周一至周日)。 |
QBluetoothUuid::CharacteristicType::DescriptorValueChanged | 0x2a7d | 该特性与环境传感服务有关。 |
QBluetoothUuid::CharacteristicType::DeviceName | 0x2a00 | 设备名称(Device Name)特性包含设备名称。 |
QBluetoothUuid::CharacteristicType::DewPoint | 0x2a7b | 露点(摄氏度) 该特性描述露点(摄氏度)。 |
QBluetoothUuid::CharacteristicType::DSTOffset | 0x2a0d | DST 偏移(DST Offset)特性描述夏令时使用的偏移量。 |
QBluetoothUuid::CharacteristicType::Elevation | 0x2a6c | 海拔高度(Elevation)特性说明海拔高度(高于/低于海平面)。 |
QBluetoothUuid::CharacteristicType::EmailAddress | 0x2a87 | 电子邮件(Email) 该特性描述了用户的电子邮件。 |
QBluetoothUuid::CharacteristicType::ExactTime256 | 0x2a0c | 精确时间 256 特性描述了数据、日期和时间,精确度为 1/256 秒。 |
QBluetoothUuid::CharacteristicType::FatBurnHeartRateLowerLimit | 0x2a88 | 用户运动时最大限度燃烧脂肪的心率下限。 |
QBluetoothUuid::CharacteristicType::FatBurnHeartRateUpperLimit | 0x2a89 | 用户运动时最大限度燃烧脂肪的心率上限。 |
QBluetoothUuid::CharacteristicType::FirmwareRevisionString | 0x2a26 | 该特性的值是一个 UTF-8 字符串,代表设备内固件的固件版本。 |
QBluetoothUuid::CharacteristicType::FirstName | 0x2a8a | 此特征显示用户的名字。 |
QBluetoothUuid::CharacteristicType::FiveZoneHeartRateLimits | 0x2a8b | 该特征包含 5 区心率定义的心率区之间的界限。 |
QBluetoothUuid::CharacteristicType::Gender | 0x2a8c | 该特征说明了用户的性别。 |
QBluetoothUuid::CharacteristicType::GlucoseFeature | 0x2a51 | Glucose Feature(葡萄糖特征)特征用于描述服务器支持的特征。读取时,"葡萄糖特征 "特征会返回一个值,客户端可使用该值确定服务器支持的特征。 |
QBluetoothUuid::CharacteristicType::GlucoseMeasurement | 0x2a18 | 葡萄糖测量特性是一个长度可变的结构,包含一个标志字段、一个序列号字段、一个基 准时间字段,并根据标志字段的内容,可能包含一个时间偏移字段、葡萄糖浓度字段、 类型-采样位置字段和一个传感器状态报警字段。 |
QBluetoothUuid::CharacteristicType::GlucoseMeasurementContext | 0x2a34 | |
QBluetoothUuid::CharacteristicType::GustFactor | 0x2a74 | 该特性表示平均风速与最大阵风风速之间的风速增加系数。 |
QBluetoothUuid::CharacteristicType::HardwareRevisionString | 0x2a27 | 该特性的值是一个 UTF-8 字符串,代表设备内硬件的硬件版本。 |
QBluetoothUuid::CharacteristicType::MaximumRecommendedHeartRate | 0x2a91 | 该特性显示了限制用力的最大推荐心率。 |
QBluetoothUuid::CharacteristicType::HeartRateControlPoint | 0x2a39 | |
QBluetoothUuid::CharacteristicType::HeartRateMax | 0x2a8d | 该特性以每分钟心跳次数为单位说明用户可达到的最大心率。 |
QBluetoothUuid::CharacteristicType::HeartRateMeasurement | 0x2a37 | |
QBluetoothUuid::CharacteristicType::HeatIndex | 0x2a7a | 该特性以摄氏度为单位提供热指数。 |
QBluetoothUuid::CharacteristicType::Height | 0x2a8e | 该特性显示用户的身高。 |
QBluetoothUuid::CharacteristicType::HIDControlPoint | 0x2a4c | HID 控制点特性是一个控制点属性,用于定义写入时的 HID 命令。 |
QBluetoothUuid::CharacteristicType::HIDInformation | 0x2a4a | HID 信息特征在读取时返回 HID 属性。 |
QBluetoothUuid::CharacteristicType::HipCircumference | 0x2a8f | 该特性以米为单位显示用户的臀围。 |
QBluetoothUuid::CharacteristicType::Humidity | 0x2a6f | 该特征以百分比为单位说明湿度。 |
QBluetoothUuid::CharacteristicType::IEEE1107320601RegulatoryCertificationDataList | 0x2a2a | 该特性的值是一个不透明结构,列出了设备声称遵守的各种法规和/或认证合规项目。 |
QBluetoothUuid::CharacteristicType::IntermediateCuffPressure | 0x2a36 | 该特性的格式与血压测量特性相同。 |
QBluetoothUuid::CharacteristicType::IntermediateTemperature | 0x2a1e | 中间温度特性的格式与温度测量特性相同。 |
QBluetoothUuid::CharacteristicType::Irradiance | 0x2a77 | 该特性以每平方米瓦特为单位说明电磁辐射功率。 |
QBluetoothUuid::CharacteristicType::Language | 0x2aa2 | 该特性包含基于 ISO639-1 的语言定义。 |
QBluetoothUuid::CharacteristicType::LastName | 0x2a90 | 该特性包含用户姓氏。 |
QBluetoothUuid::CharacteristicType::LNControlPoint | 0x2a6b | LN 控制点特性用于请求在接收设备上执行特定功能。 |
QBluetoothUuid::CharacteristicType::LNFeature | 0x2a6a | LN 特征用于报告设备支持的特征列表。 |
QBluetoothUuid::CharacteristicType::LocalTimeInformation | 0x2a0f | |
QBluetoothUuid::CharacteristicType::LocationAndSpeed | 0x2a67 | 位置和速度特性是一个长度可变的结构,包含一个 Flags 字段,根据 Flags 字段的内容,可能包含多个数据字段的组合。 |
QBluetoothUuid::CharacteristicType::MagneticDeclination | 0x2a2c | 该特性包含(地理)真北方向和磁北方向在水平面上的夹角,从真北方向到磁北方向顺时针方向测量。 |
QBluetoothUuid::CharacteristicType::MagneticFluxDensity2D | 0x2aa0 | 该特征表示 x 轴和 y 轴上的磁通密度。 |
QBluetoothUuid::CharacteristicType::MagneticFluxDensity3D | 0x2aa1 | 该特性表示 x、y 和 z 轴上的磁通密度。 |
QBluetoothUuid::CharacteristicType::ManufacturerNameString | 0x2a29 | 该特性的值是一个 UTF-8 字符串,代表设备制造商的名称。 |
QBluetoothUuid::CharacteristicType::MeasurementInterval | 0x2a21 | 测量间隔(Measurement Interval)特性定义了两次测量之间的时间间隔。 |
QBluetoothUuid::CharacteristicType::ModelNumberString | 0x2a24 | 该特性的值是一个 UTF-8 字符串,代表设备供应商分配的型号。 |
QBluetoothUuid::CharacteristicType::Navigation | 0x2a68 | 导航(Navigation)特性是一个长度可变的结构,包含一个标志(Flags)字段、一个方位(Bearing)字段、一个标题(Heading)字段,并根据标志字段的内容进行定义。 |
QBluetoothUuid::CharacteristicType::NewAlert | 0x2a46 | 该特征定义了警报的类别,以及服务器设备中出现了多少个该类别的新警报。 |
QBluetoothUuid::CharacteristicType::PeripheralPreferredConnectionParameters | 0x2a04 | |
QBluetoothUuid::CharacteristicType::PeripheralPrivacyFlag | 0x2a02 | |
QBluetoothUuid::CharacteristicType::PnPID | 0x2a50 | 使用 GATT 特征值读取程序读取时,PnP_ID 特征会返回其值。 |
QBluetoothUuid::CharacteristicType::PollenConcentration | 0x2a75 | 该特性显示每立方米的花粉浓度计数。 |
QBluetoothUuid::CharacteristicType::PositionQuality | 0x2a69 | 位置质量特性是一个长度可变的结构,包含一个标志字段和至少一个可选数据。 |
QBluetoothUuid::CharacteristicType::Pressure | 0x2a6d | 压力特性说明压力传感器的值。 |
QBluetoothUuid::CharacteristicType::ProtocolMode | 0x2a4e | 协议模式(Protocol Mode)特性用于显示与之关联的 HID 服务的当前协议模式,或设置 HID 服务所需的协议模式。 |
QBluetoothUuid::CharacteristicType::Rainfall | 0x2a78 | 该特性以米为单位显示降雨量。 |
QBluetoothUuid::CharacteristicType::ReconnectionAddress | 0x2a03 | 本页包含的信息仅供参考。规范性说明包含在适用的规范中。 |
QBluetoothUuid::CharacteristicType::RecordAccessControlPoint | 0x2a52 | 该控制点与服务一起使用,为葡萄糖传感器患者记录数据库提供基本管理功能。 |
QBluetoothUuid::CharacteristicType::ReferenceTimeInformation | 0x2a14 | |
QBluetoothUuid::CharacteristicType::Report | 0x2a4d | 报告特性用于在 HID 设备和 HID 主机之间交换数据。 |
QBluetoothUuid::CharacteristicType::ReportMap | 0x2a4b | 作为 HID 服务的一部分,该特性只存在一个实例。 |
QBluetoothUuid::CharacteristicType::RestingHeartRate | 0x2a92 | 该特性可显示用户可达到的最低心率。 |
QBluetoothUuid::CharacteristicType::RingerControlPoint | 0x2a40 | 铃声控制点(Ringer Control Point)特性定义了铃声的控制点。 |
QBluetoothUuid::CharacteristicType::RingerSetting | 0x2a41 | Ringer Setting(铃声设置)特性定义铃声的设置。 |
QBluetoothUuid::CharacteristicType::RSCFeature | 0x2a54 | RSC(跑步速度和步频)特性用于描述服务器支持的特性。 |
QBluetoothUuid::CharacteristicType::RSCMeasurement | 0x2a53 | RSC 指的是运行速度和步调。 |
QBluetoothUuid::CharacteristicType::SCControlPoint | 0x2a55 | SC 控制点特性用于请求在接收设备上执行特定功能。 |
QBluetoothUuid::CharacteristicType::ScanIntervalWindow | 0x2a4f | 扫描间隔窗口特性用于存储 GATT 客户端的扫描参数。 |
QBluetoothUuid::CharacteristicType::ScanRefresh | 0x2a31 | Scan Refresh(扫描刷新)特性用于通知客户端,服务器要求在收到通知后用最新值写入 Scan Interval Window(扫描间隔窗口)特性。 |
QBluetoothUuid::CharacteristicType::SensorLocation | 0x2a5d | 传感器位置 "特性用于显示传感器的位置。 |
QBluetoothUuid::CharacteristicType::SerialNumberString | 0x2a25 | 该特性的值是一个长度可变的 UTF-8 字符串,代表设备特定实例的序列号。 |
QBluetoothUuid::CharacteristicType::ServiceChanged | 0x2a05 | |
QBluetoothUuid::CharacteristicType::SoftwareRevisionString | 0x2a28 | 该特性的值是一个 UTF-8 字符串,代表设备内软件的软件版本。 |
QBluetoothUuid::CharacteristicType::SportTypeForAerobicAnaerobicThresholds | 0x2a93 | 此特征用于根据要进行的运动类型预设各种有氧和无氧阈值特征。 |
QBluetoothUuid::CharacteristicType::SupportedNewAlertCategory | 0x2a47 | 服务器支持的新警报类别。 |
QBluetoothUuid::CharacteristicType::SupportedUnreadAlertCategory | 0x2a48 | 服务器支持的未读警报类别。 |
QBluetoothUuid::CharacteristicType::SystemID | 0x2a23 | 如果系统 ID 基于蓝牙设备地址,公司标识符 (OUI) 为 0x123456,公司指定标识符为 0x9ABCDE,则系统标识符必须为 0x123456FFFE9ABCDE。 |
QBluetoothUuid::CharacteristicType::Temperature | 0x2a6e | 该特性的值表示以摄氏度为单位的温度。 |
QBluetoothUuid::CharacteristicType::TemperatureMeasurement | 0x2a1c | 温度测量特性是一个长度可变的结构,包含一个标志字段、一个温度测量值字段,以及根据标志字段的内容可选的时间戳字段和/或温度类型字段。 |
QBluetoothUuid::CharacteristicType::TemperatureType | 0x2a1d | 温度类型 "特性是一个枚举,表示温度测量的位置。 |
QBluetoothUuid::CharacteristicType::ThreeZoneHeartRateLimits | 0x2a94 | 该特征包含三区心率定义的心率区之间的界限。 |
QBluetoothUuid::CharacteristicType::TimeAccuracy | 0x2a12 | |
QBluetoothUuid::CharacteristicType::TimeSource | 0x2a13 | |
QBluetoothUuid::CharacteristicType::TimeUpdateControlPoint | 0x2a16 | |
QBluetoothUuid::CharacteristicType::TimeUpdateState | 0x2a17 | |
QBluetoothUuid::CharacteristicType::TimeWithDST | 0x2a11 | |
QBluetoothUuid::CharacteristicType::TimeZone | 0x2a0e | |
QBluetoothUuid::CharacteristicType::TrueWindDirection | 0x2a71 | 风向特征 该特征表示风向,测量角度为相对于(地理)真北方顺时针方向。东风的风向为 90 度。 |
QBluetoothUuid::CharacteristicType::TrueWindSpeed | 0x2a70 | 该特征表示风速,单位为米/秒。 |
QBluetoothUuid::CharacteristicType::TwoZoneHeartRateLimits | 0x2a95 | 该特性包含 2 区心率定义的心率区之间的界限。 |
QBluetoothUuid::CharacteristicType::TxPowerLevel | 0x2a07 | 特征值是一个带符号的 8 位整数,定点指数为 0。 |
QBluetoothUuid::CharacteristicType::UnreadAlertStatus | 0x2a45 | 该特性显示设备中特定类别的未读警报数量。 |
QBluetoothUuid::CharacteristicType::UserControlPoint | 0x2a9f | |
QBluetoothUuid::CharacteristicType::UserIndex | 0x2a9a | 该特征表示用户的索引。 |
QBluetoothUuid::CharacteristicType::UVIndex | 0x2a76 | 该特性显示 UV 指数。 |
QBluetoothUuid::CharacteristicType::VO2Max | 0x2a96 | 该特征显示用户的最大摄氧量。 |
QBluetoothUuid::CharacteristicType::WaistCircumference | 0x2a97 | 该特征表示用户的腰围(以米为单位)。 |
QBluetoothUuid::CharacteristicType::Weight | 0x2a98 | 该特征显示用户的体重(公斤)。 |
QBluetoothUuid::CharacteristicType::WeightMeasurement | 0x2a9d | 该特征提供体重相关数据,如体重指数或用户体重。 |
QBluetoothUuid::CharacteristicType::WeightScaleFeature | 0x2a9e | 该特性描述了 WeightMeasurement(体重测量)特性中的可用数据。 |
QBluetoothUuid::CharacteristicType::WindChill | 0x2a79 | 风寒值(摄氏度) 该特性描述了风寒值(摄氏度)。 |
enum class QBluetoothUuid::DescriptorType
描述符是描述蓝牙低功耗特性值的属性。
该枚举是描述符类 UUID 的便利类型。必要时,该类型的值将隐式转换为QBluetoothUuid 。详细的类型规范可在bluetooth.org 上找到。
常量 | 值 | 描述 |
---|---|---|
QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties | 0x2900 | 描述符定义附加特性属性。QLowEnergyCharacteristic::ExtendedProperty 标志表示存在该描述符。 |
QBluetoothUuid::DescriptorType::CharacteristicUserDescription | 0x2901 | 描述符为特性值提供文本用户描述。 |
QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration | 0x2902 | 描述符定义了特定客户端如何配置特性。 |
QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration | 0x2903 | 描述符定义服务器如何配置与特性描述符相关联的特性。 |
QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat | 0x2904 | 描述符定义了特征值的格式。 |
QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat | 0x2905 | 描述符定义聚合特征值的格式。 |
QBluetoothUuid::DescriptorType::ValidRange | 0x2906 | 描述符用于定义特征的范围。其中包含两个定义范围的必填字段(上界和下界)。 |
QBluetoothUuid::DescriptorType::ExternalReportReference | 0x2907 | 允许 HID 主机将输入报告、输出报告或特征报告数据的报告映射特征值信息映射到用于传输相关数据的外部服务特征的特征 UUID。 |
QBluetoothUuid::DescriptorType::ReportReference | 0x2908 | 报告 ID 和报告类型形式的映射信息可将当前父特性映射到报告映射表特性中定义的报告 ID 和报告类型。 |
QBluetoothUuid::DescriptorType::EnvironmentalSensingConfiguration | 0x290b | 描述符定义多个触发设置描述符的组合方式。因此,该描述符可与 EnvironmentalSensingTriggerSetting(环境传感触发设置)描述符配合使用,以定义可通知相关特征值的条件。 |
QBluetoothUuid::DescriptorType::EnvironmentalSensingMeasurement | 0x290c | 描述符定义环境传感服务器的附加信息,如预期应用、采样功能或测量周期和不确定 性。 |
QBluetoothUuid::DescriptorType::EnvironmentalSensingTriggerSetting | 0x290d | 描述符定义了环境传感服务器(ESS)应在哪些条件下触发通知。这些条件包括达到特定阈值或计时器过期。这意味着 ESS 特性支持通知。 |
QBluetoothUuid::DescriptorType::UnknownDescriptorType | 0x0 | 描述符类型未知。 |
enum class QBluetoothUuid::ProtocolUuid
该枚举是蓝牙协议 UUID 的便利类型。必要时,该类型的值将隐式转换为QBluetoothUuid 。
常量 | 值 | 描述 |
---|---|---|
QBluetoothUuid::ProtocolUuid::Sdp | 0x0001 | SDP 协议 UUID |
QBluetoothUuid::ProtocolUuid::Udp | 0x0002 | UDP 协议 UUID |
QBluetoothUuid::ProtocolUuid::Rfcomm | 0x0003 | RFCOMM 协议 UUID |
QBluetoothUuid::ProtocolUuid::Tcp | 0x0004 | TCP 协议 UUID |
QBluetoothUuid::ProtocolUuid::TcsBin | 0x0005 | 电话控制规范 UUID |
QBluetoothUuid::ProtocolUuid::TcsAt | 0x0006 | 电话控制规范 AT UUID |
QBluetoothUuid::ProtocolUuid::Att | 0x0007 | 属性协议 UUID |
QBluetoothUuid::ProtocolUuid::Obex | 0x0008 | OBEX 协议 UUID |
QBluetoothUuid::ProtocolUuid::Ip | 0x0009 | IP 协议 UUID |
QBluetoothUuid::ProtocolUuid::Ftp | 0x000A | FTP 协议 UUID |
QBluetoothUuid::ProtocolUuid::Http | 0x000C | HTTP 协议 UUID |
QBluetoothUuid::ProtocolUuid::Wsp | 0x000E | WSP UUID |
QBluetoothUuid::ProtocolUuid::Bnep | 0x000F | 蓝牙网络封装协议 UUID |
QBluetoothUuid::ProtocolUuid::Upnp | 0x0010 | 扩展服务发现配置文件 UUID |
QBluetoothUuid::ProtocolUuid::Hidp | 0x0011 | 人机接口设备配置文件 UUID |
QBluetoothUuid::ProtocolUuid::HardcopyControlChannel | 0x0012 | 硬拷贝电缆更换配置文件 UUID |
QBluetoothUuid::ProtocolUuid::HardcopyDataChannel | 0x0014 | 硬拷贝电缆更换配置文件 UUID |
QBluetoothUuid::ProtocolUuid::HardcopyNotification | 0x0016 | 硬拷贝电缆更换配置文件 UUID |
QBluetoothUuid::ProtocolUuid::Avctp | 0x0017 | 音视频控制传输协议 UUID |
QBluetoothUuid::ProtocolUuid::Avdtp | 0x0019 | 音频/视频分配传输协议 UUID |
QBluetoothUuid::ProtocolUuid::Cmtp | 0x001B | 通用 ISDN 接入配置文件 |
QBluetoothUuid::ProtocolUuid::UdiCPlain | 0x001D | UDI 协议 UUID |
QBluetoothUuid::ProtocolUuid::McapControlChannel | 0x001E | 多通道适配协议 UUID |
QBluetoothUuid::ProtocolUuid::McapDataChannel | 0x001F | 多通道适配协议 UUID |
QBluetoothUuid::ProtocolUuid::L2cap | 0x0100 | L2CAP 协议 UUID |
另请参见 QBluetoothServiceInfo::ProtocolDescriptorList 。
enum class QBluetoothUuid::ServiceClassUuid
该枚举是蓝牙服务类别和配置文件 UUID 的便利类型。必要时,该类型的值将隐式转换为QBluetoothUuid 。有些 UUID 指的是服务类 id,有些指的是配置文件 id,有些则两者兼而有之。一般来说,配置文件 UUID 只能在QBluetoothServiceInfo::BluetoothProfileDescriptorList 属性中使用,服务类别 UUID 只能在QBluetoothServiceInfo::ServiceClassIds 属性中使用。如果 UUID 被标记为配置文件和服务类别 UUID,则可用作上述任一服务属性的值。这种双重用途有其历史原因,但对较新的 UUID 来说已不再允许。
下面的列表明确说明了每个 UUID 的使用类型。从 0x18 开始的蓝牙低功耗相关值由 Qt 5.4 引入
常量 | 值 | 说明 |
---|---|---|
QBluetoothUuid::ServiceClassUuid::ServiceDiscoveryServer | 0x1000 | 服务发现服务器 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::BrowseGroupDescriptor | 0x1001 | 浏览组描述符(服务) |
QBluetoothUuid::ServiceClassUuid::PublicBrowseGroup | 0x1002 | 公共浏览组服务类别。browse group list 中包含公共浏览组的服务可被远程设备发现。 |
QBluetoothUuid::ServiceClassUuid::SerialPort | 0x1101 | 串行端口配置文件 UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::LANAccessUsingPPP | 0x1102 | 局域网访问配置文件 UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::DialupNetworking | 0x1103 | 拨号网络配置文件 UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::IrMCSync | 0x1104 | 同步配置文件 UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::ObexObjectPush | 0x1105 | OBEX 对象推送服务 UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::OBEXFileTransfer | 0x1106 | 文件传输配置文件(FTP)UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::IrMCSyncCommand | 0x1107 | 同步配置文件 UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::Headset | 0x1108 | 耳机配置文件(HSP)UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::AudioSource | 0x110a | 高级音频分配规范 (A2DP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::AudioSink | 0x110b | 高级音频分配规范(A2DP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::AV_RemoteControlTarget | 0x110c | 音频/视频远程控制配置文件(AVRCP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::AdvancedAudioDistribution | 0x110d | 高级音频分配规范 (A2DP) UUID(规范) |
QBluetoothUuid::ServiceClassUuid::AV_RemoteControl | 0x110e | 音频/视频远程控制配置文件 (AVRCP) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::AV_RemoteControlController | 0x110f | 音频/视频远程控制规范 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::HeadsetAG | 0x1112 | 耳机规范 (HSP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::PANU | 0x1115 | 个人区域网络配置文件 (PAN) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::NAP | 0x1116 | 个人区域网络配置文件 (PAN) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::GN | 0x1117 | 个人区域网络配置文件 (PAN) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::DirectPrinting | 0x1118 | 基本打印配置文件 (BPP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::ReferencePrinting | 0x1119 | 与基本打印配置文件 (BPP) UUID(服务)相关 |
QBluetoothUuid::ServiceClassUuid::BasicImage | 0x111a | 基本成像规范 (BIP) UUID(规范) |
QBluetoothUuid::ServiceClassUuid::ImagingResponder | 0x111b | 基本成像规范(BIP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::ImagingAutomaticArchive | 0x111c | 基本成像规范 (BIP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::ImagingReferenceObjects | 0x111d | 基本成像规范 (BIP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::Handsfree | 0x111e | 免提规范 (HFP) UUID(服务和规范) |
QBluetoothUuid::ServiceClassUuid::HandsfreeAudioGateway | 0x111f | 免提音频网关 (HFP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::DirectPrintingReferenceObjectsService | 0x1120 | 基本打印配置文件 (BPP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::ReflectedUI | 0x1121 | 基本打印配置文件 (BPP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::BasicPrinting | 0x1122 | 基本打印配置文件 (BPP) UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::PrintingStatus | 0x1123 | 基本打印配置文件 (BPP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::HumanInterfaceDeviceService | 0x1124 | 人机接口设备 (HID) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::HardcopyCableReplacement | 0x1125 | 硬拷贝电缆更换配置文件 (HCRP)(配置文件) |
QBluetoothUuid::ServiceClassUuid::HCRPrint | 0x1126 | 硬拷贝电缆更换配置文件 (HCRP)(服务) |
QBluetoothUuid::ServiceClassUuid::HCRScan | 0x1127 | 硬拷贝电缆更换配置文件 (HCRP)(服务) |
QBluetoothUuid::ServiceClassUuid::SIMAccess | 0x112d | SIM 访问配置文件 (SAP) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::PhonebookAccessPCE | 0x112e | 电话簿访问配置文件 (PBAP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::PhonebookAccessPSE | 0x112f | 电话簿访问配置文件 (PBAP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::PhonebookAccess | 0x1130 | 电话簿访问配置文件 (PBAP)(配置文件) |
QBluetoothUuid::ServiceClassUuid::HeadsetHS | 0x1131 | 耳麦规范 (HSP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::MessageAccessServer | 0x1132 | 信息访问配置文件(MAP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::MessageNotificationServer | 0x1133 | 信息访问配置文件(MAP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::MessageAccessProfile | 0x1134 | 信息访问配置文件 (MAP) UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::GNSS | 0x1135 | 全球导航卫星系统 UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::GNSSServer | 0x1136 | 全球导航卫星系统服务器(UUID)(服务) |
QBluetoothUuid::ServiceClassUuid::Display3D | 0x1137 | 3D 同步显示器 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::Glasses3D | 0x1138 | 3D 同步眼镜 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::Synchronization3D | 0x1139 | 3D 同步 UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::MPSProfile | 0x113a | 多配置文件规范 UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::MPSService | 0x113b | 多配置文件规范 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::PnPInformation | 0x1200 | 设备识别 (DID) UUID(服务和配置文件) |
QBluetoothUuid::ServiceClassUuid::GenericNetworking | 0x1201 | 通用网络 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::GenericFileTransfer | 0x1202 | 通用文件传输 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::GenericAudio | 0x1203 | 通用音频 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::GenericTelephony | 0x1204 | 通用电话 UUID(服务) |
QBluetoothUuid::ServiceClassUuid::VideoSource | 0x1303 | 视频分发配置文件(VDP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::VideoSink | 0x1304 | 视频分发配置文件(VDP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::VideoDistribution | 0x1305 | 视频分发配置文件(VDP)UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::HDP | 0x1400 | 健康设备配置文件 (HDP) UUID(配置文件) |
QBluetoothUuid::ServiceClassUuid::HDPSource | 0x1401 | 健康设备配置文件源 (HDP) UUID(服务) |
QBluetoothUuid::ServiceClassUuid::HDPSink | 0x1402 | 健康设备配置文件汇(HDP)UUID(服务) |
QBluetoothUuid::ServiceClassUuid::GenericAccess | 0x1800 | 蓝牙低功耗设备 UUID(服务)的通用访问服务。它包含有关设备的通用信息。所有可用特性均为只读。 |
QBluetoothUuid::ServiceClassUuid::GenericAttribute | 0x1801 | |
QBluetoothUuid::ServiceClassUuid::ImmediateAlert | 0x1802 | 即时警报 UUID(服务)。该服务提供一个控制点,允许对等设备立即发出警报。 |
QBluetoothUuid::ServiceClassUuid::LinkLoss | 0x1803 | 链路丢失 UUID(服务)。该服务定义两个设备之间链路丢失时的行为。 |
QBluetoothUuid::ServiceClassUuid::TxPower | 0x1804 | 传输功率 UUID(服务)。该服务公开设备在连接时的当前传输功率级别。 |
QBluetoothUuid::ServiceClassUuid::CurrentTimeService | 0x1805 | 当前时间 UUID(服务)。该服务定义如何使用通用属性配置文件(GATT)公开当前时间。 |
QBluetoothUuid::ServiceClassUuid::ReferenceTimeUpdateService | 0x1806 | 参考时间更新 UUID(服务)。该服务定义了客户端如何从时间服务器的参考时间源请求更新。 |
QBluetoothUuid::ServiceClassUuid::NextDSTChangeService | 0x1807 | 下一个夏令时变化 UUID(服务)。该服务定义了如何公开即将到来的夏令时变化信息。 |
QBluetoothUuid::ServiceClassUuid::Glucose | 0x1808 | 葡萄糖 UUID(服务)。该服务公开葡萄糖和葡萄糖传感器的其他数据,供消费者和专业医疗保健应用使用。 |
QBluetoothUuid::ServiceClassUuid::HealthThermometer | 0x1809 | 健康温度计 UUID(服务)。健康温度计服务公开温度计的温度和其他数据,供医疗保健和健身应用使用。 |
QBluetoothUuid::ServiceClassUuid::DeviceInformation | 0x180a | 设备信息 UUID(服务)。设备信息服务公开设备的制造商和/或供应商信息。 |
QBluetoothUuid::ServiceClassUuid::HeartRate | 0x180d | 心率 UUID(服务)。该服务公开健身应用中心率传感器的心率和其他数据。 |
QBluetoothUuid::ServiceClassUuid::PhoneAlertStatusService | 0x180e | 手机警报状态 UUID(服务)。该服务公开连接中的手机警报状态。 |
QBluetoothUuid::ServiceClassUuid::BatteryService | 0x180f | 电池 UUID(服务)。电池服务公开设备内电池的状态。 |
QBluetoothUuid::ServiceClassUuid::BloodPressure | 0x1810 | 血压 UUID(服务)。该服务公开血压计的血压和其他数据,用于医疗保健应用。 |
QBluetoothUuid::ServiceClassUuid::AlertNotificationService | 0x1811 | 警报通知 UUID(服务)。警报通知服务公开设备上的警报信息。 |
QBluetoothUuid::ServiceClassUuid::HumanInterfaceDevice | 0x1812 | 人机界面 UUID(服务)。该服务公开 HID 报告和其他 HID 数据,供 HID 主机和 HID 设备使用。 |
QBluetoothUuid::ServiceClassUuid::ScanParameters | 0x1813 | 扫描参数 UUID(服务)。扫描参数服务使 GATT 服务器设备能够公开 GATT 客户端的特征,以便在 GATT 服务器设备上写入扫描间隔和扫描窗口。 |
QBluetoothUuid::ServiceClassUuid::RunningSpeedAndCadence | 0x1814 | 运行速度和节奏 UUID(服务)。该服务用于公开跑步速度和步频传感器的速度、步频和其他数据,供健身应用使用。 |
QBluetoothUuid::ServiceClassUuid::CyclingSpeedAndCadence | 0x1816 | 自行车速度和步频 UUID(服务)。该服务公开健身应用中自行车速度和步频传感器提供的速度和步频相关数据。 |
QBluetoothUuid::ServiceClassUuid::CyclingPower | 0x1818 | 骑行速度 UUID(服务)。该服务公开来自自行车功率传感器的功率和力相关数据以及速度和步频相关数据,用于运动和健身应用。 |
QBluetoothUuid::ServiceClassUuid::LocationAndNavigation | 0x1819 | 位置导航 UUID(服务)。该服务公开来自位置和导航传感器的位置和导航相关数据,用于户外活动应用。 |
QBluetoothUuid::ServiceClassUuid::EnvironmentalSensing | 0x181a | 环境传感器 UUID(服务)。该服务公开来自环境传感器的数据,用于运动和健身应用。 |
QBluetoothUuid::ServiceClassUuid::BodyComposition | 0x181b | 身体成分 UUID(服务)。该服务公开身体成分数据,用于消费者保健应用。 |
QBluetoothUuid::ServiceClassUuid::UserData | 0x181c | 用户数据 UUID(服务)。用户数据服务提供与用户相关的数据,如运动和健身环境中的姓名、性别或体重。 |
QBluetoothUuid::ServiceClassUuid::WeightScale | 0x181d | 体重计 UUID(服务)。体重秤服务为消费者医疗保健、体育和健身应用提供体重秤的相关数据。 |
QBluetoothUuid::ServiceClassUuid::BondManagement | 0x181e | 债券管理 UUID(服务)。债券管理服务使用户能够管理蓝牙设备上债券信息的存储。 |
QBluetoothUuid::ServiceClassUuid::ContinuousGlucoseMonitoring | 0x181f | 连续葡萄糖监测 UUID(服务)。连续葡萄糖监测服务可公开来自监测传感器的葡萄糖数据,供医疗保健应用使用。 |
成员函数文档
[constexpr noexcept]
QBluetoothUuid::QBluetoothUuid()
创建一个新的 null 蓝牙 UUID。
[constexpr noexcept]
QBluetoothUuid::QBluetoothUuid(QBluetoothUuid::CharacteristicType uuid)
利用特征类型uuid 构建新的蓝牙 UUID。
[constexpr noexcept]
QBluetoothUuid::QBluetoothUuid(QBluetoothUuid::DescriptorType uuid)
利用描述符类型uuid 构建新的蓝牙 UUID。
[constexpr noexcept]
QBluetoothUuid::QBluetoothUuid(QBluetoothUuid::ProtocolUuid uuid)
根据协议uuid 构建新的蓝牙 UUID。
[constexpr noexcept]
QBluetoothUuid::QBluetoothUuid(QBluetoothUuid::ServiceClassUuid uuid)
从服务类uuid 构建一个新的蓝牙 UUID。
QBluetoothUuid::QBluetoothUuid(const QUuid &uuid)
构建一个新的蓝牙 UUID,它是uuid 的副本。
[explicit constexpr noexcept]
QBluetoothUuid::QBluetoothUuid(quint16 uuid)
利用 16 位uuid 构建新的蓝牙 UUID。
[explicit constexpr noexcept]
QBluetoothUuid::QBluetoothUuid(quint32 uuid)
根据 32 位uuid 构建新的蓝牙 UUID。
[default, since 6.6]
QBluetoothUuid::QBluetoothUuid(QUuid::Id128Bytes uuid, QSysInfo::Endian order)
从由积分uuid 参数表示的 128 位uuid 中构造一个新的蓝牙 UUID,并遵守字节顺序order 。
该函数在 Qt 6.6 中引入。
[explicit noexcept]
QBluetoothUuid::QBluetoothUuid(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian)
根据 128 位uuid 构建新的蓝牙 UUID。
注: 在 6.6 之前的 Qt XML 版本中,没有order 参数,该函数被硬编码为 big-endian 顺序。
[static]
QString QBluetoothUuid::characteristicToString(QBluetoothUuid::CharacteristicType uuid)
返回由uuid 表示的给定特征类型的可读翻译名称。
另请参见 QBluetoothUuid::CharacteristicType 。
[static]
QString QBluetoothUuid::descriptorToString(QBluetoothUuid::DescriptorType uuid)
返回由uuid 表示的指定描述符类型的可读翻译名称。
另请参见 QBluetoothUuid::DescriptorType 。
[static, since 6.6]
QBluetoothUuid QBluetoothUuid::fromCBUUID(CBUUID *cbUuid)
构造一个新的QBluetoothUuid ,包含cbUuid CBUUID 的副本。
注意: 此函数仅适用于 Apple 平台。
此函数在 Qt 6.6 中引入。
int QBluetoothUuid::minimumSize() const
返回 UUID 所能表示的最小字节数。对于非空 UUID,返回 2、4 或 16。对于空 UUID,则返回 0。
另请参阅 isNull()、toUInt16() 和toUInt32()。
[static]
QString QBluetoothUuid::protocolToString(QBluetoothUuid::ProtocolUuid uuid)
返回由uuid 表示的给定协议的可读翻译名称。
另请参见 QBluetoothUuid::ProtocolUuid 。
[static, since Qt 5.4]
QString QBluetoothUuid::serviceClassToString(QBluetoothUuid::ServiceClassUuid uuid)
返回由uuid 表示的给定服务类的可读翻译名称。
此函数在 Qt 5.4 中引入。
另请参见 QBluetoothUuid::ServiceClassUuid 。
[since 6.6]
CBUUID *QBluetoothUuid::toCBUUID() const
从QBluetoothUuid 创建一个 CBUUID。
生成的 CBUUID 将自动释放。
注意: 此函数仅适用于 Apple 平台。
此函数在 Qt 6.6 中引入。
quint16 QBluetoothUuid::toUInt16(bool *ok = nullptr) const
返回该 UUID 的 16 位表示形式。如果传入ok ,如果可以转换,则设置为 true,否则设置为 false。如果ok 设置为 false,则返回值未定义。
quint32 QBluetoothUuid::toUInt32(bool *ok = nullptr) const
返回 UUID 的 32 位表示形式。如果传入ok ,如果可以转换,则设置为 true,否则设置为 false。如果ok 设置为 false,则返回值未定义。
[noexcept]
quint128 QBluetoothUuid::toUInt128(QSysInfo::Endian order = QSysInfo::BigEndian) const
以字节序返回 UUID 的 128 位表示order 。
注: 在 6.6 之前的 Qt XML 版本中,不存在order 参数,该函数被硬编码为按 big-endian 顺序返回。
相关非成员
bool operator!=(const QBluetoothUuid &a, const QBluetoothUuid &b)
如果a 不等于b ,则返回true
,否则返回false
。
bool operator==(const QBluetoothUuid &a, const QBluetoothUuid &b)
如果a 等于b ,则返回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.