fesa::AbstractField Class Reference

Base class which defines virtual methods to manage all the FESA fields. More...

#include <AbstractField.h>

Inheritance diagram for fesa::AbstractField:
fesa::Field< T > fesa::FieldArray< T > fesa::FieldArray2D< T > fesa::FieldString fesa::FieldStringArray fesa::Field< DataType > fesa::AcqFieldScalar< T > fesa::AcqFieldStruct< T > fesa::ConfigFieldScalar< T > fesa::ConfigFieldStruct< T > fesa::GenericFieldScalar< T > fesa::GenericFieldStruct< T > fesa::SettingFieldScalar< T > fesa::SettingFieldStruct< T > fesa::AcqFieldArray< T > fesa::ConfigFieldArray< T > fesa::GenericFieldArray< T > fesa::SettingFieldArray< T > fesa::AcqFieldArray2D< T > fesa::ConfigFieldArray2D< T > fesa::GenericFieldArray2D< T > fesa::SettingFieldArray2D< T > fesa::AcqFieldString fesa::ConfigFieldString fesa::GenericFieldString fesa::SettingFieldString fesa::AcqFieldStringArray fesa::ConfigFieldStringArray fesa::GenericFieldStringArray fesa::SettingFieldStringArray fesa::GenericFieldStruct< DataType >

List of all members.

Public Member Functions

virtual ~AbstractField ()
 destructor
AbstractMultiplexingManagergetMultiplexingManager ()
uint32_t getMuxDepth ()
bool isMultiplexed ()
const std::string & getName ()
FieldCategory getType ()
bool isMultiMux ()
bool isPersistent ()
std::string getAsString (MultiplexingContext *context=NULL)
 Changes the pendingChanged flag in the field value class at a given slot.

Protected Member Functions

virtual void initialize (FieldElement &fieldElement)
 Used to initialize values coming from the instantation.
void setMultiplexingManager (AbstractMultiplexingManager *muxManager)
 changes the multiplexing manager of the field.
void setDataIntegrity (DataIntegrity dataIntegrity)
 changes the data integrity value of the field
void restore (FieldElement &fieldElement)
 gives the value to the field from the field element This method should be used to populate the fields at instantiation
void store (FieldElement &fieldElement)
 Used to persist fields.
 AbstractField (const std::string &fieldName, const FieldCategory fieldCategory, bool multiplexed, bool multiMultipexed, bool persistent, DataIntegrity buffer, DataStore *pDataStore)
 Constructor.
void commit (uint32_t slot)
 commit changes of field values at the indicated slot
void resetToBeSync (uint32_t slot)
 cancel any ongoing synchronization
void registerModifiedField (FieldValueBase *pFV, MultiplexingContext *context)
 this method registers the field value in the FieldSynchroManager class
uint32_t getSlot (MultiplexingContext *context)
uint32_t requireSlot (MultiplexingContext *context)
virtual FieldValueBasegetFieldValue (int32_t slot)=0
 get the field value in a particular slot
virtual void getValueToStore (int32_t slot, std::string &str)=0
virtual void setFieldValueAddress (char *pFV, bool initFieldsFlag)=0
 Maps an address in shared memory or on the heap to the field value member of the field class.
virtual void copyValue (uint32_t slot, std::string &val)=0
 copy the value passed by parameter in the specified slot
virtual uint32_t getFieldValueSize ()=0
 Method to get the size of the field-value object. The template of the field-value class depends on the field type.
void setMultiMuxFlag (bool flag)
 Changes multi-multiplexing status of the field to parameter value of flag.
void setMultiplexed (bool multiplexed)
 changes the multiplexing status

Protected Attributes

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
AbstractMultiplexingManagermultiplexingManager_
 multiplexing manager of the field
DataStorepDataStore_
 dataStore of the field
bool isMultiMux_
 flag that indicates whether field is multi-multiplexed
bool isPersistent_
 flag that indicates whether field is persistent
bool isShared_
 flag that indicates whether field is shared byt RT and Server
uint32_t valueSize_
 size of the value
DataIntegrity buffer_
 type of buffer of the field

Friends

class DeviceFactoryImp
class StoreManager
class InitializeDataStoreManager
class DataStore

Detailed Description

Base class which defines virtual methods to manage all the FESA fields.

Definition at line 23 of file AbstractField.h.


Constructor & Destructor Documentation

fesa::AbstractField::~AbstractField (  )  [virtual]

destructor

Definition at line 85 of file AbstractField.cpp.

fesa::AbstractField::AbstractField ( const std::string &  fieldName,
const FieldCategory  fieldCategory,
bool  multiplexed,
bool  multiMultipexed,
bool  persistent,
DataIntegrity  buffer,
DataStore pDataStore 
) [protected]

