hueplusplus  1.0.0
Public Member Functions | Protected Attributes | List of all members
hueplusplus::EntertainmentMode Class Reference

Class for Hue Entertainment Mode. More...

#include <hueplusplus/EntertainmentMode.h>

+ Collaboration diagram for hueplusplus::EntertainmentMode:

Public Member Functions

 EntertainmentMode (Bridge &b, Group &g)
 Constructor. More...
 
 ~EntertainmentMode ()
 Destroy the Entertainment Mode object. More...
 
bool connect ()
 Connect and start streaming. More...
 
bool disconnect ()
 Disconnect and stop streaming. More...
 
bool setColorRGB (uint8_t light_index, uint8_t red, uint8_t green, uint8_t blue)
 Set the color of the given light in RGB format. More...
 
bool update ()
 Update all set colors by setColorRGB. More...
 

Protected Attributes

Bridgebridge
 Associated bridge. More...
 
Groupgroup
 Associated group. More...
 
std::vector< uint8_t > entertainment_msg
 buffer containing the entertainment mode packet data More...
 
uint8_t entertainment_num_lights
 number of lights in entertainment mode group More...
 
std::unique_ptr< TLSContexttls_context
 tls context More...
 

Detailed Description

Class for Hue Entertainment Mode.

Provides methods to initialize and control Entertainment groups.

Constructor & Destructor Documentation

◆ EntertainmentMode()

hueplusplus::EntertainmentMode::EntertainmentMode ( Bridge b,
Group g 
)

Constructor.

Parameters
bBridge reference
gGroup 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.

Member Function Documentation

◆ 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_indexLight index inside the group
redRed color value (0-255)
greenGreen color value (0-255)
blueBlue 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

Member Data Documentation

◆ bridge

Bridge* hueplusplus::EntertainmentMode::bridge
protected

Associated bridge.

◆ 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

Associated group.

◆ tls_context

std::unique_ptr<TLSContext> hueplusplus::EntertainmentMode::tls_context
protected

tls context


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