fesa-core
4.2.0
|
Field template class for scalar fields. More...
#include <Field.h>
Public Member Functions | |
Field (const FieldConfig &fieldConfig, DataStore *pDataStore) | |
Constructor. More... | |
~Field () | |
destructor | |
![]() | |
virtual | ~AbstractField () |
destructor | |
AbstractMultiplexingManager * | getMultiplexingManager () |
uint32_t | getMuxDepth () const |
bool | isMultiplexed () const |
const std::string & | getName () const |
FieldCategory | getType () const |
bool | isMultiMux () const |
bool | isPersistent () const |
bool | isShared () const |
virtual std::string | getAsString (const MultiplexingContext *context) const =0 |
Method to retrieve the value of the field converted to string. More... | |
std::string | getAttributeAsStringByName (const std::string &attribute, MultiplexingContext *context=NULL) |
Method to retrieve the struct attribute value converted to string. More... | |
Protected Member Functions | |
std::size_t | getFieldValueSize () const |
Method to get the size of the field-value object. The template of the field-value class depends on the field type. More... | |
FieldValue< T > * | getFieldValue (int32_t slot) |
Get the field's value for a given slot. More... | |
void | setFieldValueAddress (char *pFV, bool initFieldsFlag) |
Maps an address in shared memory or on the heap to the field value member of the field class. More... | |
void | copyValue (uint32_t slot, const std::string &val) |
this method puts in the slot the value passed by parameter in the corresponding format More... | |
void | getValueToStore (int32_t slot, std::string &str) const |
![]() | |
virtual void | initializeDefaultValue (const std::string &value) |
Initialize the default value with a value provided in the instantiation file. More... | |
virtual void | initializeDimensions (const boost::shared_ptr< FieldElement > &fieldElement) |
Used to initialize dimensions coming from the instantation. More... | |
void | setMultiplexingManager (AbstractMultiplexingManager *muxManager) |
changes the multiplexing manager of the field. More... | |
void | setDataIntegrity (DataIntegrity dataIntegrity) |
changes the data integrity value of the field | |
void | restore (const PersistanceFieldElement &fieldElement) |
gives the value to the field from the field element This method should be used to populate the fields at instantiation More... | |
void | store (PersistanceFieldElement &fieldElement) |
Used to persist fields. More... | |
AbstractField (const FieldConfig &fieldConfig, DataStore *dataStore) | |
Constructor. More... | |
template<typename T > | |
T * | getSlotPointer (void *baseAddress, std::size_t slot) |
template<typename T > | |
const T * | getSlotPointer (const void *baseAddress, std::size_t slot) const |
virtual void | getAttributeValueToStore (int32_t slot, const std::string &attribute, std::string &str) |
template<typename T > | |
void | validateValue (const T &value) const |
template<typename T > | |
void | validateValues (const T *values, const std::size_t count) const |
void | setMultiMuxFlag (bool flag) |
Changes multi-multiplexing status of the field to parameter value of flag. More... | |
void | setMultiplexed (bool multiplexed) |
changes the multiplexing status | |
Protected Attributes | |
FieldValue< T > * | fieldValue_ |
value of the field in the first slot | |
![]() | |
std::string | name_ |
name of the field | |
FieldCategory | fieldCategory_ |
category of the field (Acquisition, Generic, Setting or Configuration) | |
bool | multiplexed_ |
true if the field is multiplexed | |
bool | multiMultiplexed_ |
flag that indicates whether field is multi-multiplexed | |
bool | shared_ |
flag that indicates whether field is shared byt RT and Server | |
bool | persistent_ |
flag that indicates whether field is persistent | |
DataIntegrity | buffer_ |
type of buffer of the field | |
AbstractMultiplexingManager * | multiplexingManager_ |
multiplexing manager of the field | |
DataStore * | dataStore_ |
The data store this field belongs to. | |
std::size_t | valueSize_ |
size of the value | |
Additional Inherited Members | |
![]() | |
static const std::size_t | INVALID_SIZE = std::numeric_limits<std::size_t>::max() |
Field template class for scalar fields.
fesa::Field< T >::Field | ( | const FieldConfig & | fieldConfig, |
DataStore * | pDataStore | ||
) |
Constructor.
name | of the field, field category, multiplexing criterion, pointer to DataStore |
|
protectedvirtual |
this method puts in the slot the value passed by parameter in the corresponding format
slot | to put the value |
val | value to put |
Implements fesa::AbstractField.
|
protectedvirtual |
Get the field's value for a given slot.
slot | The slot to get the field's value from |
Implements fesa::AbstractField.
|
protectedvirtual |
Method to get the size of the field-value object. The template of the field-value class depends on the field type.
Implements fesa::AbstractField.
|
protectedvirtual |
Implements fesa::AbstractField.
|
protectedvirtual |
Maps an address in shared memory or on the heap to the field value member of the field class.
pFV | pointer to a field value. |
Implements fesa::AbstractField.