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::AerobicHeartRateLowerLimit0x2a7e用户运动时提高耐力的心率下限。
QBluetoothUuid::CharacteristicType::AerobicHeartRateUpperLimit0x2a84用户运动时提高耐力的心率上限。
QBluetoothUuid::CharacteristicType::AerobicThreshold0x2a7f该特征表示第一个代谢阈值。
QBluetoothUuid::CharacteristicType::Age0x2a80该特征表示用户的年龄。
QBluetoothUuid::CharacteristicType::AnaerobicHeartRateLowerLimit0x2a81用户在运动时提高无氧耐受力的心率下限。
QBluetoothUuid::CharacteristicType::AnaerobicHeartRateUpperLimit0x2a82用户在运动时提高无氧耐受力的心率上限。
QBluetoothUuid::CharacteristicType::AnaerobicThreshold0x2a83该特性说明了第二代谢阈值。
QBluetoothUuid::CharacteristicType::AlertCategoryID0x2a43警报/信息类别。
QBluetoothUuid::CharacteristicType::AlertCategoryIDBitMask0x2a42警报/信息类别。
QBluetoothUuid::CharacteristicType::AlertLevel0x2a06设备发出警报的级别。如果在警报响起时更改了该级别,新级别将生效。
QBluetoothUuid::CharacteristicType::AlertNotificationControlPoint0x2a44警报通知服务器的控制点。客户端可以在此写入命令,请求服务器提供多种功能。
QBluetoothUuid::CharacteristicType::AlertStatus0x2a3f警报状态特性定义警报的状态。
QBluetoothUuid::CharacteristicType::ApparentWindDirection0x2a73该特性显示视风向。视风向是运动中的观察者所感受到的风向。该特性以相对于观察者航向的顺时针角度表示风向。
QBluetoothUuid::CharacteristicType::ApparentWindSpeed0x2a72该特性以米/秒为单位显示视风速。观察者在运动中感受到的风速。
QBluetoothUuid::CharacteristicType::Appearance0x2a01该设备的外观。数值由类别(10 位)和子类别(6 位)组成。
QBluetoothUuid::CharacteristicType::BarometricPressureTrend0x2aa3该特性显示气压的变化趋势。
QBluetoothUuid::CharacteristicType::BatteryLevel0x2a19电池的当前电量。100% 表示完全充电,0% 表示完全放电。
QBluetoothUuid::CharacteristicType::BloodPressureFeature0x2a49血压特征特性用于描述血压传感器支持的特征。
QBluetoothUuid::CharacteristicType::BloodPressureMeasurement0x2a35血压测量特性是一个长度可变的结构,包含一个标志字段、一个血压测量复合值字 段,以及由标志字段内容决定的时间戳、脉搏率和用户 ID 等附加字段。
QBluetoothUuid::CharacteristicType::BodyCompositionFeature0x2a9b该特征描述了 BodyCompositionMeasurement 特征中的可用功能。
QBluetoothUuid::CharacteristicType::BodyCompositionMeasurement0x2a9c该特征描述了身体成分,如肌肉百分比或身体水分质量。
QBluetoothUuid::CharacteristicType::BodySensorLocation0x2a38身体传感器位置特征描述传感器在身体上的位置(例如:胸部、手指或手)。
QBluetoothUuid::CharacteristicType::BootKeyboardInputReport0x2a22引导键盘输入报告特征用于在引导协议模式下运行的 HID 主机和与引导键盘相对应的 HID 服务之间传输固定格式和长度的输入报告数据。
QBluetoothUuid::CharacteristicType::BootKeyboardOutputReport0x2a32启动键盘输出报告特性用于在启动协议模式下运行的 HID 主机和与启动键盘相对应的 HID 服务之间传输固定格式和长度的输出报告数据。
QBluetoothUuid::CharacteristicType::BootMouseInputReport0x2a33引导鼠标输入报告特性用于在引导协议模式下运行的 HID 主机和与引导鼠标相对应的 HID 服务之间传输固定格式和长度的输入报告数据。
QBluetoothUuid::CharacteristicType::CSCFeature0x2a5cCSC(骑行速度和步频)特性用于描述服务器支持的特性。
QBluetoothUuid::CharacteristicType::CSCMeasurement0x2a5bCSC 测量特性(CSC 指骑行速度和步频)是一个长度可变的结构,包含一个标志字段,并根据标志字段的内容,可能包含一个或多个附加字段,如下表所示。
QBluetoothUuid::CharacteristicType::CurrentTime0x2a2b当前时间特性显示与 ExactTime256 特性相同的信息,以及有关时区、DST 和所采用的更新方法的信息。
QBluetoothUuid::CharacteristicType::CyclingPowerControlPoint0x2a66循环功率控制点特性用于请求在接收设备上执行特定功能。
QBluetoothUuid::CharacteristicType::CyclingPowerFeature0x2a65CP 特性用于报告设备支持的特性列表。
QBluetoothUuid::CharacteristicType::CyclingPowerMeasurement0x2a63循环功率测量特性是一个长度可变的结构,包含一个标志字段和一个瞬时功率字段,并可根据标志字段的内容包含一个或多个附加字段,如下表所示。
QBluetoothUuid::CharacteristicType::CyclingPowerVector0x2a64循环功率矢量(Cycling Power Vector)特性是一个长度可变的结构,包含一个标志(Flags)字段,并可根据标志字段的内容包含一个或多个附加字段,如下表所示。
QBluetoothUuid::CharacteristicType::DatabaseChangeIncrement0x2a99
QBluetoothUuid::CharacteristicType::DateOfBirth0x2a85该特征表示用户的出生日期。
QBluetoothUuid::CharacteristicType::DateOfThresholdAssessment0x2a86
QBluetoothUuid::CharacteristicType::DateTime0x2a08日期时间特性用于表示时间。
QBluetoothUuid::CharacteristicType::DayDateTime0x2a0a日期时间特征表示日期、时间和星期。
QBluetoothUuid::CharacteristicType::DayOfWeek0x2a09星期特征描述一周中的哪一天(周一至周日)。
QBluetoothUuid::CharacteristicType::DescriptorValueChanged0x2a7d该特性与环境传感服务有关。
QBluetoothUuid::CharacteristicType::DeviceName0x2a00设备名称(Device Name)特性包含设备名称。
QBluetoothUuid::CharacteristicType::DewPoint0x2a7b露点(摄氏度) 该特性描述露点(摄氏度)。
QBluetoothUuid::CharacteristicType::DSTOffset0x2a0dDST 偏移(DST Offset)特性描述夏令时使用的偏移量。
QBluetoothUuid::CharacteristicType::Elevation0x2a6c海拔高度(Elevation)特性说明海拔高度(高于/低于海平面)。
QBluetoothUuid::CharacteristicType::EmailAddress0x2a87电子邮件(Email) 该特性描述了用户的电子邮件。
QBluetoothUuid::CharacteristicType::ExactTime2560x2a0c精确时间 256 特性描述了数据、日期和时间,精确度为 1/256 秒。
QBluetoothUuid::CharacteristicType::FatBurnHeartRateLowerLimit0x2a88用户运动时最大限度燃烧脂肪的心率下限。
QBluetoothUuid::CharacteristicType::FatBurnHeartRateUpperLimit0x2a89用户运动时最大限度燃烧脂肪的心率上限。
QBluetoothUuid::CharacteristicType::FirmwareRevisionString0x2a26该特性的值是一个 UTF-8 字符串,代表设备内固件的固件版本。
QBluetoothUuid::CharacteristicType::FirstName0x2a8a此特征显示用户的名字。
QBluetoothUuid::CharacteristicType::FiveZoneHeartRateLimits0x2a8b该特征包含 5 区心率定义的心率区之间的界限。
QBluetoothUuid::CharacteristicType::Gender0x2a8c该特征说明了用户的性别。
QBluetoothUuid::CharacteristicType::GlucoseFeature0x2a51Glucose Feature(葡萄糖特征)特征用于描述服务器支持的特征。读取时,"葡萄糖特征 "特征会返回一个值,客户端可使用该值确定服务器支持的特征。
QBluetoothUuid::CharacteristicType::GlucoseMeasurement0x2a18葡萄糖测量特性是一个长度可变的结构,包含一个标志字段、一个序列号字段、一个基 准时间字段,并根据标志字段的内容,可能包含一个时间偏移字段、葡萄糖浓度字段、 类型-采样位置字段和一个传感器状态报警字段。
QBluetoothUuid::CharacteristicType::GlucoseMeasurementContext0x2a34
QBluetoothUuid::CharacteristicType::GustFactor0x2a74该特性表示平均风速与最大阵风风速之间的风速增加系数。
QBluetoothUuid::CharacteristicType::HardwareRevisionString0x2a27该特性的值是一个 UTF-8 字符串,代表设备内硬件的硬件版本。
QBluetoothUuid::CharacteristicType::MaximumRecommendedHeartRate0x2a91该特性显示了限制用力的最大推荐心率。
QBluetoothUuid::CharacteristicType::HeartRateControlPoint0x2a39
QBluetoothUuid::CharacteristicType::HeartRateMax0x2a8d该特性以每分钟心跳次数为单位说明用户可达到的最大心率。
QBluetoothUuid::CharacteristicType::HeartRateMeasurement0x2a37
QBluetoothUuid::CharacteristicType::HeatIndex0x2a7a该特性以摄氏度为单位提供热指数。
QBluetoothUuid::CharacteristicType::Height0x2a8e该特性显示用户的身高。
QBluetoothUuid::CharacteristicType::HIDControlPoint0x2a4cHID 控制点特性是一个控制点属性,用于定义写入时的 HID 命令。
QBluetoothUuid::CharacteristicType::HIDInformation0x2a4aHID 信息特征在读取时返回 HID 属性。
QBluetoothUuid::CharacteristicType::HipCircumference0x2a8f该特性以米为单位显示用户的臀围。
QBluetoothUuid::CharacteristicType::Humidity0x2a6f该特征以百分比为单位说明湿度。
QBluetoothUuid::CharacteristicType::IEEE1107320601RegulatoryCertificationDataList0x2a2a该特性的值是一个不透明结构,列出了设备声称遵守的各种法规和/或认证合规项目。
QBluetoothUuid::CharacteristicType::IntermediateCuffPressure0x2a36该特性的格式与血压测量特性相同。
QBluetoothUuid::CharacteristicType::IntermediateTemperature0x2a1e中间温度特性的格式与温度测量特性相同。
QBluetoothUuid::CharacteristicType::Irradiance0x2a77该特性以每平方米瓦特为单位说明电磁辐射功率。
QBluetoothUuid::CharacteristicType::Language0x2aa2该特性包含基于 ISO639-1 的语言定义。
QBluetoothUuid::CharacteristicType::LastName0x2a90该特性包含用户姓氏。
QBluetoothUuid::CharacteristicType::LNControlPoint0x2a6bLN 控制点特性用于请求在接收设备上执行特定功能。
QBluetoothUuid::CharacteristicType::LNFeature0x2a6aLN 特征用于报告设备支持的特征列表。
QBluetoothUuid::CharacteristicType::LocalTimeInformation0x2a0f
QBluetoothUuid::CharacteristicType::LocationAndSpeed0x2a67位置和速度特性是一个长度可变的结构,包含一个 Flags 字段,根据 Flags 字段的内容,可能包含多个数据字段的组合。
QBluetoothUuid::CharacteristicType::MagneticDeclination0x2a2c该特性包含(地理)真北方向和磁北方向在水平面上的夹角,从真北方向到磁北方向顺时针方向测量。
QBluetoothUuid::CharacteristicType::MagneticFluxDensity2D0x2aa0该特征表示 x 轴和 y 轴上的磁通密度。
QBluetoothUuid::CharacteristicType::MagneticFluxDensity3D0x2aa1该特性表示 x、y 和 z 轴上的磁通密度。
QBluetoothUuid::CharacteristicType::ManufacturerNameString0x2a29该特性的值是一个 UTF-8 字符串,代表设备制造商的名称。
QBluetoothUuid::CharacteristicType::MeasurementInterval0x2a21测量间隔(Measurement Interval)特性定义了两次测量之间的时间间隔。
QBluetoothUuid::CharacteristicType::ModelNumberString0x2a24该特性的值是一个 UTF-8 字符串,代表设备供应商分配的型号。
QBluetoothUuid::CharacteristicType::Navigation0x2a68导航(Navigation)特性是一个长度可变的结构,包含一个标志(Flags)字段、一个方位(Bearing)字段、一个标题(Heading)字段,并根据标志字段的内容进行定义。
QBluetoothUuid::CharacteristicType::NewAlert0x2a46该特征定义了警报的类别,以及服务器设备中出现了多少个该类别的新警报。
QBluetoothUuid::CharacteristicType::PeripheralPreferredConnectionParameters0x2a04
QBluetoothUuid::CharacteristicType::PeripheralPrivacyFlag0x2a02
QBluetoothUuid::CharacteristicType::PnPID0x2a50使用 GATT 特征值读取程序读取时,PnP_ID 特征会返回其值。
QBluetoothUuid::CharacteristicType::PollenConcentration0x2a75该特性显示每立方米的花粉浓度计数。
QBluetoothUuid::CharacteristicType::PositionQuality0x2a69位置质量特性是一个长度可变的结构,包含一个标志字段和至少一个可选数据。
QBluetoothUuid::CharacteristicType::Pressure0x2a6d压力特性说明压力传感器的值。
QBluetoothUuid::CharacteristicType::ProtocolMode0x2a4e协议模式(Protocol Mode)特性用于显示与之关联的 HID 服务的当前协议模式,或设置 HID 服务所需的协议模式。
QBluetoothUuid::CharacteristicType::Rainfall0x2a78该特性以米为单位显示降雨量。
QBluetoothUuid::CharacteristicType::ReconnectionAddress0x2a03本页包含的信息仅供参考。规范性说明包含在适用的规范中。
QBluetoothUuid::CharacteristicType::RecordAccessControlPoint0x2a52该控制点与服务一起使用,为葡萄糖传感器患者记录数据库提供基本管理功能。
QBluetoothUuid::CharacteristicType::ReferenceTimeInformation0x2a14
QBluetoothUuid::CharacteristicType::Report0x2a4d报告特性用于在 HID 设备和 HID 主机之间交换数据。
QBluetoothUuid::CharacteristicType::ReportMap0x2a4b作为 HID 服务的一部分,该特性只存在一个实例。
QBluetoothUuid::CharacteristicType::RestingHeartRate0x2a92该特性可显示用户可达到的最低心率。
QBluetoothUuid::CharacteristicType::RingerControlPoint0x2a40铃声控制点(Ringer Control Point)特性定义了铃声的控制点。
QBluetoothUuid::CharacteristicType::RingerSetting0x2a41Ringer Setting(铃声设置)特性定义铃声的设置。
QBluetoothUuid::CharacteristicType::RSCFeature0x2a54RSC(跑步速度和步频)特性用于描述服务器支持的特性。
QBluetoothUuid::CharacteristicType::RSCMeasurement0x2a53RSC 指的是运行速度和步调。
QBluetoothUuid::CharacteristicType::SCControlPoint0x2a55SC 控制点特性用于请求在接收设备上执行特定功能。
QBluetoothUuid::CharacteristicType::ScanIntervalWindow0x2a4f扫描间隔窗口特性用于存储 GATT 客户端的扫描参数。
QBluetoothUuid::CharacteristicType::ScanRefresh0x2a31Scan Refresh(扫描刷新)特性用于通知客户端,服务器要求在收到通知后用最新值写入 Scan Interval Window(扫描间隔窗口)特性。
QBluetoothUuid::CharacteristicType::SensorLocation0x2a5d传感器位置 "特性用于显示传感器的位置。
QBluetoothUuid::CharacteristicType::SerialNumberString0x2a25该特性的值是一个长度可变的 UTF-8 字符串,代表设备特定实例的序列号。
QBluetoothUuid::CharacteristicType::ServiceChanged0x2a05
QBluetoothUuid::CharacteristicType::SoftwareRevisionString0x2a28该特性的值是一个 UTF-8 字符串,代表设备内软件的软件版本。
QBluetoothUuid::CharacteristicType::SportTypeForAerobicAnaerobicThresholds0x2a93此特征用于根据要进行的运动类型预设各种有氧和无氧阈值特征。
QBluetoothUuid::CharacteristicType::SupportedNewAlertCategory0x2a47服务器支持的新警报类别。
QBluetoothUuid::CharacteristicType::SupportedUnreadAlertCategory0x2a48服务器支持的未读警报类别。
QBluetoothUuid::CharacteristicType::SystemID0x2a23如果系统 ID 基于蓝牙设备地址,公司标识符 (OUI) 为 0x123456,公司指定标识符为 0x9ABCDE,则系统标识符必须为 0x123456FFFE9ABCDE。
QBluetoothUuid::CharacteristicType::Temperature0x2a6e该特性的值表示以摄氏度为单位的温度。
QBluetoothUuid::CharacteristicType::TemperatureMeasurement0x2a1c温度测量特性是一个长度可变的结构,包含一个标志字段、一个温度测量值字段,以及根据标志字段的内容可选的时间戳字段和/或温度类型字段。
QBluetoothUuid::CharacteristicType::TemperatureType0x2a1d温度类型 "特性是一个枚举,表示温度测量的位置。
QBluetoothUuid::CharacteristicType::ThreeZoneHeartRateLimits0x2a94该特征包含三区心率定义的心率区之间的界限。
QBluetoothUuid::CharacteristicType::TimeAccuracy0x2a12
QBluetoothUuid::CharacteristicType::TimeSource0x2a13
QBluetoothUuid::CharacteristicType::TimeUpdateControlPoint0x2a16
QBluetoothUuid::CharacteristicType::TimeUpdateState0x2a17
QBluetoothUuid::CharacteristicType::TimeWithDST0x2a11
QBluetoothUuid::CharacteristicType::TimeZone0x2a0e
QBluetoothUuid::CharacteristicType::TrueWindDirection0x2a71风向特征 该特征表示风向,测量角度为相对于(地理)真北方顺时针方向。东风的风向为 90 度。
QBluetoothUuid::CharacteristicType::TrueWindSpeed0x2a70该特征表示风速,单位为米/秒。
QBluetoothUuid::CharacteristicType::TwoZoneHeartRateLimits0x2a95该特性包含 2 区心率定义的心率区之间的界限。
QBluetoothUuid::CharacteristicType::TxPowerLevel0x2a07特征值是一个带符号的 8 位整数,定点指数为 0。
QBluetoothUuid::CharacteristicType::UnreadAlertStatus0x2a45该特性显示设备中特定类别的未读警报数量。
QBluetoothUuid::CharacteristicType::UserControlPoint0x2a9f
QBluetoothUuid::CharacteristicType::UserIndex0x2a9a该特征表示用户的索引。
QBluetoothUuid::CharacteristicType::UVIndex0x2a76该特性显示 UV 指数。
QBluetoothUuid::CharacteristicType::VO2Max0x2a96该特征显示用户的最大摄氧量。
QBluetoothUuid::CharacteristicType::WaistCircumference0x2a97该特征表示用户的腰围(以米为单位)。
QBluetoothUuid::CharacteristicType::Weight0x2a98该特征显示用户的体重(公斤)。
QBluetoothUuid::CharacteristicType::WeightMeasurement0x2a9d该特征提供体重相关数据,如体重指数或用户体重。
QBluetoothUuid::CharacteristicType::WeightScaleFeature0x2a9e该特性描述了 WeightMeasurement(体重测量)特性中的可用数据。
QBluetoothUuid::CharacteristicType::WindChill0x2a79风寒值(摄氏度) 该特性描述了风寒值(摄氏度)。

