fesa-core  5.0.1
fesa::AbstractEventSourceFactory Class Referenceabstract

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

#include <AbstractEventSourceFactory.h>

Public Member Functions

AbstractEventSourcecreateEventSource (const std::string &className, const std::string &eventSourceName, EventSourceType type)
 Create an event source. More...
 

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 void printConfigAll (FesaStream *fesaStream)
 This method prints, on the fesaStream passed as a parameter, the configuration of this abstract event source. More...
 
static void printStateAll (std::ostream &stream, double elapsedTime)
 this method prints, on the fesaStream passed as a parameter, the state of this abstract event source More...
 

Protected Member Functions

virtual AbstractEventSourcecreateCustomEventSource (const std::string &eventSourceName)=0
 Create a custom (user-defined) event source Although custom event sources exist per class, class name is not given as parameter because custom event sources's code is generated and the class name is available at code generation. More...
 
virtual AbstractEventSourcecreateOnSubscriptionEventSource (const std::string &eventSourceName, std::size_t eventQueueSize)=0
 Create an on-subscription event source The implementation of this method is provided in the generated code to prevent the RT from permanently including all RDA sources. More...
 
 AbstractEventSourceFactory (const ProcessConfigurer &processConfigurer, const boost::shared_ptr< Diagnostics > &diagnostics)
 Constructor. More...
 

Protected Attributes

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

Detailed Description

This factory provides methods to handle events sources.

Constructor & Destructor Documentation

fesa::AbstractEventSourceFactory::AbstractEventSourceFactory ( const ProcessConfigurer processConfigurer,
const boost::shared_ptr< Diagnostics > &  diagnostics 
)
protected

Constructor.

Parameters
processConfigurerThe process configurer object to take configuration properties from
diagnosticsThe diagnostics object to be passed to event sources created by this factory

Member Function Documentation

virtual AbstractEventSource* fesa::AbstractEventSourceFactory::createCustomEventSource ( const std::string &  eventSourceName)
protectedpure virtual

Create a custom (user-defined) event source Although custom event sources exist per class, class name is not given as parameter because custom event sources's code is generated and the class name is available at code generation.

Parameters
eventSourceNameThe name of the event source
Returns
The pointer to the created event source
AbstractEventSource * fesa::AbstractEventSourceFactory::createEventSource ( const std::string &  className,
const std::string &  eventSourceName,
EventSourceType  type 
)

Create an event source.

Parameters
classNameThe FESA class the event source belongs to
eventSourceNameThe name of the event source
typeThe type of the event source
Returns
The pointer to the created event source
virtual AbstractEventSource* fesa::AbstractEventSourceFactory::createOnSubscriptionEventSource ( const std::string &  eventSourceName,
std::size_t  eventQueueSize 
)
protectedpure virtual

Create an on-subscription event source The implementation of this method is provided in the generated code to prevent the RT from permanently including all RDA sources.

Parameters
eventSourceNameThe name of the event source
eventQueueSizeThe size of the event queue
Returns
The pointer to the created event source
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
fesaStreamin which the information will be printed
void fesa::AbstractEventSourceFactory::printStateAll ( std::ostream &  stream,
double  elapsedTime 
)
static

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

Parameters
fesaStreamin which the information will be printed
elapsedTimeinterval of time to calculate the frequency of the fired events

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