Loading...
Searching...
No Matches
etl::queue_spsc_isr_base< T, MEMORY_MODEL > Class Template Reference

## Public Types

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

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.

## Protected Member Functions

| 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 ()
template<typename T1>
bool | emplace_implementation (const T1 &value1)
template<typename T1, typename T2>
bool | emplace_implementation (const T1 &value1, const T2 &value2)
template<typename T1, typename T2, typename T3>
bool | emplace_implementation (const T1 &value1, const T2 &value2, const T3 &value3)
template<typename T1, typename T2, typename T3, typename T4>
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

static size_type | get_next_index (size_type index, size_type maximum)
| Calculate the next index.

## Protected Attributes

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.

## Member Function Documentation

## available_from_isr()

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

size_type etl::queue_spsc_isr_base< T, MEMORY_MODEL >::available_from_isr | ( |  | ) | const

inline

How much free space available in the queue. Called from ISR.

## emplace_implementation() [1/5]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::emplace_implementation | ( |  | ) |

inline protected

Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.

## emplace_implementation() [2/5]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>
template<typename T1>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::emplace_implementation | ( | const T1 & | value1 | ) |

inline protected

Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.

## emplace_implementation() [3/5]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>
template<typename T1, typename T2>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::emplace_implementation | ( | const T1 & | value1,
|  | const T2 & | value2 )

inline protected

Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.

## emplace_implementation() [4/5]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>
template<typename T1, typename T2, typename T3>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::emplace_implementation | ( | const T1 & | value1,
|  | const T2 & | value2,
|  | const T3 & | value3 )

inline protected

Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.

## emplace_implementation() [5/5]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>
template<typename T1, typename T2, typename T3, typename T4>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::emplace_implementation | ( | const T1 & | value1,
|  | const T2 & | value2,
|  | const T3 & | value3,
|  | const T4 & | value4 )

inline protected

Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.

## empty_from_isr()

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::empty_from_isr | ( |  | ) | const

inline

Is the queue empty? Called from ISR.

## front_from_isr() [1/2]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

reference etl::queue_spsc_isr_base< T, MEMORY_MODEL >::front_from_isr | ( |  | ) |

inline

Peek a value at the front of the queue from an ISR If asserts or exceptions are enabled, throws an etl::queue_spsc_isr_empty if the queue is empty.

## front_from_isr() [2/2]

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

const_reference etl::queue_spsc_isr_base< T, MEMORY_MODEL >::front_from_isr | ( |  | ) | const

inline

Peek a value at the front of the queue from an ISR If asserts or exceptions are enabled, throws an etl::queue_spsc_isr_empty if the queue is empty.

## full_from_isr()

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::full_from_isr | ( |  | ) | const

inline

Is the queue full? Called from ISR.

## pop_from_isr()

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

bool etl::queue_spsc_isr_base< T, MEMORY_MODEL >::pop_from_isr | ( | reference | value | ) |

inline

Pop a value from the queue from an ISR.

Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.

Parameters

  value | The value to use to construct the item to push to the queue.

## size_from_isr()

template<typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>

size_type etl::queue_spsc_isr_base< T, MEMORY_MODEL >::size_from_isr | ( |  | ) | const

inline

How many items in the queue? Called from ISR.

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

- include/etl/queue_spsc_isr.h