ESPHome 2025.7.1
Loading...
Searching...
No Matches
esphome::LockFreeQueue< T, SIZE > Class Template Reference

#include <lock_free_queue.h>

Inheritance diagram for esphome::LockFreeQueue< T, SIZE >:
esphome::NotifyingLockFreeQueue< T, SIZE >

Public Member Functions

 LockFreeQueue ()
 
bool push (T *element)
 
T * pop ()
 
size_t size () const
 
uint16_t get_and_reset_dropped_count ()
 
void increment_dropped_count ()
 
bool empty () const
 
bool full () const
 

Protected Member Functions

bool push_internal_ (T *element, bool &was_empty, uint8_t &old_tail)
 

Protected Attributes

T * buffer_ [SIZE]
 
std::atomic< uint16_t > dropped_count_
 
std::atomic< uint8_t > head_
 
std::atomic< uint8_t > tail_
 

Detailed Description

template<class T, uint8_t SIZE>
class esphome::LockFreeQueue< T, SIZE >

Definition at line 35 of file lock_free_queue.h.

Constructor & Destructor Documentation

◆ LockFreeQueue()

template<class T , uint8_t SIZE>
esphome::LockFreeQueue< T, SIZE >::LockFreeQueue ( )
inline

Definition at line 37 of file lock_free_queue.h.

Member Function Documentation

◆ empty()

template<class T , uint8_t SIZE>
bool esphome::LockFreeQueue< T, SIZE >::empty ( ) const
inline

Definition at line 95 of file lock_free_queue.h.

◆ full()

template<class T , uint8_t SIZE>
bool esphome::LockFreeQueue< T, SIZE >::full ( ) const
inline

Definition at line 97 of file lock_free_queue.h.

◆ get_and_reset_dropped_count()

template<class T , uint8_t SIZE>
uint16_t esphome::LockFreeQueue< T, SIZE >::get_and_reset_dropped_count ( )
inline

Definition at line 91 of file lock_free_queue.h.

◆ increment_dropped_count()

template<class T , uint8_t SIZE>
void esphome::LockFreeQueue< T, SIZE >::increment_dropped_count ( )
inline

Definition at line 93 of file lock_free_queue.h.

◆ pop()

template<class T , uint8_t SIZE>
T * esphome::LockFreeQueue< T, SIZE >::pop ( )
inline

Definition at line 73 of file lock_free_queue.h.

◆ push()

template<class T , uint8_t SIZE>
bool esphome::LockFreeQueue< T, SIZE >::push ( T * element)
inline

Definition at line 39 of file lock_free_queue.h.

◆ push_internal_()

template<class T , uint8_t SIZE>
bool esphome::LockFreeQueue< T, SIZE >::push_internal_ ( T * element,
bool & was_empty,
uint8_t & old_tail )
inlineprotected

Definition at line 47 of file lock_free_queue.h.

◆ size()

template<class T , uint8_t SIZE>
size_t esphome::LockFreeQueue< T, SIZE >::size ( ) const
inline

Definition at line 85 of file lock_free_queue.h.

Field Documentation

◆ buffer_

template<class T , uint8_t SIZE>
T* esphome::LockFreeQueue< T, SIZE >::buffer_[SIZE]
protected

Definition at line 103 of file lock_free_queue.h.

◆ dropped_count_

template<class T , uint8_t SIZE>
std::atomic<uint16_t> esphome::LockFreeQueue< T, SIZE >::dropped_count_
protected

Definition at line 105 of file lock_free_queue.h.

◆ head_

template<class T , uint8_t SIZE>
std::atomic<uint8_t> esphome::LockFreeQueue< T, SIZE >::head_
protected

Definition at line 109 of file lock_free_queue.h.

◆ tail_

template<class T , uint8_t SIZE>
std::atomic<uint8_t> esphome::LockFreeQueue< T, SIZE >::tail_
protected

Definition at line 111 of file lock_free_queue.h.


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