20#ifndef __FPSDK_COMMON_UTILS_HPP__
21#define __FPSDK_COMMON_UTILS_HPP__
122 bool Write(
const uint8_t* data,
const std::size_t size);
132 bool Read(uint8_t* data,
const std::size_t size);
142 bool Peek(uint8_t* data,
const std::size_t size);
145 std::vector<uint8_t> buf_;
bool Read(uint8_t *data, const std::size_t size)
Read chunk of data from buffer.
bool Write(const uint8_t *data, const std::size_t size)
Write chunk of data to buffer.
CircularBuffer(const std::size_t size)
Constructor.
void Reset()
Reset buffer, discard all data.
std::size_t Avail() const
Get size available.
bool Full() const
Check if full.
std::size_t Size() const
Get size (capacity) of buffer.
bool Empty() const
Check if empty.
std::size_t Used() const
Get size used.
bool Peek(uint8_t *data, const std::size_t size)
Read chunk of data from buffer (but don't remove it from the buffer)
const char * GetVersionString()
Get version string.
const char * GetLicenseString()
Get license string.
const char * GetCopyrightString()
Get copyright string.