Base class for field-storage classes in the framework: Device, GlobalDevice and DomainStore.
More...
#include <DataStore.h>
|
std::vector< AbstractField * > | fields_ |
| field collection containing all fields of the data store
|
|
std::vector< AbstractField * > | persistentFields_ |
| setting collection containing all the persistent fields
|
|
std::map< AbstractField
*, AbstractField * > | relatedFields_ |
| maps a field to its related field. Used for example by history fields, so that initializing dimensions of the main field also initializes dimensions of the related field. This is a unidirectional relation. Bidirectional relations are forbidden as they may produce infinite loops.
|
|
RWLock * | pRWLock_ |
| read-write lock used to lock data store during synchronization of setting fields
|
|
Base class for field-storage classes in the framework: Device, GlobalDevice and DomainStore.
AbstractField * fesa::DataStore::getField |
( |
const std::string & |
name | ) |
const |
Retrieves a pointer to a concrete field.
- Parameters
-
- Returns
- a AbstractField pointer to the field searched, or NULL if the field doesn't exist.
const std::vector< AbstractField * > & fesa::DataStore::getFieldCollection |
( |
| ) |
const |
|
inline |
Retrieve the collection of fields.
- Returns
- The collection of all fields
boost::optional< int64_t > fesa::DataStore::getId |
( |
| ) |
const |
Returns the unique identifier of this device, if available.
const std::vector< AbstractField * > & fesa::DataStore::getPersistentFieldsCollection |
( |
| ) |
const |
|
inline |
Method to retrieve the setting field collection of that data store.
- Returns
- a vector of AbstractFields containing all the setting fields
std::size_t fesa::DataStore::getSizeOfAdditionalFields |
( |
| ) |
const |
|
protectedvirtual |
FaultSeverity::FaultSeverity fesa::DataStore::getStatus |
( |
const MultiplexingContext * |
context, |
|
|
std::vector< const char * > & |
faultDescriptions |
|
) |
| const |
Get the status of the data store.
- Parameters
-
context | The multiplexing context |
faultDescriptions | The descriptions of all the raised fault fields of the warning or error severity |
- Returns
- The highest severity of all the raised fault fields
void fesa::DataStore::initializeFieldDefaultValues |
( |
const boost::shared_ptr< DataStoreElement > & |
dataStoreElement | ) |
|
|
protected |
initializes all fields of this device with default-values from the instantiation-file
- Parameters
-
dataStoreElement | data-store-element from the instantiation-file |
void fesa::DataStore::initializeFieldDimensions |
( |
const boost::shared_ptr< DataStoreElement > & |
dataStoreElement | ) |
|
|
protected |
initializes all fields of this data-store with the dimensions, defined in the instantiation-file
- Parameters
-
dataStoreElement | data-store-element from the instantiation-file |
void fesa::DataStore::initializeOtherFieldValues |
( |
const boost::shared_ptr< DataStoreElement > & |
dataStoreElement | ) |
|
|
protectedvirtual |
Extension point called at the end of initializeFieldDefaultValues. Can be used by child classes to initialize fields which are not initialized by initializeFieldDefaultValues.
Reimplemented in fesa::AbstractDevice.
void fesa::DataStore::mapAdditionalFields |
( |
char * |
p | ) |
|
|
protectedvirtual |
void fesa::DataStore::mapMemory |
( |
char * |
p, |
|
|
bool |
multiProcess, |
|
|
bool |
initializeFields |
|
) |
| |
Maps shared fields and attributes to memory.
- Parameters
-
p | pointer to the memory allocated to be used by the data store |
multiProcess | true if multiple processes will access the shared fields and attributes |
initializeFields | indicates if the field object has to be initialized. |
void fesa::DataStore::registerFaultField |
( |
AbstractField * |
field | ) |
|
Register a fault field in the data store.
- Parameters
-
field | The field to be registered in the data store |
Registers a new field in the current field collection.
- Parameters
-
field | pointer to the AbstractField to be registered in the field collection |
Registers a related field of a field. Initializing the dimensions of the field will initialize the dimensions of its related field with the same value. This is a unidirectional relation. A related field cannot be the main field of another field.
- Exceptions
-
FesaException | if relatedField is already registered as a main field |
this method restores the data store with the element passed as a parameter
- Parameters
-
Reimplemented in fesa::AbstractDevice.
The documentation for this class was generated from the following files:
- DataStore.h
- DataStore.cpp