iox::concurrent::FiFo🔗
single pusher single pop'er thread safe fifo More...
#include <fifo.hpp>
Public Functions🔗
Name | |
---|---|
bool | push(const ValueType & f_value) pushes a value into the fifo |
cxx::optional< ValueType > | pop() returns the oldest value from the fifo and removes it |
bool | empty() const returns true when the fifo is empty, otherwise false |
uint64_t | size() const returns the size of the fifo |
constexpr uint64_t | capacity() returns the capacity of the fifo |
Detailed Description🔗
template <typename ValueType ,
uint64_t Capacity>
class iox::concurrent::FiFo;
single pusher single pop'er thread safe fifo
Public Functions Documentation🔗
function push🔗
inline bool push(
const ValueType & f_value
)
pushes a value into the fifo
Return: if the values was pushed successfully into the fifo it returns true, otherwise false
function pop🔗
inline cxx::optional< ValueType > pop()
returns the oldest value from the fifo and removes it
Return: if the fifo was not empty the optional contains the value, otherwise it contains a nullopt
function empty🔗
inline bool empty() const
returns true when the fifo is empty, otherwise false
function size🔗
inline uint64_t size() const
returns the size of the fifo
function capacity🔗
static inline constexpr uint64_t capacity()
returns the capacity of the fifo
Updated on 31 May 2022 at 15:29:15 CEST