tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
queue< T, Size > Struct Template Reference

Wrapper around a FreeRTOS queue. More...

#include <queue.hpp>

Public Types

using size_type = etl::uint32_t
 
using value_type = T
 

Public Member Functions

 queue ()
 Creates a new queue. RAM is automatically allocated from the FreeRTOS heap.
 
 queue (queue &&)=delete
 
 queue (queue const &)=delete
 
 ~queue ()
 Delete a queue - freeing all the memory allocated for storing of items placed on the queue.
 
auto capacity () const -> size_type
 Returns the capacity of the internal buffer.
 
auto messages_waiting () const -> etl::uint32_t
 
auto operator= (queue &&) -> queue &=delete
 
auto operator= (queue const &) -> queue &=delete
 
auto receive (T &data, TickType_t ticksToWait=0) const -> bool
 Pop an element of the queue.
 
auto receive (TickType_t ticksToWait=0) const -> pair< bool, T >
 Pop an element of the queue.
 
auto reset () const -> bool
 
auto send (T const &data, TickType_t ticksToWait=0) const -> bool
 Push an element on to the queue.
 

Detailed Description

template<typename T, etl::uint32_t Size>
struct etl::experimental::freertos::queue< T, Size >

Wrapper around a FreeRTOS queue.

https://www.freertos.org/Embedded-RTOS-Queues.html

Template Parameters
TThe type that's being stored inside the queue.
SizeThe maximum capacity of the queue.

Member Typedef Documentation

◆ size_type

template<typename T, etl::uint32_t Size>
using size_type = etl::uint32_t

◆ value_type

template<typename T, etl::uint32_t Size>
using value_type = T

Constructor & Destructor Documentation

◆ queue() [1/3]

template<typename T, etl::uint32_t Size>
queue ( )
inline

Creates a new queue. RAM is automatically allocated from the FreeRTOS heap.

https://www.freertos.org/a00116.html

◆ ~queue()

template<typename T, etl::uint32_t Size>
~queue ( )
inline

Delete a queue - freeing all the memory allocated for storing of items placed on the queue.

https://www.freertos.org/a00018.html#vQueueDelete

◆ queue() [2/3]

template<typename T, etl::uint32_t Size>
queue ( queue< T, Size > const & )
delete

◆ queue() [3/3]

template<typename T, etl::uint32_t Size>
queue ( queue< T, Size > && )
delete

Member Function Documentation

◆ capacity()

template<typename T, etl::uint32_t Size>
auto capacity ( ) const -> size_type
inlinenodiscard

Returns the capacity of the internal buffer.

◆ messages_waiting()

template<typename T, etl::uint32_t Size>
auto messages_waiting ( ) const -> etl::uint32_t
inlinenodiscard

◆ operator=() [1/2]

template<typename T, etl::uint32_t Size>
auto operator= ( queue< T, Size > && ) -> queue &=delete
delete

◆ operator=() [2/2]

template<typename T, etl::uint32_t Size>
auto operator= ( queue< T, Size > const & ) -> queue &=delete
delete

◆ receive() [1/2]

template<typename T, etl::uint32_t Size>
auto receive ( T & data,
TickType_t ticksToWait = 0 ) const -> bool
inline

Pop an element of the queue.

◆ receive() [2/2]

template<typename T, etl::uint32_t Size>
auto receive ( TickType_t ticksToWait = 0) const -> pair<bool, T>
inlinenodiscard

Pop an element of the queue.

◆ reset()

template<typename T, etl::uint32_t Size>
auto reset ( ) const -> bool
inlinenodiscard

◆ send()

template<typename T, etl::uint32_t Size>
auto send ( T const & data,
TickType_t ticksToWait = 0 ) const -> bool
inlinenodiscard

Push an element on to the queue.


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