Loading...
Searching...
No Matches
etl::queue_spsc_isr< T, SIZE, TAccess, MEMORY_MODEL > Class Template Reference

`#include <queue_spsc_isr.h>`

## Public Types

typedef base_t::size_type | size_type
Public Types inherited from etl::iqueue_spsc_isr< T, TAccess, etl::memory_model::MEMORY_MODEL_LARGE >
typedef base_t::value_type | value_type
| The type stored in the queue.
typedef base_t::reference | reference
| A reference to the type used in the queue.
typedef base_t::const_reference | const_reference
| A const reference to the type used in the queue.
typedef base_t::size_type | size_type
| The type used for determining the size of the queue.
Public Types inherited from etl::queue_spsc_isr_base< T, MEMORY_MODEL >
typedef etl::size_type_lookup< MEMORY_MODEL >::type | size_type
| The type used for determining the size of queue.
typedef T | value_type
| The type stored in the queue.
typedef T & | reference
| A reference to the type used in the queue.
typedef const T & | const_reference
| A const reference to the type used in the queue.

## Public Member Functions

| ETL_STATIC_ASSERT ((SIZE<=etl::integral_limits< size_type >::max), "Size too large for memory model")
| queue_spsc_isr ()
| Default constructor.
| ~queue_spsc_isr ()
| Destructor.
Public Member Functions inherited from etl::iqueue_spsc_isr< T, TAccess, etl::memory_model::MEMORY_MODEL_LARGE >
bool | push (const_reference value)
| Push a value to the queue.
bool | emplace ()
bool | pop (reference value)
| Pop a value from the queue.
reference | front ()
void | clear ()
| Clear the queue.
bool | empty () const
| Is the queue empty?
bool | full () const
| Is the queue full?
size_type | size () const
| How many items in the queue?
size_type | available () const
| How much free space available in the queue.
Public Member Functions inherited from etl::queue_spsc_isr_base< T, MEMORY_MODEL >
bool | push_from_isr (const_reference value)
| Push a value to the queue from an ISR.
bool | pop_from_isr (reference value)
| Pop a value from the queue from an ISR.
bool | pop_from_isr ()
| Pop a value from the queue from an ISR, and discard.
reference | front_from_isr ()
const_reference | front_from_isr () const
size_type | available_from_isr () const
void | clear_from_isr ()
| Clear the queue from the ISR.
bool | empty_from_isr () const
bool | full_from_isr () const
size_type | size_from_isr () const
size_type | capacity () const
| How many items can the queue hold.
size_type | max_size () const
| How many items can the queue hold.

## Static Public Attributes

static ETL_CONSTANT size_type | MAX_SIZE = size_type(SIZE)

## Additional Inherited Members

Protected Member Functions inherited from etl::iqueue_spsc_isr< T, TAccess, etl::memory_model::MEMORY_MODEL_LARGE >
| iqueue_spsc_isr (T *p_buffer_, size_type max_size_)
| The constructor that is called from derived classes.
Protected Member Functions inherited from etl::queue_spsc_isr_base< T, MEMORY_MODEL >
| queue_spsc_isr_base (T *p_buffer_, size_type max_size_)
bool | push_implementation (const_reference value)
| Push a value to the queue.
bool | emplace_implementation ()
bool | emplace_implementation (const T1 &value1)
bool | emplace_implementation (const T1 &value1, const T2 &value2)
bool | emplace_implementation (const T1 &value1, const T2 &value2, const T3 &value3)
bool | emplace_implementation (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
bool | pop_implementation (reference value)
| Pop a value from the queue.
reference | front_implementation ()
| Peek a value at the front of the queue.
const_reference | front_implementation () const
| Peek a value at the front of the queue.
bool | pop_implementation ()
| Pop a value from the queue and discard.
| ~queue_spsc_isr_base ()
| Destructor.
Static Protected Member Functions inherited from etl::queue_spsc_isr_base< T, MEMORY_MODEL >
static size_type | get_next_index (size_type index, size_type maximum)
| Calculate the next index.
Protected Attributes inherited from etl::queue_spsc_isr_base< T, MEMORY_MODEL >
T * | p_buffer
| The internal buffer.
size_type | write_index
| Where to input new data.
size_type | read_index
| Where to get the oldest data.
size_type | current_size
| The current size of the queue.
const size_type | MAX_SIZE
| The maximum number of items in the queue.

## Detailed Description

template<typename T, size_t SIZE, typename TAccess, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>
class etl::queue_spsc_isr< T, SIZE, TAccess, MEMORY_MODEL >

A fixed capacity spsc queue. This queue supports concurrent access by one producer and one consumer.

Template Parameters

  T | The type this queue should support.
  SIZE | The maximum capacity of the queue.
  TAccess | The type that will lock and unlock interrupts.
  MEMORY_MODEL | The memory model for the queue. Determines the type of the internal counter variables.

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

- include/etl/queue_spsc_isr.h