esp-nimble-cpp 2.0.2
Loading...
Searching...
No Matches
NimBLEDescriptorCallbacks Class Reference

Callbacks that can be associated with a BLE descriptors to inform of events. More...

#include <NimBLEDescriptor.h>

Public Member Functions

virtual void onRead (NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)
 Callback function to support a read request.
 
virtual void onWrite (NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)
 Callback function to support a write request.
 

Detailed Description

Callbacks that can be associated with a BLE descriptors to inform of events.

When a server application creates a BLE descriptor, we may wish to be informed when there is either a read or write request to the descriptors value. An application can register a sub-classed instance of this class and will be notified when such an event happens.

Member Function Documentation

◆ onRead()

void NimBLEDescriptorCallbacks::onRead ( NimBLEDescriptor pDescriptor,
NimBLEConnInfo connInfo 
)
virtual

Callback function to support a read request.

Parameters
[in]pDescriptorThe descriptor that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.

◆ onWrite()

void NimBLEDescriptorCallbacks::onWrite ( NimBLEDescriptor pDescriptor,
NimBLEConnInfo connInfo 
)
virtual

Callback function to support a write request.

Parameters
[in]pDescriptorThe descriptor that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.