38 #ifndef CIRCULAR_BUFFER_HPP 39 #define CIRCULAR_BUFFER_HPP 64 std::size_t
write(
const uint8_t* data, std::size_t bytes);
66 std::size_t
read(uint8_t* data, std::size_t bytes);
84 #endif // for CIRCULAR_BUFFER_HPP std::size_t read(uint8_t *data, std::size_t bytes)
Returns number of bytes read.
ROSaicNodeBase * node_
Pointer to the node.
std::size_t capacity() const
Returns capacity_.
std::size_t write(const uint8_t *data, std::size_t bytes)
Returns number of bytes written.
std::size_t size_
Number of bytes that have been written but not yet read.
CircularBuffer(ROSaicNodeBase *node, std::size_t capacity)
Constructor of CircularBuffer.
Class for creating, writing to and reading from a circular buffer.
~CircularBuffer()
Destructor of CircularBuffer.
std::size_t capacity_
Capacity of the circular buffer.
std::size_t head_
Specifies where we start writing.
std::size_t tail_
Specifies where we start reading.
std::size_t size() const
Returns size_.
This class is the base class for abstraction.