FreeRTOS C++ Wrappers  1.6.0
C++ interface to FreeRTOS
Public Member Functions | List of all members
cpp_freertos::BinaryQueue Class Reference

#include <queue.hpp>

Inheritance diagram for cpp_freertos::BinaryQueue:
Inheritance graph
[legend]
Collaboration diagram for cpp_freertos::BinaryQueue:
Collaboration graph
[legend]

Public Member Functions

 BinaryQueue (UBaseType_t itemSize)
 
virtual bool Enqueue (void *item)
 
virtual bool EnqueueFromISR (void *item, BaseType_t *pxHigherPriorityTaskWoken)
 
- Public Member Functions inherited from cpp_freertos::Queue
 Queue (UBaseType_t maxItems, UBaseType_t itemSize)
 
virtual ~Queue ()
 
virtual bool Enqueue (void *item, TickType_t Timeout)
 
bool Dequeue (void *item, TickType_t Timeout=portMAX_DELAY)
 
bool Peek (void *item, TickType_t Timeout=portMAX_DELAY)
 
bool DequeueFromISR (void *item, BaseType_t *pxHigherPriorityTaskWoken)
 
bool PeekFromISR (void *item)
 
bool IsEmpty ()
 
bool IsFull ()
 
void Flush ()
 
UBaseType_t NumItems ()
 
UBaseType_t NumSpacesLeft ()
 

Additional Inherited Members

- Protected Attributes inherited from cpp_freertos::Queue
QueueHandle_t handle
 

Detailed Description

Binary queue with overwrite. This queue can only hold one item. If sucessive Enqueue operations are called, that item is overwritten with whatever the last item was.

Note
It is expected that an application will instantiate this class or one of the derived classes and use that. It is not expected that a user or application will derive from these classes.

Definition at line 313 of file queue.hpp.

Constructor & Destructor Documentation

◆ BinaryQueue()

BinaryQueue::BinaryQueue ( UBaseType_t  itemSize)
explicit

Our constructor.

Exceptions
QueueCreateException
Parameters
itemSizeSize of an item in a queue.
Note
FreeRTOS queues use a memcpy / fixed size scheme for queues.

Definition at line 196 of file cqueue.cpp.

Member Function Documentation

◆ Enqueue()

bool BinaryQueue::Enqueue ( void *  item)
virtual

Add an item to the queue.

Parameters
itemThe item you are adding.
Returns
true always, because of overwrite.

Reimplemented from cpp_freertos::Queue.

Definition at line 202 of file cqueue.cpp.

◆ EnqueueFromISR()

bool BinaryQueue::EnqueueFromISR ( void *  item,
BaseType_t *  pxHigherPriorityTaskWoken 
)
virtual

Add an item to the queue in ISR context.

Parameters
itemThe item you are adding.
pxHigherPriorityTaskWokenDid this operation result in a rescheduling event.
Returns
true always, because of overwrite.

Reimplemented from cpp_freertos::Queue.

Definition at line 209 of file cqueue.cpp.


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