RTXI  3.0.0
The Real-Time eXperiment Interface Reference Manual
Public Member Functions
Event::Manager Class Reference

#include <event.hpp>

Collaboration diagram for Event::Manager:
Collaboration graph

Public Member Functions

 Manager ()
 Manager (const Manager &manager)=delete
Manageroperator= (const Manager &manager)=delete
 Manager (Manager &&)=delete
Manageroperator= (Manager &&)=delete
 ~Manager ()
void postEvent (Object *event)
void postEvent (std::vector< Object > &events)
void registerHandler (Handler *handler)
void unregisterHandler (Handler *handler)
bool isRegistered (Handler *handler)
eventLoggergetLogger ()

Detailed Description

Definition at line 255 of file event.hpp.

Constructor & Destructor Documentation

◆ Manager() [1/3]


Definition at line 233 of file event.cpp.

Here is the call graph for this function:

◆ Manager() [2/3]

Event::Manager::Manager(const Managermanager)

◆ Manager() [3/3]

Event::Manager::Manager(Manager && )

◆ ~Manager()


Definition at line 282 of file event.cpp.

Member Function Documentation

◆ getLogger()

eventLogger* Event::Manager::getLogger()

Returns a pointer to the event logger

The event manager class also logs all messages being passed around in RTXI and sends them to standard output. These logs are automatically generated in the event processor thread, and the only other part of the system that requires access to the logger is the telemitry processor, which will also log all telemitry received by RTXI from the RT::System class in the realtime thread.

Raw pointer to eventLogger class
See also

Definition at line 333 of file event.hpp.

◆ isRegistered()

bool Event::Manager::isRegistered(Event::Handlerhandler)

Checks Whether the handler is registered

handlerPointer to handler to check registration
True if handler is registered, false otherwise.

Definition at line 356 of file event.cpp.

◆ operator=() [1/2]

Manager& Event::Manager::operator=(const Managermanager)

◆ operator=() [2/2]

Manager& Event::Manager::operator=(Manager && )

◆ postEvent() [1/2]

void Event::Manager::postEvent(Event::Objectevent)

Function for posting an event to be signaled.

The event manager will take the object and route it to all event handlers registered. This is done by passing the event through a thread-safe queue, which is then processed by event handler workers. This is synchronous, meaning that it blocks until all event handlers return. In addition, the event manager automatically marks the event as done right before returning.This function should only be called from non-realtime.

eventThe event to be posted.
See also

Definition at line 299 of file event.cpp.

Here is the call graph for this function:

◆ postEvent() [2/2]

void Event::Manager::postEvent(std::vector< Object > & events)

Function for posting multiple events at the same time.

The order at which these events are posted are preserved. This is more efficient for situations where multiple events can be generated from a single action(loading multiple plugins, loading settings file that changes many parameters, unregister module, etc.). Will block until all events are processed.

eventsA vector of events that will be published

Definition at line 315 of file event.cpp.

◆ registerHandler()

void Event::Manager::registerHandler(Event::Handlerhandler)

Registers handler in the registry

handlerpointer of handler to add to registry

Definition at line 336 of file event.cpp.

◆ unregisterHandler()

void Event::Manager::unregisterHandler(Event::Handlerhandler)

Removes handler from registry

handlerpointer of handler to remove from registry

Definition at line 346 of file event.cpp.

The documentation for this class was generated from the following files: