hueplusplus
1.0.0
|
Immutable state of a light. More...
#include <hueplusplus/Scene.h>
Public Member Functions | |
LightState (const nlohmann::json &state) | |
Create LightState from json. More... | |
bool | isOn () const |
Get whether the light is on. More... | |
bool | hasBrightness () const |
Get whether a brightness is stored. More... | |
int | getBrightness () const |
Get brightness of the light. More... | |
bool | hasHueSat () const |
Get whether hue and saturation is stored. More... | |
HueSaturation | getHueSat () const |
Get hue and saturation of the light. More... | |
bool | hasXY () const |
Get whether xy color is stored. More... | |
XYBrightness | getXY () const |
Get xy color of the light. More... | |
bool | hasCt () const |
Get whether color temperature is stored. More... | |
int | getCt () const |
Get color temperature of the light. More... | |
bool | hasEffect () const |
Get whether effect is stored. More... | |
bool | getColorloop () const |
Get whether colorloop effect is active. More... | |
int | getTransitionTime () const |
Get transition time to this light state. More... | |
nlohmann::json | toJson () const |
Convert to json representation. More... | |
bool | operator== (const LightState &other) const |
Equality comparison. More... | |
bool | operator!= (const LightState &other) const |
Inequality comparison. More... | |
Immutable state of a light.
|
explicit |
Create LightState from json.
int hueplusplus::LightState::getBrightness | ( | ) | const |
Get brightness of the light.
bool hueplusplus::LightState::getColorloop | ( | ) | const |
Get whether colorloop effect is active.
int hueplusplus::LightState::getCt | ( | ) | const |
Get color temperature of the light.
HueSaturation hueplusplus::LightState::getHueSat | ( | ) | const |
Get hue and saturation of the light.
int hueplusplus::LightState::getTransitionTime | ( | ) | const |
Get transition time to this light state.
XYBrightness hueplusplus::LightState::getXY | ( | ) | const |
Get xy color of the light.
bool hueplusplus::LightState::hasBrightness | ( | ) | const |
Get whether a brightness is stored.
bool hueplusplus::LightState::hasCt | ( | ) | const |
Get whether color temperature is stored.
bool hueplusplus::LightState::hasEffect | ( | ) | const |
Get whether effect is stored.
bool hueplusplus::LightState::hasHueSat | ( | ) | const |
Get whether hue and saturation is stored.
bool hueplusplus::LightState::hasXY | ( | ) | const |
Get whether xy color is stored.
bool hueplusplus::LightState::isOn | ( | ) | const |
Get whether the light is on.
bool hueplusplus::LightState::operator!= | ( | const LightState & | other | ) | const |
Inequality comparison.
bool hueplusplus::LightState::operator== | ( | const LightState & | other | ) | const |
Equality comparison.
nlohmann::json hueplusplus::LightState::toJson | ( | ) | const |
Convert to json representation.