fesa::RTEvent Class Reference

This class defines an event created by an event source. More...

#include <RTEvent.h>

Inheritance diagram for fesa::RTEvent:
fesa::AbstractEvent fesa::OnDemandEvent

List of all members.

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 ()
RTEventPayloadgetPayload ()
 Retrieves the payload attached to the event.
AbstractEventSourcegetEventSource ()
 Retrieves the event source that produced the event.
const std::string & getName () const

Protected Attributes

RTEventPayloadpayload_
 Pointer to the event payload attached to the event.
std::string concreteEventName_

Private Attributes

AbstractEventSourcepEvtSrc_

Friends

class AbstractRTAction

Detailed Description

This class defines an event created by an event source.

Definition at line 20 of file RTEvent.h.


Constructor & Destructor Documentation

fesa::RTEvent::RTEvent ( const std::string &  concreteEventName,
MultiplexingContext context,
AbstractEventSource pEvtSrc 
)
fesa::RTEvent::RTEvent ( const std::string &  concreteEventName,
MultiplexingContext context,
AbstractEventSource pEvtSrc,
RTEventPayload pPayload 
)

Constructor.

Parameters:
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]

Member Function Documentation

AbstractEventSource * fesa::RTEvent::getEventSource (  ) 

Retrieves the event source that produced the event.

Returns:
a pointer to the event source that triggered the event

Definition at line 72 of file RTEvent.cpp.

References pEvtSrc_.

const std::string & fesa::RTEvent::getName (  )  const [inline]
RTEventPayload * fesa::RTEvent::getPayload (  )  [inline]

Retrieves the payload attached to the event.

Returns:
a pointer to the payload object conveyed by the event. The payload can be null if no payload exists. The RTEventPayload is basically a string and customEventSource has to sub-class it to fit specific needs
Exceptions:
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_.


Friends And Related Function Documentation

friend class AbstractRTAction [friend]

Definition at line 74 of file RTEvent.h.


Member Data Documentation

std::string fesa::RTEvent::concreteEventName_ [protected]

Definition at line 68 of file RTEvent.h.

Referenced by getName(), and getPayload().

Pointer to the event payload attached to the event.

Definition at line 66 of file RTEvent.h.

Referenced by getPayload(), and ~RTEvent().

Definition at line 72 of file RTEvent.h.

Referenced by getEventSource().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1