fesa-core  7.0.0
fesa::AbstractMultiplexingManager Class Referenceabstract

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::MultiplexingManager fesa::RollingBufferMuxManager

Public Member Functions

virtual int32_t getDepth ()
 This method returns the depth of the multiplexing manager. More...
 
const std::string & getTimingDomain () const
 
const CycleDescriptorgetTimingDescriptor () const
 
virtual int32_t requireSlot (const 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. More...
 
virtual int32_t getSlot (const MultiplexingContext &context)
 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. More...
 
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 std::size_t computeMemorySize ()
 returns the number of bytes needed to store the data of the class shared between server and RT processes.
 
virtual void mapMemory (char *&address, bool first, std::ostream &logStream)
 

Protected Member Functions

 AbstractMultiplexingManager (const CycleDescriptor *timingDescriptor)
 Constructor. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Protected Attributes

const CycleDescriptortimingDescriptor_
 a reference to the timing descriptor
 

Detailed Description

This class is used to find the correct slot for a multiplexed field value using the virtual accelerator or the multiplexing context.

Constructor & Destructor Documentation

fesa::AbstractMultiplexingManager::AbstractMultiplexingManager ( const CycleDescriptor timingDescriptor)
protected

Constructor.

Parameters
nameof the multiplexing manager
timingDescriptorreference to the TimingDescriptor that will be used in the multiplexing manager

Member Function Documentation

int32_t fesa::AbstractMultiplexingManager::getClosestSlot ( timestamp_ns  timestamp)
inlinevirtual

Returns the slot closest to the given timestamp.

Parameters
timestampthe timestamp to look for

Reimplemented in fesa::RollingBufferMuxManager.

int32_t fesa::AbstractMultiplexingManager::getClosestSlot ( const std::string &  cycleName,
timestamp_ns  timestamp 
)
inlinevirtual

Returns the slot closest to the given timestamp whose cycle matches cycleName.

Parameters
cycleNamethe name of the cycle to look for
timestampthe timestamp to look for

Reimplemented in fesa::RollingBufferMuxManager.

int32_t fesa::AbstractMultiplexingManager::getDepth ( )
virtual

This method returns the depth of the multiplexing manager.

Returns
the depth of the multiplexing manager

Reimplemented in fesa::RollingBufferMuxManager.

virtual int32_t fesa::AbstractMultiplexingManager::getLastSlot ( const std::string &  cycleName)
protectedpure 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
cycleNamethe name of teh cycle
Returns
the last slot used by the requested cycle

Implemented in fesa::RollingBufferMuxManager, and fesa::MultiplexingManager.

virtual int32_t fesa::AbstractMultiplexingManager::getLastSlot ( int32_t  cycleId)
protectedpure 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
cycleIdthe ID of the cycle for the requested slot
Returns
the last slot used by the requested cycle

Implemented in fesa::RollingBufferMuxManager, and fesa::MultiplexingManager.

int32_t fesa::AbstractMultiplexingManager::getSlot ( const MultiplexingContext context)
inlinevirtual

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
contextthe multiplexing context for which a slot is requested
Returns
the slot where the data corresponding to the context is stored

Reimplemented in fesa::MultiplexingManager.

int32_t fesa::AbstractMultiplexingManager::getSlotByCycleName ( const std::string &  cycleName)
inlinevirtual

This method the last given cycleName set slot.

Returns
The last cyclename slot.

Reimplemented in fesa::RollingBufferMuxManager.

int32_t fesa::AbstractMultiplexingManager::getSlotByTimeStamp ( timestamp_ns  timeStamp)
inlinevirtual

Returns the slot corresponding to timeStamp, or INVALID_SLOT if this feature is not supported by the concrete MultiplexingManager.

Exceptions
FesaExceptionif no slot is assigned timeStamp.

Reimplemented in fesa::RollingBufferMuxManager.

const CycleDescriptor * fesa::AbstractMultiplexingManager::getTimingDescriptor ( ) const
inline

Returns the timing descriptor associated to this multiplexing manager.

const std::string & fesa::AbstractMultiplexingManager::getTimingDomain ( ) const

Returns the timing domain associated to this multiplexing manager.

void fesa::AbstractMultiplexingManager::mapMemory ( char *&  address,
bool  first,
std::ostream &  logStream 
)
virtual

Maps shared fields to the memory pointed to by address.

Parameters
[in,out]addressaddress where to map shared fields. It is updated to point to the byte following the last byte mapped.
firsttrue if this is the first process to map the shared fields
logStreamstream on which details of the mapping are output

Reimplemented in fesa::RollingBufferMuxManager.

virtual int32_t fesa::AbstractMultiplexingManager::requireSlot ( const 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
contextthe multiplexing context for which a slot is requested
Returns
the slot where the data can be stored

Implemented in fesa::MultiplexingManager, and fesa::RollingBufferMuxManager.

virtual int32_t fesa::AbstractMultiplexingManager::requireSlot ( const std::string &  cycleName)
protectedpure 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
cycleNamethe name of the cycle
Returns
the slot where data can be stored

Implemented in fesa::RollingBufferMuxManager, and fesa::MultiplexingManager.

virtual int32_t fesa::AbstractMultiplexingManager::requireSlot ( int32_t  cycleId)
protectedpure 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
cycleIdthe ID of the cycle for the requested slot
Returns
the slot where data can be stored

Implemented in fesa::RollingBufferMuxManager, and fesa::MultiplexingManager.


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