QLowEnergyAdvertisingData Class
The QLowEnergyAdvertisingData class represents the data to be broadcast during Bluetooth Low Energy advertising. More...
| Header: | #include <QLowEnergyAdvertisingData> |
| qmake: | QT += bluetooth |
| Since: | Qt 5.7 |
This class was introduced in Qt 5.7.
Public Types
| enum | Discoverability { DiscoverabilityNone, DiscoverabilityLimited, DiscoverabilityGeneral } |
Detailed Description
This data can include the device name, GATT services offered by the device, and so on. The data set via this class will be used when advertising is started by calling QLowEnergyController::startAdvertising(). Objects of this class can represent an Advertising Data packet or a Scan Response packet.
Note: The actual data packets sent over the advertising channel cannot contain more than 31 bytes. If the variable-length data set via this class exceeds that limit, it will be left out of the packet or truncated, depending on the type.
See also QLowEnergyAdvertisingParameters and QLowEnergyController::startAdvertising().
Member Type Documentation
enum QLowEnergyAdvertisingData::Discoverability
The discoverability of the advertising device as defined by the Generic Access Profile.
| Constant | Value | Description |
|---|---|---|
QLowEnergyAdvertisingData::DiscoverabilityNone | 0 | The advertising device does not wish to be discoverable by scanning devices. |
QLowEnergyAdvertisingData::DiscoverabilityLimited | 1 | The advertising device wishes to be discoverable with a high priority. Note that this mode is not compatible with using a white list. The value of QLowEnergyAdvertisingParameters::filterPolicy() is always assumed to be QLowEnergyAdvertisingParameters::IgnoreWhiteList when limited discoverability is used. |
QLowEnergyAdvertisingData::DiscoverabilityGeneral | 2 | The advertising device wishes to be discoverable by scanning devices. |