|
A.R.G.U.S 2.1.0
Adaptive Real-Time Guardian for Unsafe Situations
|
GPIO character-device based physical button module. More...
#include <PhysicalButtonModule.hpp>
Public Member Functions | |
| PhysicalButtonModule () | |
| Construct module from environment-derived configuration. | |
| ~PhysicalButtonModule () | |
| Destroy module and release any open line descriptors. | |
| PhysicalButtonModule (const PhysicalButtonConfig &config) | |
| Construct module with explicit configuration. | |
| bool | available () const noexcept |
| Check whether at least one input channel is available. | |
| bool | poll (PhysicalButtonEvent &event) noexcept |
| Poll channels and emit a debounced semantic event if available. | |
| bool | waitForEvent (PhysicalButtonEvent &event, std::chrono::milliseconds timeout) noexcept |
| Wait for next debounced event using blocking GPIO edge reads. | |
| bool | readAcknowledgePressed (bool &pressed) noexcept |
| Read current acknowledge-button pressed state. | |
| const char * | lastErrorString () const noexcept |
| Get last error string. | |
| const char * | statusString () const noexcept |
| Get compact status summary string. | |
Static Public Member Functions | |
| static PhysicalButtonConfig | configFromEnvironment () noexcept |
| Build button configuration from environment variables. | |
| static const char * | eventToString (PhysicalButtonEvent event) noexcept |
| Convert semantic event enum to readable string. | |
Definition at line 39 of file PhysicalButtonModule.hpp.
| PhysicalButtonModule::PhysicalButtonModule | ( | ) |
Definition at line 314 of file PhysicalButtonModule.cpp.
| PhysicalButtonModule::~PhysicalButtonModule | ( | ) |
Definition at line 317 of file PhysicalButtonModule.cpp.
|
explicit |
| config | Button channel mapping and debounce options. |
Definition at line 332 of file PhysicalButtonModule.cpp.
References ACK_REQUEST, PhysicalButtonConfig::acknowledge_gpio, PhysicalButtonConfig::arm_gpio, ARM_REQUEST, PhysicalButtonConfig::debounce, PhysicalButtonConfig::disarm_gpio, and DISARM_REQUEST.
|
noexcept |
true when module has at least one active channel. Definition at line 356 of file PhysicalButtonModule.cpp.
Referenced by AppController::runButtonTest(), and AppController::runLiveMarkerTest().
|
staticnoexcept |
Definition at line 479 of file PhysicalButtonModule.cpp.
References PhysicalButtonConfig::acknowledge_gpio, PhysicalButtonConfig::active_low, PhysicalButtonConfig::arm_gpio, PhysicalButtonConfig::debounce, and PhysicalButtonConfig::disarm_gpio.
|
staticnoexcept |
| event | Event value. |
Definition at line 491 of file PhysicalButtonModule.cpp.
References ACK_REQUEST, ARM_REQUEST, and DISARM_REQUEST.
Referenced by AppController::runButtonTest(), and AppController::runLiveMarkerTest().
|
noexcept |
Definition at line 465 of file PhysicalButtonModule.cpp.
Referenced by AppController::runButtonTest(), and AppController::runLiveMarkerTest().
|
noexcept |
| event | Output event populated on success. |
true when an event is emitted; otherwise false. Definition at line 360 of file PhysicalButtonModule.cpp.
|
noexcept |
| pressed | Output flag populated on success. |
true when read succeeded, otherwise false. Definition at line 451 of file PhysicalButtonModule.cpp.
|
noexcept |
Definition at line 472 of file PhysicalButtonModule.cpp.
Referenced by AppController::runButtonTest(), and AppController::runLiveMarkerTest().
|
noexcept |
| event | Output event populated on success. |
| timeout | Maximum wait duration. |
true when event is received before timeout, otherwise false. Definition at line 368 of file PhysicalButtonModule.cpp.
Referenced by AppController::runButtonTest().