MatLogger2  1.0.0
Library for logging of numeric data to HDF5 MAT-files, which is RT-safe and multithreaded.
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
XBot::VariableBuffer::QueueImpl Class Reference

The QueueImpl class implements the buffering strategy for a single logged variable. More...

+ Collaboration diagram for XBot::VariableBuffer::QueueImpl:

Public Types

template<typename T >
using LockfreeQueue = lf::spsc_queue< T, lf::capacity< NUM_BLOCKS >>
 

Public Member Functions

 QueueImpl (int elem_size, int buffer_size)
 
BufferBlock::Ptr get_new_block ()
 Get a new block from the pool, if available. More...
 
LockfreeQueue< BufferBlock::Ptr > & get_read_queue ()
 Handle to the read queue. More...
 
LockfreeQueue< BufferBlock::Ptr > & get_write_queue ()
 Handle to the write queue. More...
 

Static Public Member Functions

static int Size ()
 

Static Public Attributes

static const int NUM_BLOCKS = 20
 

Detailed Description

The QueueImpl class implements the buffering strategy for a single logged variable.

This consists of:

Definition at line 52 of file var_buffer.cpp.

Member Typedef Documentation

template<typename T >
using XBot::VariableBuffer::QueueImpl::LockfreeQueue = lf::spsc_queue<T, lf::capacity<NUM_BLOCKS>>

Definition at line 60 of file var_buffer.cpp.

Constructor & Destructor Documentation

XBot::VariableBuffer::QueueImpl::QueueImpl ( int  elem_size,
int  buffer_size 
)
inline

Definition at line 62 of file var_buffer.cpp.

Member Function Documentation

BufferBlock::Ptr XBot::VariableBuffer::QueueImpl::get_new_block ( )
inline

Get a new block from the pool, if available.

Returns
a shared pointer to a block, or a nullptr if non is available

Definition at line 81 of file var_buffer.cpp.

LockfreeQueue<BufferBlock::Ptr>& XBot::VariableBuffer::QueueImpl::get_read_queue ( )
inline

Handle to the read queue.

Definition at line 106 of file var_buffer.cpp.

LockfreeQueue<BufferBlock::Ptr>& XBot::VariableBuffer::QueueImpl::get_write_queue ( )
inline

Handle to the write queue.

Definition at line 114 of file var_buffer.cpp.

static int XBot::VariableBuffer::QueueImpl::Size ( )
inlinestatic

Definition at line 119 of file var_buffer.cpp.

Member Data Documentation

const int XBot::VariableBuffer::QueueImpl::NUM_BLOCKS = 20
static

Definition at line 57 of file var_buffer.cpp.


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