#include <ring_buffer.hh>
A Ring Buffer for multi-threaded communications.
This code was taken from a post by Shane Kirk http://shanekirk.com/category/programming/cc/. Minor modifications and a bug-fix were made by Eric Klavins, August 2023.
Public Member Functions | |
RingBuffer (int capacity) | |
int | getReadableItemCount () const |
int | getWriteableItemCount () const |
int | read (DataType *pData, int max) |
int | write (DataType *pData, int numItems) |