fesa::AbstractEventSourceFactory Class Reference

This factory provides methods to handle events sources. More...

#include <AbstractEventSourceFactory.h>

List of all members.

Public Member Functions

AbstractEventSourcecreateEventSource (const std::string &className, const std::string &eventSourceName, const EventSourceType &type)

Static Public Member Functions

static void deleteEventSources ()
 browse the Map of event-sources and remove them.
static void startEventSources ()
 browse the Map of event-sources and start them.
static void stopEventSources ()
 stops all the event sources in the equipment
static AbstractEventSourcegetEventSource (const std::string &className, const std::string &eventSourceName)
 this method returns one particular instance of the event-source by its name and class. throws an exception if the source doesnt exist
static bool eventSourceExists (const std::string &className, const std::string &eventSourceName)
static void printConfigAll (FesaStream *fesaStream)
 This method prints, on the fesaStream passed as a parameter, the configuration of this abstract event source.
static void printStateAll (FesaStream *fesaStream, double elapsedTime)
 this method prints, on the fesaStream passed as a parameter, the state of this abstract event source

Protected Member Functions

virtual AbstractEventSourcecreateCustomEventSource (const std::string &eventSourceName)=0
 This method creates a custom(user-defined) event source.
virtual AbstractEventSourcecreateOnSubscriptionEventSource (const std::string &eventSourceName)=0
 This method creates an OnSubscriptionEventSource by name. The implementation of this method is in the generated code, to prevent the RT from permanently including all RDA sources.
 AbstractEventSourceFactory ()
virtual ~AbstractEventSourceFactory ()

Protected Attributes

AbstractRealTimeLabObjectFactorylabFactory_
 reference to the lab factory to create lab dependent event sources such as the timing event source Is filled in the generated code

Private Types

typedef const std::string EventSourceName
typedef const std::string ClassName
typedef const std::pair
< EventSourceName, ClassName
EventSourceKey
typedef std::map
< EventSourceKey,
AbstractEventSource * > 
EventSourceMap

Private Member Functions

AbstractEventSourcecreateTimingEventSource (const std::string &eventSourceName)
AbstractEventSourcecreateTimerEventSource (const std::string &eventSourceName)
AbstractEventSourcecreateOnDemandEventSource (const std::string &className, const std::string &eventSourceName)

Static Private Member Functions

static EventSourceKey generateKey (const std::string &className, const std::string &eventSourceName)
 Generates an unique key, in order to identify an event-source.

Static Private Attributes

static EventSourceMap eventSourceMap_
 Map which keeps track about all created event sources.

Detailed Description

This factory provides methods to handle events sources.

Definition at line 18 of file AbstractEventSourceFactory.h.


Member Typedef Documentation

typedef const std::string fesa::AbstractEventSourceFactory::ClassName [private]

Definition at line 87 of file AbstractEventSourceFactory.h.

Definition at line 88 of file AbstractEventSourceFactory.h.

Definition at line 89 of file AbstractEventSourceFactory.h.

typedef const std::string fesa::AbstractEventSourceFactory::EventSourceName [private]

Definition at line 86 of file AbstractEventSourceFactory.h.


Constructor & Destructor Documentation

fesa::AbstractEventSourceFactory::AbstractEventSourceFactory (  )  [protected]

Definition at line 32 of file AbstractEventSourceFactory.cpp.

fesa::AbstractEventSourceFactory::~AbstractEventSourceFactory (  )  [protected, virtual]

Definition at line 37 of file AbstractEventSourceFactory.cpp.


Member Function Documentation

virtual AbstractEventSource* fesa::AbstractEventSourceFactory::createCustomEventSource ( const std::string &  eventSourceName  )  [protected, pure virtual]

This method creates a custom(user-defined) event source.

Referenced by createEventSource().

AbstractEventSource * fesa::AbstractEventSourceFactory::createEventSource ( const std::string &  className,
const std::string &  eventSourceName,
const EventSourceType type 
)
AbstractEventSource * fesa::AbstractEventSourceFactory::createOnDemandEventSource ( const std::string &  className,
const std::string &  eventSourceName 
) [private]
virtual AbstractEventSource* fesa::AbstractEventSourceFactory::createOnSubscriptionEventSource ( const std::string &  eventSourceName  )  [protected, pure virtual]

This method creates an OnSubscriptionEventSource by name. The implementation of this method is in the generated code, to prevent the RT from permanently including all RDA sources.

Referenced by createEventSource().

AbstractEventSource * fesa::AbstractEventSourceFactory::createTimerEventSource ( const std::string &  eventSourceName  )  [private]
AbstractEventSource * fesa::AbstractEventSourceFactory::createTimingEventSource ( const std::string &  eventSourceName  )  [private]
void fesa::AbstractEventSourceFactory::deleteEventSources (  )  [static]

browse the Map of event-sources and remove them.

Definition at line 125 of file AbstractEventSourceFactory.cpp.

References eventSourceMap_.

Referenced by fesa::RTController::~RTController().

bool fesa::AbstractEventSourceFactory::eventSourceExists ( const std::string &  className,
const std::string &  eventSourceName 
) [static]
AbstractEventSourceFactory::EventSourceKey fesa::AbstractEventSourceFactory::generateKey ( const std::string &  className,
const std::string &  eventSourceName 
) [static, private]

Generates an unique key, in order to identify an event-source.

Definition at line 182 of file AbstractEventSourceFactory.cpp.

References fesa::ON_SUBSCRIPTION_EVENT_SOURCE_NAME, fesa::TIMER_EVENT_SOURCE_NAME, and fesa::TIMING_EVENT_SOURCE_NAME.

Referenced by createEventSource(), eventSourceExists(), and getEventSource().

AbstractEventSource * fesa::AbstractEventSourceFactory::getEventSource ( const std::string &  className,
const std::string &  eventSourceName 
) [static]
void fesa::AbstractEventSourceFactory::printConfigAll ( FesaStream fesaStream  )  [static]

This method prints, on the fesaStream passed as a parameter, the configuration of this abstract event source.

Parameters:
fesaStream in which the information will be printed

Definition at line 194 of file AbstractEventSourceFactory.cpp.

References eventSourceMap_.

void fesa::AbstractEventSourceFactory::printStateAll ( FesaStream fesaStream,
double  elapsedTime 
) [static]

this method prints, on the fesaStream passed as a parameter, the state of this abstract event source

Parameters:
fesaStream in which the information will be printed
elapsedTime interval of time to calculate the frequency of the fired events

Definition at line 204 of file AbstractEventSourceFactory.cpp.

References eventSourceMap_.

void fesa::AbstractEventSourceFactory::startEventSources (  )  [static]

browse the Map of event-sources and start them.

Definition at line 135 of file AbstractEventSourceFactory.cpp.

References eventSourceMap_.

Referenced by fesa::RTController::start().

void fesa::AbstractEventSourceFactory::stopEventSources (  )  [static]

stops all the event sources in the equipment

Definition at line 148 of file AbstractEventSourceFactory.cpp.

References eventSourceMap_.

Referenced by fesa::RTController::~RTController().


Member Data Documentation

Map which keeps track about all created event sources.

Definition at line 105 of file AbstractEventSourceFactory.h.

Referenced by createEventSource(), deleteEventSources(), eventSourceExists(), getEventSource(), printConfigAll(), printStateAll(), startEventSources(), and stopEventSources().

reference to the lab factory to create lab dependent event sources such as the timing event source Is filled in the generated code

Definition at line 82 of file AbstractEventSourceFactory.h.

Referenced by createTimingEventSource().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1