This class represents the real time part of the equipment. it contains all the AbstractRTDeviceClass and the AbstractRTController for the real time behavior. More...
#include <AbstractRTEquipment.h>
Public Member Functions | |
AbstractRTDeviceClass * | getRTDeviceClass (const std::string &rtDeviceClass) |
this method returns the AbstractRTDeviceClass whose name is passed by parameter | |
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 | |
void | printStateAll (FesaStream *fesaStream, double elapsedTime) |
this methods prints the equipment state into the FesaStream passed by argument | |
virtual void | handleEventSourceError (AbstractEventSource *eventSource, FesaException &exception)=0 |
this method is called when an error occurs in a AbstractEventSource | |
virtual void | handleSchedulerError (RTScheduler *scheduler, FesaException &exception)=0 |
this method is called when an error occurs in a AbstractEventSource | |
Static Public Member Functions | |
static AbstractRTEquipment * | getInstance () |
returns the unique instance of the class in the system | |
Protected Types | |
typedef std::vector < RTLayerInfo * > | RTLayerInfoCol |
Protected Member Functions | |
AbstractRTEquipment () | |
Constructor. | |
virtual | ~AbstractRTEquipment () |
destructor | |
virtual void | fillRTSchedulerInfo (std::vector< RTLayerInfo * > &layerCol) |
fill the layer info associated with the framework | |
void | waitSignal () |
Blocking call that waits for and treats signals. | |
Protected Attributes | |
RTController * | rtController_ |
Static Protected Attributes | |
static AbstractRTEquipment * | theInstance_ = NULL |
single instance for the singleton pattern | |
Friends | |
class | RTController |
This class represents the real time part of the equipment. it contains all the AbstractRTDeviceClass and the AbstractRTController for the real time behavior.
Definition at line 91 of file AbstractRTEquipment.h.
typedef std::vector<RTLayerInfo*> fesa::AbstractRTEquipment::RTLayerInfoCol [protected] |
Definition at line 159 of file AbstractRTEquipment.h.
fesa::AbstractRTEquipment::AbstractRTEquipment | ( | ) | [protected] |
Constructor.
Definition at line 29 of file AbstractRTEquipment.cpp.
References RTController, rtController_, and theInstance_.
fesa::AbstractRTEquipment::~AbstractRTEquipment | ( | ) | [protected, virtual] |
destructor
Definition at line 91 of file AbstractRTEquipment.cpp.
References rtController_, and theInstance_.
void fesa::AbstractRTEquipment::fillRTSchedulerInfo | ( | std::vector< RTLayerInfo * > & | layerCol | ) | [protected, virtual] |
fill the layer info associated with the framework
Definition at line 168 of file AbstractRTEquipment.cpp.
References fesa::RTSchedulingUnitRef::className_, fesa::DIAGNOSTIC_LAYER, fesa::RTSchedulingUnitRef::found_, getInstance(), fesa::RTLayerInfo::layerName_, fesa::RTSchedulingUnitRef::name_, fesa::RTSchedulingUnitRef::perDeviceCollection_, fesa::RTLayerInfo::queueSize_, and fesa::RTLayerInfo::schedulingUnitRefCol_.
Referenced by fesa::RTController::initialize().
AbstractRTEquipment * fesa::AbstractRTEquipment::getInstance | ( | ) | [inline, static] |
returns the unique instance of the class in the system
Definition at line 209 of file AbstractRTEquipment.h.
References FesaErrorRTEquipmentNotCreated, and theInstance_.
Referenced by fesa::AbstractRTDeviceClass::AbstractRTDeviceClass(), fillRTSchedulerInfo(), fesa::ServiceLocatorRealtimeSplitImplementation::getDevice(), fesa::ServiceLocatorUnsplitImplementation::getDevice(), fesa::ServiceLocatorRealtimeSplitImplementation::getDeviceCollection(), fesa::ServiceLocatorUnsplitImplementation::getDeviceCollection(), fesa::ServiceLocatorRealtimeSplitImplementation::getGlobalDevice(), fesa::ServiceLocatorUnsplitImplementation::getGlobalDevice(), fesa::RTController::initialize(), initialize(), fesa::RTScheduler::post(), fesa::AbstractEventSource::run(), fesa::ServiceLocatorRealtimeSplitImplementation::runClassSpecificInitRT(), fesa::ServiceLocatorUnsplitImplementation::runClassSpecificInitRT(), fesa::ServiceLocatorRealtimeSplitImplementation::runDeployUnitSpecificInitRT(), fesa::ServiceLocatorUnsplitImplementation::runDeployUnitSpecificInitRT(), start(), fesa::ServiceLocatorRealtimeSplitImplementation::synchronizeSettingFields(), fesa::ServiceLocatorUnsplitImplementation::synchronizeSettingFields(), waitSignal(), and fesa::AbstractRTDeviceClass::~AbstractRTDeviceClass().
AbstractRTDeviceClass * fesa::AbstractRTEquipment::getRTDeviceClass | ( | const std::string & | rtDeviceClass | ) | [inline] |
this method returns the AbstractRTDeviceClass whose name is passed by parameter
This method has to be overwritten in the concrete equipment
rtDeviceClass | name of the class to retrieve |
Definition at line 204 of file AbstractRTEquipment.h.
References fesa::AbstractComponentEquipment::getDeviceClass().
Referenced by fesa::ServiceLocatorRealtimeSplitImplementation::getDevice(), fesa::ServiceLocatorUnsplitImplementation::getDevice(), fesa::ServiceLocatorRealtimeSplitImplementation::getDeviceCollection(), fesa::ServiceLocatorUnsplitImplementation::getDeviceCollection(), fesa::ServiceLocatorRealtimeSplitImplementation::getGlobalDevice(), fesa::ServiceLocatorUnsplitImplementation::getGlobalDevice(), fesa::ServiceLocatorRealtimeSplitImplementation::runClassSpecificInitRT(), fesa::ServiceLocatorUnsplitImplementation::runClassSpecificInitRT(), fesa::ServiceLocatorRealtimeSplitImplementation::synchronizeSettingFields(), and fesa::ServiceLocatorUnsplitImplementation::synchronizeSettingFields().
virtual void fesa::AbstractRTEquipment::handleEventSourceError | ( | AbstractEventSource * | eventSource, | |
FesaException & | exception | |||
) | [pure virtual] |
this method is called when an error occurs in a AbstractEventSource
eventSource | in which the error occurred | |
exception | with the error code and error description |
Referenced by fesa::AbstractEventSource::run().
virtual void fesa::AbstractRTEquipment::handleSchedulerError | ( | RTScheduler * | scheduler, | |
FesaException & | exception | |||
) | [pure virtual] |
this method is called when an error occurs in a AbstractEventSource
eventSource | in which the error occurred | |
exception | with the error code and error description |
Referenced by fesa::RTScheduler::post().
void fesa::AbstractRTEquipment::initialize | ( | ) | [virtual] |
this method configures the equipment component
Reimplemented from fesa::AbstractComponentEquipment.
Definition at line 37 of file AbstractRTEquipment.cpp.
References FesaErrorNoPermissionToSendSignals, FesaErrorRTProcessAlreadyExists, getInstance(), fesa::RTController::initialize(), rtController_, fesa::EquipmentData::rtProcessID_, fesa::EquipmentData::rtUp_, and fesa::SIGFESA_CHECK_PROCESS_ALIVE.
void fesa::AbstractRTEquipment::printConfigAll | ( | FesaStream * | fesaStream | ) |
this methods prints the equipment configuration (scheduling) into the FesaStream passed by argument
fesaStream | in which the equipment configuration will be printed |
Definition at line 102 of file AbstractRTEquipment.cpp.
References fesa::RTController::printConfigAll(), and rtController_.
void fesa::AbstractRTEquipment::printStateAll | ( | FesaStream * | fesaStream, | |
double | elapsedTime | |||
) |
this methods prints the equipment state into the FesaStream passed by argument
fesaStream | in which the equipment state will be printed |
Definition at line 106 of file AbstractRTEquipment.cpp.
References fesa::RTController::printStateAll(), and rtController_.
void fesa::AbstractRTEquipment::start | ( | RunMode | mode | ) | [virtual] |
this method starts the real time process runMode indicates if thread should block on this call or keep run
Implements fesa::AbstractComponentEquipment.
Definition at line 66 of file AbstractRTEquipment.cpp.
References fesa::blocking, fesa::FesaStream::getConfigStream(), fesa::AbstractEquipment::getEquipmentName(), fesa::AbstractEquipment::getFesaBuildDate(), fesa::AbstractEquipment::getFesaVersion(), getInstance(), fesa::AbstractEquipment::getProcessTypeAsString(), fesa::RTController::printConfigAll(), rtController_, fesa::RTController::start(), fesa::FesaStream::update(), and waitSignal().
void fesa::AbstractRTEquipment::waitSignal | ( | ) | [protected, virtual] |
Blocking call that waits for and treats signals.
Implements fesa::AbstractComponentEquipment.
Definition at line 111 of file AbstractRTEquipment.cpp.
References getInstance(), fesa::EquipmentData::rtUp_, fesa::SIGFESA_CHECK_PROCESS_ALIVE, fesa::SIGFESA_RT_DOWN, and fesa::EquipmentData::srvProcessPid_.
Referenced by start().
friend class RTController [friend] |
Definition at line 157 of file AbstractRTEquipment.h.
Referenced by AbstractRTEquipment().
fesa::AbstractRTEquipment::rtController_ [protected] |
brief reference to the real time controller
Definition at line 186 of file AbstractRTEquipment.h.
Referenced by AbstractRTEquipment(), initialize(), printConfigAll(), printStateAll(), start(), and ~AbstractRTEquipment().
fesa::AbstractRTEquipment::theInstance_ = NULL [static, protected] |
single instance for the singleton pattern
Definition at line 192 of file AbstractRTEquipment.h.
Referenced by AbstractRTEquipment(), getInstance(), and ~AbstractRTEquipment().