This class is used to find the correct slot for a multiplexed field value using the virtual accelerator or the multiplexing context. More...
#include <AbstractMultiplexingManager.h>
Public Member Functions | |
virtual int32_t | getDepth () |
This method returns the depth of the multiplexing manager. | |
virtual int32_t | requireSlot (MultiplexingContext &context)=0 |
This method returns the next slot in which the value of a field will be stored. The method is implemented by the concrete multiplexing manager. | |
virtual int32_t | getSlot (MultiplexingContext &context)=0 |
This method returns the slot in which the required value is stored, according to the given multiplexing context.The method is implemented by the concrete multiplexing manager. | |
virtual | ~AbstractMultiplexingManager () |
Destructor. | |
Protected Member Functions | |
CycleDescriptor * | getTimingDescriptor () |
This method returns the timing descriptor of this multiplexing manager. | |
virtual AbstractMultiplexingDataManager * | getMultiplexingDataManager ()=0 |
This method returns the MultiplexingDataManager of this multiplexing manager Is is implemented by each concrete MultiplexingManager. There is no attribute in the base class because each multiplexing manager requires a different type of services. In this way we avoid casting in the extended classes. | |
const std::string & | getName () |
This method returns the name of the multiplexing manager. | |
AbstractMultiplexingManager (const std::string &name, CycleDescriptor *timingDescriptor) | |
Constructor. | |
virtual int32_t | getLastSlot (const std::string &cycleName)=0 |
This method returns the slot in which the last value for the virtual accelerator passed by argument was stored. The method is implemented by the concrete multiplexing manager. | |
virtual int32_t | requireSlot (const std::string &cycleName)=0 |
This method returns the next slot in which the value of a field will be stored. The method is implemented by the concrete multiplexing manager. | |
virtual int32_t | requireSlot (int32_t cycleId)=0 |
This method returns the next slot in which the value of a field will be stored. The method is implemented by the concrete multiplexing manager. | |
virtual int32_t | getLastSlot (int32_t cycleId)=0 |
This method returns the slot in which the last value for the virtual accelerator passed by argument was stored. The method is implemented by the concrete multiplexing manager. | |
Static Protected Member Functions | |
static int32_t | getMemorySizeToAllocate () |
This method retrieves the size to be allocated in heap or shared memory, regarding the collection of multiplexing managers. | |
static void | mapMemory (char *pAddr) |
This method map in memory the multiplexing managers of the collection. | |
static AbstractMultiplexingManager * | getMultiplexingManager (const std::string &name) |
This method retrieves the desired multiplexing manager. | |
Protected Attributes | |
std::string | name_ |
mutex that protects conditional variable newMsgCondVar_ | |
CycleDescriptor * | timingDescriptor_ |
a reference to the timing descriptor | |
Static Protected Attributes | |
static std::map< std::string, AbstractMultiplexingManager * > | managersCol_ |
a map which contains pointers to all the multiplexing managers on the system | |
Friends | |
class | ExtendedMultiplexingManager |
class | Field |
class | DeviceFactoryImp |
class | AbstractField |
class | SynchronizationFactory |
This class is used to find the correct slot for a multiplexed field value using the virtual accelerator or the multiplexing context.
Definition at line 23 of file AbstractMultiplexingManager.h.
fesa::AbstractMultiplexingManager::~AbstractMultiplexingManager | ( | ) | [virtual] |
Destructor.
Definition at line 23 of file AbstractMultiplexingManager.cpp.
References managersCol_, and name_.
fesa::AbstractMultiplexingManager::AbstractMultiplexingManager | ( | const std::string & | name, | |
CycleDescriptor * | timingDescriptor | |||
) | [protected] |
Constructor.
name | of the multiplexing manager | |
timingDescriptor | reference to the TimingDescriptor that will be used in the multiplexing manager |
Definition at line 15 of file AbstractMultiplexingManager.cpp.
References managersCol_.
int32_t fesa::AbstractMultiplexingManager::getDepth | ( | ) | [virtual] |
This method returns the depth of the multiplexing manager.
Reimplemented in fesa::ExtendedMultiplexingManager, and fesa::RollingMultiplexingManager.
Definition at line 80 of file AbstractMultiplexingManager.cpp.
References fesa::CycleDescriptor::getCycleIdsCol(), and timingDescriptor_.
Referenced by fesa::ExtendedMultiplexingManager::getDepth(), fesa::ExtendedMultiplexingManager::getLastSlot(), fesa::AbstractField::getMuxDepth(), fesa::ExtendedMultiplexingManager::getSlot(), fesa::ExtendedMultiplexingManager::requireSlot(), fesa::AbstractField::restore(), fesa::FieldStringArray::setFieldValueAddress(), fesa::FieldString::setFieldValueAddress(), fesa::FieldArray2D< T >::setFieldValueAddress(), fesa::FieldArray< T >::setFieldValueAddress(), fesa::Field< T >::setFieldValueAddress(), and fesa::FieldStringArray::~FieldStringArray().
virtual int32_t fesa::AbstractMultiplexingManager::getLastSlot | ( | int32_t | cycleId | ) | [protected, pure virtual] |
This method returns the slot in which the last value for the virtual accelerator passed by argument was stored. The method is implemented by the concrete multiplexing manager.
cycleId | the ID of the cycle for the requested slot |
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
virtual int32_t fesa::AbstractMultiplexingManager::getLastSlot | ( | const std::string & | cycleName | ) | [protected, pure virtual] |
This method returns the slot in which the last value for the virtual accelerator passed by argument was stored. The method is implemented by the concrete multiplexing manager.
cycleName | the name of teh cycle |
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
Referenced by fesa::ExtendedMultiplexingManager::getLastSlot(), and fesa::AbstractField::store().
int32_t fesa::AbstractMultiplexingManager::getMemorySizeToAllocate | ( | ) | [static, protected] |
This method retrieves the size to be allocated in heap or shared memory, regarding the collection of multiplexing managers.
Definition at line 46 of file AbstractMultiplexingManager.cpp.
References fesa::AbstractMultiplexingDataManager::computeMemorySize(), getMultiplexingDataManager(), and managersCol_.
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::computeMemorySize().
virtual AbstractMultiplexingDataManager* fesa::AbstractMultiplexingManager::getMultiplexingDataManager | ( | ) | [protected, pure virtual] |
This method returns the MultiplexingDataManager of this multiplexing manager Is is implemented by each concrete MultiplexingManager. There is no attribute in the base class because each multiplexing manager requires a different type of services. In this way we avoid casting in the extended classes.
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
Referenced by getMemorySizeToAllocate(), fesa::ExtendedMultiplexingManager::getMultiplexingDataManager(), and mapMemory().
AbstractMultiplexingManager * fesa::AbstractMultiplexingManager::getMultiplexingManager | ( | const std::string & | name | ) | [static, protected] |
This method retrieves the desired multiplexing manager.
name | The name of the multiplexing manager |
Definition at line 32 of file AbstractMultiplexingManager.cpp.
References managersCol_.
Referenced by fesa::SynchronizationFactory::createExtendedMultiplexingManager(), fesa::SynchronizationFactory::createMultiplexingManager(), fesa::SynchronizationFactory::createRollingMultiplexingManager(), fesa::SynchronizationFactory::createRollingSharedMultiplexingManager(), and fesa::SynchronizationFactory::createSharedMultiplexingManager().
const std::string & fesa::AbstractMultiplexingManager::getName | ( | ) | [inline, protected] |
This method returns the name of the multiplexing manager.
Definition at line 164 of file AbstractMultiplexingManager.h.
References name_.
Referenced by fesa::SynchronizationFactory::createExtendedMultiplexingManager().
virtual int32_t fesa::AbstractMultiplexingManager::getSlot | ( | MultiplexingContext & | context | ) | [pure virtual] |
This method returns the slot in which the required value is stored, according to the given multiplexing context.The method is implemented by the concrete multiplexing manager.
context | the multiplexing context for which a slot is requested |
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
Referenced by 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(), fesa::AbstractField::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(), fesa::SettingFieldStruct< T >::getPending(), fesa::SettingFieldScalar< T >::getPending(), fesa::SettingFieldArray2D< T >::getRow(), fesa::GenericFieldArray2D< T >::getRow(), fesa::AcqFieldArray2D< T >::getRow(), fesa::FieldStringArray::getSize(), fesa::ExtendedMultiplexingManager::getSlot(), fesa::SettingFieldStringArray::getString(), fesa::GenericFieldStringArray::getString(), and fesa::AcqFieldStringArray::getString().
CycleDescriptor * fesa::AbstractMultiplexingManager::getTimingDescriptor | ( | ) | [inline, protected] |
This method returns the timing descriptor of this multiplexing manager.
Definition at line 169 of file AbstractMultiplexingManager.h.
References timingDescriptor_.
Referenced by fesa::AbstractField::store().
void fesa::AbstractMultiplexingManager::mapMemory | ( | char * | pAddr | ) | [static, protected] |
This method map in memory the multiplexing managers of the collection.
Definition at line 64 of file AbstractMultiplexingManager.cpp.
References fesa::AbstractMultiplexingDataManager::computeMemorySize(), getMultiplexingDataManager(), managersCol_, and fesa::AbstractMultiplexingDataManager::mapMemory().
Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::mapFields().
virtual int32_t fesa::AbstractMultiplexingManager::requireSlot | ( | int32_t | cycleId | ) | [protected, pure virtual] |
This method returns the next slot in which the value of a field will be stored. The method is implemented by the concrete multiplexing manager.
cycleId | the ID of the cycle for the requested slot |
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
virtual int32_t fesa::AbstractMultiplexingManager::requireSlot | ( | const std::string & | cycleName | ) | [protected, pure virtual] |
This method returns the next slot in which the value of a field will be stored. The method is implemented by the concrete multiplexing manager.
cycleName | the name of the cycle |
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
virtual int32_t fesa::AbstractMultiplexingManager::requireSlot | ( | MultiplexingContext & | context | ) | [pure virtual] |
This method returns the next slot in which the value of a field will be stored. The method is implemented by the concrete multiplexing manager.
context | the multiplexing context for which a slot is requested |
Implemented in fesa::ExtendedMultiplexingManager, fesa::MultiplexingManager, and fesa::RollingMultiplexingManager.
Referenced by fesa::SettingFieldArray2D< T >::getSize(), fesa::SettingFieldArray< T >::getSize(), fesa::GenericFieldArray2D< T >::getSize(), fesa::GenericFieldArray< T >::getSize(), fesa::AcqFieldArray2D< T >::getSize(), fesa::AcqFieldArray< T >::getSize(), fesa::FaultField< DataType >::getTimestamp(), fesa::FaultField< DataType >::isRaised(), fesa::FaultField< DataType >::lower(), fesa::FaultField< DataType >::raise(), fesa::ExtendedMultiplexingManager::requireSlot(), fesa::AbstractField::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::SettingFieldArray2D< T >::setRow(), fesa::GenericFieldArray2D< T >::setRow(), fesa::AcqFieldArray2D< T >::setRow(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), and fesa::AcqFieldStringArray::setString().
friend class AbstractField [friend] |
Reimplemented in fesa::ExtendedMultiplexingManager.
Definition at line 29 of file AbstractMultiplexingManager.h.
friend class DeviceFactoryImp [friend] |
Definition at line 28 of file AbstractMultiplexingManager.h.
friend class ExtendedMultiplexingManager [friend] |
Definition at line 26 of file AbstractMultiplexingManager.h.
friend class Field [friend] |
Reimplemented in fesa::ExtendedMultiplexingManager.
Definition at line 27 of file AbstractMultiplexingManager.h.
friend class SynchronizationFactory [friend] |
Definition at line 30 of file AbstractMultiplexingManager.h.
std::map< std::string, AbstractMultiplexingManager * > fesa::AbstractMultiplexingManager::managersCol_ [static, protected] |
a map which contains pointers to all the multiplexing managers on the system
Definition at line 123 of file AbstractMultiplexingManager.h.
Referenced by AbstractMultiplexingManager(), getMemorySizeToAllocate(), getMultiplexingManager(), mapMemory(), and ~AbstractMultiplexingManager().
std::string fesa::AbstractMultiplexingManager::name_ [protected] |
mutex that protects conditional variable newMsgCondVar_
Definition at line 118 of file AbstractMultiplexingManager.h.
Referenced by getName(), and ~AbstractMultiplexingManager().
a reference to the timing descriptor
Definition at line 128 of file AbstractMultiplexingManager.h.
Referenced by getDepth(), fesa::RollingMultiplexingManager::getLastSlot(), fesa::MultiplexingManager::getLastSlot(), fesa::RollingMultiplexingManager::getSlot(), getTimingDescriptor(), and fesa::RollingMultiplexingManager::requireSlot().