This class is the head of each equipment. It is used to decouple the server and the RT package from the core package. More...
#include <AbstractEquipment.h>
Public Member Functions | |
AbstractComponentEquipment * | getServerComponent () |
returns the ServerComponentEquipment | |
AbstractComponentEquipment * | getRTComponent () |
returns the RTComponentEquipment | |
const ProcessConfiguration * | getProcessConfiguration () |
Get process configuration. | |
const boost::shared_ptr < Diagnostics > & | getDiagnostics () const |
Get diagnostics manager. | |
virtual void | initialize ()=0 |
this method is overridden in the generated code to create the instances of the server and real time components | |
void | start () |
this method starts the components under the equipment, it is a blocking call | |
const std::string & | getEquipmentName () |
This method returns the equipment name of the equipment. | |
const FesaProcessType & | getProcessType () |
This method returns the process type of the protected equipment. | |
std::string | getProcessTypeAsString () |
This method returns the process type of the protected equipment. | |
const std::string & | getFesaVersion () |
This method returns the version number of the used fesa-framework. | |
const std::string & | getVersion () |
This method returns the version number of the equipment as string. | |
const std::string & | getFesaBuildDate () |
This method returns the fesa build date. | |
const std::string & | getHostName () |
This method returns the host name. | |
const std::string | getDeviceDataFileName () |
This method returns the path of instantiation document. | |
const std::string | getPersistencyFileName (const std::string &className) |
This method returns the path of the persistency document for a given device class. | |
const std::string | getNotificationFileName () |
This method returns the path of the persistency document for a given device class. | |
bool | getTimingSimulationMode () |
returns the enable state of the Timing Simulation | |
void | setClassOptional (const std::string &className, bool optional) |
specify whether a class is optional or not | |
bool | isClassOptional (const std::string &className) |
bool | isInitialized () |
Static Public Member Functions | |
static AbstractEquipment * | getInstance () |
Method to retrieve the singleton instance of the class This class has a particular implementation of the singleton design pattern:
| |
Protected Member Functions | |
AbstractEquipment (const std::string &equipmentName, FesaProcessType processType, const boost::shared_ptr< ProcessConfiguration > &configuration, const boost::shared_ptr< Diagnostics > &diagnostics) | |
Constructor. | |
AbstractEquipment () | |
virtual | ~AbstractEquipment () |
Destructor. | |
Protected Attributes | |
std::string | equipmentName_ |
name of the equipment | |
FesaProcessType | processType_ |
type of the process deployment | |
AbstractComponentEquipment * | theRTEquipmentComponent_ |
pointer to the real time component | |
AbstractComponentEquipment * | theServerEquipmentComponent_ |
pointer to the server equipment | |
std::map< std::string, bool > | optionalClasses_ |
hashmap that contains whether a specific class is optional or not key --> class name value --> true if the class is optional | |
std::string | fesaVersion_ |
std::string | version_ |
std::string | madeAt_ |
bool | initialized_ |
Static Protected Attributes | |
static AbstractEquipment * | instance_ = NULL |
instance for the singleton pattern | |
Private Attributes | |
std::string | hostName_ |
host name of the frontend computer on which the class is deployed | |
boost::shared_ptr < ProcessConfiguration > | configuration_ |
boost::shared_ptr< Diagnostics > | diagnostics_ |
This class is the head of each equipment. It is used to decouple the server and the RT package from the core package.
Definition at line 24 of file AbstractEquipment.h.
fesa::AbstractEquipment::AbstractEquipment | ( | const std::string & | equipmentName, | |
FesaProcessType | processType, | |||
const boost::shared_ptr< ProcessConfiguration > & | configuration, | |||
const boost::shared_ptr< Diagnostics > & | diagnostics | |||
) | [protected] |
Constructor.
equipmentName | name of the equipment to create | |
processType | indicates whether the real time and server are in the same process (unsplit) or they are in different processes (split) | |
configuration | Representation of configuration infrastructure | |
diagnostics | Representation of diagnostic infrastructure |
FesaException | when host name cannot be retrieved |
Definition at line 44 of file AbstractEquipment.cpp.
References FesaErrorGettingHostName, hostName_, and instance_.
fesa::AbstractEquipment::AbstractEquipment | ( | ) | [inline, protected] |
Definition at line 170 of file AbstractEquipment.h.
fesa::AbstractEquipment::~AbstractEquipment | ( | ) | [protected, virtual] |
Destructor.
Definition at line 69 of file AbstractEquipment.cpp.
References fesa::NotificationIDManager::releaseInstance(), theRTEquipmentComponent_, and theServerEquipmentComponent_.
const std::string fesa::AbstractEquipment::getDeviceDataFileName | ( | ) |
This method returns the path of instantiation document.
Definition at line 169 of file AbstractEquipment.cpp.
References configuration_, fesa::PropertyTag::DEVICE_DATA_PATH, equipmentName_, fesa::PropertyTag::INSTANCE_FILE, and version_.
Referenced by fesa::AbstractEventSource::AbstractEventSource(), fesa::Thread::AdjustProcessPriority(), fesa::RTController::initialize(), fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize(), fesa::InitializeDataStoreManager::InitializeDataStoreManager(), fesa::NotificationConsumer::NotificationConsumer(), fesa::NotificationThread::NotificationThread(), fesa::RTScheduler::RTScheduler(), fesa::FesaDeviceServer::start(), and fesa::PersistencyManager::start().
const boost::shared_ptr< Diagnostics > & fesa::AbstractEquipment::getDiagnostics | ( | ) | const |
Get diagnostics manager.
Definition at line 90 of file AbstractEquipment.cpp.
References diagnostics_.
Referenced by fesa::SetDiagnosticSetting::execute(), fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), fesa::GetDiagnosticSetting::execute(), fesa::AbstractRTAction::executeAction(), fesa::FesaDeviceServer::get(), fesa::RTScheduler::logDiagnostics(), fesa::FesaDeviceServer::monitorOff(), fesa::FesaDeviceServer::monitorOn(), fesa::NotificationThread::NotificationThread(), fesa::RTEvent::RTEvent(), fesa::FesaDeviceServer::runDeviceServer(), fesa::FesaDeviceServer::set(), fesa::SubscriptionParameter::SubscriptionParameter(), fesa::RTEvent::~RTEvent(), and fesa::SubscriptionParameter::~SubscriptionParameter().
const std::string & fesa::AbstractEquipment::getEquipmentName | ( | ) | [inline] |
This method returns the equipment name of the equipment.
Definition at line 258 of file AbstractEquipment.h.
References equipmentName_.
Referenced by fesa::NotificationConsumer::getInstance(), fesa::NotificationProducer::getInstance(), and fesa::AbstractRTEquipment::start().
const std::string & fesa::AbstractEquipment::getFesaBuildDate | ( | ) | [inline] |
This method returns the fesa build date.
Definition at line 293 of file AbstractEquipment.h.
References madeAt_.
Referenced by fesa::AbstractRTEquipment::start().
const std::string & fesa::AbstractEquipment::getFesaVersion | ( | ) | [inline] |
This method returns the version number of the used fesa-framework.
Definition at line 283 of file AbstractEquipment.h.
References fesaVersion_.
Referenced by fesa::AbstractRTEquipment::start().
const std::string & fesa::AbstractEquipment::getHostName | ( | ) | [inline] |
This method returns the host name.
Definition at line 268 of file AbstractEquipment.h.
References hostName_.
AbstractEquipment * fesa::AbstractEquipment::getInstance | ( | ) | [inline, static] |
Method to retrieve the singleton instance of the class This class has a particular implementation of the singleton design pattern:
Definition at line 253 of file AbstractEquipment.h.
References instance_.
Referenced by fesa::AbstractEventSource::AbstractEventSource(), fesa::Thread::AdjustProcessPriority(), fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::configureFields(), fesa::AbstractMsgQueue::Constants::Constants(), fesa::DataStore::createMutex(), fesa::AbstractEventSourceFactory::createOnDemandEventSource(), fesa::AbstractEventSourceFactory::createTimingEventSource(), fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::DeviceFactory(), fesa::SetDiagnosticSetting::execute(), fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), fesa::GetDiagnosticSetting::execute(), fesa::AbstractRTAction::executeAction(), fesa::FesaDeviceServer::get(), fesa::DataStore::getMemorySizeToAllocate(), fesa::MsgQueueFactory::getOrCreateMsgQueue(), fesa::FesaDeviceServer::initCMW(), fesa::RTController::initialize(), fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize(), fesa::AbstractComponentEquipment::initialize(), fesa::InitializeDataStoreManager::InitializeDataStoreManager(), fesa::RTScheduler::logDiagnostics(), fesa::FesaDeviceServer::monitorOff(), fesa::FesaDeviceServer::monitorOn(), fesa::MultiplexingContext::MultiplexingContext(), fesa::NotificationThread::NotificationThread(), fesa::FesaException::preloadMessages(), fesa::StoreManager::restore(), fesa::RTDiagnosticSetting::RTDiagnosticSetting(), fesa::RTEvent::RTEvent(), fesa::RTScheduler::RTScheduler(), fesa::FesaDeviceServer::runDeviceServer(), fesa::NotificationIDManager::save(), fesa::NotificationProducer::sendAutomaticNotification(), fesa::NotificationProducer::sendCommandMessage(), fesa::NotificationProducer::sendManualNotification(), fesa::OnDemandProducerImpl::sendMessage(), fesa::FesaDeviceServer::set(), fesa::ShmFactory< GlobalDeviceType, DomainStoreType, DevInstType >::setUpMemory(), fesa::FesaDeviceServer::start(), fesa::NotificationIDManager::storeNotificationIDCollection(), fesa::SubscriptionParameter::SubscriptionParameter(), fesa::RTEvent::~RTEvent(), and fesa::SubscriptionParameter::~SubscriptionParameter().
const std::string fesa::AbstractEquipment::getNotificationFileName | ( | ) |
This method returns the path of the persistency document for a given device class.
className | Name of the class for which I want to have the filename |
Definition at line 189 of file AbstractEquipment.cpp.
References configuration_, fesa::PropertyTag::DEVICE_DATA_PATH, and equipmentName_.
Referenced by fesa::NotificationIDManager::load().
const std::string fesa::AbstractEquipment::getPersistencyFileName | ( | const std::string & | className | ) |
This method returns the path of the persistency document for a given device class.
className | Name of the class for which I want to have the filename |
Definition at line 183 of file AbstractEquipment.cpp.
References configuration_, and fesa::PropertyTag::DEVICE_DATA_PATH.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize(), and fesa::StoreManager::restore().
const ProcessConfiguration * fesa::AbstractEquipment::getProcessConfiguration | ( | ) | [inline] |
Get process configuration.
Definition at line 273 of file AbstractEquipment.h.
References configuration_.
Referenced by fesa::AbstractEventSource::AbstractEventSource(), fesa::Thread::AdjustProcessPriority(), fesa::AbstractMsgQueue::Constants::Constants(), fesa::AbstractEventSourceFactory::createOnDemandEventSource(), fesa::FesaDeviceServer::initCMW(), fesa::NotificationConsumer::NotificationConsumer(), fesa::NotificationThread::NotificationThread(), fesa::FesaException::preloadMessages(), fesa::RTScheduler::RTScheduler(), fesa::FesaDeviceServer::start(), and fesa::PersistencyManager::start().
const FesaProcessType & fesa::AbstractEquipment::getProcessType | ( | ) | [inline] |
This method returns the process type of the protected equipment.
Definition at line 263 of file AbstractEquipment.h.
References processType_.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::configureFields(), fesa::MsgQueueFactory::getOrCreateMsgQueue(), and fesa::RTDiagnosticSetting::RTDiagnosticSetting().
std::string fesa::AbstractEquipment::getProcessTypeAsString | ( | ) |
This method returns the process type of the protected equipment.
Definition at line 145 of file AbstractEquipment.cpp.
References processType_, fesa::splitRealTimeMixed, fesa::splitRealTimeOnly, fesa::splitServerMixed, fesa::splitServerOnly, and fesa::unsplit.
Referenced by fesa::AbstractRTEquipment::start().
AbstractComponentEquipment * fesa::AbstractEquipment::getRTComponent | ( | ) | [inline] |
returns the RTComponentEquipment
Definition at line 248 of file AbstractEquipment.h.
References theRTEquipmentComponent_.
AbstractComponentEquipment * fesa::AbstractEquipment::getServerComponent | ( | ) | [inline] |
returns the ServerComponentEquipment
Definition at line 243 of file AbstractEquipment.h.
References theServerEquipmentComponent_.
Referenced by fesa::AbstractServerEquipment::reportErrorToAllSubscribers().
bool fesa::AbstractEquipment::getTimingSimulationMode | ( | ) | [inline] |
returns the enable state of the Timing Simulation
Definition at line 278 of file AbstractEquipment.h.
References configuration_.
Referenced by fesa::AbstractEventSourceFactory::createTimingEventSource().
const std::string & fesa::AbstractEquipment::getVersion | ( | ) | [inline] |
This method returns the version number of the equipment as string.
Definition at line 288 of file AbstractEquipment.h.
References version_.
virtual void fesa::AbstractEquipment::initialize | ( | ) | [pure virtual] |
this method is overridden in the generated code to create the instances of the server and real time components
bool fesa::AbstractEquipment::isClassOptional | ( | const std::string & | className | ) |
Definition at line 132 of file AbstractEquipment.cpp.
References optionalClasses_.
Referenced by fesa::RTController::initialize(), fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize(), and fesa::AbstractComponentEquipment::initialize().
bool fesa::AbstractEquipment::isInitialized | ( | ) | [inline] |
Definition at line 298 of file AbstractEquipment.h.
References initialized_.
Referenced by fesa::MultiplexingContext::MultiplexingContext().
void fesa::AbstractEquipment::setClassOptional | ( | const std::string & | className, | |
bool | optional | |||
) |
specify whether a class is optional or not
Definition at line 126 of file AbstractEquipment.cpp.
References optionalClasses_.
void fesa::AbstractEquipment::start | ( | ) |
this method starts the components under the equipment, it is a blocking call
Definition at line 96 of file AbstractEquipment.cpp.
References fesa::blocking, FesaErrorNULLPointer, fesa::nonBlocking, processType_, fesa::splitRealTimeMixed, fesa::splitRealTimeOnly, fesa::splitServerMixed, fesa::splitServerOnly, fesa::AbstractComponentEquipment::start(), theRTEquipmentComponent_, theServerEquipmentComponent_, and fesa::unsplit.
boost::shared_ptr<ProcessConfiguration> fesa::AbstractEquipment::configuration_ [private] |
Definition at line 237 of file AbstractEquipment.h.
Referenced by getDeviceDataFileName(), getNotificationFileName(), getPersistencyFileName(), getProcessConfiguration(), and getTimingSimulationMode().
boost::shared_ptr<Diagnostics> fesa::AbstractEquipment::diagnostics_ [private] |
Definition at line 238 of file AbstractEquipment.h.
Referenced by getDiagnostics().
std::string fesa::AbstractEquipment::equipmentName_ [protected] |
name of the equipment
Definition at line 182 of file AbstractEquipment.h.
Referenced by getDeviceDataFileName(), getEquipmentName(), and getNotificationFileName().
std::string fesa::AbstractEquipment::fesaVersion_ [protected] |
Definition at line 209 of file AbstractEquipment.h.
Referenced by getFesaVersion().
std::string fesa::AbstractEquipment::hostName_ [private] |
host name of the frontend computer on which the class is deployed
Definition at line 236 of file AbstractEquipment.h.
Referenced by AbstractEquipment(), and getHostName().
bool fesa::AbstractEquipment::initialized_ [protected] |
Definition at line 224 of file AbstractEquipment.h.
Referenced by isInitialized().
AbstractEquipment * fesa::AbstractEquipment::instance_ = NULL [static, protected] |
instance for the singleton pattern
Definition at line 229 of file AbstractEquipment.h.
Referenced by AbstractEquipment(), and getInstance().
std::string fesa::AbstractEquipment::madeAt_ [protected] |
Definition at line 219 of file AbstractEquipment.h.
Referenced by getFesaBuildDate().
std::map<std::string,bool> fesa::AbstractEquipment::optionalClasses_ [protected] |
hashmap that contains whether a specific class is optional or not key --> class name value --> true if the class is optional
Definition at line 204 of file AbstractEquipment.h.
Referenced by isClassOptional(), and setClassOptional().
FesaProcessType fesa::AbstractEquipment::processType_ [protected] |
type of the process deployment
Definition at line 187 of file AbstractEquipment.h.
Referenced by getProcessType(), getProcessTypeAsString(), and start().
pointer to the real time component
Definition at line 192 of file AbstractEquipment.h.
Referenced by getRTComponent(), start(), and ~AbstractEquipment().
pointer to the server equipment
Definition at line 197 of file AbstractEquipment.h.
Referenced by getServerComponent(), start(), and ~AbstractEquipment().
std::string fesa::AbstractEquipment::version_ [protected] |
Definition at line 214 of file AbstractEquipment.h.
Referenced by getDeviceDataFileName(), and getVersion().