libvisiontransfer  8.0.0
Public Member Functions | List of all members
visiontransfer::internal::SensorDataRingBuffer< RecordType, RINGBUFFER_SIZE > Class Template Reference

#include <visiontransfer/sensorringbuffer.h>

Public Member Functions

constexpr unsigned int ringbufferSize () const
constexpr int capacity () const
int size () const
int samplesLost () const
bool isFull () const
bool isEmpty () const
bool advanceWritePosition ()
bool pushData (const std::vector< RecordType > &data)
bool pushData (const RecordType &data)
bool pushData (RecordType &&data)
std::vector< RecordType > popAllData ()
std::vector< RecordType > popBetweenTimes (int fromSec=0, int fromUSec=0, int untilSec=0x7fffFFFFl, int untilUSec=0x7fffFFFFl)
 Pop and return the data between timestamps (or the whole ring buffer contents if not provided) More...

Detailed Description

template<typename RecordType, int RINGBUFFER_SIZE>
class visiontransfer::internal::SensorDataRingBuffer< RecordType, RINGBUFFER_SIZE >

Thread-safe ring buffer for timestamped generic sensor data. RecordType needs to implement getTimestamp() in order to perform comparisons in popBetweenTimes() (= obtain data series in interval).

Maximum capacity of the buffer is RINGBUFFER_SIZE-1. lostSamples() tallies the number of samples silently lost due to buffer overruns, and is reset by any of the pop...() methods.

Definition at line 42 of file sensorringbuffer.h.

Member Function Documentation

◆ popBetweenTimes()

template<typename RecordType, int RINGBUFFER_SIZE>
std::vector<RecordType> visiontransfer::internal::SensorDataRingBuffer< RecordType, RINGBUFFER_SIZE >::popBetweenTimes ( int  fromSec = 0,
int  fromUSec = 0,
int  untilSec = 0x7fffFFFFl,
int  untilUSec = 0x7fffFFFFl 

Pop and return the data between timestamps (or the whole ring buffer contents if not provided)

Definition at line 107 of file sensorringbuffer.h.

The documentation for this class was generated from the following file:
Nerian Vision Technologies