This class contains the properties of the class and lets access to them. Besides it creates the UserEventProducer. More...
#include <AbstractServerDeviceClass.h>
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. | |
Property * | getProperty (const std::string &propertyName) |
this method returns the property with the name passed by argument | |
AbstractServerActionFactory * | getActionFactory () |
This method looks for the class passed as a parameter recursively in the related classes. | |
void | reportErrorToSubscribers (std::string Message) |
this method generates an Listener error for all underliing subscribers | |
virtual void | printConfig (FesaStream *configStream) |
this method prints the action configuration into the stream passed by argument | |
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 | |
Protected Member Functions | |
virtual std::vector < PropertyInfo * > * | fillProperties ()=0 |
this method fills in the property configuration with the information from the design document | |
virtual std::map< std::string, std::vector< std::string > > * | fillActions ()=0 |
this method fills in the notified properties by the server actions | |
Protected Attributes | |
AbstractServerActionFactory * | actionFactory_ |
the action factory creates the sever actions | |
std::map< std::string, Property * > | propertiesCol_ |
map that stores the properties by their names | |
Private Member Functions | |
void | configurePropertiesActions () |
This method fills the propertiesCol_ with the properties and their server actions. |
This class contains the properties of the class and lets access to them. Besides it creates the UserEventProducer.
Definition at line 89 of file AbstractServerDeviceClass.h.
fesa::AbstractServerDeviceClass::AbstractServerDeviceClass | ( | const std::string & | name, | |
const std::string & | version | |||
) |
name | of the class |
Definition at line 30 of file AbstractServerDeviceClass.cpp.
References fesa::AbstractServerEquipment::getInstance(), and fesa::AbstractComponentEquipment::registerDeviceClass().
fesa::AbstractServerDeviceClass::~AbstractServerDeviceClass | ( | ) | [virtual] |
destructor
Definition at line 37 of file AbstractServerDeviceClass.cpp.
References fesa::AbstractComponentEquipment::deregisterDeviceClass(), fesa::AbstractServerEquipment::getInstance(), fesa::AbstractDeviceClass::name_, propertiesCol_, and fesa::AbstractDeviceClass::relatedClassCol_.
void fesa::AbstractServerDeviceClass::configurePropertiesActions | ( | ) | [private] |
This method fills the propertiesCol_ with the properties and their server actions.
Definition at line 91 of file AbstractServerDeviceClass.cpp.
References actionFactory_, fesa::AbstractServerActionFactory::createServerAction(), fillActions(), fillProperties(), fesa::Property::getName(), fesa::AbstractDeviceClass::name_, fesa::ServerActionConfig::name_, fesa::ServerActionConfig::notifiedPropertiesCol_, and propertiesCol_.
Referenced by initialize().
virtual std::map<std::string, std::vector<std::string> >* fesa::AbstractServerDeviceClass::fillActions | ( | ) | [protected, pure virtual] |
this method fills in the notified properties by the server actions
Referenced by configurePropertiesActions().
virtual std::vector<PropertyInfo*>* fesa::AbstractServerDeviceClass::fillProperties | ( | ) | [protected, pure virtual] |
this method fills in the property configuration with the information from the design document
Referenced by configurePropertiesActions().
AbstractServerActionFactory * fesa::AbstractServerDeviceClass::getActionFactory | ( | ) | [inline] |
This method looks for the class passed as a parameter recursively in the related classes.
Definition at line 179 of file AbstractServerDeviceClass.h.
References actionFactory_.
Property * fesa::AbstractServerDeviceClass::getProperty | ( | const std::string & | propertyName | ) |
this method returns the property with the name passed by argument
propertyName |
Definition at line 154 of file AbstractServerDeviceClass.cpp.
References fesa::AbstractDeviceClass::baseClass_, and propertiesCol_.
Referenced by fesa::FesaDeviceServer::decodeIOPoint().
void fesa::AbstractServerDeviceClass::initialize | ( | ) | [virtual] |
This method configures the class creating the properties and linking them to the actions.
Implements fesa::AbstractDeviceClass.
Definition at line 62 of file AbstractServerDeviceClass.cpp.
References fesa::FieldSynchroManager::commitModifiedFieldSynchronization(), configurePropertiesActions(), fesa::AbstractDeviceFactory::getAbstractDeviceCollection(), fesa::AbstractDeviceClass::getDeviceFactory(), fesa::AbstractDeviceFactory::getGlobalDevice(), fesa::FieldSynchroManager::getInstance(), fesa::EquipmentData::getInstance(), fesa::AbstractDeviceClass::specificInit(), fesa::EquipmentData::srvProcessPid_, and fesa::DataStore::synchronizeSettingFields().
void fesa::AbstractServerDeviceClass::printConfig | ( | FesaStream * | configStream | ) | [virtual] |
this method prints the action configuration into the stream passed by argument
configStream | in which the information will be printed |
Definition at line 174 of file AbstractServerDeviceClass.cpp.
References fesa::AbstractDeviceClass::baseClass_, fesa::AbstractDeviceClass::getName(), fesa::AbstractDeviceClass::getVersion(), fesa::AbstractDeviceClass::name_, propertiesCol_, fesa::AbstractDeviceClass::relatedClassCol_, and fesa::AbstractDeviceClass::version_.
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
fesaStream | in which the information will be printed |
Definition at line 215 of file AbstractServerDeviceClass.cpp.
void fesa::AbstractServerDeviceClass::reportErrorToSubscribers | ( | std::string | Message | ) |
this method generates an Listener error for all underliing subscribers
Messsage | The error message |
Definition at line 170 of file AbstractServerDeviceClass.cpp.
the action factory creates the sever actions
Definition at line 161 of file AbstractServerDeviceClass.h.
Referenced by configurePropertiesActions(), and getActionFactory().
std::map<std::string, Property*> fesa::AbstractServerDeviceClass::propertiesCol_ [protected] |
map that stores the properties by their names
Definition at line 166 of file AbstractServerDeviceClass.h.
Referenced by configurePropertiesActions(), getProperty(), printConfig(), and ~AbstractServerDeviceClass().