fesa::CycleDescriptor Class Reference

This class provides an interface to retrieve the cycles ids and names depending on the timing domain. Since the timing Domain is lab specific, a child class inside the lap package implements most of the methods. More...

#include <CycleDescriptor.h>

List of all members.

Public Member Functions

virtual ~CycleDescriptor ()
 Destructor.
virtual const std::vector
< int32_t > & 
getCycleIdsCol ()
 Returns the ID-Collection of this cycle descriptor. Implementation can be done per lab, if default method is not sufficient.
virtual const std::map
< std::string, int32_t > & 
getCycleSelectorCol ()
 Returns the collection of cycle selectors Implementation can be done per lab, if default method is not sufficient.
virtual int32_t getCycleSelectorId (const std::string &cycleSelectorName)
 returns the SelectorID of the corresponding cycleSelector. Implementation can be done per lab, if default method is not sufficient.
virtual const std::string getCycleSelectorName (int32_t cycleSelectorID)
 returns the SelectorName of the corresponding cycleSelectorID. Implementation can be done per lab, if default method is not sufficient.
virtual bool isValidCycleSelector (const std::string &cycleSelectorName)
 Checks, if the passed timing selector is valid. Implementation can be done per lab, if the default is not sufficient.
const std::string & getTimingDomain ()
const std::string & getTimingCriterion ()
const std::string & getName ()

Protected Member Functions

 CycleDescriptor (const std::string &timingDomain, const std::string &multiplexingCriterion)
 Constructor.
virtual void addSelector (const std::string &cycleSelectorName)
 method to safely add Selectors (only possible at startup!!!)
virtual void renameSelector (const std::string &oldCycleSelectorName, const std::string &newCycleSelectorName)
 method to rename an existing selector

Protected Attributes

std::string timingDomain_
 timing domain
std::string timingCriterion_
 multiplexing criterion
std::string name_
 internal name of the timing descriptor

Private Attributes

std::vector< int32_t > cycleIdsCol_
 collection of cycle-ids
std::map< std::string, int32_t > cycleSelectorCol_
 The collection of cycle-selector-names.
Mutex cycleSelectorColMutex_
 mutex to protect the cycle ids and names

Detailed Description

This class provides an interface to retrieve the cycles ids and names depending on the timing domain. Since the timing Domain is lab specific, a child class inside the lap package implements most of the methods.

Definition at line 20 of file CycleDescriptor.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 20 of file CycleDescriptor.cpp.

fesa::CycleDescriptor::CycleDescriptor ( const std::string &  timingDomain,
const std::string &  multiplexingCriterion 
) [protected]

Constructor.

Parameters:
timingDomain timing domain of the timing descriptor
multiplexingCriterion of the timing descriptor

Definition at line 14 of file CycleDescriptor.cpp.

References name_.

Referenced by fesa::MultiplexingContext::setExtraCondition().


Member Function Documentation

void fesa::CycleDescriptor::addSelector ( const std::string &  cycleSelectorName  )  [protected, virtual]

method to safely add Selectors (only possible at startup!!!)

Parameters:
cycleSelectorName The name of the new selector

Definition at line 75 of file CycleDescriptor.cpp.

References cycleIdsCol_, cycleSelectorCol_, cycleSelectorColMutex_, FesaErrorDublicateSelectionCriterion, and isValidCycleSelector().

const std::vector< int32_t > & fesa::CycleDescriptor::getCycleIdsCol (  )  [virtual]

Returns the ID-Collection of this cycle descriptor. Implementation can be done per lab, if default method is not sufficient.

Returns:
map of IDs of this cycle descriptor

Definition at line 119 of file CycleDescriptor.cpp.

References cycleIdsCol_.

Referenced by fesa::AbstractSubscriptionFilter::allCyclesFirstUpdate(), fesa::AbstractMultiplexingManager::getDepth(), fesa::MultiplexingManager::getLastSlot(), and fesa::AbstractField::store().

const std::map< std::string, int32_t > & fesa::CycleDescriptor::getCycleSelectorCol (  )  [virtual]

Returns the collection of cycle selectors Implementation can be done per lab, if default method is not sufficient.

Returns:
map of cycleSelectorName and slot numbers (artificial cycleID) of this cycle descriptor

Definition at line 124 of file CycleDescriptor.cpp.

References cycleSelectorCol_.

int32_t fesa::CycleDescriptor::getCycleSelectorId ( const std::string &  cycleSelectorName  )  [virtual]

