fesa::AbstractEquipment Class Reference

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>

List of all members.

Public Member Functions

AbstractComponentEquipmentgetServerComponent ()
 returns the ServerComponentEquipment
AbstractComponentEquipmentgetRTComponent ()
 returns the RTComponentEquipment
const ProcessConfigurationgetProcessConfiguration ()
 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 FesaProcessTypegetProcessType ()
 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 AbstractEquipmentgetInstance ()
 Method to retrieve the singleton instance of the class This class has a particular implementation of the singleton design pattern:

  • Equipment is instantiated as static object (getInstance does not provide this service)
  • Dedicated shutDown to delete all the process resources properly.

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
AbstractComponentEquipmenttheRTEquipmentComponent_
 pointer to the real time component
AbstractComponentEquipmenttheServerEquipmentComponent_
 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 AbstractEquipmentinstance_ = 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< Diagnosticsdiagnostics_

Detailed Description

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.


Constructor & Destructor Documentation

fesa::AbstractEquipment::AbstractEquipment ( const std::string &  equipmentName,
FesaProcessType  processType,
const boost::shared_ptr< ProcessConfiguration > &  configuration,
const boost::shared_ptr< Diagnostics > &  diagnostics 
) [protected]

Constructor.

Parameters:
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
Exceptions:
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]

Member Function Documentation

const std::string fesa::AbstractEquipment::getDeviceDataFileName (  ) 
const boost::shared_ptr< Diagnostics > & fesa::AbstractEquipment::getDiagnostics (  )  const
const std::string & fesa::AbstractEquipment::getEquipmentName (  )  [inline]

This method returns the equipment name of the equipment.

Returns:
the equipment name

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.

Returns:
a ref to 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.

Returns:
a ref to the fesa-framework version

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.

Returns:
a ref to the hostname string

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:

  • Equipment is instantiated as static object (getInstance does not provide this service)
  • Dedicated shutDown to delete all the process resources properly.

Returns:
the single instance of the Equipment

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.

Parameters:
className Name of the class for which I want to have the filename
Returns:
persistency file name

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.

Parameters:
className Name of the class for which I want to have the filename
Returns:
persistency file name

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]
const FesaProcessType & fesa::AbstractEquipment::getProcessType (  )  [inline]

This method returns the process type of the protected equipment.

Returns:
a ref to the process type

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.

Returns:
a ref to the process type

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

Returns:
the real time component of the equipment

Definition at line 248 of file AbstractEquipment.h.

References theRTEquipmentComponent_.

AbstractComponentEquipment * fesa::AbstractEquipment::getServerComponent (  )  [inline]

returns the ServerComponentEquipment

Returns:
the server component of the equipment

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

Returns:
true, if the timing simulation is enabled

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.

Returns:
a ref to the Equipment version 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  ) 
bool fesa::AbstractEquipment::isInitialized (  )  [inline]
Returns:
true if the Equipment has finished the initialization phase

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 (  ) 

Member Data Documentation

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().

Definition at line 224 of file AbstractEquipment.h.

Referenced by isInitialized().

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().

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().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1