This class provides methods to retrieve information about the cycle IDs and names that a multiplexing manager uses regardless the implementation of the data. The prefix "rolling" means the following: 1.) The number of available slots can be defined per class-instance. 2.) Only acquisition data is handled by the rolling data manager. 3.) New values are written inside just one after another for all incoming cycles(cycleNames) 4.) If the last slot is reached, the rolling data manager will continue writing on the first slot. 5.) It is possible that for an "old" cycle no data is available, since it was already overridden.
More...
#include <RollingBufferMuxDataManager.h>
This class provides methods to retrieve information about the cycle IDs and names that a multiplexing manager uses regardless the implementation of the data. The prefix "rolling" means the following: 1.) The number of available slots can be defined per class-instance. 2.) Only acquisition data is handled by the rolling data manager. 3.) New values are written inside just one after another for all incoming cycles(cycleNames) 4.) If the last slot is reached, the rolling data manager will continue writing on the first slot. 5.) It is possible that for an "old" cycle no data is available, since it was already overridden.
fesa::RollingBufferMuxDataManager::RollingBufferMuxDataManager |
( |
int32_t |
depth | ) |
|
Constructor.
- Parameters
-
depth | The size of the Rolling Buffer |
virtual std::size_t fesa::RollingBufferMuxDataManager::computeMemorySize |
( |
| ) |
|
|
pure virtual |
int32_t fesa::RollingBufferMuxDataManager::findClosestCycleId |
( |
int32_t |
cycleId, |
|
|
timestamp_ns |
timestamp |
|
) |
| |
Finds and returns the slot whose cycle corresponds to cycleId, and whose timestamp is the closest less than or equal to the timestamp parameter.
- Parameters
-
cycleId | the cycle ID to look for |
timestamp | the timestamp to look for |
- Returns
- the matching slot, or INVALID_SLOT if not found.
int32_t fesa::RollingBufferMuxDataManager::findClosestTimeStamp |
( |
timestamp_ns |
timestamp | ) |
|
Finds and returns the slot whose timestamp is the closest less than or equal to the timestamp parameter.
- Parameters
-
timestamp | the timestamp to look for |
- Returns
- the matching slot, or INVALID_SLOT if not found.
int32_t fesa::RollingBufferMuxDataManager::findCycleIdBackward |
( |
int32_t |
cycleId | ) |
|
This method finds the latest occurrence of the cycleId passed by parameter. The method looks up the ID going backwards from the currentPosition.
- Parameters
-
cycleId | the CycleID we are searching for |
- Returns
- the corresponding slot, INVALID_SLOT if not found
int32_t fesa::RollingBufferMuxDataManager::findCycleStampBackward |
( |
timestamp_ns |
cycleStamp | ) |
|
This method finds the latest occurrence of the cycleStamp passed by parameter. The method looks up the stamp going backwards from the currentPosition.
- Parameters
-
cycleStamp | the cycleStamp we are searching for |
- Returns
- the corresponding slot, INVALID_SLOT if not found
int32_t fesa::RollingBufferMuxDataManager::getCurrentCycleId |
( |
| ) |
|
|
inline |
This method returns the cycle ID of the current slot.
- Returns
- the current cycle ID
int32_t fesa::RollingBufferMuxDataManager::getCurrentPosition |
( |
| ) |
|
|
inline |
- Returns
- the current position of the rolling
int64_t fesa::RollingBufferMuxDataManager::getCycleStamp |
( |
int32_t |
position | ) |
|
|
inline |
- Returns
- the cycle stamp at the position passed by argument
int32_t fesa::RollingBufferMuxDataManager::getDepth |
( |
| ) |
|
|
inline |
This method returns the depth of the data.
- Returns
- the depth of the data
int32_t fesa::RollingBufferMuxDataManager::getNumberStoredValues |
( |
| ) |
|
|
inline |
This method returns the number of stored values in the rolling buffer.
- Returns
- The number of stored values.
virtual void fesa::RollingBufferMuxDataManager::mapMemory |
( |
char * |
address, |
|
|
bool |
first |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following files:
- RollingBufferMuxDataManager.h
- RollingBufferMuxDataManager.cpp