ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::hdmi_cec::FrameRingBuffer< SIZE > Class Template Reference

A queue of frames between one producer and one consumer, for instance the receive interrupt and loop(). More...

#include <hdmi_cec.h>

Public Member Functions

ESPHOME_ALWAYS_INLINE Frame * front ()
 
ESPHOME_ALWAYS_INLINE void pop_front ()
 
ESPHOME_ALWAYS_INLINE Frame * back ()
 
ESPHOME_ALWAYS_INLINE void push_back ()
 
ESPHOME_ALWAYS_INLINE bool is_empty () const
 

Protected Member Functions

ESPHOME_ALWAYS_INLINE uint8_t count_ () const
 
ESPHOME_ALWAYS_INLINE Frame * slot_ (const std::atomic< uint8_t > &inx)
 
ESPHOME_ALWAYS_INLINE void advance_ (std::atomic< uint8_t > &inx)
 

Protected Attributes

std::array< Frame, SIZE > store_ {}
 
std::atomic< uint8_t > front_inx_ {0}
 
std::atomic< uint8_t > back_inx_ {0}
 

Detailed Description

template<size_t SIZE>
class esphome::hdmi_cec::FrameRingBuffer< SIZE >

A queue of frames between one producer and one consumer, for instance the receive interrupt and loop().

The indices run freely and each is written by one side only, so no lock is needed. back() hands out a slot to fill and push_back() commits it; front() and pop_front() do the same on the reading side.

Definition at line 70 of file hdmi_cec.h.

Member Function Documentation

◆ advance_()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE void esphome::hdmi_cec::FrameRingBuffer< SIZE >::advance_ ( std::atomic< uint8_t > & inx)
inlineprotected

Definition at line 85 of file hdmi_cec.h.

◆ back()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE Frame * esphome::hdmi_cec::FrameRingBuffer< SIZE >::back ( )
inline

Definition at line 76 of file hdmi_cec.h.

◆ count_()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE uint8_t esphome::hdmi_cec::FrameRingBuffer< SIZE >::count_ ( ) const
inlineprotected

Definition at line 81 of file hdmi_cec.h.

◆ front()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE Frame * esphome::hdmi_cec::FrameRingBuffer< SIZE >::front ( )
inline

Definition at line 74 of file hdmi_cec.h.

◆ is_empty()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE bool esphome::hdmi_cec::FrameRingBuffer< SIZE >::is_empty ( ) const
inline

Definition at line 78 of file hdmi_cec.h.

◆ pop_front()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE void esphome::hdmi_cec::FrameRingBuffer< SIZE >::pop_front ( )
inline

Definition at line 75 of file hdmi_cec.h.

◆ push_back()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE void esphome::hdmi_cec::FrameRingBuffer< SIZE >::push_back ( )
inline

Definition at line 77 of file hdmi_cec.h.

◆ slot_()

template<size_t SIZE>
ESPHOME_ALWAYS_INLINE Frame * esphome::hdmi_cec::FrameRingBuffer< SIZE >::slot_ ( const std::atomic< uint8_t > & inx)
inlineprotected

Definition at line 84 of file hdmi_cec.h.

Field Documentation

◆ back_inx_

template<size_t SIZE>
std::atomic<uint8_t> esphome::hdmi_cec::FrameRingBuffer< SIZE >::back_inx_ {0}
protected

Definition at line 91 of file hdmi_cec.h.

◆ front_inx_

template<size_t SIZE>
std::atomic<uint8_t> esphome::hdmi_cec::FrameRingBuffer< SIZE >::front_inx_ {0}
protected

Definition at line 90 of file hdmi_cec.h.

◆ store_

template<size_t SIZE>
std::array<Frame, SIZE> esphome::hdmi_cec::FrameRingBuffer< SIZE >::store_ {}
protected

Definition at line 89 of file hdmi_cec.h.


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