fesa-core  5.0.1
fesa::ExtendedMultiplexingManager Class Reference

This mutiplexing manager is needed in order to do Multi-Multiplexing. This means it needs to be able to handle extra criteria. More...

#include <ExtendedMultiplexingManager.h>

Inheritance diagram for fesa::ExtendedMultiplexingManager:
fesa::AbstractMultiplexingManager

Public Member Functions

 ExtendedMultiplexingManager (const std::string &name, std::vector< std::string > extraCriterionCol, AbstractMultiplexingManager *baseMultiplexingManager)
 Constructor. More...
 
int32_t getDepth ()
 returns the depth of this multiplexing manager More...
 
int32_t requireSlot (const MultiplexingContext &context)
 requests a slot dependent on a MultiplexingContext More...
 
int32_t getSlot (const MultiplexingContext &context)
 This method returns the slot in which the required value is stored, according to the given multiplexing context. More...
 
const std::vector< std::string > & getExtraCriterionCol ()
 This method returns the list of extra criteria. More...
 
AbstractMultiplexingDataManagergetMultiplexingDataManager ()
 This method returns the MultiplexingDataManager. Is is pure virtual in the baseclass, so we have to provide an implementation. More...
 
- Public Member Functions inherited from fesa::AbstractMultiplexingManager
const std::string & getTimingDomain () const
 
const CycleDescriptorgetTimingDescriptor () const
 
virtual int32_t getSlotByTimeStamp (timestamp_ns timeStamp)
 
virtual int32_t getClosestSlot (timestamp_ns timestamp)
 
virtual int32_t getClosestSlot (const std::string &cycleName, timestamp_ns timestamp)
 
virtual int32_t getSlotByCycleName (const std::string &cycleName)
 This method the last given cycleName set slot. More...
 
virtual ~AbstractMultiplexingManager ()
 Destructor.
 

Protected Member Functions

int32_t getLastSlot (int32_t cycleId)
 This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called. More...
 
int32_t getLastSlot (int32_t cycleId, const std::string &extraCriterion)
 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. More...
 
int32_t requireSlot (int32_t cycleId)
 This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called. More...
 
int32_t requireSlot (int32_t cycleId, const std::string &extraCriterion)
 This method returns the next slot in which the value of a field will be stored. More...
 
int32_t getLastSlot (const std::string &cycleName)
 This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called. More...
 
int32_t getLastSlot (const std::string &cycleName, const std::string &extraCriterion)
 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. More...
 
int32_t requireSlot (const std::string &cycleName)
 This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called. More...
 
int32_t requireSlot (const std::string &cycleName, const std::string &extraCriterion)
 This method returns the next slot in which the value of a field will be stored. More...
 
int32_t getBlockOffset (const MultiplexingContext &context)
 retrieve the position of the current extra condition in the collection. This position is used as an offset to calculate the slot. context reference to the current context More...
 
- Protected Member Functions inherited from fesa::AbstractMultiplexingManager
const std::string & getName ()
 This method returns the name of the multiplexing manager. More...
 
 AbstractMultiplexingManager (const std::string &name, const CycleDescriptor *timingDescriptor)
 Constructor. More...
 

Protected Attributes

AbstractMultiplexingManagerbaseMultiplexingManager_
 The basic multiplexing manager, where the extended multiplexing manager "inherits" its attributes from.
 
std::vector< std::string > extraCriterionCol_
 a collection of extra-criterions
 
- Protected Attributes inherited from fesa::AbstractMultiplexingManager
std::string name_
 mutex that protects conditional variable newMsgCondVar_
 
const CycleDescriptortimingDescriptor_
 a reference to the timing descriptor
 

Additional Inherited Members

- Static Protected Member Functions inherited from fesa::AbstractMultiplexingManager
static std::size_t getMemorySizeToAllocate ()
 This method retrieves the size to be allocated in heap or shared memory, regarding the collection of multiplexing managers. More...
 
static void mapMemory (char *pAddr, bool first)
 
static
AbstractMultiplexingManager
getMultiplexingManager (const std::string &name)
 This method retrieves the desired multiplexing manager. More...
 
- Static Protected Attributes inherited from fesa::AbstractMultiplexingManager
static std::map< std::string,
AbstractMultiplexingManager * > 
managersCol_
 a map which contains pointers to all the multiplexing managers on the system
 

Detailed Description