Constructor.

Parameters:
fieldName name of the field
fieldCategory category of the field
multiplexed true if the field is multiplexed
pDataStore datastore that contains this field

Definition at line 19 of file AbstractField.cpp.

References pDataStore_, and fesa::DataStore::registerField().


Member Function Documentation

void fesa::AbstractField::commit ( uint32_t  slot  )  [protected]

commit changes of field values at the indicated slot

Parameters:
slot 

Definition at line 105 of file AbstractField.cpp.

References fesa::FieldValueBase::commit(), and getFieldValue().

Referenced by fesa::FaultField< DataType >::lower(), and fesa::FaultField< DataType >::raise().

virtual void fesa::AbstractField::copyValue ( uint32_t  slot,
std::string &  val 
) [protected, pure virtual]

copy the value passed by parameter in the specified slot

Parameters:
slot to put the value
val value to put

Implemented in fesa::Field< T >, fesa::FieldArray< T >, fesa::FieldArray2D< T >, fesa::FieldString, fesa::FieldStringArray, fesa::Field< int32_t >, fesa::Field< DataType >, and fesa::Field< bool >.

Referenced by restore().

std::string fesa::AbstractField::getAsString ( MultiplexingContext context = NULL  ) 

Changes the pendingChanged flag in the field value class at a given slot.

Parameters:
changed (true or false)
slot 
Returns:
field value as string

Definition at line 31 of file AbstractField.cpp.

References FesaErrorNoneContextforMuxedField, fesa::AbstractMultiplexingManager::getSlot(), fesa::MultiplexingContext::getType(), getValueToStore(), multiplexingManager_, name_, and fesa::MultiplexingContext::NoneCtxt.

Referenced by fesa::FieldExpression::match().

virtual FieldValueBase* fesa::AbstractField::getFieldValue ( int32_t  slot  )  [protected, pure virtual]
virtual uint32_t fesa::AbstractField::getFieldValueSize (  )  [protected, pure virtual]

Method to get the size of the field-value object. The template of the field-value class depends on the field type.

Returns:
the size in bytes of the field value object.

Implemented in fesa::Field< T >, fesa::FieldArray< T >, fesa::FieldArray2D< T >, fesa::FieldString, fesa::FieldStringArray, fesa::Field< int32_t >, fesa::Field< DataType >, and fesa::Field< bool >.

AbstractMultiplexingManager * fesa::AbstractField::getMultiplexingManager (  ) 
Returns:
the multiplexing manager of the field

Definition at line 49 of file AbstractField.cpp.

References multiplexingManager_.

uint32_t fesa::AbstractField::getMuxDepth (  ) 
Returns:
retrieves the multiplexing depth of the field

Definition at line 53 of file AbstractField.cpp.

References fesa::AbstractMultiplexingManager::getDepth(), and multiplexingManager_.

const std::string & fesa::AbstractField::getName (  ) 
Returns:
string reference containing name of the field.

Definition at line 69 of file AbstractField.cpp.

References name_.

Referenced by store().

uint32_t fesa::AbstractField::getSlot ( MultiplexingContext context  )  [protected]
FieldCategory fesa::AbstractField::getType (  ) 
Returns:
the type of the field

Definition at line 93 of file AbstractField.cpp.

References fieldCategory_.

Referenced by fesa::DataStore::registerField().

virtual void fesa::AbstractField::getValueToStore ( int32_t  slot,
std::string &  str 
) [protected, pure virtual]
void fesa::AbstractField::initialize ( FieldElement fieldElement  )  [protected, virtual]

Used to initialize values coming from the instantation.

Parameters:
fieldElement that contains the values

Reimplemented in fesa::FieldArray< T >, fesa::FieldArray2D< T >, fesa::FieldString, and fesa::FieldStringArray.

Definition at line 89 of file AbstractField.cpp.

bool fesa::AbstractField::isMultiMux (  ) 
Returns:
true if the field is multi-multiplexed

Definition at line 81 of file AbstractField.cpp.

References isMultiMux_.

bool fesa::AbstractField::isMultiplexed (  ) 
Returns:
true if the field is multiplexed

Definition at line 64 of file AbstractField.cpp.

References multiplexed_.

bool fesa::AbstractField::isPersistent (  ) 
Returns:
true if the field is persistent

Definition at line 73 of file AbstractField.cpp.

References isPersistent_.

Referenced by fesa::DataStore::registerField().

