fesa::AbstractMultiplexingManager Class Reference

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>

Inheritance diagram for fesa::AbstractMultiplexingManager:
fesa::ExtendedMultiplexingManager fesa::MultiplexingManager fesa::RollingMultiplexingManager

List of all members.

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

CycleDescriptorgetTimingDescriptor ()
 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_
CycleDescriptortimingDescriptor_
 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

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
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_.


Member Function Documentation

int32_t fesa::AbstractMultiplexingManager::getDepth (  )  [virtual]
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.

Parameters:
cycleId the ID of the cycle for the requested slot
Returns:
the last slot used by the requested cycle

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.

Parameters:
cycleName the name of teh cycle
Returns:
the last slot used by the requested 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.

Returns:
the size to allocate

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.

Returns:
the reference to the MultiplexingDataManager. Might be NULL

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.

Parameters:
name The name of the multiplexing manager
Returns:
a pointer to the desired multiplexing manager, or NULL if not found

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.

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.

Parameters:
context the multiplexing context for which a slot is requested
Returns:
the slot where the data corresponding to the context is stored

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.

Returns:
the reference to the timing descriptor

Definition at line 169 of file AbstractMultiplexingManager.h.

References timingDescriptor_.

Referenced by fesa::AbstractField::store().

void fesa::AbstractMultiplexingManager::mapMemory ( char *  pAddr  )  [static, protected]
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.

Parameters:
cycleId the ID of the cycle for the requested slot
Returns:
the slot where data can be stored

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.

Parameters:
cycleName the name of the cycle
Returns:
the slot where data can be stored

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.

Parameters:
context the multiplexing context for which a slot is requested
Returns:
the slot where the data can be stored

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().


Friends And Related Function Documentation

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.


Member Data Documentation

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().

mutex that protects conditional variable newMsgCondVar_

Definition at line 118 of file AbstractMultiplexingManager.h.

Referenced by getName(), and ~AbstractMultiplexingManager().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1