enum class QBluetoothUuid::DescriptorType

描述符是描述蓝牙低功耗特性值的属性。

该枚举是描述符类 UUID 的便利类型。必要时,该类型的值将隐式转换为QBluetoothUuid 。详细的类型规范可在bluetooth.org 上找到。

常量描述
QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties0x2900描述符定义附加特性属性。QLowEnergyCharacteristic::ExtendedProperty 标志表示存在该描述符。
QBluetoothUuid::DescriptorType::CharacteristicUserDescription0x2901描述符为特性值提供文本用户描述。
QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration0x2902描述符定义了特定客户端如何配置特性。
QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration0x2903描述符定义服务器如何配置与特性描述符相关联的特性。
QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat0x2904描述符定义了特征值的格式。
QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat0x2905描述符定义聚合特征值的格式。
QBluetoothUuid::DescriptorType::ValidRange0x2906描述符用于定义特征的范围。其中包含两个定义范围的必填字段(上界和下界)。
QBluetoothUuid::DescriptorType::ExternalReportReference0x2907允许 HID 主机将输入报告、输出报告或特征报告数据的报告映射特征值信息映射到用于传输相关数据的外部服务特征的特征 UUID。
QBluetoothUuid::DescriptorType::ReportReference0x2908报告 ID 和报告类型形式的映射信息可将当前父特性映射到报告映射表特性中定义的报告 ID 和报告类型。
QBluetoothUuid::DescriptorType::EnvironmentalSensingConfiguration0x290b描述符定义多个触发设置描述符的组合方式。因此,该描述符可与 EnvironmentalSensingTriggerSetting(环境传感触发设置)描述符配合使用,以定义可通知相关特征值的条件。
QBluetoothUuid::DescriptorType::EnvironmentalSensingMeasurement0x290c描述符定义环境传感服务器的附加信息,如预期应用、采样功能或测量周期和不确定 性。
QBluetoothUuid::DescriptorType::EnvironmentalSensingTriggerSetting0x290d描述符定义了环境传感服务器(ESS)应在哪些条件下触发通知。这些条件包括达到特定阈值或计时器过期。这意味着 ESS 特性支持通知。
QBluetoothUuid::DescriptorType::UnknownDescriptorType0x0描述符类型未知。

