NimBLE-Arduino 2.1.2
|
Callbacks that can be associated with a BLE characteristic to inform of events. More...
#include <NimBLECharacteristic.h>
Public Member Functions | |
virtual void | onRead (NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) |
Callback function to support a read request. | |
virtual void | onWrite (NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) |
Callback function to support a write request. | |
virtual void | onStatus (NimBLECharacteristic *pCharacteristic, int code) |
Callback function to support a Notify/Indicate Status report. | |
virtual void | onSubscribe (NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo, uint16_t subValue) |
Callback function called when a client changes subscription status. | |
Callbacks that can be associated with a BLE characteristic to inform of events.
When a server application creates a BLE characteristic, we may wish to be informed when there is either a read or write request to the characteristic's value. An application can register a sub-classed instance of this class and will be notified when such an event happens.
|
virtual |
Callback function to support a read request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | connInfo | A reference to a NimBLEConnInfo instance containing the peer info. |
|
virtual |
Callback function to support a Notify/Indicate Status report.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | code | Status return code from the NimBLE stack. |
The status code for success is 0 for notifications and BLE_HS_EDONE for indications, any other value is an error.
|
virtual |
Callback function called when a client changes subscription status.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | connInfo | A reference to a NimBLEConnInfo instance containing the peer info. |
[in] | subValue | The subscription status:
|
|
virtual |
Callback function to support a write request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | connInfo | A reference to a NimBLEConnInfo instance containing the peer info. |