Class for Hue Entertainment Mode.
More...
#include <hueplusplus/EntertainmentMode.h>
Class for Hue Entertainment Mode.
Provides methods to initialize and control Entertainment groups.
◆ EntertainmentMode()
hueplusplus::EntertainmentMode::EntertainmentMode |
( |
Bridge & |
b, |
|
|
Group & |
g |
|
) |
| |
Constructor.
- Parameters
-
b | Bridge reference |
g | Group to control in entertainment mode reference |
- Note
- References are held to both
b
and g
. They must stay valid until EntertainmentMode ist destroyed.
◆ ~EntertainmentMode()
hueplusplus::EntertainmentMode::~EntertainmentMode |
( |
| ) |
|
Destroy the Entertainment Mode object.
◆ connect()
bool hueplusplus::EntertainmentMode::connect |
( |
| ) |
|
Connect and start streaming.
- Returns
- true If conected and ready to receive commands
-
false If an error occured
◆ disconnect()
bool hueplusplus::EntertainmentMode::disconnect |
( |
| ) |
|
Disconnect and stop streaming.
- Returns
- true If disconnected successfully
-
false If an error occurred
◆ setColorRGB()
bool hueplusplus::EntertainmentMode::setColorRGB |
( |
uint8_t |
light_index, |
|
|
uint8_t |
red, |
|
|
uint8_t |
green, |
|
|
uint8_t |
blue |
|
) |
| |
Set the color of the given light in RGB format.
- Parameters
-
light_index | Light index inside the group |
red | Red color value (0-255) |
green | Green color value (0-255) |
blue | Blue color value (0-255) |
- Returns
- true If light_index was valid
-
false If light_index was invalid
◆ update()
bool hueplusplus::EntertainmentMode::update |
( |
| ) |
|
Update all set colors by setColorRGB.
- Returns
- true If all color values for all lights have ben written/sent
-
false If there was an error while writing
◆ bridge
Bridge* hueplusplus::EntertainmentMode::bridge |
|
protected |
◆ entertainment_msg
std::vector<uint8_t> hueplusplus::EntertainmentMode::entertainment_msg |
|
protected |
buffer containing the entertainment mode packet data
◆ entertainment_num_lights
uint8_t hueplusplus::EntertainmentMode::entertainment_num_lights |
|
protected |
number of lights in entertainment mode group
◆ group
Group* hueplusplus::EntertainmentMode::group |
|
protected |
◆ tls_context
std::unique_ptr<TLSContext> hueplusplus::EntertainmentMode::tls_context |
|
protected |
The documentation for this class was generated from the following files: