ESPHome  2024.11.1
e131_addressable_light_effect.h
Go to the documentation of this file.
1 #pragma once
2 
5 #ifdef USE_NETWORK
6 namespace esphome {
7 namespace e131 {
8 
9 class E131Component;
10 struct E131Packet;
11 
13 
15  public:
16  E131AddressableLightEffect(const std::string &name);
17 
18  void start() override;
19  void stop() override;
20  void apply(light::AddressableLight &it, const Color &current_color) override;
21 
22  int get_data_per_universe() const;
23  int get_lights_per_universe() const;
24  int get_first_universe() const;
25  int get_last_universe() const;
26  int get_universe_count() const;
27 
29  void set_channels(E131LightChannels channels) { this->channels_ = channels; }
30  void set_e131(E131Component *e131) { this->e131_ = e131; }
31 
32  protected:
33  bool process_(int universe, const E131Packet &packet);
34 
38  E131Component *e131_{nullptr};
39 
40  friend class E131Component;
41 };
42 
43 } // namespace e131
44 } // namespace esphome
45 #endif
const char * name
Definition: stm32flash.h:78
bool process_(int universe, const E131Packet &packet)
uint16_t universe
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7