|
Open Model Railroad Network (OpenMRN)
|
#include <EventService.hxx>
Classes | |
| class | Impl |
| PImpl class for the EventService. More... | |
Public Member Functions | |
| EventService (ExecutorBase *e) | |
| Creates a global event service with no interfaces registered. | |
| EventService (If *iface) | |
| Creates a global event service that runs on an interface's thread and registers the interface. | |
| void | register_interface (If *iface) |
| Registers this global event handler with an interface. | |
| Impl * | impl () |
| bool | event_processing_pending () |
| Returns true if there are outstanding events that are not yet handled. | |
Public Member Functions inherited from Service | |
| Service (ExecutorBase *e) | |
| Constructor. | |
| ~Service () | |
| Destructor. | |
| ExecutorBase * | executor () |
Static Public Attributes | |
| static EventService * | instance = nullptr |
Private Attributes | |
| std::unique_ptr< Impl > | impl_ |
Global Event Service.
Registers itself with a specific interface to receive all incoming messages related to the OpenLCB Event Protocol, maintains the registry of event handlers, and routes the incoming messages to the event handlers based on the registration arguments.
Definition at line 67 of file EventService.hxx.
| openlcb::EventService::EventService | ( | ExecutorBase * | e | ) |
Creates a global event service with no interfaces registered.
Definition at line 23 of file EventService.cxx.
| openlcb::EventService::EventService | ( | If * | iface | ) |
Creates a global event service that runs on an interface's thread and registers the interface.
Definition at line 30 of file EventService.cxx.
| openlcb::EventService::~EventService | ( | ) |
Definition at line 38 of file EventService.cxx.
| bool openlcb::EventService::event_processing_pending | ( | ) |
Returns true if there are outstanding events that are not yet handled.
Definition at line 107 of file EventService.cxx.
|
inline |
Definition at line 82 of file EventService.hxx.
| void openlcb::EventService::register_interface | ( | If * | iface | ) |
Registers this global event handler with an interface.
This operation will be undone in the destructor.
Definition at line 44 of file EventService.cxx.
|
private |
Definition at line 94 of file EventService.hxx.
|
static |
Definition at line 91 of file EventService.hxx.