fesa-core  5.0.1
fesa::AbstractServerDeviceClass Class Reference

This class contains the properties of the class and lets access to them. Besides it creates the UserEventProducer. More...

#include <AbstractServerDeviceClass.h>

Inheritance diagram for fesa::AbstractServerDeviceClass:
fesa::AbstractDeviceClass

Public Member Functions

 AbstractServerDeviceClass (const std::string &name, const std::string &version)
 
virtual ~AbstractServerDeviceClass ()
 destructor
 
void initialize ()
 This method configures the class creating the properties and linking them to the actions.
 
PropertygetProperty (const std::string &propertyName)
 this method returns the property with the name passed by argument More...
 
PropertygetProperty (std::size_t index)
 
PropertygetGlobalProperty (std::size_t index)
 
AbstractServerActionFactorygetActionFactory ()
 This method looks for the class passed as a parameter recursively in the related classes. More...
 
void reportErrorToSubscribers (std::string Message)
 this method generates an Listener error for all underliing subscribers More...
 
virtual void printConfig (FesaStream *configStream)
 this method prints the action configuration into the stream passed by argument More...
 
virtual void printState (FesaStream *fesaStream, double elapsedTime)
 this method prints the actual state of the action (frequency of the completed actions) into the stream passed by argument More...
 
- Public Member Functions inherited from fesa::AbstractDeviceClass
 AbstractDeviceClass (const std::string &fesaClassName, const std::string &version)
 Constructor. More...
 
virtual ~AbstractDeviceClass ()
 Destructor.
 
virtual AbstractDeviceFactorygetDeviceFactory ()
 returns the abstract device factory of the class More...
 
virtual const std::string & getName ()
 returns the name of the class as string More...
 
virtual const std::string & getVersion ()
 returns the version of the class as string More...
 
virtual void specificInit ()=0
 Custom initialization of the class.
 
virtual boost::shared_ptr
< ClassElement
getInstantiationXMLElement ()
 Getter for the member InstantiationXMLElement_. More...
 

Protected Attributes

AbstractServerActionFactoryactionFactory_
 the action factory creates the sever actions
 
PropertyMap propertiesCol_
 map that stores the properties by their names
 
std::vector< Property * > orderedProperties_
 
std::vector< Property * > orderedGlobalProperties_
 
- Protected Attributes inherited from fesa::AbstractDeviceClass
std::string name_
 name of the abstract device class
 
std::string version_
 version of the abstract device class
 
AbstractDeviceFactorydeviceFactory_
 reference to the device factory
 
std::vector
< AbstractDeviceClass * > 
relatedClassCol_
 list of classes related to this one by means of composition relationship.If the device class doesn't define any composition relationship, this collection is empty
 
AbstractDeviceClassbaseClass_
 Defines the base class from which this device class inherits. If the device class does not define any inheritance relationship, the baseClass_ attribute is NULL.
 
OnDemandEventProducerCollection onDemandEventProducerCol_
 service to trigger the different on-demand-event sources of this class
 
boost::shared_ptr< ClassElementinstantiationXMLElement_
 Used to access the class-specific XML-data of the instantiation-file.
 

Additional Inherited Members

- Protected Member Functions inherited from fesa::AbstractDeviceClass
virtual void addOnDemandEventProducer (const std::string &className, const std::string &onDemandEventSourceName, FwkPart::FwkPart fwkPart)
 Allows the concrete device class to add OD-producers, according to the concrete class-design.
 

Detailed Description

This class contains the properties of the class and lets access to them. Besides it creates the UserEventProducer.

Constructor & Destructor Documentation

fesa::AbstractServerDeviceClass::AbstractServerDeviceClass ( const std::string &  name,
const std::string &  version 
)
Parameters
nameof the class

Member Function Documentation

AbstractServerActionFactory * fesa::AbstractServerDeviceClass::getActionFactory ( )
inline

This method looks for the class passed as a parameter recursively in the related classes.

Returns
a reference to the AbstractServerDeviceClass which name is passed as a parameter or NULL if the class is not found
the action factory
Property * fesa::AbstractServerDeviceClass::getGlobalProperty ( std::size_t  index)

Returns a global property based on its index in orderedGlobalProperties_.

Exceptions
FesaExceptionif out of bounds
Property * fesa::AbstractServerDeviceClass::getProperty ( const std::string &  propertyName)

this method returns the property with the name passed by argument

Parameters
propertyName
Property * fesa::AbstractServerDeviceClass::getProperty ( std::size_t  index)

Returns a property based on its index in orderedProperties_.

Exceptions
FesaExceptionif out of bounds
void fesa::AbstractServerDeviceClass::printConfig ( FesaStream *  configStream)
virtual

this method prints the action configuration into the stream passed by argument

Parameters
configStreamin which the information will be printed
void fesa::AbstractServerDeviceClass::printState ( FesaStream *  fesaStream,
double  elapsedTime 
)
virtual

this method prints the actual state of the action (frequency of the completed actions) into the stream passed by argument

Parameters
fesaStreamin which the information will be printed
void fesa::AbstractServerDeviceClass::reportErrorToSubscribers ( std::string  Message)

this method generates an Listener error for all underliing subscribers

Parameters
MesssageThe error message

Member Data Documentation

std::vector<Property*> fesa::AbstractServerDeviceClass::orderedGlobalProperties_
protected

Vector containing global properties in the same order as the design. As such, it is compatible with the generated property enumeration.

std::vector<Property*> fesa::AbstractServerDeviceClass::orderedProperties_
protected

Vector containing properties in the same order as the design. As such, it is compatible with the generated property enumeration.


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