TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QueueRTOS< T, TAllocator > 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)
 
void setReadMaxWait (TickType_t ticks)
 
void setWriteMaxWait (TickType_t ticks)
 
bool resize (int size)
 (Re-)defines the size
 
bool enqueue (T &data)
 
bool peek (T &data)
 
bool dequeue (T &data)
 
size_t size ()
 
bool clear ()
 
void end ()
 
bool isEmpty ()
 

Protected Member Functions

bool setup ()
 

Protected Attributes

QueueHandle_t xQueue = nullptr
 
TickType_t write_max_wait = portMAX_DELAY
 
TickType_t read_max_wait = portMAX_DELAY
 
int queue_size
 
StaticQueue_t queue_buffer
 
TAllocator allocator
 
size_t allocated_size = 0
 
uint8_t * p_data = nullptr
 

Detailed Description

template<class T, class TAllocator = AllocatorPSRAM<T>>
class tinyrobotics::QueueRTOS< T, TAllocator >

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

Author
Phil Schatzmann
Template Parameters
T

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