|
ELEC-C7222
Libraries for ELEC C7222 Course Work
|
Minimal GAP event handler for example applications. More...
#include <gap_event_handler.hpp>


Public Member Functions | |
| GapEventHandler (c7222::Gap *gap=c7222::Gap::GetInstance(), c7222::AttributeServer *attribute_server=nullptr) | |
| Construct a handler with optional GAP and AttributeServer pointers. | |
| void | SetAttributeServer (c7222::AttributeServer *attribute_server) |
| Attach an attribute server after construction. | |
| void | OnScanRequestReceived (uint8_t advertising_handle, const c7222::BleAddress &scanner_address) const override |
| Logs scan requests received by the advertiser. | |
| void | OnAdvertisingStart (uint8_t status) const override |
| Logs the start of advertising. | |
| void | OnAdvertisingEnd (uint8_t status, c7222::ConnectionHandle connection_handle) const override |
| Logs the end of advertising. | |
| void | OnAdvertisingReport (const c7222::Gap::AdvertisingReport &report) const override |
| Logs legacy advertising reports. | |
| void | OnExtendedAdvertisingReport (const c7222::Gap::ExtendedAdvertisingReport &report) const override |
| Logs extended advertising reports. | |
| void | OnScanTimeout (uint8_t status) const override |
| Logs a scan timeout event. | |
| void | OnPeriodicAdvertisingSyncEstablished (uint8_t status, c7222::ConnectionHandle sync_handle) const override |
| Logs periodic advertising sync establishment. | |
| void | OnPeriodicAdvertisingReport (c7222::ConnectionHandle sync_handle, int8_t tx_power, int8_t rssi, uint8_t data_status, const uint8_t *data, uint8_t data_length) const override |
| Logs a periodic advertising report. | |
| void | OnPeriodicAdvertisingSyncLoss (c7222::ConnectionHandle sync_handle) const override |
| Logs loss of periodic advertising sync. | |
| void | OnConnectionComplete (uint8_t status, c7222::ConnectionHandle con_handle, const c7222::BleAddress &address, uint16_t conn_interval, uint16_t conn_latency, uint16_t supervision_timeout) const override |
| Logs new connections and updates the attribute server handle. | |
| void | OnUpdateConnectionParametersRequest (c7222::ConnectionHandle con_handle, uint16_t min_interval, uint16_t max_interval, uint16_t latency, uint16_t supervision_timeout) const override |
| Logs a request to update connection parameters. | |
| void | OnConnectionParametersUpdateComplete (uint8_t status, c7222::ConnectionHandle con_handle, uint16_t conn_interval, uint16_t conn_latency, uint16_t supervision_timeout) const override |
| Logs completion of connection parameter updates. | |
| void | OnDisconnectionComplete (uint8_t status, c7222::ConnectionHandle con_handle, uint8_t reason) const override |
| Logs disconnections and restarts advertising. | |
| void | OnReadPhy (uint8_t status, c7222::ConnectionHandle con_handle, c7222::Gap::Phy tx_phy, c7222::Gap::Phy rx_phy) const override |
| Logs PHY read results. | |
| void | OnPhyUpdateComplete (uint8_t status, c7222::ConnectionHandle con_handle, c7222::Gap::Phy tx_phy, c7222::Gap::Phy rx_phy) const override |
| Logs PHY update completion. | |
| void | OnDataLengthChange (c7222::ConnectionHandle con_handle, uint16_t tx_size, uint16_t rx_size) const override |
| Logs data length changes. | |
| void | OnPrivacyEnabled () const override |
| Logs that privacy mode has been enabled. | |
| void | OnSecurityLevel (c7222::ConnectionHandle con_handle, uint8_t security_level) const override |
| Logs the negotiated security level. | |
| void | OnDedicatedBondingCompleted (uint8_t status, const c7222::BleAddress &address) const override |
| Logs completion of dedicated bonding. | |
| void | OnInquiryResult (const c7222::Gap::InquiryResult &result) const override |
| Logs inquiry results. | |
| void | OnInquiryComplete (uint8_t status) const override |
| Logs completion of inquiry. | |
| void | OnRssiMeasurement (c7222::ConnectionHandle con_handle, int8_t rssi) const override |
| Logs RSSI measurements. | |
| void | OnLocalOobData (bool oob_data_present, const uint8_t *c_192, const uint8_t *r_192, const uint8_t *c_256, const uint8_t *r_256) const override |
| Logs presence of local OOB data. | |
| void | OnPairingStarted (c7222::ConnectionHandle con_handle, const c7222::BleAddress &address, bool ssp, bool initiator) const override |
| Logs the start of pairing. | |
| void | OnPairingComplete (c7222::ConnectionHandle con_handle, const c7222::BleAddress &address, uint8_t status) const override |
| Logs completion of pairing. | |
Additional Inherited Members | |
Protected Member Functions inherited from c7222::Gap::EventHandler | |
| ~EventHandler ()=default | |
Minimal GAP event handler for example applications.
Tracks and prints GAP events. Used in BLE examples as a lightweight way to observe advertising, scanning, and connection activity.
The stored Gap instance is used to restart advertising on disconnect. The optional AttributeServer instance is used to set the active connection handle when a connection completes, which is required for GATT operations.
|
explicit |
Construct a handler with optional GAP and AttributeServer pointers.
| gap | GAP singleton used for actions like restarting advertising. |
| attribute_server | Optional attribute server updated on connect. |
|
overridevirtual |
Logs the end of advertising.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs legacy advertising reports.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs the start of advertising.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs new connections and updates the attribute server handle.
Reimplemented from c7222::Gap::EventHandler.

|
overridevirtual |
Logs completion of connection parameter updates.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs data length changes.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs completion of dedicated bonding.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs disconnections and restarts advertising.
Reimplemented from c7222::Gap::EventHandler.

|
overridevirtual |
Logs extended advertising reports.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs completion of inquiry.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs inquiry results.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs presence of local OOB data.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs completion of pairing.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs the start of pairing.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs a periodic advertising report.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs periodic advertising sync establishment.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs loss of periodic advertising sync.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs PHY update completion.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs that privacy mode has been enabled.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs PHY read results.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs RSSI measurements.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs scan requests received by the advertiser.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs a scan timeout event.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs the negotiated security level.
Reimplemented from c7222::Gap::EventHandler.
|
overridevirtual |
Logs a request to update connection parameters.
Reimplemented from c7222::Gap::EventHandler.
| void GapEventHandler::SetAttributeServer | ( | c7222::AttributeServer * | attribute_server | ) |
Attach an attribute server after construction.
When a connection is established, the handler will call AttributeServer::SetConnectionHandle() with the active handle.
