arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QueueRTOS< T > Class Template Reference

FIFO Queue whch is based on the FreeRTOS queue API. The default allocator will allocate the memory from psram if available. More...

#include <QueueRTOS.h>

Public Member Functions

 QueueRTOS (int size, TickType_t writeMaxWait=portMAX_DELAY, TickType_t readMaxWait=portMAX_DELAY, Allocator &allocator=DefaultAllocator)
 
 ~QueueRTOS ()
 
bool clear ()
 
bool dequeue (T &data)
 
bool empty ()
 
bool enqueue (T &data)
 
bool peek (T &data)
 
bool resize (size_t size)
 (Re-)defines the size
 
void setReadMaxWait (TickType_t ticks)
 
void setWriteMaxWait (TickType_t ticks)
 
size_t size ()
 

Protected Member Functions

void end ()
 
bool setup ()
 

Protected Attributes

Allocatorp_allocator = nullptr
 
uint8_tp_data = nullptr
 
StaticQueue_t queue_buffer
 
int queue_size
 
TickType_t read_max_wait = portMAX_DELAY
 
TickType_t write_max_wait = portMAX_DELAY
 
QueueHandle_t xQueue = nullptr
 

Detailed Description

template<class T>
class audio_tools::QueueRTOS< T >

FIFO Queue whch is based on the FreeRTOS queue API. The default allocator will allocate the memory from psram if available.

Note
Supported by all FreeRTOS platforms
Author
Phil Schatzmann
Template Parameters
T

Constructor & Destructor Documentation

◆ QueueRTOS()

template<class T >
QueueRTOS ( int  size,
TickType_t  writeMaxWait = portMAX_DELAY,
TickType_t  readMaxWait = portMAX_DELAY,
Allocator allocator = DefaultAllocator 
)
inline

◆ ~QueueRTOS()

template<class T >
~QueueRTOS ( )
inline

Member Function Documentation

◆ clear()

template<class T >
bool clear ( )
inline

◆ dequeue()

template<class T >
bool dequeue ( T data)
inline

◆ empty()

template<class T >
bool empty ( )
inline

◆ end()

template<class T >
void end ( )
inlineprotected

◆ enqueue()

template<class T >
bool enqueue ( T data)
inline

◆ peek()

template<class T >
bool peek ( T data)
inline

◆ resize()

template<class T >
bool resize ( size_t  size)
inline

(Re-)defines the size

◆ setReadMaxWait()

template<class T >
void setReadMaxWait ( TickType_t  ticks)
inline

◆ setup()

template<class T >
bool setup ( )
inlineprotected

◆ setWriteMaxWait()

template<class T >
void setWriteMaxWait ( TickType_t  ticks)
inline

◆ size()

template<class T >
size_t size ( )
inline

Member Data Documentation

◆ p_allocator

template<class T >
Allocator* p_allocator = nullptr
protected

◆ p_data

template<class T >
uint8_t* p_data = nullptr
protected

◆ queue_buffer

template<class T >
StaticQueue_t queue_buffer
protected

◆ queue_size

template<class T >
int queue_size
protected

◆ read_max_wait

template<class T >
TickType_t read_max_wait = portMAX_DELAY
protected

◆ write_max_wait

template<class T >
TickType_t write_max_wait = portMAX_DELAY
protected

◆ xQueue

template<class T >
QueueHandle_t xQueue = nullptr
protected

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