RTC Toolkit 4.0.2
Loading...
Searching...
No Matches
Namespaces | Functions
readerHelpers.hpp File Reference

Helper methods to read data from shared memory queue. More...

#include <rtctk/componentFramework/logger.hpp>
#include <chrono>
#include <cmath>
#include <system_error>

Go to the source code of this file.

Namespaces

namespace  rtctk
 
namespace  rtctk::dataTask
 
namespace  rtctk::dataTask::detail
 

Functions

std::chrono::milliseconds rtctk::dataTask::detail::CalcTimeout (size_t count, float loop_frequency, float error_margin)
 Helper function to calculate the estimated time to read the a number of samples at a given frequency.
 
template<typename ReaderType , typename Operation >
std::error_code rtctk::dataTask::detail::Read (ReaderType &reader, Operation &&op, size_t count, float loop_frequency, float error_margin)
 Helper function to wrap the ipcq.read with handling of timeouts and count values.
 
template<typename ReaderType >
std::error_code rtctk::dataTask::detail::Skip (ReaderType &reader, size_t count, float loop_frequency, float error_margin)
 Helper function to wrap the ipcq.skip with handling of timeouts and count values.
 
template<typename ReaderType >
std::error_code rtctk::dataTask::detail::Reset (ReaderType &reader)
 Helper function to reset the ipcq.reader to latest sample.
 
template<typename ReaderType >
size_t rtctk::dataTask::detail::NumFree (ReaderType &reader)
 Helper function to get the free space in the shm.
 

Detailed Description

Helper methods to read data from shared memory queue.