fesa-core  5.0.1
fesa::AbstractEquipment Class Referenceabstract

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

AbstractComponentEquipmentgetServerComponent () const
 returns the ServerComponentEquipment More...
 
AbstractComponentEquipmentgetRTComponent () const
 returns the RTComponentEquipment More...
 
AbstractComponentEquipmentgetCurrentComponent () const
 
const boost::shared_ptr
< Diagnostics > & 
getDiagnostics () const
 Get diagnostics manager. More...
 
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
 
void shutDown ()
 Shut down the equipment's components.
 
const std::string & getEquipmentName () const
 This method returns the equipment name of the equipment. More...
 
ProcessType::ProcessType getProcessType () const
 
bool isMultiProcess () const
 
std::string getProcessTypeAsString () const
 This method returns the process type of the protected equipment. More...
 
const std::string & getFesaVersion () const
 This method returns the version number of the used fesa-framework. More...
 
const std::string & getVersion () const
 This method returns the version number of the equipment as string. More...
 
const std::string & getEquipmentBuildDate () const
 This method returns the deploy-unit build date. More...
 
const std::string & getHostName () const
 This method returns the host name. More...
 
const std::string & getServerName () const
 This method returns the server name. More...
 
std::string getDeviceDataFileName () const
 This method returns the path of instantiation document. More...
 
const std::string getPersistencyFileName (const std::string &className)
 This method returns the path of the persistency document for a given device class. More...
 
const std::string getNotificationFileName ()
 This method returns the path of the persistency document for a given device class. More...
 
bool getTimingSimulationMode () const
 returns the enable state of the Timing Simulation More...
 
void setClassOptional (const std::string &className, bool optional)
 specify whether a class is optional or not
 
bool isClassOptional (const std::string &className)
 
bool isInitialized () const
 
bool isRTRunning () const
 

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: More...
 

Protected Member Functions

 AbstractEquipment (const std::string &equipmentName, ProcessType::ProcessType processType, bool multiProcess, const ProcessConfigurer &configurer, const boost::shared_ptr< Diagnostics > &diagnostics)
 Constructor. More...
 
virtual ~AbstractEquipment ()
 Destructor.
 
void postInit () const
 

Protected Attributes

std::string equipmentName_
 name of the equipment
 
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
 

Static Protected Attributes

static AbstractEquipmentinstance_ = NULL
 instance for the singleton pattern
 

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.

Constructor & Destructor Documentation

fesa::AbstractEquipment::AbstractEquipment ( const std::string &  equipmentName,
ProcessType::ProcessType  processType,
bool  multiProcess,
const ProcessConfigurer configurer,
const boost::shared_ptr< Diagnostics > &  diagnostics 
)
protected

Constructor.

Parameters
equipmentNamename of the equipment to create
processTypewhether this process is Server, RT, or Mixed
multiProcesswhether there is another FESA process for this equipment.
configurerRepresentation of configuration infrastructure
diagnosticsRepresentation of diagnostic infrastructure
Exceptions
FesaExceptionwhen host name cannot be retrieved

Member Function Documentation

AbstractComponentEquipment * fesa::AbstractEquipment::getCurrentComponent ( ) const
Exceptions
FesaExceptionif the process contains both server and real-time part.
Returns
the current component equipment.
std::string fesa::AbstractEquipment::getDeviceDataFileName ( ) const

This method returns the path of instantiation document.

Returns
device instantiation file name
const boost::shared_ptr< Diagnostics > & fesa::AbstractEquipment::getDiagnostics ( ) const

Get diagnostics manager.

Returns
Diagnostic manager
const std::string & fesa::AbstractEquipment::getEquipmentBuildDate ( ) const
inline

This method returns the deploy-unit build date.

Returns
a ref to the deploy-unit build date
const std::string & fesa::AbstractEquipment::getEquipmentName ( ) const
inline

This method returns the equipment name of the equipment.

Returns
the equipment name
const std::string & fesa::AbstractEquipment::getFesaVersion ( ) const
inline

This method returns the version number of the used fesa-framework.

Returns
a ref to the fesa-framework version
const std::string & fesa::AbstractEquipment::getHostName ( ) const
inline

This method returns the host name.

Returns
a ref to the hostname string
AbstractEquipment * fesa::AbstractEquipment::getInstance ( )
inlinestatic

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
const std::string fesa::AbstractEquipment::getNotificationFileName ( )

This method returns the path of the persistency document for a given device class.

Parameters
classNameName of the class for which I want to have the filename
Returns
persistency file name
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
classNameName of the class for which I want to have the filename
Returns
persistency file name
ProcessType::ProcessType fesa::AbstractEquipment::getProcessType ( ) const

Returns the process type. Can be RT, Server, or Mixed depending on the deployment mode.

std::string fesa::AbstractEquipment::getProcessTypeAsString ( ) const

This method returns the process type of the protected equipment.

Returns
a ref to the process type
AbstractComponentEquipment * fesa::AbstractEquipment::getRTComponent ( ) const
inline

returns the RTComponentEquipment

Returns
the real time component of the equipment
AbstractComponentEquipment * fesa::AbstractEquipment::getServerComponent ( ) const
inline

returns the ServerComponentEquipment

Returns
the server component of the equipment
const std::string & fesa::AbstractEquipment::getServerName ( ) const

This method returns the server name.

Returns
server-name
bool fesa::AbstractEquipment::getTimingSimulationMode ( ) const
inline

returns the enable state of the Timing Simulation

Returns
true, if the timing simulation is enabled
const std::string & fesa::AbstractEquipment::getVersion ( ) const
inline

This method returns the version number of the equipment as string.

Returns
a ref to the Equipment version string
bool fesa::AbstractEquipment::isClassOptional ( const std::string &  className)
Returns
true if the class is optiona
bool fesa::AbstractEquipment::isInitialized ( ) const
inline
Returns
true if the Equipment has finished the initialization phase
bool fesa::AbstractEquipment::isMultiProcess ( ) const
Returns
true if this equipment is comprised of multiple processes; false otherwise. Examples: -Server only: false -RealTime only: false -Server and RT, mixed: false -Server and RT, split: true
bool fesa::AbstractEquipment::isRTRunning ( ) const
Returns
true if the RT part of the equipment is running. Always returns true when running in mixed mode.
void fesa::AbstractEquipment::postInit ( ) const
protected

Initializes all lazy-initialized members and performs various checks.


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