enum class QBluetoothUuid::ProtocolUuid

该枚举是蓝牙协议 UUID 的便利类型。必要时,该类型的值将隐式转换为QBluetoothUuid

常量描述
QBluetoothUuid::ProtocolUuid::Sdp0x0001SDP 协议 UUID
QBluetoothUuid::ProtocolUuid::Udp0x0002UDP 协议 UUID
QBluetoothUuid::ProtocolUuid::Rfcomm0x0003RFCOMM 协议 UUID
QBluetoothUuid::ProtocolUuid::Tcp0x0004TCP 协议 UUID
QBluetoothUuid::ProtocolUuid::TcsBin0x0005电话控制规范 UUID
QBluetoothUuid::ProtocolUuid::TcsAt0x0006电话控制规范 AT UUID
QBluetoothUuid::ProtocolUuid::Att0x0007属性协议 UUID
QBluetoothUuid::ProtocolUuid::Obex0x0008OBEX 协议 UUID
QBluetoothUuid::ProtocolUuid::Ip0x0009IP 协议 UUID
QBluetoothUuid::ProtocolUuid::Ftp0x000AFTP 协议 UUID
QBluetoothUuid::ProtocolUuid::Http0x000CHTTP 协议 UUID
QBluetoothUuid::ProtocolUuid::Wsp0x000EWSP UUID
QBluetoothUuid::ProtocolUuid::Bnep0x000F蓝牙网络封装协议 UUID
QBluetoothUuid::ProtocolUuid::Upnp0x0010扩展服务发现配置文件 UUID
QBluetoothUuid::ProtocolUuid::Hidp0x0011人机接口设备配置文件 UUID
QBluetoothUuid::ProtocolUuid::HardcopyControlChannel0x0012硬拷贝电缆更换配置文件 UUID
QBluetoothUuid::ProtocolUuid::HardcopyDataChannel0x0014硬拷贝电缆更换配置文件 UUID
QBluetoothUuid::ProtocolUuid::HardcopyNotification0x0016硬拷贝电缆更换配置文件 UUID
QBluetoothUuid::ProtocolUuid::Avctp0x0017音视频控制传输协议 UUID
QBluetoothUuid::ProtocolUuid::Avdtp0x0019音频/视频分配传输协议 UUID
QBluetoothUuid::ProtocolUuid::Cmtp0x001B通用 ISDN 接入配置文件
QBluetoothUuid::ProtocolUuid::UdiCPlain0x001DUDI 协议 UUID
QBluetoothUuid::ProtocolUuid::McapControlChannel0x001E多通道适配协议 UUID
QBluetoothUuid::ProtocolUuid::McapDataChannel0x001F多通道适配协议 UUID
QBluetoothUuid::ProtocolUuid::L2cap0x0100L2CAP 协议 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::ServiceDiscoveryServer0x1000服务发现服务器 UUID(服务)
QBluetoothUuid::ServiceClassUuid::BrowseGroupDescriptor0x1001浏览组描述符(服务)
QBluetoothUuid::ServiceClassUuid::PublicBrowseGroup0x1002公共浏览组服务类别。browse group list 中包含公共浏览组的服务可被远程设备发现。
QBluetoothUuid::ServiceClassUuid::SerialPort0x1101串行端口配置文件 UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::LANAccessUsingPPP0x1102局域网访问配置文件 UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::DialupNetworking0x1103拨号网络配置文件 UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::IrMCSync0x1104同步配置文件 UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::ObexObjectPush0x1105OBEX 对象推送服务 UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::OBEXFileTransfer0x1106文件传输配置文件(FTP)UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::IrMCSyncCommand0x1107同步配置文件 UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::Headset0x1108耳机配置文件(HSP)UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::AudioSource0x110a高级音频分配规范 (A2DP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::AudioSink0x110b高级音频分配规范(A2DP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::AV_RemoteControlTarget0x110c音频/视频远程控制配置文件(AVRCP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::AdvancedAudioDistribution0x110d高级音频分配规范 (A2DP) UUID(规范)
QBluetoothUuid::ServiceClassUuid::AV_RemoteControl0x110e音频/视频远程控制配置文件 (AVRCP) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::AV_RemoteControlController0x110f音频/视频远程控制规范 UUID(服务)
QBluetoothUuid::ServiceClassUuid::HeadsetAG0x1112耳机规范 (HSP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::PANU0x1115个人区域网络配置文件 (PAN) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::NAP0x1116个人区域网络配置文件 (PAN) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::GN0x1117个人区域网络配置文件 (PAN) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::DirectPrinting0x1118基本打印配置文件 (BPP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::ReferencePrinting0x1119与基本打印配置文件 (BPP) UUID(服务)相关
QBluetoothUuid::ServiceClassUuid::BasicImage0x111a基本成像规范 (BIP) UUID(规范)
QBluetoothUuid::ServiceClassUuid::ImagingResponder0x111b基本成像规范(BIP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::ImagingAutomaticArchive0x111c基本成像规范 (BIP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::ImagingReferenceObjects0x111d基本成像规范 (BIP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::Handsfree0x111e免提规范 (HFP) UUID(服务和规范)
QBluetoothUuid::ServiceClassUuid::HandsfreeAudioGateway0x111f免提音频网关 (HFP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::DirectPrintingReferenceObjectsService0x1120基本打印配置文件 (BPP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::ReflectedUI0x1121基本打印配置文件 (BPP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::BasicPrinting0x1122基本打印配置文件 (BPP) UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::PrintingStatus0x1123基本打印配置文件 (BPP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::HumanInterfaceDeviceService0x1124人机接口设备 (HID) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::HardcopyCableReplacement0x1125硬拷贝电缆更换配置文件 (HCRP)(配置文件)
QBluetoothUuid::ServiceClassUuid::HCRPrint0x1126硬拷贝电缆更换配置文件 (HCRP)(服务)
QBluetoothUuid::ServiceClassUuid::HCRScan0x1127硬拷贝电缆更换配置文件 (HCRP)(服务)
QBluetoothUuid::ServiceClassUuid::SIMAccess0x112dSIM 访问配置文件 (SAP) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::PhonebookAccessPCE0x112e电话簿访问配置文件 (PBAP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::PhonebookAccessPSE0x112f电话簿访问配置文件 (PBAP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::PhonebookAccess0x1130电话簿访问配置文件 (PBAP)(配置文件)
QBluetoothUuid::ServiceClassUuid::HeadsetHS0x1131耳麦规范 (HSP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::MessageAccessServer0x1132信息访问配置文件(MAP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::MessageNotificationServer0x1133信息访问配置文件(MAP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::MessageAccessProfile0x1134信息访问配置文件 (MAP) UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::GNSS0x1135全球导航卫星系统 UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::GNSSServer0x1136全球导航卫星系统服务器(UUID)(服务)
QBluetoothUuid::ServiceClassUuid::Display3D0x11373D 同步显示器 UUID(服务)
QBluetoothUuid::ServiceClassUuid::Glasses3D0x11383D 同步眼镜 UUID(服务)
QBluetoothUuid::ServiceClassUuid::Synchronization3D0x11393D 同步 UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::MPSProfile0x113a多配置文件规范 UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::MPSService0x113b多配置文件规范 UUID(服务)
QBluetoothUuid::ServiceClassUuid::PnPInformation0x1200设备识别 (DID) UUID(服务和配置文件)
QBluetoothUuid::ServiceClassUuid::GenericNetworking0x1201通用网络 UUID(服务)
QBluetoothUuid::ServiceClassUuid::GenericFileTransfer0x1202通用文件传输 UUID(服务)
QBluetoothUuid::ServiceClassUuid::GenericAudio0x1203通用音频 UUID(服务)
QBluetoothUuid::ServiceClassUuid::GenericTelephony0x1204通用电话 UUID(服务)
QBluetoothUuid::ServiceClassUuid::VideoSource0x1303视频分发配置文件(VDP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::VideoSink0x1304视频分发配置文件(VDP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::VideoDistribution0x1305视频分发配置文件(VDP)UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::HDP0x1400健康设备配置文件 (HDP) UUID(配置文件)
QBluetoothUuid::ServiceClassUuid::HDPSource0x1401健康设备配置文件源 (HDP) UUID(服务)
QBluetoothUuid::ServiceClassUuid::HDPSink0x1402健康设备配置文件汇(HDP)UUID(服务)
QBluetoothUuid::ServiceClassUuid::GenericAccess0x1800蓝牙低功耗设备 UUID(服务)的通用访问服务。它包含有关设备的通用信息。所有可用特性均为只读。
QBluetoothUuid::ServiceClassUuid::GenericAttribute0x1801
QBluetoothUuid::ServiceClassUuid::ImmediateAlert0x1802即时警报 UUID(服务)。该服务提供一个控制点,允许对等设备立即发出警报。
QBluetoothUuid::ServiceClassUuid::LinkLoss0x1803链路丢失 UUID(服务)。该服务定义两个设备之间链路丢失时的行为。
QBluetoothUuid::ServiceClassUuid::TxPower0x1804传输功率 UUID(服务)。该服务公开设备在连接时的当前传输功率级别。
QBluetoothUuid::ServiceClassUuid::CurrentTimeService0x1805当前时间 UUID(服务)。该服务定义如何使用通用属性配置文件(GATT)公开当前时间。
QBluetoothUuid::ServiceClassUuid::ReferenceTimeUpdateService0x1806参考时间更新 UUID(服务)。该服务定义了客户端如何从时间服务器的参考时间源请求更新。
QBluetoothUuid::ServiceClassUuid::NextDSTChangeService0x1807下一个夏令时变化 UUID(服务)。该服务定义了如何公开即将到来的夏令时变化信息。
QBluetoothUuid::ServiceClassUuid::Glucose0x1808葡萄糖 UUID(服务)。该服务公开葡萄糖和葡萄糖传感器的其他数据,供消费者和专业医疗保健应用使用。
QBluetoothUuid::ServiceClassUuid::HealthThermometer0x1809健康温度计 UUID(服务)。健康温度计服务公开温度计的温度和其他数据,供医疗保健和健身应用使用。
QBluetoothUuid::ServiceClassUuid::DeviceInformation0x180a设备信息 UUID(服务)。设备信息服务公开设备的制造商和/或供应商信息。
QBluetoothUuid::ServiceClassUuid::HeartRate0x180d心率 UUID(服务)。该服务公开健身应用中心率传感器的心率和其他数据。
QBluetoothUuid::ServiceClassUuid::PhoneAlertStatusService0x180e手机警报状态 UUID(服务)。该服务公开连接中的手机警报状态。
QBluetoothUuid::ServiceClassUuid::BatteryService0x180f电池 UUID(服务)。电池服务公开设备内电池的状态。
QBluetoothUuid::ServiceClassUuid::BloodPressure0x1810血压 UUID(服务)。该服务公开血压计的血压和其他数据,用于医疗保健应用。
QBluetoothUuid::ServiceClassUuid::AlertNotificationService0x1811警报通知 UUID(服务)。警报通知服务公开设备上的警报信息。
QBluetoothUuid::ServiceClassUuid::HumanInterfaceDevice0x1812人机界面 UUID(服务)。该服务公开 HID 报告和其他 HID 数据,供 HID 主机和 HID 设备使用。
QBluetoothUuid::ServiceClassUuid::ScanParameters0x1813扫描参数 UUID(服务)。扫描参数服务使 GATT 服务器设备能够公开 GATT 客户端的特征,以便在 GATT 服务器设备上写入扫描间隔和扫描窗口。
QBluetoothUuid::ServiceClassUuid::RunningSpeedAndCadence0x1814运行速度和节奏 UUID(服务)。该服务用于公开跑步速度和步频传感器的速度、步频和其他数据,供健身应用使用。
QBluetoothUuid::ServiceClassUuid::CyclingSpeedAndCadence0x1816自行车速度和步频 UUID(服务)。该服务公开健身应用中自行车速度和步频传感器提供的速度和步频相关数据。
QBluetoothUuid::ServiceClassUuid::CyclingPower0x1818骑行速度 UUID(服务)。该服务公开来自自行车功率传感器的功率和力相关数据以及速度和步频相关数据,用于运动和健身应用。
QBluetoothUuid::ServiceClassUuid::LocationAndNavigation0x1819位置导航 UUID(服务)。该服务公开来自位置和导航传感器的位置和导航相关数据,用于户外活动应用。
QBluetoothUuid::ServiceClassUuid::EnvironmentalSensing0x181a环境传感器 UUID(服务)。该服务公开来自环境传感器的数据,用于运动和健身应用。
QBluetoothUuid::ServiceClassUuid::BodyComposition0x181b身体成分 UUID(服务)。该服务公开身体成分数据,用于消费者保健应用。
QBluetoothUuid::ServiceClassUuid::UserData0x181c用户数据 UUID(服务)。用户数据服务提供与用户相关的数据,如运动和健身环境中的姓名、性别或体重。
QBluetoothUuid::ServiceClassUuid::WeightScale0x181d体重计 UUID(服务)。体重秤服务为消费者医疗保健、体育和健身应用提供体重秤的相关数据。
QBluetoothUuid::ServiceClassUuid::BondManagement0x181e债券管理 UUID(服务)。债券管理服务使用户能够管理蓝牙设备上债券信息的存储。
QBluetoothUuid::ServiceClassUuid::ContinuousGlucoseMonitoring0x181f连续葡萄糖监测 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.