fesa-core  4.2.0
fesa::AbstractRTEquipment Class Referenceabstract

This class represents the real time part of the equipment. More...

#include <AbstractRTEquipment.h>

Inheritance diagram for fesa::AbstractRTEquipment:
fesa::AbstractComponentEquipment

Public Member Functions

AbstractRTDeviceClassgetRTDeviceClass (const std::string &rtDeviceClass)
 This method has to be overwritten in the concrete equipment More...
 
void initialize ()
 this method configures the equipment component
 
void start (RunMode mode)
 this method starts the real time process runMode indicates if thread should block on this call or keep run
 
void printConfigAll (FesaStream *fesaStream)
 this methods prints the equipment configuration (scheduling) into the FesaStream passed by argument More...
 
void printStateAll (std::ostream &stream, double elapsedTime)
 this methods prints the equipment state into the FesaStream passed by argument More...
 
virtual void handleEventSourceError (AbstractEventSource *eventSource, FesaException &exception)=0
 this method is called when an error occurs in a AbstractEventSource More...
 
virtual void handleSchedulerError (RTScheduler *scheduler, FesaException &exception)=0
 this method is called when an error occurs in a AbstractEventSource More...
 
- Public Member Functions inherited from fesa::AbstractComponentEquipment
virtual void specificInit ()=0
 Custom initialization of the Equipment.
 
virtual void shutDown ()
 Shut down the equipment component.
 
const std::vector
< AbstractDeviceClass * > & 
getDeviceClassCol ()
 This method returns all abstract device classes, managed by this equipment. More...
 
AbstractDeviceClassgetDeviceClass (const std::string &className)
 This method returns a pointer to the requested abstract device class. More...
 
const std::string & getServerName ()
 This method returns the server name. More...
 
void registerDeviceClass (AbstractDeviceClass *abstractDeviceClass)
 This method registers abstract device class in vector abstractDeviceClassCol_. More...
 
void deregisterDeviceClass (const std::string &className)
 this method removes the abstract class passed by parameter from vector abstractDeviceClassCol_ More...
 
bool isFirstProcess () const
 
virtual ~AbstractComponentEquipment ()
 Destructor.
 

Static Public Member Functions

static AbstractRTEquipmentgetInstance ()
 returns the unique instance of the class in the system
 

Protected Member Functions

 AbstractRTEquipment ()
 Constructor.
 
virtual ~AbstractRTEquipment ()
 destructor
 
virtual void fillRTSchedulerInfo (std::vector< RTLayerInfo * > &layerCol)
 fill the layer info associated with the framework
 
void signalHandlingLoop ()
 
- Protected Member Functions inherited from fesa::AbstractComponentEquipment
 AbstractComponentEquipment ()
 Constructor.
 
void mapEquipmentSharedMemory ()
 
void registerSettingFields (const std::vector< AbstractField * > &fields)
 
void setupSignalHandlers (const sigset_t &sigset) const
 
void waitForSignal (int &signo) const
 

Protected Attributes

boost::scoped_ptr< RTControllerrtController_
 
- Protected Attributes inherited from fesa::AbstractComponentEquipment
std::vector
< AbstractDeviceClass * > 
abstractDeviceClassCol_
 contains the complete list of device classes
 
bool firstProcess_
 
void * equipmentSharedMemory_
 
std::size_t equipmentSharedMemorySize_
 

Static Protected Attributes

static AbstractRTEquipmenttheInstance_ = NULL
 single instance for the singleton pattern
 

Detailed Description

This class represents the real time part of the equipment.

it contains all the AbstractRTDeviceClass and the AbstractRTController for the real time behavior

Member Function Documentation

AbstractRTDeviceClass * fesa::AbstractRTEquipment::getRTDeviceClass ( const std::string &  rtDeviceClass)

This method has to be overwritten in the concrete equipment

Returns the AbstractRTDeviceClass whose name is passed by parameter

Parameters
rtDeviceClassname of the class to retrieve
Exceptions
FesaExceptionif class is not found
virtual void fesa::AbstractRTEquipment::handleEventSourceError ( AbstractEventSource eventSource,
FesaException exception 
)
pure virtual

this method is called when an error occurs in a AbstractEventSource

Parameters
eventSourcein which the error occurred
exceptionwith the error code and error description
virtual void fesa::AbstractRTEquipment::handleSchedulerError ( RTScheduler scheduler,
FesaException exception 
)
pure virtual

this method is called when an error occurs in a AbstractEventSource

Parameters
eventSourcein which the error occurred
exceptionwith the error code and error description
void fesa::AbstractRTEquipment::printConfigAll ( FesaStream *  fesaStream)

this methods prints the equipment configuration (scheduling) into the FesaStream passed by argument

Parameters
fesaStreamin which the equipment configuration will be printed
void fesa::AbstractRTEquipment::printStateAll ( std::ostream &  stream,
double  elapsedTime 
)

this methods prints the equipment state into the FesaStream passed by argument

Parameters
fesaStreamin which the equipment state will be printed
void fesa::AbstractRTEquipment::signalHandlingLoop ( )
protectedvirtual

Waits for and treats signals. Never returns, unless a non-fatal terminating signal has been received by the process, to let it shutdown gracefully. Non-fatal terminating signals are: SIGINT, SIGTERM, SIGHUP.

Implements fesa::AbstractComponentEquipment.

Member Data Documentation

fesa::AbstractRTEquipment::rtController_
protected

brief reference to the real time controller


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