ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::light::ESPRangeView Class Referencefinal

A half-open range of LEDs, inclusive of the begin index and exclusive of the end index, using zero-based numbering. More...

#include <esp_range_view.h>

Inheritance diagram for esphome::light::ESPRangeView:
esphome::light::ESPColorSettable

Public Member Functions

 ESPRangeView (ESPColorAccessor *accessor, int32_t begin, int32_t end)
 
 ESPRangeView (const ESPRangeView &)=default
 
int32_t size () const
 
ESPColorView operator[] (int32_t index) const
 
ESPRangeIterator begin ()
 
ESPRangeIterator end ()
 
void set (Color color) override
 
void set_channel (uint8_t channel, uint8_t value) override
 
void set_effect_data (uint8_t effect_data) override
 
void fade_to_white (uint8_t amnt) override
 
void fade_to_black (uint8_t amnt) override
 
void lighten (uint8_t delta) override
 
void darken (uint8_t delta) override
 
ESPRangeView & operator= (Color color)
 
ESPRangeView & operator= (ESPHSVColor hsv_color)
 
ESPRangeView & operator= (const ESPColorView &color_view)
 
ESPRangeView & operator= (const ESPRangeView &rhs)
 
- Public Member Functions inherited from esphome::light::ESPColorSettable
void set_red (uint8_t red) ESPHOME_ALWAYS_INLINE
 
void set_green (uint8_t green) ESPHOME_ALWAYS_INLINE
 
void set_blue (uint8_t blue) ESPHOME_ALWAYS_INLINE
 
void set_white (uint8_t white) ESPHOME_ALWAYS_INLINE
 
void set_rgb (uint8_t red, uint8_t green, uint8_t blue)
 
void set_rgbw (uint8_t red, uint8_t green, uint8_t blue, uint8_t white)
 
 ESPDEPRECATED ("Use set_hsv(hsv_color) instead. Removed in 2027.5.0.", "2026.11.0") void set(ESPHSVColor hsv_color)
 
void set_hsv (ESPHSVColor hsv_color)
 

Protected Member Functions

int32_t interpret_index_ (int32_t index) const
 

Protected Attributes

friend ESPRangeIterator
 
ESPColorAccessor *const accessor_
 
const int32_t begin_
 
const int32_t end_
 

Detailed Description

A half-open range of LEDs, inclusive of the begin index and exclusive of the end index, using zero-based numbering.

Definition at line 13 of file esp_range_view.h.

Constructor & Destructor Documentation

◆ ESPRangeView() [1/2]

esphome::light::ESPRangeView::ESPRangeView ( ESPColorAccessor * accessor,
int32_t begin,
int32_t end )
inline

Definition at line 15 of file esp_range_view.h.

◆ ESPRangeView() [2/2]

esphome::light::ESPRangeView::ESPRangeView ( const ESPRangeView & )
default

Member Function Documentation

◆ begin()

ESPRangeIterator esphome::light::ESPRangeView::begin ( )
inline

Definition at line 78 of file esp_range_view.h.

◆ darken()

void esphome::light::ESPRangeView::darken ( uint8_t delta)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 30 of file esp_range_view.cpp.

◆ end()

ESPRangeIterator esphome::light::ESPRangeView::end ( )
inline

Definition at line 79 of file esp_range_view.h.

◆ fade_to_black()

void esphome::light::ESPRangeView::fade_to_black ( uint8_t amnt)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 22 of file esp_range_view.cpp.

◆ fade_to_white()

void esphome::light::ESPRangeView::fade_to_white ( uint8_t amnt)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 18 of file esp_range_view.cpp.

◆ interpret_index_()

int32_t esphome::light::ESPRangeView::interpret_index_ ( int32_t index) const
inlineprotected

Definition at line 55 of file esp_range_view.h.

◆ lighten()

void esphome::light::ESPRangeView::lighten ( uint8_t delta)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 26 of file esp_range_view.cpp.

◆ operator=() [1/4]

ESPRangeView & esphome::light::ESPRangeView::operator= ( Color color)
inline

Definition at line 37 of file esp_range_view.h.

◆ operator=() [2/4]

ESPRangeView & esphome::light::ESPRangeView::operator= ( const ESPColorView & color_view)
inline

Definition at line 45 of file esp_range_view.h.

◆ operator=() [3/4]

ESPRangeView & esphome::light::ESPRangeView::operator= ( const ESPRangeView & rhs)

Definition at line 34 of file esp_range_view.cpp.

◆ operator=() [4/4]

ESPRangeView & esphome::light::ESPRangeView::operator= ( ESPHSVColor hsv_color)
inline

Definition at line 41 of file esp_range_view.h.

◆ operator[]()

ESPColorView esphome::light::ESPRangeView::operator[] ( int32_t index) const
inline

Definition at line 20 of file esp_range_view.h.

◆ set()

void esphome::light::ESPRangeView::set ( Color color)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 5 of file esp_range_view.cpp.

◆ set_channel()

void esphome::light::ESPRangeView::set_channel ( uint8_t channel,
uint8_t value )
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 9 of file esp_range_view.cpp.

◆ set_effect_data()

void esphome::light::ESPRangeView::set_effect_data ( uint8_t effect_data)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 13 of file esp_range_view.cpp.

◆ size()

int32_t esphome::light::ESPRangeView::size ( ) const
inline

Definition at line 19 of file esp_range_view.h.

Field Documentation

◆ accessor_

ESPColorAccessor* const esphome::light::ESPRangeView::accessor_
protected

Definition at line 57 of file esp_range_view.h.

◆ begin_

const int32_t esphome::light::ESPRangeView::begin_
protected

Definition at line 58 of file esp_range_view.h.

◆ end_

const int32_t esphome::light::ESPRangeView::end_
protected

Definition at line 59 of file esp_range_view.h.

◆ ESPRangeIterator

friend esphome::light::ESPRangeView::ESPRangeIterator
protected

Definition at line 53 of file esp_range_view.h.


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