struct Core::Bluetooth::IGattPeripheralAttributeObserver
Overview
#include <coregattperipheral.h> struct IGattPeripheralAttributeObserver { // methods virtual void onRead (uint8* valueBuffer, int& valueSize) = 0; virtual void onWrite (const uint8 valueBuffer [], int& valueSize) = 0; };
Detailed Documentation
Methods
virtual void onRead (uint8* valueBuffer, int& valueSize) = 0
Called when a Gatt Central reads from the Attribute, the Observer writes the Attribute value to be read into valueBuffer, and the descriptor size into valueSize, capacity is kAttributeCapacity (512 bytes).
virtual void onWrite (const uint8 valueBuffer [], int& valueSize) = 0
Called when a Gatt Central writes to the Descriptor, the Observer accepts the descriptor data just written from valueBuffer and the number of bytes from valueSize.
The number of bytes accepted is written back into valueSize.