Gap::EventHandler implementation that allows the application to register multiple separate EventHandlers to be called when Gap events happen. More...
#include <ChainableGapEventHandler.h>
Public Member Functions | |
void | onScanRequestReceived (const ble::ScanRequestEvent &event) override |
Called when an advertising device receive a scan response. More... | |
void | onAdvertisingStart (const ble::AdvertisingStartEvent &event) override |
Called when advertising starts. More... | |
void | onAdvertisingEnd (const ble::AdvertisingEndEvent &event) override |
Called when advertising ends. More... | |
void | onAdvertisingReport (const ble::AdvertisingReportEvent &event) override |
Called when a scanner receives an advertising or a scan response packet. More... | |
void | onScanTimeout (const ble::ScanTimeoutEvent &event) override |
Called when scan times out. More... | |
void | onPeriodicAdvertisingSyncEstablished (const ble::PeriodicAdvertisingSyncEstablishedEvent &event) override |
Called when first advertising packet in periodic advertising is received. More... | |
void | onPeriodicAdvertisingReport (const ble::PeriodicAdvertisingReportEvent &event) override |
Called when a periodic advertising packet is received. More... | |
void | onPeriodicAdvertisingSyncLoss (const ble::PeriodicAdvertisingSyncLoss &event) override |
Called when a periodic advertising sync has been lost. More... | |
void | onConnectionComplete (const ble::ConnectionCompleteEvent &event) override |
Called when connection attempt ends or an advertising device has been connected. More... | |
void | onUpdateConnectionParametersRequest (const ble::UpdateConnectionParametersRequestEvent &event) override |
Called when the peer request connection parameters updates. More... | |
void | onConnectionParametersUpdateComplete (const ble::ConnectionParametersUpdateCompleteEvent &event) override |
Called when connection parameters have been updated. More... | |
void | onDisconnectionComplete (const ble::DisconnectionCompleteEvent &event) override |
Called when a connection has been disconnected. More... | |
void | onReadPhy (ble_error_t status, ble::connection_handle_t connectionHandle, ble::phy_t txPhy, ble::phy_t rxPhy) override |
Function invoked when the current transmitter and receiver PHY have been read for a given connection. More... | |
void | onPhyUpdateComplete (ble_error_t status, ble::connection_handle_t connectionHandle, ble::phy_t txPhy, ble::phy_t rxPhy) override |
Function invoked when the update process of the PHY has been completed. More... | |
void | onDataLengthChange (ble::connection_handle_t connectionHandle, uint16_t txSize, uint16_t rxSize) override |
Function invoked when the connections changes the maximum number of octets that can be sent or received by the controller in a single packet. More... | |
void | onPrivacyEnabled () override |
Function invoked when the privacy subsystem has been enabled and is ready to be used. More... | |
bool | addEventHandler (ble::Gap::EventHandler *event_handler) |
Add an EventHandler to be notified of events sent to this ChainableEventHandler. More... | |
void | removeEventHandler (ble::Gap::EventHandler *target) |
Remove an EventHandler previously added with addEventHandler. More... | |
Gap::EventHandler implementation that allows the application to register multiple separate EventHandlers to be called when Gap events happen.
Definition at line 30 of file ChainableGapEventHandler.h.
|
inherited |
Add an EventHandler to be notified of events sent to this ChainableEventHandler.
[in] | event_handler | Handler to add to chain |
true | if adding EventHandler was successful, false otherwise |
Definition at line 54 of file ChainableEventHandler.h.
|
overridevirtual |
Called when advertising ends.
Advertising ends when the process timeout or if it is stopped by the application or if the local device accepts a connection request.
event | Advertising end event. |
Reimplemented from Gap::EventHandler.
Definition at line 48 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when a scanner receives an advertising or a scan response packet.
event | Advertising report. |
Reimplemented from Gap::EventHandler.
Definition at line 52 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when advertising starts.
event | Advertising start event. |
Reimplemented from Gap::EventHandler.
Definition at line 44 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when connection attempt ends or an advertising device has been connected.
event | Connection event. |
Reimplemented from Gap::EventHandler.
Definition at line 75 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when connection parameters have been updated.
event | The new connection parameters. |
Reimplemented from Gap::EventHandler.
Definition at line 84 of file ChainableGapEventHandler.h.
|
overridevirtual |
Function invoked when the connections changes the maximum number of octets that can be sent or received by the controller in a single packet.
A single L2CAP packet can be fragmented across many such packets.
connectionHandle | The handle of the connection that changed the size. |
txSize | Number of octets we can send on this connection in a single packet. |
rxSize | Number of octets we can receive on this connection in a single packet. |
Reimplemented from Gap::EventHandler.
Definition at line 111 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when a connection has been disconnected.
event | Details of the event. |
Reimplemented from Gap::EventHandler.
Definition at line 89 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when a periodic advertising packet is received.
event | Periodic advertisement event. |
Reimplemented from Gap::EventHandler.
Definition at line 65 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when first advertising packet in periodic advertising is received.
event | Periodic advertising sync event. |
Reimplemented from Gap::EventHandler.
Definition at line 60 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when a periodic advertising sync has been lost.
event | Details of the event. |
Reimplemented from Gap::EventHandler.
Definition at line 70 of file ChainableGapEventHandler.h.
|
overridevirtual |
Function invoked when the update process of the PHY has been completed.
The process can be initiated by a call to the function setPhy, the local bluetooth subsystem or the peer.
status | Status of the operation: BLE_ERROR_NONE in case of success or an appropriate error code. |
connectionHandle | The handle of the connection on which the operation was made. |
txPhy | PHY used by the transmitter. |
rxPhy | PHY used by the receiver. |
Reimplemented from Gap::EventHandler.
Definition at line 102 of file ChainableGapEventHandler.h.
|
overridevirtual |
Function invoked when the privacy subsystem has been enabled and is ready to be used.
Reimplemented from Gap::EventHandler.
Definition at line 119 of file ChainableGapEventHandler.h.
|
overridevirtual |
Function invoked when the current transmitter and receiver PHY have been read for a given connection.
status | Status of the operation: BLE_ERROR_NONE in case of success or an appropriate error code. |
connectionHandle | The handle of the connection for which the PHYs have been read. |
txPhy | PHY used by the transmitter. |
rxPhy | PHY used by the receiver. |
Reimplemented from Gap::EventHandler.
Definition at line 93 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when an advertising device receive a scan response.
event | Scan request event. |
Reimplemented from Gap::EventHandler.
Definition at line 40 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when scan times out.
event | Associated event. |
Reimplemented from Gap::EventHandler.
Definition at line 56 of file ChainableGapEventHandler.h.
|
overridevirtual |
Called when the peer request connection parameters updates.
Application must accept the update with acceptConnectionParametersUpdate() or reject it with rejectConnectionParametersUpdate().
event | The connection parameters requested by the peer. |
Reimplemented from Gap::EventHandler.
Definition at line 79 of file ChainableGapEventHandler.h.
|
inherited |
Remove an EventHandler previously added with addEventHandler.
[in] | event_handler | Pointer to event handler to remove |
Definition at line 74 of file ChainableEventHandler.h.