QLowEnergyAdvertisingParameters Class
The QLowEnergyAdvertisingParameters class represents the parameters used for Bluetooth Low Energy advertising. More...
| Header: | #include <QLowEnergyAdvertisingParameters> |
| qmake: | QT += bluetooth |
| Since: | Qt 5.7 |
This class was introduced in Qt 5.7.
Public Types
| struct | AddressInfo |
| enum | FilterPolicy { IgnoreWhiteList, UseWhiteListForScanning, UseWhiteListForConnecting, UseWhiteListForScanningAndConnecting } |
| enum | Mode { AdvInd, AdvScanInd, AdvNonConnInd } |
Public Functions
| QLowEnergyAdvertisingParameters(const QLowEnergyAdvertisingParameters &other) | |
| QLowEnergyAdvertisingParameters() | |
| QLowEnergyAdvertisingParameters & | operator=(const QLowEnergyAdvertisingParameters &other) |
| ~QLowEnergyAdvertisingParameters() | |
| FilterPolicy | filterPolicy() const |
| int | maximumInterval() const |
| int | minimumInterval() const |
| Mode | mode() const |
| void | setInterval(quint16 minimum, quint16 maximum) |
| void | setMode(Mode mode) |
| void | setWhiteList(const QList<AddressInfo> &whiteList, FilterPolicy policy) |
| void | swap(QLowEnergyAdvertisingParameters &other) |
| QList<AddressInfo> | whiteList() const |
Detailed Description
When running the advertising procedure, a number of parameters can be configured, such as how fast to advertise or which clients, if any, can connect to the advertising device. These parameters are set via this class, and their values will be used when advertising is started by calling QLowEnergyController::startAdvertising().
See also QLowEnergyAdvertisingData and QLowEnergyController::startAdvertising().
Member Type Documentation
enum QLowEnergyAdvertisingParameters::FilterPolicy
Specifies the semantics of the white list.
| Constant | Value | Description |
|---|---|---|
QLowEnergyAdvertisingParameters::IgnoreWhiteList | 0x00 | The value of the white list is ignored, that is, no filtering takes place for either scan or connection requests when using undirected advertising. |
QLowEnergyAdvertisingParameters::UseWhiteListForScanning | 0x01 | The white list is used when handling scan requests, but is ignored for connection requests. |
QLowEnergyAdvertisingParameters::UseWhiteListForConnecting | 0x02 | The white list is used when handling connection requests, but is ignored for scan requests. |
QLowEnergyAdvertisingParameters::UseWhiteListForScanningAndConnecting | 0x03 | The white list is used for both connection and scan requests. |
See also QLowEnergyAdvertisingParameters::whiteList().