ESPHome  2024.12.2
Public Member Functions | Protected Attributes
esphome::light::ESPRangeView Class Reference

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 (AddressableLight *parent, 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 (const Color &color) override
 
void set (const ESPHSVColor &color)
 
void set_red (uint8_t red) override
 
void set_green (uint8_t green) override
 
void set_blue (uint8_t blue) override
 
void set_white (uint8_t white) 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
 
ESPRangeViewoperator= (const Color &rhs)
 
ESPRangeViewoperator= (const ESPColorView &rhs)
 
ESPRangeViewoperator= (const ESPHSVColor &rhs)
 
ESPRangeViewoperator= (const ESPRangeView &rhs)
 
- Public Member Functions inherited from esphome::light::ESPColorSettable
void set (const ESPHSVColor &color)
 
void set_hsv (const ESPHSVColor &color)
 
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)
 

Protected Attributes

friend ESPRangeIterator
 
AddressableLightparent_
 
int32_t begin_
 
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 17 of file esp_range_view.h.

Constructor & Destructor Documentation

◆ ESPRangeView() [1/2]

esphome::light::ESPRangeView::ESPRangeView ( AddressableLight parent,
int32_t  begin,
int32_t  end 
)
inline

Definition at line 19 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 ( )

Definition at line 17 of file esp_range_view.cpp.

◆ darken()

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

Implements esphome::light::ESPColorSettable.

Definition at line 59 of file esp_range_view.cpp.

◆ end()

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

Definition at line 18 of file esp_range_view.cpp.

◆ fade_to_black()

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

Implements esphome::light::ESPColorSettable.

Definition at line 51 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 47 of file esp_range_view.cpp.

◆ lighten()

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

Implements esphome::light::ESPColorSettable.

Definition at line 55 of file esp_range_view.cpp.

◆ operator=() [1/4]

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

Definition at line 41 of file esp_range_view.h.

◆ operator=() [2/4]

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

Definition at line 45 of file esp_range_view.h.

◆ operator=() [3/4]

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

Definition at line 49 of file esp_range_view.h.

◆ operator=() [4/4]

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

Definition at line 63 of file esp_range_view.cpp.

◆ operator[]()

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

Definition at line 13 of file esp_range_view.cpp.

◆ set() [1/2]

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

Implements esphome::light::ESPColorSettable.

Definition at line 20 of file esp_range_view.cpp.

◆ set() [2/2]

void esphome::light::ESPRangeView::set ( const ESPHSVColor color)
inline

Definition at line 29 of file esp_range_view.h.

◆ set_blue()

void esphome::light::ESPRangeView::set_blue ( uint8_t  blue)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 34 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 42 of file esp_range_view.cpp.

◆ set_green()

void esphome::light::ESPRangeView::set_green ( uint8_t  green)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 30 of file esp_range_view.cpp.

◆ set_red()

void esphome::light::ESPRangeView::set_red ( uint8_t  red)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 26 of file esp_range_view.cpp.

◆ set_white()

void esphome::light::ESPRangeView::set_white ( uint8_t  white)
overridevirtual

Implements esphome::light::ESPColorSettable.

Definition at line 38 of file esp_range_view.cpp.

◆ size()

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

Definition at line 23 of file esp_range_view.h.

Field Documentation

◆ begin_

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

Definition at line 59 of file esp_range_view.h.

◆ end_

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

Definition at line 60 of file esp_range_view.h.

◆ ESPRangeIterator

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

Definition at line 56 of file esp_range_view.h.

◆ parent_

AddressableLight* esphome::light::ESPRangeView::parent_
protected

Definition at line 58 of file esp_range_view.h.


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