returns the SelectorID of the corresponding cycleSelector. Implementation can be done per lab, if default method is not sufficient.

Parameters:
cycleSelectorName the name of the requested cycleSelector
Returns:
cycleSelector ID
Exceptions:
FesaException is thrown when no cycleSelector Name was found for this cycleSelector

Definition at line 25 of file CycleDescriptor.cpp.

References cycleSelectorCol_, cycleSelectorColMutex_, and FesaErrorCycleSelectorNameNotFound.

Referenced by fesa::RollingMultiplexingManager::getLastSlot(), fesa::MultiplexingManager::getLastSlot(), fesa::RollingMultiplexingManager::getSlot(), fesa::RollingMultiplexingManager::requireSlot(), and fesa::TimingContext::TimingContext().

const std::string fesa::CycleDescriptor::getCycleSelectorName ( int32_t  cycleSelectorID  )  [virtual]

returns the SelectorName of the corresponding cycleSelectorID. Implementation can be done per lab, if default method is not sufficient.

Parameters:
cycleSelectorID the ID of the requested cycleSelector
Returns:
cycleSelectorName
Exceptions:
FesaException is thrown when no cycleSelector ID was found for this cycleSelector

Definition at line 42 of file CycleDescriptor.cpp.

References cycleSelectorCol_, cycleSelectorColMutex_, and FesaErrorCycleSelectorIDNotFound.

Referenced by fesa::AbstractSubscriptionFilter::allCyclesFirstUpdate(), and fesa::AbstractField::store().

const std::string & fesa::CycleDescriptor::getName (  ) 
const std::string & fesa::CycleDescriptor::getTimingCriterion (  ) 
Returns:
multiplexing criterion of the timing descriptor

Definition at line 109 of file CycleDescriptor.cpp.

References timingCriterion_.

const std::string & fesa::CycleDescriptor::getTimingDomain (  ) 
Returns:
timing domain of the timing descriptor

Definition at line 104 of file CycleDescriptor.cpp.

References timingDomain_.

bool fesa::CycleDescriptor::isValidCycleSelector ( const std::string &  cycleSelectorName  )  [virtual]

Checks, if the passed timing selector is valid. Implementation can be done per lab, if the default is not sufficient.

Parameters:
timingSelectorName The name of the selector to check
Returns:
true, if valid

Definition at line 58 of file CycleDescriptor.cpp.

References cycleSelectorCol_, and cycleSelectorColMutex_.

Referenced by addSelector(), and fesa::Property::validateCycleSelector().

void fesa::CycleDescriptor::renameSelector ( const std::string &  oldCycleSelectorName,
const std::string &  newCycleSelectorName 
) [protected, virtual]

method to rename an existing selector

Parameters:
oldCycleSelectorName The cycleSelector to rename
newCycleSelectorName The new name of the cycleSelector

Definition at line 91 of file CycleDescriptor.cpp.

References cycleSelectorCol_, cycleSelectorColMutex_, and FesaErrorCycleSelectorNameNotFound.


Member Data Documentation

std::vector<int32_t> fesa::CycleDescriptor::cycleIdsCol_ [private]

collection of cycle-ids

Definition at line 127 of file CycleDescriptor.h.

Referenced by addSelector(), and getCycleIdsCol().

std::map<std::string, int32_t> fesa::CycleDescriptor::cycleSelectorCol_ [private]

The collection of cycle-selector-names.

Definition at line 132 of file CycleDescriptor.h.

Referenced by addSelector(), getCycleSelectorCol(), getCycleSelectorId(), getCycleSelectorName(), isValidCycleSelector(), and renameSelector().

mutex to protect the cycle ids and names

Definition at line 137 of file CycleDescriptor.h.

Referenced by addSelector(), getCycleSelectorId(), getCycleSelectorName(), isValidCycleSelector(), and renameSelector().

std::string fesa::CycleDescriptor::name_ [protected]

internal name of the timing descriptor

Definition at line 120 of file CycleDescriptor.h.

Referenced by CycleDescriptor(), and getName().

std::string fesa::CycleDescriptor::timingCriterion_ [protected]

multiplexing criterion

Definition at line 115 of file CycleDescriptor.h.

Referenced by getTimingCriterion().

std::string fesa::CycleDescriptor::timingDomain_ [protected]

timing domain

Definition at line 110 of file CycleDescriptor.h.

Referenced by getTimingDomain().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1