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>
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 |
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.
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.
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().
void fesa::CycleDescriptor::addSelector | ( | const std::string & | cycleSelectorName | ) | [protected, virtual] |
method to safely add Selectors (only possible at startup!!!)
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.
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.
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.
cycleSelectorName | the name of the requested cycleSelector |
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.
cycleSelectorID | the ID of the requested cycleSelector |
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 | ( | ) |
Definition at line 114 of file CycleDescriptor.cpp.
References name_.
Referenced by fesa::SynchronizationFactory::createCycleDescriptor(), fesa::SynchronizationFactory::createMultiplexingManager(), fesa::SynchronizationFactory::createRollingMultiplexingManager(), fesa::SynchronizationFactory::createRollingSharedMultiplexingManager(), and fesa::SynchronizationFactory::createSharedMultiplexingManager().
const std::string & fesa::CycleDescriptor::getTimingCriterion | ( | ) |
Definition at line 109 of file CycleDescriptor.cpp.
References timingCriterion_.
const std::string & fesa::CycleDescriptor::getTimingDomain | ( | ) |
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.
timingSelectorName | The name of the selector to check |
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
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.
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] |