rtmlib
|
#include <reader.h>
Public Types | |
enum | error_t { AVAILABLE = 0, UNAVAILABLE, OVERFLOW, BUFFER_READ } |
typedef B | buffer_t |
Public Member Functions | |
RTML_reader (const B &) | |
error_t | pull (typename B::event_t &) |
error_t | pop (typename B::event_t &) |
bool | synchronize () |
bool | gap () const |
size_t | length () const |
void | debug () const |
Protected Attributes | |
const B & | buffer |
size_t | top |
size_t | bottom |
timespanw | timestamp |
typedef B RTML_reader< B >::buffer_t |
enum RTML_reader::error_t |
RTML_reader< B >::RTML_reader | ( | const B & | _buffer | ) |
Constructs a new RTML_reader.
Construct the new event reader that reads and manage events from a buffer.
buffer | a constant pointer that points to the buffer. |
void RTML_reader< B >::debug | ( | ) | const |
Debug function
bool RTML_reader< B >::gap | ( | ) | const |
Detects a gap. It compares the current RTML_reader absolute timestamp with the current absolute timestamp of the buffer.
size_t RTML_reader< B >::length | ( | ) | const |
Get reader length
RTML_reader< B >::error_t RTML_reader< B >::pop | ( | typename B::event_t & | event | ) |
Pop event from the buffer.
RTML_reader< B >::error_t RTML_reader< B >::pull | ( | typename B::event_t & | event | ) |
Pull event from the buffer.
bool RTML_reader< B >::synchronize | ( | ) |
Synchronizes the RTML_reader with the buffer
|
protected |
The bottom of the reader
|
protected |
Constant reference to a ring Buffer this RTML_reader reads from.
|
protected |
The timestamp of the reader to detect gaps
|
protected |
The reader contains a top and a bottom