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