|
Open Model Railroad Network (OpenMRN)
|
Shared notification structure that is assembled for each incoming event-related message, and passed around to all event handlers. More...
#include <EventHandler.hxx>
Public Member Functions | |
| template<int N> | |
| WriteHelper * | event_write_helper () |
| These allow event handlers to produce up to four messages per invocation. | |
| EventReport (TestingEnum) | |
| Public constructor for use in tests only. | |
Public Attributes | |
| EventId | event |
| The event ID from the incoming message. | |
| EventId | mask |
| Specifies the mask in case the request is for an event range. | |
| NodeHandle | src_node |
| Information about the sender of the incoming event-related OpenLCB message. | |
| Node * | dst_node |
| nullptr for global messages; points to the specific virtual node for addressed events identify message. | |
| EventState | state |
| For producer/consumer identified messages, specifies the state of the producer/consumer as the sender of the message (valid/invalid/unknown/reserved). | |
Private Member Functions | |
| EventReport () | |
| Constrained access to the constructors. | |
Private Attributes | |
| WriteHelper | write_helpers [4] |
| Static objects usable by all event handler implementations. | |
Friends | |
| class | EventIteratorFlow |
| class | DecoderRangeTest |
Shared notification structure that is assembled for each incoming event-related message, and passed around to all event handlers.
Definition at line 64 of file EventHandler.hxx.
|
inline |
Public constructor for use in tests only.
Definition at line 95 of file EventHandler.hxx.
|
inlineprivate |
Constrained access to the constructors.
We do this because the EventReport structure is pretty expensive due to the statically allocated memory of the write helpers. Only the EventIteratorFlow should have objects of this type.
Definition at line 104 of file EventHandler.hxx.
|
inline |
These allow event handlers to produce up to four messages per invocation.
They are always available at the entry to an event handler function.
Definition at line 88 of file EventHandler.hxx.
|
friend |
Definition at line 106 of file EventHandler.hxx.
|
friend |
Definition at line 105 of file EventHandler.hxx.
| Node* openlcb::EventReport::dst_node |
nullptr for global messages; points to the specific virtual node for addressed events identify message.
Definition at line 79 of file EventHandler.hxx.
| EventId openlcb::EventReport::event |
The event ID from the incoming message.
Definition at line 67 of file EventHandler.hxx.
| EventId openlcb::EventReport::mask |
Specifies the mask in case the request is for an event range.
The low bits are set to one, the high bits are set to zero. Ranges of size 1 have mask==0, a range that covers all events has mask==0xffff...f.
Definition at line 72 of file EventHandler.hxx.
| NodeHandle openlcb::EventReport::src_node |
Information about the sender of the incoming event-related OpenLCB message.
It is not specified whether the node_id or the alias is specified, but they are not both zero.
Definition at line 76 of file EventHandler.hxx.
| EventState openlcb::EventReport::state |
For producer/consumer identified messages, specifies the state of the producer/consumer as the sender of the message (valid/invalid/unknown/reserved).
Definition at line 83 of file EventHandler.hxx.
|
private |
Static objects usable by all event handler implementations.
Definition at line 109 of file EventHandler.hxx.