fesa::TimerEventSource Class Reference

#include <TimerEventSource.h>

Inheritance diagram for fesa::TimerEventSource:
fesa::AbstractEventSource fesa::Thread

List of all members.

Private Member Functions

 TimerEventSource ()
 constructor
 ~TimerEventSource ()
 destructor
void connect (boost::shared_ptr< fesa::EventElement > &eventElement)
 fill the timer information with the information from the instance document
RTEventwait ()
 this method returns a real time event source according to the periods provided in the instance document
RTEventfireNextEvent ()
 this method fires the first event in the queue

Private Attributes

int64_t totalDelay_
 contains the number of ms that have passed since the event source started
std::vector< std::string > eventNamesCol_
 lists of the events that can be fired by this event source
std::vector< int32_t > eventDelaysCol_
 period of each event. This period defines the time that the abstract event source has to wait before firing the same event again
std::vector< int64_t > eventTotalDelaysCol_
 each entry contains the time in ms at which the event will be fired. Those ms are relative to the totalDelay, which contains the ms that have passed since the event source started for instance if an entry contains 120 and the total delay is 60, then the event will be fired in 60 ms
std::deque< int32_t > eventsToFire_
std::vector< int32_t > eventsFired_
 number of times that each event has been fired

Friends

class AbstractRealTimeLabObjectFactory
class AbstractEventSourceFactory

Detailed Description

Definition at line 30 of file TimerEventSource.h.


Constructor & Destructor Documentation

fesa::TimerEventSource::TimerEventSource (  )  [private]

constructor

Definition at line 38 of file TimerEventSource.cpp.

fesa::TimerEventSource::~TimerEventSource (  )  [private]

destructor

Definition at line 44 of file TimerEventSource.cpp.


Member Function Documentation

void fesa::TimerEventSource::connect ( boost::shared_ptr< fesa::EventElement > &  eventElement  )  [private, virtual]

fill the timer information with the information from the instance document

Parameters:
eventElement that contains the information from the instance document

Implements fesa::AbstractEventSource.

Definition at line 48 of file TimerEventSource.cpp.

References eventDelaysCol_, eventNamesCol_, eventsFired_, eventTotalDelaysCol_, FesaErrorWrongTimerPeriod, and fesa::TIMER_TAG_PERIOD.

RTEvent * fesa::TimerEventSource::fireNextEvent (  )  [private]

this method fires the first event in the queue

Definition at line 117 of file TimerEventSource.cpp.

References eventNamesCol_, eventsFired_, eventsToFire_, and fesa::AbstractEventSource::RTEvent.

Referenced by wait().

RTEvent * fesa::TimerEventSource::wait (  )  [private, virtual]

this method returns a real time event source according to the periods provided in the instance document

Implements fesa::AbstractEventSource.

Definition at line 65 of file TimerEventSource.cpp.

References eventDelaysCol_, eventsToFire_, eventTotalDelaysCol_, fireNextEvent(), and totalDelay_.


Friends And Related Function Documentation

friend class AbstractEventSourceFactory [friend]

Reimplemented from fesa::AbstractEventSource.

Definition at line 38 of file TimerEventSource.h.

friend class AbstractRealTimeLabObjectFactory [friend]

Definition at line 37 of file TimerEventSource.h.


Member Data Documentation

std::vector<int32_t> fesa::TimerEventSource::eventDelaysCol_ [private]

period of each event. This period defines the time that the abstract event source has to wait before firing the same event again

Definition at line 81 of file TimerEventSource.h.

Referenced by connect(), and wait().

std::vector<std::string> fesa::TimerEventSource::eventNamesCol_ [private]

lists of the events that can be fired by this event source

Definition at line 73 of file TimerEventSource.h.

Referenced by connect(), and fireNextEvent().

number of times that each event has been fired

Definition at line 109 of file TimerEventSource.h.

Referenced by connect(), and fireNextEvent().

std::deque<int32_t> fesa::TimerEventSource::eventsToFire_ [private]

Definition at line 98 of file TimerEventSource.h.

Referenced by fireNextEvent(), and wait().

std::vector<int64_t> fesa::TimerEventSource::eventTotalDelaysCol_ [private]

each entry contains the time in ms at which the event will be fired. Those ms are relative to the totalDelay, which contains the ms that have passed since the event source started for instance if an entry contains 120 and the total delay is 60, then the event will be fired in 60 ms

Definition at line 90 of file TimerEventSource.h.

Referenced by connect(), and wait().

contains the number of ms that have passed since the event source started

Definition at line 67 of file TimerEventSource.h.

Referenced by wait().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1