esp-nimble-cpp
1.4.1
|
Callbacks that can be associated with a BLE characteristic to inform of events. More...
Public Types | |
enum | Status |
An enum to provide the callback the status of the notification/indication, implemented for backward compatibility. More... | |
Public Member Functions | |
virtual void | onRead (NimBLECharacteristic *pCharacteristic) |
Callback function to support a read request. More... | |
virtual void | onRead (NimBLECharacteristic *pCharacteristic, ble_gap_conn_desc *desc) |
Callback function to support a read request. More... | |
virtual void | onWrite (NimBLECharacteristic *pCharacteristic) |
Callback function to support a write request. More... | |
virtual void | onWrite (NimBLECharacteristic *pCharacteristic, ble_gap_conn_desc *desc) |
Callback function to support a write request. More... | |
virtual void | onNotify (NimBLECharacteristic *pCharacteristic) |
Callback function to support a Notify request. More... | |
virtual void | onStatus (NimBLECharacteristic *pCharacteristic, Status s, int code) |
Callback function to support a Notify/Indicate Status report. More... | |
virtual void | onSubscribe (NimBLECharacteristic *pCharacteristic, ble_gap_conn_desc *desc, uint16_t subValue) |
Callback function called when a client changes subscription status. More... | |
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.
An enum to provide the callback the status of the notification/indication, implemented for backward compatibility.
|
virtual |
Callback function to support a Notify request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
|
virtual |
Callback function to support a read request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
|
virtual |
Callback function to support a read request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | desc | The connection description struct that is associated with the peer that performed the read. |
|
virtual |
Callback function to support a Notify/Indicate Status report.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | s | Status of the notification/indication. |
[in] | code | Additional return code from the NimBLE stack. |
|
virtual |
Callback function called when a client changes subscription status.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | desc | The connection description struct that is associated with the client. |
[in] | subValue | The subscription status:
|
|
virtual |
Callback function to support a write request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
|
virtual |
Callback function to support a write request.
[in] | pCharacteristic | The characteristic that is the source of the event. |
[in] | desc | The connection description struct that is associated with the peer that performed the write. |