void fesa::AbstractField::registerModifiedField ( FieldValueBase pFV,
MultiplexingContext context 
) [protected]
uint32_t fesa::AbstractField::requireSlot ( MultiplexingContext context  )  [protected]
void fesa::AbstractField::resetToBeSync ( uint32_t  slot  )  [protected]
void fesa::AbstractField::restore ( FieldElement fieldElement  )  [protected]
void fesa::AbstractField::setDataIntegrity ( DataIntegrity  dataIntegrity  )  [protected]

changes the data integrity value of the field

Definition at line 101 of file AbstractField.cpp.

References buffer_.

virtual void fesa::AbstractField::setFieldValueAddress ( char *  pFV,
bool  initFieldsFlag 
) [protected, pure virtual]

Maps an address in shared memory or on the heap to the field value member of the field class.

Parameters:
pFV pointer to a field value.

Implemented in fesa::Field< T >, fesa::FieldArray< T >, fesa::FieldArray2D< T >, fesa::FieldString, fesa::FieldStringArray, fesa::Field< int32_t >, fesa::Field< DataType >, and fesa::Field< bool >.

void fesa::AbstractField::setMultiMuxFlag ( bool  flag  )  [protected]

Changes multi-multiplexing status of the field to parameter value of flag.

Parameters:
bool flag

Definition at line 77 of file AbstractField.cpp.

References isMultiMux_.

void fesa::AbstractField::setMultiplexed ( bool  multiplexed  )  [protected]

changes the multiplexing status

Definition at line 60 of file AbstractField.cpp.

References multiplexed_.

void fesa::AbstractField::setMultiplexingManager ( AbstractMultiplexingManager muxManager  )  [protected]

changes the multiplexing manager of the field.

Parameters:
muxManager pointer to an already created multiplexing manager

Definition at line 44 of file AbstractField.cpp.

References multiplexingManager_.

void fesa::AbstractField::store ( FieldElement fieldElement  )  [protected]

Friends And Related Function Documentation

friend class DataStore [friend]

Definition at line 250 of file AbstractField.h.

friend class DeviceFactoryImp [friend]

Definition at line 27 of file AbstractField.h.

friend class InitializeDataStoreManager [friend]

Definition at line 29 of file AbstractField.h.

friend class StoreManager [friend]

Definition at line 28 of file AbstractField.h.


Member Data Documentation

category of the field (Acquisition, Generic, Setting or Configuration)

Definition at line 192 of file AbstractField.h.

Referenced by getType().

flag that indicates whether field is multi-multiplexed

Definition at line 215 of file AbstractField.h.

Referenced by isMultiMux(), and setMultiMuxFlag().

flag that indicates whether field is persistent

Definition at line 221 of file AbstractField.h.

Referenced by isPersistent(), and fesa::SettingFieldStructArray2D< T >::SettingFieldStructArray2D().

true if the field is multiplexed

Definition at line 197 of file AbstractField.h.

Referenced by isMultiplexed(), and setMultiplexed().

multiplexing manager of the field

Definition at line 203 of file AbstractField.h.

