Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions | Protected Member Functions
GattServer::EventHandler Struct Reference

Definition of the general handler of GattServer related events. More...

#include <GattServer.h>

Inheritance diagram for GattServer::EventHandler:
ChainableGattServerEventHandler

Public Member Functions

virtual void onAttMtuChange (ble::connection_handle_t connectionHandle, uint16_t attMtuSize)
 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...
 
virtual void onDataSent (const GattDataSentCallbackParams &params)
 Function invoked when the server has sent data to a client. More...
 
virtual void onDataWritten (const GattWriteCallbackParams &params)
 Function invoked when a client writes an attribute. More...
 
virtual void onDataRead (const GattReadCallbackParams &params)
 Function invoked when a client reads an attribute. More...
 
virtual void onShutdown (const GattServer &server)
 Function invoked when the GattServer instance is about to be shut down. More...
 
virtual void onUpdatesEnabled (const GattUpdatesEnabledCallbackParams &params)
 Function invoked when the client has subscribed to characteristic updates. More...
 
virtual void onUpdatesDisabled (const GattUpdatesDisabledCallbackParams &params)
 Function invoked when the client has unsubscribed from characteristic updates. More...
 
virtual void onConfirmationReceived (const GattConfirmationReceivedCallbackParams &params)
 Event not used. More...
 

Protected Member Functions

 ~EventHandler ()=default
 Prevent polymorphic deletion and avoid unnecessary virtual destructor as the GattServer class will never delete the instance it contains. More...
 

Detailed Description

Definition of the general handler of GattServer related events.

Definition at line 107 of file GattServer.h.

Constructor & Destructor Documentation

~EventHandler ( )
protecteddefault

Prevent polymorphic deletion and avoid unnecessary virtual destructor as the GattServer class will never delete the instance it contains.

Member Function Documentation

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

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
See also
negotiateAttMtu()

Reimplemented in ChainableGattServerEventHandler.

Definition at line 118 of file GattServer.h.

virtual void onConfirmationReceived ( const GattConfirmationReceivedCallbackParams params)
virtual

Event not used.

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

Reimplemented in ChainableGattServerEventHandler.

Definition at line 201 of file GattServer.h.

virtual void onDataRead ( const GattReadCallbackParams params)
virtual

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 in ChainableGattServerEventHandler.

Definition at line 161 of file GattServer.h.

virtual void onDataSent ( const GattDataSentCallbackParams params)
virtual

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 in ChainableGattServerEventHandler.

Definition at line 134 of file GattServer.h.

virtual void onDataWritten ( const GattWriteCallbackParams params)
virtual

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 in ChainableGattServerEventHandler.

Definition at line 144 of file GattServer.h.

virtual void onShutdown ( const GattServer server)
virtual

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

This can be the result of a call to reset() or BLE::reset().

Reimplemented in ChainableGattServerEventHandler.

Definition at line 169 of file GattServer.h.

virtual void onUpdatesDisabled ( const GattUpdatesDisabledCallbackParams params)
virtual

Function invoked when the client has unsubscribed from characteristic updates.

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

Reimplemented in ChainableGattServerEventHandler.

Definition at line 189 of file GattServer.h.

virtual void onUpdatesEnabled ( const GattUpdatesEnabledCallbackParams params)
virtual

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 in ChainableGattServerEventHandler.

Definition at line 179 of file GattServer.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.