This class defines an event created by an event source. More...
#include <RTEvent.h>
Public Member Functions | |
RTEvent (const std::string &concreteEventName, MultiplexingContext *context, AbstractEventSource *pEvtSrc) | |
Constructor. | |
RTEvent (const std::string &concreteEventName, MultiplexingContext *context, AbstractEventSource *pEvtSrc, RTEventPayload *pPayload) | |
Constructor. | |
virtual | ~RTEvent () |
RTEventPayload * | getPayload () |
Retrieves the payload attached to the event. | |
AbstractEventSource * | getEventSource () |
Retrieves the event source that produced the event. | |
const std::string & | getName () const |
Protected Attributes | |
RTEventPayload * | payload_ |
Pointer to the event payload attached to the event. | |
std::string | concreteEventName_ |
Private Attributes | |
AbstractEventSource * | pEvtSrc_ |
Friends | |
class | AbstractRTAction |
This class defines an event created by an event source.
Definition at line 20 of file RTEvent.h.
fesa::RTEvent::RTEvent | ( | const std::string & | concreteEventName, | |
MultiplexingContext * | context, | |||
AbstractEventSource * | pEvtSrc | |||
) |
Constructor.
name | of the event | |
context | the context associated with the event. |
Definition at line 24 of file RTEvent.cpp.
References fesa::DiagnosticUtils::DiagnosticMessage::action, fesa::DiagnosticUtils::event, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::AbstractEquipment::getInstance(), getName(), fesa::DiagnosticUtils::DiagnosticMessage::name, fesa::DiagnosticUtils::DiagnosticMessage::side, fesa::DiagnosticUtils::DiagnosticMessage::source, and fesa::DiagnosticUtils::start.
fesa::RTEvent::RTEvent | ( | const std::string & | concreteEventName, | |
MultiplexingContext * | context, | |||
AbstractEventSource * | pEvtSrc, | |||
RTEventPayload * | pPayload | |||
) |
Constructor.
name | the name of the event | |
context | the context associated with the event. | |
pPayload | the address of the payload attached to the event If the event has a payload the custom code is responsible to allocate a dynamic payload object (can be a sub-class of the RTEventPayload) and to free it during the event consuming. |
Definition at line 39 of file RTEvent.cpp.
References fesa::DiagnosticUtils::DiagnosticMessage::action, fesa::DiagnosticUtils::event, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::AbstractEquipment::getInstance(), getName(), fesa::DiagnosticUtils::DiagnosticMessage::name, fesa::DiagnosticUtils::DiagnosticMessage::side, fesa::DiagnosticUtils::DiagnosticMessage::source, and fesa::DiagnosticUtils::start.
fesa::RTEvent::~RTEvent | ( | ) | [virtual] |
Definition at line 55 of file RTEvent.cpp.
References fesa::DiagnosticUtils::DiagnosticMessage::action, fesa::DiagnosticUtils::event, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::AbstractEquipment::getInstance(), getName(), fesa::AbstractEvent::muxContext_, fesa::DiagnosticUtils::DiagnosticMessage::name, payload_, fesa::DiagnosticUtils::DiagnosticMessage::side, fesa::DiagnosticUtils::DiagnosticMessage::source, and fesa::DiagnosticUtils::stop.
AbstractEventSource * fesa::RTEvent::getEventSource | ( | ) |
Retrieves the event source that produced the event.
Definition at line 72 of file RTEvent.cpp.
References pEvtSrc_.
const std::string & fesa::RTEvent::getName | ( | ) | const [inline] |
Definition at line 88 of file RTEvent.h.
References concreteEventName_.
Referenced by fesa::RTScheduler::logDiagnostics(), RTEvent(), fesa::RTScheduler::schedule(), fesa::OnDemandEventSource::wait(), and ~RTEvent().
RTEventPayload * fesa::RTEvent::getPayload | ( | ) | [inline] |
Retrieves the payload attached to the event.
This | method throws an exception in case the event is not configured to carry a payload |
Definition at line 79 of file RTEvent.h.
References concreteEventName_, FesaErrorGettingPayload, and payload_.
friend class AbstractRTAction [friend] |
std::string fesa::RTEvent::concreteEventName_ [protected] |
Definition at line 68 of file RTEvent.h.
Referenced by getName(), and getPayload().
RTEventPayload* fesa::RTEvent::payload_ [protected] |
Pointer to the event payload attached to the event.
Definition at line 66 of file RTEvent.h.
Referenced by getPayload(), and ~RTEvent().
AbstractEventSource* fesa::RTEvent::pEvtSrc_ [private] |
Definition at line 72 of file RTEvent.h.
Referenced by getEventSource().