SDK  23.9.2
For IoT System Software Development
Public Member Functions | List of all members
BLECharacteristicCallbacks Class Reference

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

#include <BLECharacteristic.hpp>

Public Member Functions

virtual void onRead (BLECharacteristic *pCharacteristic)
 Callback function to support a read request. More...
 
virtual void onWrite (BLECharacteristic *pCharacteristic)
 Callback function to support a write request. More...
 

Detailed Description

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.

Member Function Documentation

◆ onRead()

void BLECharacteristicCallbacks::onRead ( BLECharacteristic pCharacteristic)
virtual

Callback function to support a read request.

Parameters
[in]pCharacteristicThe characteristic that is the source of the event.
365  {
366  _debug_print("BLECharacteristicCallbacks", ">> onRead: default");
367  _debug_print("BLECharacteristicCallbacks", "<< onRead");
368 } // onRead

◆ onWrite()

void BLECharacteristicCallbacks::onWrite ( BLECharacteristic pCharacteristic)
virtual

Callback function to support a write request.

Parameters
[in]pCharacteristicThe characteristic that is the source of the event.
375  {
376  _debug_print("BLECharacteristicCallbacks", ">> onWrite: default");
377  _debug_print("BLECharacteristicCallbacks", "<< onWrite");
378 } // onWrite

The documentation for this class was generated from the following files: