this class is responsible for retrieve the information from of the different devices linked to a class More...
#include <InitializeDataStoreManager.h>
Public Member Functions | |
InitializeDataStoreManager (const std::string className) | |
constructor | |
~InitializeDataStoreManager () | |
destructor | |
GlobalDeviceElement & | retrieveGlobalDeviceElement () |
return the global device from the initialization system (instance file) | |
const std::vector < DeviceElement * > & | retrieveDeviceElements () |
return the devices from from the initialization system (instance file) | |
const std::vector < DomainStoreElement * > & | retrieveDomainStoreElements () |
return the devices from from the initialization system (instance file) | |
int32_t | getRollingManagerDepth () |
return rolling multiplexing manager depth | |
Private Member Functions | |
void | processDeviceFields (const std::vector< ElementXML * > &fields, DeviceElement *pDeviceElement) |
Processes the device fields in the vector and initialises the DeviceElement. | |
void | fillElement (const ElementXML *pField, FieldElement *pFieldElement) |
this method fills the FieldElement data with the information coming from the XML element | |
void | processDeviceRelationField (const ElementXML *pField, FieldElement *pFieldElement) |
Processes the device-relation device field and initialises the FieldElement. | |
void | processExtraMuxField (const ElementXML *pField, DeviceElement *pDeviceElement) |
Processes the extra mux criterion device field and initialises the DeviceElement. | |
std::string | getFieldValue (const ElementXML *pField) |
Retrieves the initial value of the given field. Returns an empty string of no value can be found. | |
std::string | getAttributeValue (const ElementXML *element) |
Retrieves the value of the value attribute and converts it to an uint32_t. Return 0 if the element is not found. | |
uint32_t | getAttributeValueAsInt (const ElementXML *element) |
Retrieves the value of the value attribute and converts it to an uint32_t. Return 0 if the element is not found. | |
Private Attributes | |
XMLParser * | parser_ |
Internal xml parser to get the information. | |
std::string | className_ |
name of the class which needs to be parsed | |
GlobalDeviceElement * | globalDeviceElement_ |
information for the global device | |
std::vector< DeviceElement * > | pDeviceElementCol_ |
information for the devices | |
std::vector< DomainStoreElement * > | pDomainStoreElementCol_ |
information for the domain stores | |
Static Private Attributes | |
static const int32_t | ROLLING_DEFAULT_SIZE = 3 |
this class is responsible for retrieve the information from of the different devices linked to a class
Definition at line 26 of file InitializeDataStoreManager.h.
fesa::InitializeDataStoreManager::InitializeDataStoreManager | ( | const std::string | className | ) |
constructor
className | name of the class to initialize |
FesaException |
Definition at line 26 of file InitializeDataStoreManager.cpp.
References className_, fesa::AbstractEquipment::getDeviceDataFileName(), fesa::AbstractEquipment::getInstance(), and parser_.
fesa::InitializeDataStoreManager::~InitializeDataStoreManager | ( | ) |
destructor
Definition at line 41 of file InitializeDataStoreManager.cpp.
References globalDeviceElement_, parser_, pDeviceElementCol_, and pDomainStoreElementCol_.
void fesa::InitializeDataStoreManager::fillElement | ( | const ElementXML * | pField, | |
FieldElement * | pFieldElement | |||
) | [private] |
this method fills the FieldElement data with the information coming from the XML element
Definition at line 271 of file InitializeDataStoreManager.cpp.
References fesa::ElementXML::childList_, fesa::DIM1_TAG, fesa::DIM2_TAG, fesa::DIM_TAG, fesa::FieldElement::dimension1_, fesa::FieldElement::dimension2_, fesa::FieldElement::fieldValuesCol_, getAttributeValueAsInt(), getFieldValue(), and fesa::ElementXML::name_.
Referenced by processDeviceFields(), retrieveDomainStoreElements(), and retrieveGlobalDeviceElement().
std::string fesa::InitializeDataStoreManager::getAttributeValue | ( | const ElementXML * | element | ) | [private] |
Retrieves the value of the value attribute and converts it to an uint32_t. Return 0 if the element is not found.
Definition at line 316 of file InitializeDataStoreManager.cpp.
References fesa::ElementXML::attributeList_, fesa::AttributeXML::name_, fesa::AttributeXML::value_, and fesa::VALUE_TAG.
Referenced by getAttributeValueAsInt(), and getFieldValue().
uint32_t fesa::InitializeDataStoreManager::getAttributeValueAsInt | ( | const ElementXML * | element | ) | [private] |
Retrieves the value of the value attribute and converts it to an uint32_t. Return 0 if the element is not found.
Definition at line 330 of file InitializeDataStoreManager.cpp.
References fesa::StringUtilities::fromString(), and getAttributeValue().
Referenced by fillElement().
std::string fesa::InitializeDataStoreManager::getFieldValue | ( | const ElementXML * | pField | ) | [private] |
Retrieves the initial value of the given field. Returns an empty string of no value can be found.
Definition at line 299 of file InitializeDataStoreManager.cpp.
References fesa::ElementXML::childList_, and getAttributeValue().
Referenced by fillElement().
int32_t fesa::InitializeDataStoreManager::getRollingManagerDepth | ( | ) |
return rolling multiplexing manager depth
Definition at line 428 of file InitializeDataStoreManager.cpp.
References fesa::CLASSES_TAG, className_, fesa::XMLParser::extractElementsFromXPath(), FesaErrorXMLElementNotFound, fesa::MUX_DEPTH_TAG, fesa::MUX_ROLLING_TAG, parser_, and ROLLING_DEFAULT_SIZE.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::configureFields().
void fesa::InitializeDataStoreManager::processDeviceFields | ( | const std::vector< ElementXML * > & | fields, | |
DeviceElement * | pDeviceElement | |||
) | [private] |
Processes the device fields in the vector and initialises the DeviceElement.
Definition at line 199 of file InitializeDataStoreManager.cpp.
References fesa::DataStoreElement::addFieldElement(), fesa::DEVICE_RELATIONS_TAG, fesa::EXTRA_MUX_TAG, FesaErrorLoadDeviceElements, fillElement(), fesa::FieldElement::fromPersistency_, fesa::ElementXML::name_, processDeviceRelationField(), and processExtraMuxField().
Referenced by retrieveDeviceElements().
void fesa::InitializeDataStoreManager::processDeviceRelationField | ( | const ElementXML * | pField, | |
FieldElement * | pFieldElement | |||
) | [private] |
Processes the device-relation device field and initialises the FieldElement.
Definition at line 230 of file InitializeDataStoreManager.cpp.
References fesa::ElementXML::childList_, fesa::FieldElement::dimension1_, fesa::FieldElement::fieldValuesCol_, fesa::AttributeXML::name_, and fesa::AttributeXML::value_.
Referenced by processDeviceFields().
void fesa::InitializeDataStoreManager::processExtraMuxField | ( | const ElementXML * | pField, | |
DeviceElement * | pDeviceElement | |||
) | [private] |
Processes the extra mux criterion device field and initialises the DeviceElement.
Definition at line 253 of file InitializeDataStoreManager.cpp.
References fesa::ElementXML::childList_, fesa::DeviceElement::extraCriterionCol_, fesa::AttributeXML::name_, and fesa::AttributeXML::value_.
Referenced by processDeviceFields().
const std::vector< DeviceElement * > & fesa::InitializeDataStoreManager::retrieveDeviceElements | ( | ) |
return the devices from from the initialization system (instance file)
Definition at line 114 of file InitializeDataStoreManager.cpp.
References fesa::ElementXML::attributeList_, fesa::ElementXML::childList_, fesa::CLASSES_TAG, className_, fesa::DEVICE_ACQUISITION_ELEMEMT_TAG, fesa::DEVICE_CONFIGURATION_ELEMEMT_TAG, fesa::DEVICE_ELEMENT_ATTRIBUTE_TAG, fesa::DEVICE_ELEMENT_TAG, fesa::DEVICE_SETTING_ELEMEMT_TAG, fesa::EVENTS_MAPPING_ELEMENT_TAG, fesa::XMLParser::extractElementsFromXPath(), FesaErrorLoadDeviceElements, FesaErrorXMLElementNotFound, fesa::ElementXML::name_, parser_, pDeviceElementCol_, processDeviceFields(), and fesa::AttributeXML::value_.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize().
const std::vector< DomainStoreElement * > & fesa::InitializeDataStoreManager::retrieveDomainStoreElements | ( | ) |
return the devices from from the initialization system (instance file)
Definition at line 342 of file InitializeDataStoreManager.cpp.
References fesa::DataStoreElement::addFieldElement(), fesa::ElementXML::attributeList_, fesa::ElementXML::childList_, fesa::CLASSES_TAG, className_, fesa::DEVICE_CONFIGURATION_ELEMEMT_TAG, fesa::DEVICE_SETTING_ELEMEMT_TAG, fesa::DOMAIN_STORE_ATTRIBUTE_TAG, fesa::DOMAIN_STORE_TAG, fesa::XMLParser::extractElementsFromXPath(), FesaErrorLoadDomainStoreElements, fillElement(), fesa::FieldElement::fromPersistency_, fesa::GENERIC_TAG, fesa::ElementXML::name_, parser_, pDomainStoreElementCol_, and fesa::AttributeXML::value_.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize().
GlobalDeviceElement & fesa::InitializeDataStoreManager::retrieveGlobalDeviceElement | ( | ) |
return the global device from the initialization system (instance file)
Definition at line 57 of file InitializeDataStoreManager.cpp.
References fesa::DataStoreElement::addFieldElement(), fesa::ElementXML::childList_, fesa::CLASSES_TAG, className_, fesa::DEVICE_ACQUISITION_ELEMEMT_TAG, fesa::DEVICE_CONFIGURATION_ELEMEMT_TAG, fesa::DEVICE_SETTING_ELEMEMT_TAG, fesa::XMLParser::extractAttribute(), fesa::XMLParser::extractElementsFromXPath(), FesaErrorLoadGlobalDeviceElement, FesaErrorXMLAttributeNotFound, FesaErrorXMLElementNotFound, fillElement(), fesa::FieldElement::fromPersistency_, fesa::GLOBAL_DEVICE_ELEMENT_ATTRIBUTE_TAG, fesa::GLOBAL_DEVICE_ELEMENT_TAG, globalDeviceElement_, fesa::ElementXML::name_, parser_, and fesa::AttributeXML::value_.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize().
std::string fesa::InitializeDataStoreManager::className_ [private] |
name of the class which needs to be parsed
Definition at line 112 of file InitializeDataStoreManager.h.
Referenced by getRollingManagerDepth(), InitializeDataStoreManager(), retrieveDeviceElements(), retrieveDomainStoreElements(), and retrieveGlobalDeviceElement().
information for the global device
Definition at line 117 of file InitializeDataStoreManager.h.
Referenced by retrieveGlobalDeviceElement(), and ~InitializeDataStoreManager().
Internal xml parser to get the information.
Definition at line 107 of file InitializeDataStoreManager.h.
Referenced by getRollingManagerDepth(), InitializeDataStoreManager(), retrieveDeviceElements(), retrieveDomainStoreElements(), retrieveGlobalDeviceElement(), and ~InitializeDataStoreManager().
std::vector<DeviceElement*> fesa::InitializeDataStoreManager::pDeviceElementCol_ [private] |
information for the devices
Definition at line 122 of file InitializeDataStoreManager.h.
Referenced by retrieveDeviceElements(), and ~InitializeDataStoreManager().
std::vector<DomainStoreElement*> fesa::InitializeDataStoreManager::pDomainStoreElementCol_ [private] |
information for the domain stores
Definition at line 127 of file InitializeDataStoreManager.h.
Referenced by retrieveDomainStoreElements(), and ~InitializeDataStoreManager().
const int32_t fesa::InitializeDataStoreManager::ROLLING_DEFAULT_SIZE = 3 [static, private] |
Definition at line 66 of file InitializeDataStoreManager.h.
Referenced by getRollingManagerDepth().