fesa-core
7.0.0
|
This class represents an abstraction of the underlying device by defining the common fields of the FESA class devices (instance device and global one). More...
#include <AbstractDevice.h>
Public Member Functions | |
virtual | ~AbstractDevice () |
destructor | |
std::string | getMainMuxCriterion () const |
Returns the main multiplexing criterion of the device. | |
std::string | getTimingDomain () const |
Returns the timing domain that the device belongs to. | |
std::string | getAccelerator () const |
Returns the accelerator that the device belongs to. | |
std::string | getAcceleratorZone () const |
Returns the accelerator zone that the device belongs to. | |
std::string | getDescription () const |
Returns the device's description. | |
bool | isLoggable () const |
Returns the flag that indicates if the device trace is logged. | |
void | setLoggable (bool loggable) |
Set the flag that indicates if the device trace is logged. | |
bool | isMultiplexed () const |
bool | isCycleBound () const |
virtual void | initialize () |
initializes the device | |
virtual boost::shared_ptr < DeviceInstantiationData > | getInstantiationData () const |
getter for the member-variable instantiationData_ | |
Public Member Functions inherited from fesa::DataStore | |
DataStore () | |
Constructor. | |
virtual | ~DataStore () |
destructor | |
virtual const std::string & | getName () const |
Get the name of the data store. | |
boost::optional< int64_t > | getId () const |
FaultSeverity::FaultSeverity | getStatus (const MultiplexingContext *context, std::vector< const char * > &faultDescriptions) const |
Get the status of the data store. More... | |
const std::vector < AbstractField * > & | getFieldCollection () const |
Retrieve the collection of fields. More... | |
const std::vector < AbstractField * > & | getPersistentFieldsCollection () const |
Method to retrieve the setting field collection of that data store. More... | |
AbstractField * | getField (const std::string &name) const |
Retrieves a pointer to a concrete field. More... | |
std::size_t | getMemorySizeToAllocate (bool multiProcess) const |
void | mapMemory (char *&address, bool multiProcess, bool initializeFields, std::ostream &logStream) |
void | registerFaultField (AbstractField *field) |
Register a fault field in the data store. More... | |
Public Attributes | |
ConfigFieldString | name |
Configuration field containing the device's name. | |
ConfigFieldString | description |
Configuration field containing the device's description. | |
ConfigFieldString | acceleratorZone |
Configuration field containing the device's accelerator zone. | |
ConfigFieldString | accelerator |
Configuration field containing the device's accelerator. | |
ConfigFieldString | timingDomain |
Configuration field containing the device's timing domain. | |
ConfigFieldString | mainMuxCriterion |
Configuration field containing the device's main multiplexing criterion. | |
ConfigFieldScalar< bool > | cycleBound |
Protected Member Functions | |
AbstractDevice (const boost::shared_ptr< DeviceInstantiationData > &instantiationData) | |
Initializes the common device fields. More... | |
void | initializeOtherFieldValues (const boost::shared_ptr< DataStoreElement > &dataStoreElement) |
void | restoreFromElement (PersistanceDataStoreElement &element, bool ignoreInvalidValues) |
this method restores the data store with the element passed as a parameter More... | |
virtual std::size_t | getSizeOfAdditionalFields () const |
Get the size related to non-Fesa-type fields. More... | |
virtual void | mapAdditionalFields (char *&address) |
Map additional shared (non generated by FESA) fields. More... | |
Protected Member Functions inherited from fesa::DataStore | |
void | initializeFieldDefaultValues (const boost::shared_ptr< DataStoreElement > &dataStoreElement) |
initializes all fields of this device with default-values from the instantiation-file More... | |
void | initializeFieldDimensions (const boost::shared_ptr< DataStoreElement > &dataStoreElement) |
initializes all fields of this data-store with the dimensions, defined in the instantiation-file More... | |
virtual void | registerField (AbstractField *field) |
Registers a new field in the current field collection. More... | |
void | registerRelatedField (AbstractField *mainField, AbstractField *relatedField) |
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. More... | |
Additional Inherited Members | |
Protected Attributes inherited from fesa::DataStore | |
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 | |
This class represents an abstraction of the underlying device by defining the common fields of the FESA class devices (instance device and global one).
|
protected |
Initializes the common device fields.
Constructor
instantiationData | device-specific data comming from the instance-file |
|
protectedvirtual |
Get the size related to non-Fesa-type fields.
Reimplemented from fesa::DataStore.
|
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 from fesa::DataStore.
bool fesa::AbstractDevice::isCycleBound | ( | ) | const |
bool fesa::AbstractDevice::isMultiplexed | ( | ) | const |
|
protectedvirtual |
Map additional shared (non generated by FESA) fields.
[in,out] | address | address where to map shared fields. It is updated to point to the byte following the last byte mapped. |
Reimplemented from fesa::DataStore.
|
protectedvirtual |
this method restores the data store with the element passed as a parameter
PersistanceDataStoreElement | that contains the information |
ignoreInvalidValues | Flag to skip wrong values in the persistence file |
Reimplemented from fesa::DataStore.
ConfigFieldScalar<bool> fesa::AbstractDevice::cycleBound |
Configuration field containing the device's cycle-bound flag.