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

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

#include <Gap.h>

Public Member Functions

virtual void onScanRequestReceived (const ScanRequestEvent &event)
 Called when an advertising device receive a scan response. More...
 
virtual void onAdvertisingEnd (const AdvertisingEndEvent &event)
 Called when advertising ends. More...
 
virtual void onAdvertisingReport (const AdvertisingReportEvent &event)
 Called when a scanner receives an advertising or a scan response packet. More...
 
virtual void onScanTimeout (const ScanTimeoutEvent &event)
 Called when scan times out. More...
 
virtual void onPeriodicAdvertisingSyncEstablished (const PeriodicAdvertisingSyncEstablishedEvent &event)
 Called when first advertising packet in periodic advertising is received. More...
 
virtual void onPeriodicAdvertisingReport (const PeriodicAdvertisingReportEvent &event)
 Called when a periodic advertising packet is received. More...
 
virtual void onPeriodicAdvertisingSyncLoss (const PeriodicAdvertisingSyncLoss &event)
 Called when a periodic advertising sync has been lost. More...
 
virtual void onConnectionComplete (const ConnectionCompleteEvent &event)
 Called when connection attempt ends or an advertising device has been connected. More...
 
virtual void onUpdateConnectionParametersRequest (const UpdateConnectionParametersRequestEvent &event)
 Called when the peer request connection parameters updates. More...
 
virtual void onConnectionParametersUpdateComplete (const ConnectionParametersUpdateCompleteEvent &event)
 Called when connection parameters have been updated. More...
 
virtual void onDisconnectionComplete (const DisconnectionCompleteEvent &event)
 Called when a connection has been disconnected. More...
 
virtual void onReadPhy (ble_error_t status, connection_handle_t connectionHandle, phy_t txPhy, phy_t rxPhy)
 Function invoked when the current transmitter and receiver PHY have been read for a given connection. More...
 
virtual void onPhyUpdateComplete (ble_error_t status, connection_handle_t connectionHandle, phy_t txPhy, phy_t rxPhy)
 Function invoked when the update process of the PHY has been completed. More...
 

Protected Member Functions

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

Detailed Description

Definition of the general handler of Gap related events.

Definition at line 276 of file gap/Gap.h.

Constructor & Destructor Documentation

~EventHandler ( )
protected

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

Definition at line 500 of file gap/Gap.h.

Member Function Documentation

virtual void onAdvertisingEnd ( const AdvertisingEndEvent event)
virtual

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.

Parameters
eventAdvertising end event.
See also
startAdvertising()
stopAdvertising()
onConnectionComplete()

Definition at line 302 of file gap/Gap.h.

virtual void onAdvertisingReport ( const AdvertisingReportEvent event)
virtual

Called when a scanner receives an advertising or a scan response packet.

Parameters
eventAdvertising report.
See also
startScan()

Definition at line 313 of file gap/Gap.h.

virtual void onConnectionComplete ( const ConnectionCompleteEvent event)
virtual

Called when connection attempt ends or an advertising device has been connected.

See also
startAdvertising()
connect()
Parameters
eventConnection event.

Definition at line 382 of file gap/Gap.h.

virtual void onConnectionParametersUpdateComplete ( const ConnectionParametersUpdateCompleteEvent event)
virtual

Called when connection parameters have been updated.

Parameters
eventThe new connection parameters.
See also
updateConnectionParameters()
acceptConnectionParametersUpdate()

Definition at line 417 of file gap/Gap.h.

virtual void onDisconnectionComplete ( const DisconnectionCompleteEvent event)
virtual

Called when a connection has been disconnected.

Parameters
eventDetails of the event.
See also
disconnect()

Definition at line 430 of file gap/Gap.h.

virtual void onPeriodicAdvertisingReport ( const PeriodicAdvertisingReportEvent event)
virtual

Called when a periodic advertising packet is received.

Parameters
eventPeriodic advertisement event.
Version
: 5+.
See also
createSync()

Definition at line 352 of file gap/Gap.h.

virtual void onPeriodicAdvertisingSyncEstablished ( const PeriodicAdvertisingSyncEstablishedEvent event)
virtual

Called when first advertising packet in periodic advertising is received.

Parameters
eventPeriodic advertising sync event.
Version
: 5+.
See also
createSync()

Definition at line 337 of file gap/Gap.h.

virtual void onPeriodicAdvertisingSyncLoss ( const PeriodicAdvertisingSyncLoss event)
virtual

Called when a periodic advertising sync has been lost.

Parameters
eventDetails of the event.
Version
: 5+.
See also
createSync()

Definition at line 367 of file gap/Gap.h.

virtual void onPhyUpdateComplete ( ble_error_t  status,
connection_handle_t  connectionHandle,
phy_t  txPhy,
phy_t  rxPhy 
)
virtual

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.

Parameters
statusStatus of the operation: BLE_ERROR_NONE in case of success or an appropriate error code.
connectionHandleThe handle of the connection on which the operation was made.
txPhyPHY used by the transmitter.
rxPhyPHY used by the receiver.
Note
Success doesn't mean the PHY has been updated it means both ends have negotiated the best PHY according to their configuration and capabilities. The PHY currently used are present in the txPhy and rxPhy parameters.
See also
setPhy()
Version
: 5+.

Definition at line 486 of file gap/Gap.h.

virtual void onReadPhy ( ble_error_t  status,
connection_handle_t  connectionHandle,
phy_t  txPhy,
phy_t  rxPhy 
)
virtual

Function invoked when the current transmitter and receiver PHY have been read for a given connection.

Parameters
statusStatus of the operation: BLE_ERROR_NONE in case of success or an appropriate error code.
connectionHandleThe handle of the connection for which the PHYs have been read.
txPhyPHY used by the transmitter.
rxPhyPHY used by the receiver.
See also
readPhy().
Version
: 5+.

Definition at line 452 of file gap/Gap.h.

virtual void onScanRequestReceived ( const ScanRequestEvent event)
virtual

Called when an advertising device receive a scan response.

Parameters
eventScan request event.
Version
: 5+.
See also
AdvertisingParameters::setScanRequestNotification().

Definition at line 286 of file gap/Gap.h.

virtual void onScanTimeout ( const ScanTimeoutEvent event)
virtual

Called when scan times out.

Parameters
eventAssociated event.
See also
startScan()

Definition at line 324 of file gap/Gap.h.

virtual void onUpdateConnectionParametersRequest ( const UpdateConnectionParametersRequestEvent event)
virtual

Called when the peer request connection parameters updates.

Application must accept the update with acceptConnectionParametersUpdate() or reject it with rejectConnectionParametersUpdate().

Parameters
eventThe connection parameters requested by the peer.
Version
4.1+.
Note
This event is not generated if connection parameters update is managed by the middleware.
See also
manageConnectionParametersUpdateRequest()
acceptConnectionParametersUpdate()
rejectConnectionParametersUpdate()

Definition at line 403 of file gap/Gap.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.