|
esp-nimble-cpp
1.4.1
|
Extended advertising class. More...
Public Member Functions | |
| NimBLEExtAdvertising () | |
| Construct an extended advertising object. | |
| ~NimBLEExtAdvertising () | |
| Destructor: deletes callback instances if requested. | |
| bool | start (uint8_t inst_id, int duration=0, int max_events=0) |
| Start extended advertising. More... | |
| bool | setInstanceData (uint8_t inst_id, NimBLEExtAdvertisement &adv) |
| Register the extended advertisement data. More... | |
| bool | setScanResponseData (uint8_t inst_id, NimBLEExtAdvertisement &data) |
| Set the scan response data for a legacy advertisement. More... | |
| bool | removeInstance (uint8_t inst_id) |
| Stop and remove this instance data from the advertisement set. More... | |
| bool | removeAll () |
| Stop and remove all advertising instance data. More... | |
| bool | stop (uint8_t inst_id) |
| Stop advertising this instance data. More... | |
| bool | stop () |
| Stop all advertisements. More... | |
| bool | isActive (uint8_t inst_id) |
| Check if currently advertising. More... | |
| bool | isAdvertising () |
| Check if any instances are currently advertising. More... | |
| void | setCallbacks (NimBLEExtAdvertisingCallbacks *callbacks, bool deleteCallbacks=true) |
| Set a callback to call when the advertisement stops. More... | |
Extended advertising class.
| bool NimBLEExtAdvertising::isActive | ( | uint8_t | inst_id | ) |
Check if currently advertising.
| [in] | inst_id | The instance ID of the advertised data to get the status of. |
| bool NimBLEExtAdvertising::isAdvertising | ( | ) |
Check if any instances are currently advertising.
| bool NimBLEExtAdvertising::removeAll | ( | ) |
Stop and remove all advertising instance data.
| bool NimBLEExtAdvertising::removeInstance | ( | uint8_t | inst_id | ) |
Stop and remove this instance data from the advertisement set.
| [in] | inst_id | The extended advertisement instance to stop advertising. |
| void NimBLEExtAdvertising::setCallbacks | ( | NimBLEExtAdvertisingCallbacks * | pCallbacks, |
| bool | deleteCallbacks = true |
||
| ) |
Set a callback to call when the advertisement stops.
| [in] | pCallbacks | A pointer to a callback to be invoked when an advertisement stops. |
| [in] | deleteCallbacks | if true callback class will be deleted when advertising is destructed. |
| bool NimBLEExtAdvertising::setInstanceData | ( | uint8_t | inst_id, |
| NimBLEExtAdvertisement & | adv | ||
| ) |
Register the extended advertisement data.
| [in] | inst_id | The extended advertisement instance ID to assign to this data. |
| [in] | adv | The extended advertisement instance with the data to set. |
| bool NimBLEExtAdvertising::setScanResponseData | ( | uint8_t | inst_id, |
| NimBLEExtAdvertisement & | lsr | ||
| ) |
Set the scan response data for a legacy advertisement.
| [in] | inst_id | The extended advertisement instance ID to assign to this data. |
| [in] | lsr | A reference to a NimBLEExtAdvertisement that contains the data. |
| bool NimBLEExtAdvertising::start | ( | uint8_t | inst_id, |
| int | duration = 0, |
||
| int | max_events = 0 |
||
| ) |
Start extended advertising.
| [in] | inst_id | The extended advertisement instance ID to start. |
| [in] | duration | How long to advertise for in milliseconds, 0 = forever (default). |
| [in] | max_events | Maximum number of advertisement events to send, 0 = no limit (default). |
| bool NimBLEExtAdvertising::stop | ( | ) |
Stop all advertisements.
| bool NimBLEExtAdvertising::stop | ( | uint8_t | inst_id | ) |
Stop advertising this instance data.
| [in] | inst_id | The extended advertisement instance to stop advertising. |