|
Open Model Railroad Network (OpenMRN)
|
Abstract base class for all event handlers. More...
#include <EventHandler.hxx>
Public Types | |
| using | EventReport = openlcb::EventReport |
| using | EventRegistryEntry = openlcb::EventRegistryEntry |
| using | EventId = openlcb::EventId |
Public Member Functions | |
| virtual void | handle_event_report (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done)=0 |
| Called on incoming EventReport messages. | |
| virtual void | handle_consumer_identified (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done) |
| Called on another node sending ConsumerIdentified for this event. | |
| virtual void | handle_consumer_range_identified (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done) |
| Called on another node sending ConsumerRangeIdentified. | |
| virtual void | handle_producer_identified (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done) |
| Called on another node sending ProducerIdentified for this event. | |
| virtual void | handle_producer_range_identified (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done) |
| Called on another node sending ProducerRangeIdentified for this event. | |
| virtual void | handle_identify_global (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done)=0 |
| Called on the need of sending out identification messages. | |
| virtual void | handle_identify_consumer (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done)=0 |
| Called on another node sending IdentifyConsumer. | |
| virtual void | handle_identify_producer (const EventRegistryEntry ®istry_entry, EventReport *event, BarrierNotifiable *done)=0 |
| Called on another node sending IdentifyProducer. | |
Abstract base class for all event handlers.
Instances of this class can get registered with the event service to receive notifications of incoming event messages from the bus.
Definition at line 142 of file EventHandler.hxx.
| using openlcb::EventHandler::EventId = openlcb::EventId |
Definition at line 147 of file EventHandler.hxx.
Definition at line 146 of file EventHandler.hxx.
Definition at line 145 of file EventHandler.hxx.
|
inlinevirtual |
Definition at line 149 of file EventHandler.hxx.
|
inlinevirtual |
Called on another node sending ConsumerIdentified for this event.
| event | stores information about the incoming message. Filled: event_id, mask=1, src_node, state. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Reimplemented in openlcb::BroadcastTimeServer, openlcb::CallbackEventHandler, openlcb::BitEventPC, openlcb::ByteRangeEventP, and openlcb::BitRangeNonAuthoritativeEventP.
Definition at line 168 of file EventHandler.hxx.
|
inlinevirtual |
Called on another node sending ConsumerRangeIdentified.
| event | stores information about the incoming message. Filled: event id, mask (!= 1), src_node. Not filled: state. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Reimplemented in openlcb::ByteRangeEventP, and openlcb::BroadcastTimeServer.
Definition at line 180 of file EventHandler.hxx.
|
pure virtual |
Called on incoming EventReport messages.
| event | stores information about the incoming message. Filled: src_node, event. Mask is always 1 (filled in). state is not filled in. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Implemented in openlcb::BroadcastTimeClient, openlcb::BroadcastTimeServer, openlcb::CallbackEventHandler, openlcb::BitEventConsumer, openlcb::BitRangeEventPC, openlcb::BitRangeEventP, openlcb::ByteRangeEventC, openlcb::ByteRangeEventP, openlcb::BitRangeNonAuthoritativeEventP, openlcb::ConfiguredPulseConsumer, openlcb::DccAccyConsumerBase, and openlcb::DccExtAccyConsumerBase.
|
pure virtual |
Called on another node sending IdentifyConsumer.
| event | stores information about the incoming message. Filled: src_node, event, mask=1. Not filled: state. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Implemented in openlcb::BroadcastTimeClient, openlcb::BroadcastTimeServer, openlcb::DccAccyConsumerBase, openlcb::DccExtAccyConsumerBase, openlcb::BitEventConsumer, openlcb::BitRangeEventPC, openlcb::BitRangeEventP, openlcb::ByteRangeEventC, openlcb::ByteRangeEventP, openlcb::LatencyTestConsumer, openlcb::CallbackEventHandler, and openlcb::ConfiguredPulseConsumer.
|
pure virtual |
Called on the need of sending out identification messages.
| event | is NULL. This happens on startup, or when a global or addressed IdentifyGlobal message arrives. Might have destination node id! |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Implemented in openlcb::BroadcastTimeClient, openlcb::BroadcastTimeServer, openlcb::BitEventProducer, openlcb::BitEventConsumer, openlcb::BitEventPC, openlcb::BitRangeEventPC, openlcb::BitRangeEventP, openlcb::ByteRangeEventC, openlcb::ByteRangeEventP, openlcb::BitRangeNonAuthoritativeEventP, openlcb::CallbackEventHandler, openlcb::ConfiguredPulseConsumer, openlcb::DccAccyConsumerBase, openlcb::DccExtAccyConsumerBase, openlcb::FixedEventProducer< EVENT_ID >, openlcb::FixedEventProducer< openlcb::TractionDefs::IS_TRAIN_EVENT >, openlcb::FixedEventProducer< TractionDefs::IS_PROXY_EVENT >, and openlcb::LatencyTestConsumer.
|
pure virtual |
Called on another node sending IdentifyProducer.
| event | stores information about the incoming message. Filled: src_node, event, mask=1. Not filled: state. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Implemented in openlcb::BroadcastTimeClient, openlcb::BroadcastTimeServer, openlcb::BitEventProducer, openlcb::BitEventPC, openlcb::BitRangeEventPC, openlcb::ByteRangeEventP, openlcb::BitRangeNonAuthoritativeEventP, openlcb::CallbackEventHandler, openlcb::FixedEventProducer< EVENT_ID >, openlcb::FixedEventProducer< openlcb::TractionDefs::IS_TRAIN_EVENT >, and openlcb::FixedEventProducer< TractionDefs::IS_PROXY_EVENT >.
|
inlinevirtual |
Called on another node sending ProducerIdentified for this event.
| event | stores information about the incoming message. Filled: event_id, mask=1, src_node, state. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| user_arg | is an opaque argument passed in from the registration. |
| done | must be notified when the processing is done. |
Reimplemented in openlcb::BroadcastTimeClient, openlcb::CallbackEventHandler, and openlcb::BitEventConsumer.
Definition at line 193 of file EventHandler.hxx.
|
inlinevirtual |
Called on another node sending ProducerRangeIdentified for this event.
| event | stores information about the incoming message. Filled: event id, mask (!= 1), src_node. Not filled: state. |
| registry_entry | gives the registry entry for which the current handler is being called. |
| done | must be notified when the processing is done. |
Definition at line 206 of file EventHandler.hxx.