Referenced by fesa::SettingFieldArray2D< T >::checkContext(), fesa::SettingFieldArray< T >::checkContext(), fesa::SettingFieldStruct< T >::checkContext(), fesa::SettingFieldArray2D< T >::get(), fesa::SettingFieldArray< T >::get(), fesa::SettingFieldStruct< T >::get(), fesa::SettingFieldScalar< T >::get(), fesa::SettingFieldStringArray::get(), fesa::SettingFieldString::get(), fesa::GenericFieldArray2D< T >::get(), fesa::GenericFieldArray< T >::get(), fesa::GenericFieldStruct< T >::get(), fesa::GenericFieldScalar< T >::get(), fesa::GenericFieldStringArray::get(), fesa::GenericFieldString::get(), fesa::AcqFieldArray2D< T >::get(), fesa::AcqFieldArray< T >::get(), fesa::AcqFieldStruct< T >::get(), fesa::AcqFieldScalar< T >::get(), fesa::AcqFieldStringArray::get(), fesa::AcqFieldString::get(), getAsString(), fesa::SettingFieldStructArray2D< T >::getCell(), fesa::SettingFieldScalarArray2D< T >::getCell(), fesa::SettingFieldStructArray< T >::getCell(), fesa::SettingFieldScalarArray< T >::getCell(), fesa::GenericFieldStructArray2D< T >::getCell(), fesa::GenericFieldScalarArray2D< T >::getCell(), fesa::GenericFieldStructArray< T >::getCell(), fesa::GenericFieldScalarArray< T >::getCell(), fesa::AcqFieldStructArray2D< T >::getCell(), fesa::AcqFieldScalarArray2D< T >::getCell(), fesa::AcqFieldStructArray< T >::getCell(), fesa::AcqFieldScalarArray< T >::getCell(), fesa::SettingFieldArray2D< T >::getColumn(), fesa::GenericFieldArray2D< T >::getColumn(), fesa::AcqFieldArray2D< T >::getColumn(), getMultiplexingManager(), getMuxDepth(), fesa::SettingFieldStruct< T >::getPending(), fesa::SettingFieldScalar< T >::getPending(), fesa::SettingFieldArray2D< T >::getRow(), fesa::GenericFieldArray2D< T >::getRow(), fesa::AcqFieldArray2D< T >::getRow(), fesa::SettingFieldArray2D< T >::getSize(), fesa::SettingFieldArray< T >::getSize(), fesa::GenericFieldArray2D< T >::getSize(), fesa::GenericFieldArray< T >::getSize(), fesa::FieldStringArray::getSize(), fesa::AcqFieldArray2D< T >::getSize(), fesa::AcqFieldArray< T >::getSize(), fesa::SettingFieldStringArray::getString(), fesa::GenericFieldStringArray::getString(), fesa::AcqFieldStringArray::getString(), fesa::FaultField< DataType >::getTimestamp(), fesa::FaultField< DataType >::isRaised(), fesa::FaultField< DataType >::lower(), fesa::FaultField< DataType >::raise(), restore(), fesa::SettingFieldArray2D< T >::set(), fesa::SettingFieldArray< T >::set(), fesa::SettingFieldStruct< T >::set(), fesa::SettingFieldScalar< T >::set(), fesa::SettingFieldStringArray::set(), fesa::SettingFieldString::set(), fesa::GenericFieldArray2D< T >::set(), fesa::GenericFieldArray< T >::set(), fesa::GenericFieldStruct< T >::set(), fesa::GenericFieldScalar< T >::set(), fesa::GenericFieldStringArray::set(), fesa::GenericFieldString::set(), fesa::AcqFieldArray2D< T >::set(), fesa::AcqFieldArray< T >::set(), fesa::AcqFieldStruct< T >::set(), fesa::AcqFieldScalar< T >::set(), fesa::AcqFieldStringArray::set(), fesa::AcqFieldString::set(), fesa::SettingFieldStructArray2D< T >::setCell(), fesa::SettingFieldScalarArray2D< T >::setCell(), fesa::SettingFieldStructArray< T >::setCell(), fesa::SettingFieldScalarArray< T >::setCell(), fesa::GenericFieldStructArray2D< T >::setCell(), fesa::GenericFieldScalarArray2D< T >::setCell(), fesa::GenericFieldStructArray< T >::setCell(), fesa::GenericFieldScalarArray< T >::setCell(), fesa::AcqFieldStructArray2D< T >::setCell(), fesa::AcqFieldScalarArray2D< T >::setCell(), fesa::AcqFieldStructArray< T >::setCell(), fesa::AcqFieldScalarArray< T >::setCell(), fesa::SettingFieldArray2D< T >::setColumn(), fesa::GenericFieldArray2D< T >::setColumn(), fesa::AcqFieldArray2D< T >::setColumn(), fesa::FieldStringArray::setFieldValueAddress(), fesa::FieldString::setFieldValueAddress(), fesa::FieldArray2D< T >::setFieldValueAddress(), fesa::FieldArray< T >::setFieldValueAddress(), fesa::Field< T >::setFieldValueAddress(), setMultiplexingManager(), fesa::SettingFieldArray2D< T >::setRow(), fesa::GenericFieldArray2D< T >::setRow(), fesa::AcqFieldArray2D< T >::setRow(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), fesa::AcqFieldStringArray::setString(), store(), and fesa::FieldStringArray::~FieldStringArray().

name of the field

Definition at line 186 of file AbstractField.h.

