Loading...
Searching...
No Matches
EntertainmentMode.h
Go to the documentation of this file.
#ifndef INCLUDE_HUEPLUSPLUS_HUE_ENTERTAINMENT_MODE_H
#define INCLUDE_HUEPLUSPLUS_HUE_ENTERTAINMENT_MODE_H
#include "Bridge.h"
#include "Group.h"
namespace hueplusplus
{
struct TLSContext;
class EntertainmentMode
{
public:
EntertainmentMode(Bridge& b, Group& g);
~EntertainmentMode();
bool connect();
bool disconnect();
bool setColorRGB(uint8_t light_index, uint8_t red, uint8_t green, uint8_t blue);
bool update();
protected:
Bridge* bridge;
Group* group;
std::vector<uint8_t> entertainment_msg;
uint8_t entertainment_num_lights;
std::unique_ptr<TLSContext> tls_context;
};
} // namespace hueplusplus
#endif
Bridge.h
Group.h
hueplusplus::Bridge
Bridge class for a bridge.
Definition Bridge.h:139
hueplusplus::EntertainmentMode::connect
bool connect()
Connect and start streaming.
Definition EntertainmentMode.cpp:147
hueplusplus::EntertainmentMode::bridge
Bridge * bridge
Associated bridge.
Definition EntertainmentMode.h:80
hueplusplus::EntertainmentMode::disconnect
bool disconnect()
Disconnect and stop streaming.
Definition EntertainmentMode.cpp:272
hueplusplus::EntertainmentMode::entertainment_num_lights
uint8_t entertainment_num_lights
number of lights in entertainment mode group
Definition EntertainmentMode.h:84
hueplusplus::EntertainmentMode::update
bool update()
Update all set colors by setColorRGB.
Definition EntertainmentMode.cpp:299
hueplusplus::EntertainmentMode::EntertainmentMode
EntertainmentMode(Bridge &b, Group &g)
Constructor.
Definition EntertainmentMode.cpp:64
hueplusplus::EntertainmentMode::entertainment_msg
std::vector< uint8_t > entertainment_msg
buffer containing the entertainment mode packet data
Definition EntertainmentMode.h:83
hueplusplus::EntertainmentMode::~EntertainmentMode
~EntertainmentMode()
Destroy the Entertainment Mode object.
Definition EntertainmentMode.cpp:137
hueplusplus::EntertainmentMode::tls_context
std::unique_ptr< TLSContext > tls_context
tls context
Definition EntertainmentMode.h:86
hueplusplus::EntertainmentMode::setColorRGB
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.
Definition EntertainmentMode.cpp:278
hueplusplus::EntertainmentMode::group
Group * group
Associated group.
Definition EntertainmentMode.h:81
hueplusplus::Group
Class for Groups of lights.
Definition Group.h:42
hueplusplus
Namespace for the hueplusplus library.
Definition Action.h:28
hueplusplus::TLSContext
Definition EntertainmentMode.cpp:40