QBluetoothUuid Class
QBluetoothUuid 类为每个蓝牙服务生成一个 UUID。更多内容...
| 头文件: | #include <QBluetoothUuid> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| qmake: | QT += bluetooth |
| 继承自: | 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) | |
| QBluetoothUuid(const QBluetoothUuid &uuid) | |
| ~QBluetoothUuid() | |
| 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 |
| QBluetoothUuid & | operator=(const QBluetoothUuid &other) |
静态公共成员
| 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) |
相关的非成员
(since 6.11.1) size_t | qHash(QBluetoothUuid key, size_t seed = 0) |
| 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 | 该特征描述了“身体成分测量”特征中可用的功能。 |
QBluetoothUuid::CharacteristicType::BodyCompositionMeasurement | 0x2a9c | 该特征描述了身体成分,例如肌肉百分比或体内水分质量。 |
QBluetoothUuid::CharacteristicType::BodySensorLocation | 0x2a38 | “身体传感器位置”特征描述了传感器在身体上的位置(例如:胸部、手指或手)。 |
QBluetoothUuid::CharacteristicType::BootKeyboardInputReport | 0x2a22 | “启动键盘输入报告”特征用于在以启动协议模式运行的 HID 主机与对应于启动键盘的 HID 服务之间传输固定格式和长度的输入报告数据。 |
QBluetoothUuid::CharacteristicType::BootKeyboardOutputReport | 0x2a32 | “Boot Keyboard Output Report” 特征用于在以 Boot 协议模式运行的 HID 主机与对应于启动键盘的 HID 服务之间传输固定格式和长度的输出报告数据。 |
QBluetoothUuid::CharacteristicType::BootMouseInputReport | 0x2a33 | “启动鼠标输入报告”特征用于在以启动协议模式运行的 HID 主机与对应于启动鼠标的 HID 服务之间传输固定格式和长度的输入报告数据。 |
QBluetoothUuid::CharacteristicType::CSCFeature | 0x2a5c | CSC(骑行速度和踏频)功能特征用于描述服务器支持的功能。 |
QBluetoothUuid::CharacteristicType::CSCMeasurement | 0x2a5b | CSC 测量特征(CSC 指骑行速度和踏频)是一个可变长度的结构,包含一个“标志”字段,并根据“标志”字段的内容,可能包含一个或多个附加字段,如下表所示。 |
QBluetoothUuid::CharacteristicType::CurrentTime | 0x2a2b | “当前时间”特征显示与“ExactTime256”特征相同的信息,以及有关时区、夏令时和所采用的更新方法的信息。 |
QBluetoothUuid::CharacteristicType::CyclingPowerControlPoint | 0x2a66 | “骑行功率控制点”特征用于请求在接收设备上执行特定功能。 |
QBluetoothUuid::CharacteristicType::CyclingPowerFeature | 0x2a65 | CP 功能特征用于报告设备支持的功能列表。 |
QBluetoothUuid::CharacteristicType::CyclingPowerMeasurement | 0x2a63 | “循环功率测量”特征是一个可变长度结构,包含一个“标志”字段和一个“瞬时功率”字段,并根据“标志”字段的内容,可能包含如下表所示的一个或多个附加字段。 |
QBluetoothUuid::CharacteristicType::CyclingPowerVector | 0x2a64 | “循环功率向量”特征是一个可变长度结构,包含一个“标志”字段,并根据“标志”字段的内容,可能包含一个或多个附加字段,如下表所示。 |
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 | “设备名称”特征包含设备的名称。 |
QBluetoothUuid::CharacteristicType::DewPoint | 0x2a7b | 该特征以摄氏度为单位表示露点。 |
QBluetoothUuid::CharacteristicType::DSTOffset | 0x2a0d | “夏令时偏移量”特征描述了夏令时所采用的偏移量。 |
QBluetoothUuid::CharacteristicType::Elevation | 0x2a6c | “海拔”特性表示海拔高度(高于或低于海平面)。 |
QBluetoothUuid::CharacteristicType::EmailAddress | 0x2a87 | 该特征给出了用户的电子邮件地址。 |
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 | “血糖功能”特征用于描述服务器支持的功能。读取“血糖功能”特征时,该特征将返回一个值,客户端可利用该值确定服务器支持的功能。 |
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 | “位置和速度”特征是一个可变长度的结构,包含一个“标志”字段,并根据“标志”字段的内容,可能包含一组数据字段。 |
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 | “测量间隔”特征定义了两次测量之间的时间间隔。 |
QBluetoothUuid::CharacteristicType::ModelNumberString | 0x2a24 | 该特征的值为一个 UTF-8 字符串,代表设备供应商分配的型号。 |
QBluetoothUuid::CharacteristicType::Navigation | 0x2a68 | “导航”特征是一个可变长度的结构,包含“标志”字段、“方位”字段和“航向”字段,并基于“标志”字段的内容。 |
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 | “协议模式”特征用于显示与其关联的 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”特性定义了 Ringer 的控制点。 |
QBluetoothUuid::CharacteristicType::RingerSetting | 0x2a41 | “振铃设置”特征定义了振铃的设置。 |
QBluetoothUuid::CharacteristicType::RSCFeature | 0x2a54 | RSC(跑步速度和步频)功能特征用于描述服务器支持的功能。 |
QBluetoothUuid::CharacteristicType::RSCMeasurement | 0x2a53 | RSC 是指跑步速度和步频。 |
QBluetoothUuid::CharacteristicType::SCControlPoint | 0x2a55 | SC 控制点特性用于请求在接收设备上执行特定功能。 |
QBluetoothUuid::CharacteristicType::ScanIntervalWindow | 0x2a4f | “扫描间隔窗口”特征用于存储 GATT 客户端的扫描参数。 |
QBluetoothUuid::CharacteristicType::ScanRefresh | 0x2a31 | “扫描刷新”特性用于通知客户端,服务器要求在收到通知后,将“扫描间隔窗口”特性写入最新值。 |
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 | 该特征包含 3 区心率定义中各心率区之间的界限。 |
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 | 该特征包含双区心率定义中各心率区间的阈值范围。 |
QBluetoothUuid::CharacteristicType::TxPowerLevel | 0x2a07 | 该特征的值为一个带符号的 8 位整数,其固定小数点指数为 0。 |
QBluetoothUuid::CharacteristicType::UnreadAlertStatus | 0x2a45 | 该属性显示设备中特定类别内未读提醒的数量。 |
QBluetoothUuid::CharacteristicType::UserControlPoint | 0x2a9f | |
QBluetoothUuid::CharacteristicType::UserIndex | 0x2a9a | 该特征表示用户的指数。 |
QBluetoothUuid::CharacteristicType::UVIndex | 0x2a76 | 该特性公开了紫外线指数。 |
QBluetoothUuid::CharacteristicType::VO2Max | 0x2a96 | 该特征公开了用户的最大氧摄取量。 |
QBluetoothUuid::CharacteristicType::WaistCircumference | 0x2a97 | 该特征表示用户的腰围(单位:米)。 |
QBluetoothUuid::CharacteristicType::Weight | 0x2a98 | 此属性公开用户的体重(单位:千克)。 |
QBluetoothUuid::CharacteristicType::WeightMeasurement | 0x2a9d | 此特征提供与体重相关的数据,例如 BMI 或用户的体重。 |
QBluetoothUuid::CharacteristicType::WeightScaleFeature | 0x2a9e | 此特征描述了“WeightMeasurement”特征中可用的数据。 |
QBluetoothUuid::CharacteristicType::WindChill | 0x2a79 | 该特征给出了风寒指数(单位:摄氏度) |
enum class QBluetoothUuid::DescriptorType
描述符是用于描述蓝牙低功耗(Bluetooth Low Energy)特征值的属性。
此枚举是描述符类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()
构建一个新的空蓝牙 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 是uuid 的副本。
[explicit constexpr noexcept] QBluetoothUuid::QBluetoothUuid(quint16 uuid)
根据16位uuid 生成一个新的蓝牙UUID。
[explicit constexpr noexcept] QBluetoothUuid::QBluetoothUuid(quint32 uuid)
根据 32 位的uuid 生成一个新的蓝牙 UUID。
[implicit, since 6.6] QBluetoothUuid::QBluetoothUuid(QUuid::Id128Bytes uuid, QSysInfo::Endian order)
根据整数参数uuid 所表示的 128 位uuid ,并遵循字节顺序order ,构建一个新的蓝牙 UUID。
该函数在 Qt 6.6 中引入。
[explicit noexcept] QBluetoothUuid::QBluetoothUuid(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian)
根据一个 128 位的uuid 构建一个新的蓝牙 UUID。
注意:在 Qt 6.6 之前的版本中,不存在order 参数,且该函数默认采用大端序。
[constexpr noexcept default] QBluetoothUuid::QBluetoothUuid(const QBluetoothUuid &uuid)
复制并构造一个QBluetoothUuid 实例。
[constexpr noexcept default] QBluetoothUuid::~QBluetoothUuid()
销毁QBluetoothUuid 的实例。
[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 。
注意:在 Qt 6.6 之前的版本中,不存在order 参数,且该函数被硬编码为以大端序返回。
[constexpr noexcept default] QBluetoothUuid &QBluetoothUuid::operator=(const QBluetoothUuid &other)
将other 复制并赋值给此QBluetoothUuid 实例。
相关的非成员
[noexcept, since 6.11.1] size_t qHash(QBluetoothUuid key, size_t seed = 0)
返回key 的哈希值,并使用seed 作为计算的种子。
在 Qt 6.11.1 之前的版本中,该类型可通过其对QUuid 的隐式转换实现可哈希性。此显式的 qHash() 重载与该隐式 qHash() 保持兼容。
该函数在 Qt 6.11.1 中引入。
bool operator!=(const QBluetoothUuid &a, const QBluetoothUuid &b)
如果 `a ` 不等于 `b`,则返回 `true `;否则返回 `false`。
bool operator==(const QBluetoothUuid &a, const QBluetoothUuid &b)
如果a 等于b ,则返回true ;否则返回false 。
© 2026 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.