Referenced by fesa::SettingFieldArray2D< T >::checkContext(), fesa::SettingFieldArray< T >::checkContext(), fesa::SettingFieldStruct< T >::checkContext(), fesa::FieldArray< T >::checkMaxDimension(), fesa::FieldArray2D< T >::checkMaxDimensions(), fesa::FieldStringArray::copyValue(), fesa::SettingFieldArray2D< T >::get(), fesa::SettingFieldArray< T >::get(), fesa::SettingFieldStruct< T >::get(), fesa::SettingFieldScalar< T >::get(), fesa::SettingFieldStringArray::get(), fesa::SettingFieldString::get(), fesa::GenericFieldArray2D< T >::get(), fesa::GenericFieldArray< T >::get(), fesa::GenericFieldStruct< T >::get(), fesa::GenericFieldScalar< T >::get(), fesa::GenericFieldStringArray::get(), fesa::AcqFieldArray2D< T >::get(), fesa::AcqFieldArray< T >::get(), fesa::AcqFieldStruct< T >::get(), fesa::AcqFieldScalar< T >::get(), fesa::AcqFieldStringArray::get(), getAsString(), fesa::SettingFieldStructArray2D< T >::getCell(), fesa::SettingFieldScalarArray2D< T >::getCell(), fesa::SettingFieldStructArray< T >::getCell(), fesa::SettingFieldScalarArray< T >::getCell(), fesa::GenericFieldStructArray2D< T >::getCell(), fesa::GenericFieldScalarArray2D< T >::getCell(), fesa::GenericFieldStructArray< T >::getCell(), fesa::GenericFieldScalarArray< T >::getCell(), fesa::ConfigFieldStructArray2D< T >::getCell(), fesa::ConfigFieldScalarArray2D< T >::getCell(), fesa::ConfigFieldStructArray< T >::getCell(), fesa::ConfigFieldScalarArray< T >::getCell(), fesa::AcqFieldStructArray2D< T >::getCell(), fesa::AcqFieldScalarArray2D< T >::getCell(), fesa::AcqFieldStructArray< T >::getCell(), fesa::AcqFieldScalarArray< T >::getCell(), fesa::SettingFieldArray2D< T >::getColumn(), fesa::GenericFieldArray2D< T >::getColumn(), fesa::ConfigFieldArray2D< T >::getColumn(), fesa::AcqFieldArray2D< T >::getColumn(), getName(), fesa::SettingFieldStruct< T >::getPending(), fesa::SettingFieldScalar< T >::getPending(), fesa::SettingFieldArray2D< T >::getRow(), fesa::GenericFieldArray2D< T >::getRow(), fesa::ConfigFieldArray2D< T >::getRow(), fesa::AcqFieldArray2D< T >::getRow(), fesa::FieldStringArray::getSize(), fesa::SettingFieldStringArray::getString(), fesa::GenericFieldStringArray::getString(), fesa::ConfigFieldStringArray::getString(), fesa::AcqFieldStringArray::getString(), restore(), fesa::SettingFieldArray2D< T >::set(), fesa::SettingFieldArray< T >::set(), fesa::SettingFieldStruct< T >::set(), fesa::SettingFieldScalar< T >::set(), fesa::SettingFieldStringArray::set(), fesa::SettingFieldString::set(), fesa::GenericFieldArray2D< T >::set(), fesa::GenericFieldArray< T >::set(), fesa::GenericFieldStruct< T >::set(), fesa::GenericFieldScalar< T >::set(), fesa::GenericFieldStringArray::set(), fesa::GenericFieldString::set(), fesa::AcqFieldArray2D< T >::set(), fesa::AcqFieldArray< T >::set(), fesa::AcqFieldStruct< T >::set(), fesa::AcqFieldScalar< T >::set(), fesa::AcqFieldStringArray::set(), fesa::AcqFieldString::set(), fesa::SettingFieldStructArray2D< T >::setCell(), fesa::SettingFieldScalarArray2D< T >::setCell(), fesa::SettingFieldStructArray< T >::setCell(), fesa::SettingFieldScalarArray< T >::setCell(), fesa::GenericFieldStructArray2D< T >::setCell(), fesa::GenericFieldScalarArray2D< T >::setCell(), fesa::GenericFieldStructArray< T >::setCell(), fesa::GenericFieldScalarArray< T >::setCell(), fesa::AcqFieldStructArray2D< T >::setCell(), fesa::AcqFieldScalarArray2D< T >::setCell(), fesa::AcqFieldStructArray< T >::setCell(), fesa::AcqFieldScalarArray< T >::setCell(), fesa::SettingFieldArray2D< T >::setColumn(), fesa::GenericFieldArray2D< T >::setColumn(), fesa::AcqFieldArray2D< T >::setColumn(), fesa::FieldString::setFieldValueAddress(), fesa::FieldArray2D< T >::setFieldValueAddress(), fesa::FieldArray< T >::setFieldValueAddress(), fesa::Field< T >::setFieldValueAddress(), fesa::SettingFieldArray2D< T >::setRow(), fesa::GenericFieldArray2D< T >::setRow(), fesa::AcqFieldArray2D< T >::setRow(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), fesa::AcqFieldStringArray::setString(), and store().

dataStore of the field

Definition at line 209 of file AbstractField.h.

Referenced by AbstractField(), and registerModifiedField().

uint32_t fesa::AbstractField::valueSize_ [protected]

The documentation for this class was generated from the following files:

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1