RTC Toolkit
1.0.0
|
Functions | |
std::chrono::milliseconds | CalcDuration (size_t count, size_t loop_frequency, float error_margin=1.0) |
free helper function to calulate the estimated time to read the a number of samples at a given frequency More... | |
std::pair< std::chrono::milliseconds, std::chrono::milliseconds > | CalcTimeout (size_t count, size_t loop_frequency, float error_margin=2.0) |
free helper function to calulate the timeouts required for the Read and Skip functions More... | |
template<typename ReaderType , typename Operation > | |
std::error_code | Read (ReaderType &reader, Operation &&op, size_t count, size_t loop_frequency, float error_margin=2.0) |
helper function to wrap the ipcq.read with handling of timeouts and count values More... | |
template<typename ReaderType > | |
std::error_code | Skip (ReaderType &reader, size_t count, size_t loop_frequency, float error_margin=2.0) |
helper function to wrap the ipcq.skip with handling of timeouts and count values More... | |
template<typename ReaderType > | |
std::error_code | Reset (ReaderType &reader) |
helper function to reset the ipcq.reader to latest sample More... | |
template<typename ReaderType > | |
size_t | NumFree (ReaderType &reader) |
helper function to get the free space in the shm. More... | |
std::chrono::milliseconds rtctk::dataTask::detail::CalcDuration | ( | size_t | count, |
size_t | loop_frequency, | ||
float | error_margin = 1.0 |
||
) |
free helper function to calulate the estimated time to read the a number of samples at a given frequency
count | number of samples |
loop_frequency | frequency of loop |
error_margin | margin of error in calculation defaults to 1.0 |
std::pair<std::chrono::milliseconds, std::chrono::milliseconds> rtctk::dataTask::detail::CalcTimeout | ( | size_t | count, |
size_t | loop_frequency, | ||
float | error_margin = 2.0 |
||
) |
free helper function to calulate the timeouts required for the Read and Skip functions
count | number of samples |
loop_frequency | frequency of loop |
error_margin | error_margin of error to give to timeouts defaults to 2.0 |
size_t rtctk::dataTask::detail::NumFree | ( | ReaderType & | reader | ) |
helper function to get the free space in the shm.
ReaderType. | type of ipcq.reader |
reader | the reader being used |
std::error_code rtctk::dataTask::detail::Read | ( | ReaderType & | reader, |
Operation && | op, | ||
size_t | count, | ||
size_t | loop_frequency, | ||
float | error_margin = 2.0 |
||
) |
helper function to wrap the ipcq.read with handling of timeouts and count values
ReaderType. | type of ipcq.reader |
Operation | the callback to process the shm data |
reader | the reader being used |
op | the callback to process shm data samples |
count | number of samples requested |
loop_frequency | expected frequency of the loop. |
error_margin | margin of error in the loop frequency. defaults to: 2.0 |
std::error_code rtctk::dataTask::detail::Reset | ( | ReaderType & | reader | ) |
helper function to reset the ipcq.reader to latest sample
ReaderType. | type of ipcq.reader |
reader | the reader being used |
std::error_code rtctk::dataTask::detail::Skip | ( | ReaderType & | reader, |
size_t | count, | ||
size_t | loop_frequency, | ||
float | error_margin = 2.0 |
||
) |
helper function to wrap the ipcq.skip with handling of timeouts and count values
ReaderType. | type of ipcq.reader |
reader | the reader being used |
count | number of samples requested to skip |
loop_frequency | expected frequency of the loop. |
error_margin | margin of error in the loop frequency. defaults to: 2.0 |