tin  1.5.9
tsm::runtime::storage::fixed_ring_queue< Event, Capacity > Class Template Reference

#include <static_ring.h>

Collaboration diagram for tsm::runtime::storage::fixed_ring_queue< Event, Capacity >:
Collaboration graph

Public Types

using value_type = Event
 

Public Member Functions

bool try_push (Event const &event)
 
bool try_push (Event &&event)
 
bool try_pop (Event &event)
 
template<typename Value >
bool try_overwrite_latest (Value &&event)
 
bool empty () const
 
bool full () const
 
std::size_t size () const
 
void clear ()
 

Static Public Attributes

static constexpr std::size_t capacity = Capacity
 

Detailed Description

template<typename Event, std::size_t Capacity>
class tsm::runtime::storage::fixed_ring_queue< Event, Capacity >

Fixed-capacity FIFO queue for runtime event storage.

Runtime topologies need bounded storage that works on bare-metal and RTOS targets. This queue stores values in an inline array, rejects pushes when full, and exposes the small API required by queue_storage.

The implementation is a circular buffer with push and pop indices. Capacity is the actual number of usable slots; no sentinel slot is reserved.

Member Typedef Documentation

◆ value_type

template<typename Event , std::size_t Capacity>
using tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::value_type = Event

Member Function Documentation

◆ clear()

template<typename Event , std::size_t Capacity>
void tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::clear ( )
inline

◆ empty()

template<typename Event , std::size_t Capacity>
bool tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::empty ( ) const
inline

◆ full()

template<typename Event , std::size_t Capacity>
bool tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::full ( ) const
inline

◆ size()

template<typename Event , std::size_t Capacity>
std::size_t tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::size ( ) const
inline

◆ try_overwrite_latest()

template<typename Event , std::size_t Capacity>
template<typename Value >
bool tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::try_overwrite_latest ( Value &&  event)
inline

◆ try_pop()

template<typename Event , std::size_t Capacity>
bool tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::try_pop ( Event &  event)
inline

◆ try_push() [1/2]

template<typename Event , std::size_t Capacity>
bool tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::try_push ( Event &&  event)
inline

◆ try_push() [2/2]

template<typename Event , std::size_t Capacity>
bool tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::try_push ( Event const &  event)
inline

Member Data Documentation

◆ capacity

template<typename Event , std::size_t Capacity>
constexpr std::size_t tsm::runtime::storage::fixed_ring_queue< Event, Capacity >::capacity = Capacity
staticconstexpr

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