|
Open Model Railroad Network (OpenMRN)
|
Producer class for GPIO bits. More...
#include <PolledProducer.hxx>
Public Member Functions | |
| template<typename... Fields> | |
| PolledProducer (const typename Debouncer::Options &debounce_args, Fields... bit_args) | |
| EventState | get_current_state () OVERRIDE |
| void | set_state (bool new_value) OVERRIDE |
| void | poll_33hz (WriteHelper *helper, Notifiable *done) OVERRIDE |
| This function will be called approximately 33 times per second by the refresh loop. | |
Private Attributes | |
| Debouncer | debouncer_ |
| BitEventProducer | producer_ |
Producer class for GPIO bits.
Polls the hardware state at a given frequency, applies a debouncing algorithm, and when the output of the devbouncing algorithm changes, requests the Producer class to update (i.e., generate the event report message to the OpenLCB bus).
Definition at line 48 of file PolledProducer.hxx.
|
inline |
Definition at line 52 of file PolledProducer.hxx.
|
inline |
Definition at line 61 of file PolledProducer.hxx.
|
inlinevirtual |
This function will be called approximately 33 times per second by the refresh loop.
It must notify done when it is finished using the writehelper.
Implements openlcb::Polling.
Definition at line 71 of file PolledProducer.hxx.
|
inline |
Definition at line 66 of file PolledProducer.hxx.
|
private |
Definition at line 84 of file PolledProducer.hxx.
|
private |
Definition at line 85 of file PolledProducer.hxx.