|
ELEC-C7222
Libraries for ELEC C7222 Course Work
|
Minimal characteristic event handler for examples. More...
#include <characteristic_event_handler.hpp>


Public Member Functions | |
| void | OnUpdatesEnabled (bool is_indication) override |
| Called when notifications or indications are enabled. | |
| void | OnUpdatesDisabled () override |
| Called when notifications or indications are disabled. | |
| void | OnIndicationComplete (uint8_t status) override |
| Called after an indication is confirmed by the client. | |
| void | OnBroadcastEnabled () override |
| Called when broadcast is enabled on the characteristic. | |
| void | OnBroadcastDisabled () override |
| Called when broadcast is disabled on the characteristic. | |
| void | OnRead () override |
| Called when the characteristic value is read. | |
| void | OnWrite (const std::vector< uint8_t > &data) override |
| Called when the characteristic value is written. | |
| void | OnConfirmationReceived (bool status) override |
| Called when a confirmation is received. | |
| void | SetCharacteristicName (const std::string &name) |
| Set a label used in log output. | |
| std::string | GetCharacteristicName () const |
| Get the current log label for the handler. | |
Additional Inherited Members | |
Protected Member Functions inherited from c7222::Characteristic::EventHandler | |
| virtual | ~EventHandler ()=default |
| Virtual destructor for the EventHandlers interface. | |
Minimal characteristic event handler for examples.
Prints events (read/write/notify/indicate) to the console. The handler is intentionally minimal so students can observe event flow without extra logic.
|
inline |
Get the current log label for the handler.
|
overridevirtual |
Called when broadcast is disabled on the characteristic.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called when broadcast is enabled on the characteristic.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called when a confirmation is received.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called after an indication is confirmed by the client.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called when the characteristic value is read.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called when notifications or indications are disabled.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called when notifications or indications are enabled.
Reimplemented from c7222::Characteristic::EventHandler.
|
overridevirtual |
Called when the characteristic value is written.
Reimplemented from c7222::Characteristic::EventHandler.
|
inline |
Set a label used in log output.
This makes example logs easier to read when multiple characteristics exist.
