Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
ChainableGattServerEventHandler Class Reference

GattServer::EventHandler implementation that allows the application to register multiple separate EventHandlers to be called when GattServer events happen. More...

#include <ChainableGattServerEventHandler.h>

Inheritance diagram for ChainableGattServerEventHandler:
GattServer::EventHandler ChainableEventHandler< ble::GattServer::EventHandler >

Public Member Functions

void onAttMtuChange (ble::connection_handle_t connectionHandle, uint16_t attMtuSize) override
 Function invoked when the connections changes the ATT_MTU which controls the maximum size of an attribute that can be read in a single L2CAP packet which might be fragmented across multiple packets. More...
 
void onDataSent (const GattDataSentCallbackParams &params) override
 Function invoked when the server has sent data to a client. More...
 
void onDataWritten (const GattWriteCallbackParams &params) override
 Function invoked when a client writes an attribute. More...
 
void onDataRead (const GattReadCallbackParams &params) override
 Function invoked when a client reads an attribute. More...
 
void onShutdown (const GattServer &server) override
 Function invoked when the GattServer instance is about to be shut down. More...
 
void onUpdatesEnabled (const GattUpdatesEnabledCallbackParams &params) override
 Function invoked when the client has subscribed to characteristic updates. More...
 
void onUpdatesDisabled (const GattUpdatesDisabledCallbackParams &params) override
 Function invoked when the client has unsubscribed to characteristic updates. More...
 
void onConfirmationReceived (const GattConfirmationReceivedCallbackParams &params) override
 Event not used. More...
 
bool addEventHandler (ble::GattServer::EventHandler *event_handler)
 Add an EventHandler to be notified of events sent to this ChainableEventHandler. More...
 
void removeEventHandler (ble::GattServer::EventHandler *event_handler)
 Remove an EventHandler previously added with addEventHandler. More...
 
bool isEventHandlerPresent (ble::GattServer::EventHandler *event_handler)
 Test if an event handler is present in the chain or not. More...
 

Detailed Description

GattServer::EventHandler implementation that allows the application to register multiple separate EventHandlers to be called when GattServer events happen.

Definition at line 30 of file ChainableGattServerEventHandler.h.

Member Function Documentation

bool addEventHandler ( ble::GattServer::EventHandler event_handler)
inherited

Add an EventHandler to be notified of events sent to this ChainableEventHandler.

Parameters
[in]event_handlerHandler to add to chain
Return values
trueif adding EventHandler was successful, false otherwise

Definition at line 54 of file ChainableEventHandler.h.

bool isEventHandlerPresent ( ble::GattServer::EventHandler event_handler)
inherited

Test if an event handler is present in the chain or not.

Parameters
[in]event_handlerPointer to event handler to check

Definition at line 102 of file ChainableEventHandler.h.

void onAttMtuChange ( ble::connection_handle_t  connectionHandle,
uint16_t  attMtuSize 
)
overridevirtual

Function invoked when the connections changes the ATT_MTU which controls the maximum size of an attribute that can be read in a single L2CAP packet which might be fragmented across multiple packets.

Parameters
connectionHandleThe handle of the connection that changed the size.
attMtuSize

Reimplemented from GattServer::EventHandler.

Definition at line 40 of file ChainableGattServerEventHandler.h.

void onConfirmationReceived ( const GattConfirmationReceivedCallbackParams params)
overridevirtual

Event not used.

Note
params has a temporary scope and should be copied by the application if needed later

Reimplemented from GattServer::EventHandler.

Definition at line 69 of file ChainableGattServerEventHandler.h.

void onDataRead ( const GattReadCallbackParams params)
overridevirtual

Function invoked when a client reads an attribute.

Note
This functionality may not be available on all underlying stacks. Application code may work around that limitation by monitoring read requests instead of read events.
params has a temporary scope and should be copied by the application if needed later
See also
GattCharacteristic::setReadAuthorizationCallback()
isOnDataReadAvailable().

Reimplemented from GattServer::EventHandler.

Definition at line 53 of file ChainableGattServerEventHandler.h.

void onDataSent ( const GattDataSentCallbackParams params)
overridevirtual

Function invoked when the server has sent data to a client.

For notifications this is triggered when data is sent, for indications it's only triggered when the confirmation has been received.

Note
params has a temporary scope and should be copied by the application if needed later

Reimplemented from GattServer::EventHandler.

Definition at line 45 of file ChainableGattServerEventHandler.h.

void onDataWritten ( const GattWriteCallbackParams params)
overridevirtual

Function invoked when a client writes an attribute.

Note
params has a temporary scope and should be copied by the application if needed later

Reimplemented from GattServer::EventHandler.

Definition at line 49 of file ChainableGattServerEventHandler.h.

void onShutdown ( const GattServer server)
overridevirtual

Function invoked when the GattServer instance is about to be shut down.

This can result in a call to reset() or BLE::reset().

Reimplemented from GattServer::EventHandler.

Definition at line 57 of file ChainableGattServerEventHandler.h.

void onUpdatesDisabled ( const GattUpdatesDisabledCallbackParams params)
overridevirtual

Function invoked when the client has unsubscribed to characteristic updates.

Note
params has a temporary scope and should be copied by the application if needed later

Reimplemented from GattServer::EventHandler.

Definition at line 65 of file ChainableGattServerEventHandler.h.

void onUpdatesEnabled ( const GattUpdatesEnabledCallbackParams params)
overridevirtual

Function invoked when the client has subscribed to characteristic updates.

Note
params has a temporary scope and should be copied by the application if needed later

Reimplemented from GattServer::EventHandler.

Definition at line 61 of file ChainableGattServerEventHandler.h.

void removeEventHandler ( ble::GattServer::EventHandler event_handler)
inherited

Remove an EventHandler previously added with addEventHandler.

Parameters
[in]event_handlerPointer to event handler to remove

Definition at line 74 of file ChainableEventHandler.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.