This class extends the AbstractEventSource class to provide a mechanism that allows clients to fire real time actions in a server/RT-action. The sending action puts a message in a message queue. The OnDemandEventSource class reads this message from the queue and fires a RTEvent. More...
#include <OnDemandEventSource.h>
Public Member Functions | ||||
OnDemandEventSource (std::string name, boost::shared_ptr< OnDemandConsumer > eventConsumer) | ||||
virtual | ~OnDemandEventSource () | |||
Private Member Functions | ||||
void | connect (boost::shared_ptr< fesa::EventElement > &eventElement) | |||
Connects the new discrete event source. It is up to each derived event source to perform the right actions to connect the event.
| ||||
RTEvent * | wait () | |||
returns the RT event or NULL if the message is invalid | ||||
Private Attributes | ||||
boost::shared_ptr < OnDemandConsumer > | eventConsumer_ | |||
used to requests messages from the server side |
This class extends the AbstractEventSource class to provide a mechanism that allows clients to fire real time actions in a server/RT-action. The sending action puts a message in a message queue. The OnDemandEventSource class reads this message from the queue and fires a RTEvent.
Definition at line 22 of file OnDemandEventSource.h.
fesa::OnDemandEventSource::OnDemandEventSource | ( | std::string | name, | |
boost::shared_ptr< OnDemandConsumer > | eventConsumer | |||
) |
Definition at line 25 of file OnDemandEventSource.cpp.
References fesa::AbstractEventSource::disable().
fesa::OnDemandEventSource::~OnDemandEventSource | ( | ) | [virtual] |
Definition at line 32 of file OnDemandEventSource.cpp.
void fesa::OnDemandEventSource::connect | ( | boost::shared_ptr< fesa::EventElement > & | eventElement | ) | [private, virtual] |
Connects the new discrete event source. It is up to each derived event source to perform the right actions to connect the event.
FesaException. |
Implements fesa::AbstractEventSource.
Definition at line 73 of file OnDemandEventSource.cpp.
References fesa::AbstractEventSource::enable().
RTEvent * fesa::OnDemandEventSource::wait | ( | ) | [private, virtual] |
returns the RT event or NULL if the message is invalid
Implements fesa::AbstractEventSource.
Definition at line 37 of file OnDemandEventSource.cpp.
References fesa::OnDemandMessage::cycleName_, eventConsumer_, fesa::RTEvent::getName(), fesa::AbstractEventSource::getName(), fesa::OnDemandMessage::payload_, and fesa::OnDemandMessage::payloadSize_.
boost::shared_ptr<OnDemandConsumer> fesa::OnDemandEventSource::eventConsumer_ [private] |
used to requests messages from the server side
Definition at line 42 of file OnDemandEventSource.h.
Referenced by wait().