|
Open Model Railroad Network (OpenMRN)
|
Implementation of the BitEventInterface that has accessors to the desired and actual state, but does not perform callback on change. More...
#include <EventHandlerTemplates.hxx>
Public Member Functions | |
| DistributedBit (Node *node, uint64_t event_on, uint64_t event_off) | |
| ~DistributedBit () | |
| Destructor. | |
| Node * | node () override |
| Get a refference to the owning Node. | |
| EventState | get_current_state () override |
| Get the current state. | |
| EventState | get_requested_state () override |
| Get the requested state. | |
| void | set_state (bool new_value) override |
| Set the current state. | |
| void | set_requested_state (bool new_value) |
| Set the requested state. | |
| void | toggle_state () |
| Invert the requested state from the current state. | |
Public Member Functions inherited from openlcb::BitEventInterface | |
| BitEventInterface (uint64_t event_on, uint64_t event_off) | |
| uint64_t | event_on () |
| returns the event ID for representing the state transition OFF->ON. | |
| uint64_t | event_off () |
| returns the event ID for representing the state transition ON->OFF. | |
Private Member Functions | |
| DISALLOW_COPY_AND_ASSIGN (DistributedBit) | |
Private Attributes | |
| Node * | node_ |
| node that this interface is bound to | |
| EventState | state_ |
| Event state. | |
| EventState | requested_ |
| Event state reauested. | |
Implementation of the BitEventInterface that has accessors to the desired and actual state, but does not perform callback on change.
Definition at line 231 of file EventHandlerTemplates.hxx.
|
inline |
Definition at line 234 of file EventHandlerTemplates.hxx.
|
inline |
Destructor.
Definition at line 243 of file EventHandlerTemplates.hxx.
|
inlineoverridevirtual |
Get the current state.
Implements openlcb::BitEventInterface.
Definition at line 256 of file EventHandlerTemplates.hxx.
|
inlineoverridevirtual |
Get the requested state.
Reimplemented from openlcb::BitEventInterface.
Definition at line 263 of file EventHandlerTemplates.hxx.
|
inlineoverridevirtual |
Get a refference to the owning Node.
Implements openlcb::BitEventInterface.
Definition at line 249 of file EventHandlerTemplates.hxx.
|
inline |
Set the requested state.
| new | requested value |
Definition at line 277 of file EventHandlerTemplates.hxx.
|
inlineoverridevirtual |
Set the current state.
| new | state value |
Implements openlcb::BitEventInterface.
Definition at line 270 of file EventHandlerTemplates.hxx.
|
inline |
Invert the requested state from the current state.
Definition at line 283 of file EventHandlerTemplates.hxx.
|
private |
node that this interface is bound to
Definition at line 291 of file EventHandlerTemplates.hxx.
|
private |
Event state reauested.
Definition at line 297 of file EventHandlerTemplates.hxx.
|
private |
Event state.
Definition at line 294 of file EventHandlerTemplates.hxx.