This mutiplexing manager is needed in order to do Multi-Multiplexing. This means it needs to be able to handle extra criteria.

Constructor & Destructor Documentation

fesa::ExtendedMultiplexingManager::ExtendedMultiplexingManager ( const std::string &  name,
std::vector< std::string >  extraCriterionCol,
AbstractMultiplexingManager baseMultiplexingManager 
)

Constructor.

Parameters
namethe name of this multiplexing manager
extraConditionCola list of extra conditions
baseMultiplexingManagerThe multiplexing manger from which we "inherit" its settings

Member Function Documentation

int32_t fesa::ExtendedMultiplexingManager::getBlockOffset ( const MultiplexingContext context)
protected

retrieve the position of the current extra condition in the collection. This position is used as an offset to calculate the slot. context reference to the current context

Returns
offset of the data-block
int32_t fesa::ExtendedMultiplexingManager::getDepth ( )
virtual

returns the depth of this multiplexing manager

Returns
the depth

Reimplemented from fesa::AbstractMultiplexingManager.

const std::vector< std::string > & fesa::ExtendedMultiplexingManager::getExtraCriterionCol ( )
inline

This method returns the list of extra criteria.

Returns
the reference to the collection of extra-criterions
int32_t fesa::ExtendedMultiplexingManager::getLastSlot ( int32_t  cycleId)
protectedvirtual

This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called.

Parameters
cycleIdobsolete, since method is not used
Returns
is obsolete, since method is not used
Exceptions
FesaExceptionThrows an exception in any case

Implements fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::getLastSlot ( int32_t  cycleId,
const std::string &  extraCriterion 
)
protected

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
cycleIdthe ID of the cycle for the requested slot
extraCriterionThe additional criterion which identifies the slot
Returns
the last slot used by the requested cycle
int32_t fesa::ExtendedMultiplexingManager::getLastSlot ( const std::string &  cycleName)
protectedvirtual

This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called.

Parameters
cycleNamethe name of teh cycle
Returns
is obsolete, since method is not used
Exceptions
FesaExceptionThrows an exception in any case

Implements fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::getLastSlot ( const std::string &  cycleName,
const std::string &  extraCriterion 
)
protected

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
cycleNamethe name of the cycle
extraCriterionThe additional criterion which identifies the slot
Returns
the last slot used by the requested cycle
AbstractMultiplexingDataManager * fesa::ExtendedMultiplexingManager::getMultiplexingDataManager ( )
inlinevirtual

This method returns the MultiplexingDataManager. Is is pure virtual in the baseclass, so we have to provide an implementation.

Returns
pointer to the DataManager

Implements fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::getSlot ( const MultiplexingContext context)
virtual

This method returns the slot in which the required value is stored, according to the given multiplexing context.

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

Reimplemented from fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::requireSlot ( const MultiplexingContext context)
virtual

requests a slot dependent on a MultiplexingContext

Parameters
contextthe MultiplexingContext to choose the slot
Returns
a slot to write data, corresponding to the given MultiplexingContext

Implements fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::requireSlot ( int32_t  cycleId)
protectedvirtual

This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called.

Parameters
cycleIdobsolete, since method is not used
Returns
obsolete, since method is not used
Exceptions
FesaExceptionThrows an exception in any case

Implements fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::requireSlot ( int32_t  cycleId,
const std::string &  extraCriterion 
)
protected

This method returns the next slot in which the value of a field will be stored.

Parameters
cycleIdthe ID of the cycle for the requested slot
extraCriterionThe additional criterion which identifies the slot
Returns
the slot where the data can be stored
int32_t fesa::ExtendedMultiplexingManager::requireSlot ( const std::string &  cycleName)
protectedvirtual

This method has to be implemented here, (since it is pure virtual in the baseclass) But it cannot be used, since the cycleId is not enough here to identify a slot. The method will throw an exception, when called.

Parameters
cycleNamethe cycle name
Returns
obsolete, since method is not used
Exceptions
FesaExceptionThrows an exception in any case

Implements fesa::AbstractMultiplexingManager.

int32_t fesa::ExtendedMultiplexingManager::requireSlot ( const std::string &  cycleName,
const std::string &  extraCriterion 
)
protected

This method returns the next slot in which the value of a field will be stored.

Parameters
cycleNamethe name of the cycle
extraCriterionThe additional criterion which identifies the slot
Returns
the slot where the data can be stored

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