SensESP 3.1.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::SafeQueue< T > Class Template Reference

Thread-safe queue for inter-task communication. Works like std::queue. More...

#include <sensesp/system/task_queue_producer.h>

Inheritance diagram for sensesp::SafeQueue< T >:
[legend]

Public Member Functions

 SafeQueue ()
 
 ~SafeQueue ()
 
void push (const T &value)
 
bool pop (T &value, unsigned int max_duration_ms)
 
bool empty ()
 
size_t size ()
 

Protected Attributes

SemaphoreHandle_t write_lock_
 

Detailed Description

template<typename T>
class sensesp::SafeQueue< T >

Thread-safe queue for inter-task communication. Works like std::queue.

Template Parameters
T

Definition at line 20 of file task_queue_producer.h.

Constructor & Destructor Documentation

◆ SafeQueue()

template<typename T>
sensesp::SafeQueue< T >::SafeQueue ( )
inline

Definition at line 22 of file task_queue_producer.h.

◆ ~SafeQueue()

template<typename T>
sensesp::SafeQueue< T >::~SafeQueue ( )
inline

Definition at line 30 of file task_queue_producer.h.

Member Function Documentation

◆ empty()

template<typename T>
bool sensesp::SafeQueue< T >::empty ( )
inline

Definition at line 60 of file task_queue_producer.h.

◆ pop()

template<typename T>
bool sensesp::SafeQueue< T >::pop ( T & value,
unsigned int max_duration_ms )
inline

Definition at line 44 of file task_queue_producer.h.

◆ push()

template<typename T>
void sensesp::SafeQueue< T >::push ( const T & value)
inline

Definition at line 36 of file task_queue_producer.h.

◆ size()

template<typename T>
size_t sensesp::SafeQueue< T >::size ( )
inline

Definition at line 72 of file task_queue_producer.h.

Member Data Documentation

◆ write_lock_

template<typename T>
SemaphoreHandle_t sensesp::SafeQueue< T >::write_lock_
protected

Definition at line 85 of file task_queue_producer.h.


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