hueplusplus  1.0.0
Protected Member Functions | Protected Attributes | Friends | List of all members
hueplusplus::Light Class Reference

Class for Hue Light fixtures. More...

#include <hueplusplus/Light.h>

+ Inheritance diagram for hueplusplus::Light:
+ Collaboration diagram for hueplusplus::Light:

Public Member Functions

General information
virtual std::string getLuminaireUId () const
 Const function that returns the luminaireuniqueid of the light. More...
 
virtual ColorType getColorType () const
 Const function that returns the color type of the light. More...
 
ColorGamut getColorGamut () const
 Get gamut space of possible light colors. More...
 
Light state
virtual bool on (uint8_t transition=4)
 Function that turns the light on. More...
 
virtual bool off (uint8_t transition=4)
 Function that turns the light off. More...
 
virtual bool isOn ()
 Function to check whether a light is on or off. More...
 
virtual bool isOn () const
 Const function to check whether a light is on or off. More...
 
virtual bool hasBrightnessControl () const
 Const function to check whether this light has brightness control. More...
 
virtual bool hasTemperatureControl () const
 Const function to check whether this light has color temperature control. More...
 
virtual bool hasColorControl () const
 Connst function to check whether this light has full color control. More...
 
virtual bool setBrightness (unsigned int bri, uint8_t transition=4)
 Function that sets the brightness of this light. More...
 
virtual unsigned int getBrightness () const
 Const function that returns the brightness of this light. More...
 
virtual unsigned int getBrightness ()
 Function that returns the brightness of this light. More...
 
virtual bool setColorTemperature (unsigned int mired, uint8_t transition=4)
 Function that sets the color temperature of this light in mired. More...
 
virtual unsigned int getColorTemperature () const
 Const function that returns the current color temperature of the light. More...
 
virtual unsigned int getColorTemperature ()
 Function that returns the current color temperature of the light. More...
 
virtual bool setColorHue (uint16_t hue, uint8_t transition=4)
 Function to set the color of this light with specified hue. More...
 
virtual bool setColorSaturation (uint8_t sat, uint8_t transition=4)
 Function to set the color of this light with specified saturation. More...
 
virtual bool setColorHueSaturation (const HueSaturation &hueSat, uint8_t transition=4)
 Function to set the color of this light with specified hue and saturation. More...
 
virtual HueSaturation getColorHueSaturation () const
 Const function that returns the current color of the light as hue and saturation. More...
 
virtual HueSaturation getColorHueSaturation ()
 Function that returns the current color of the light as hue and saturation. More...
 
virtual bool setColorXY (const XYBrightness &xy, uint8_t transition=4)
 Function to set the color of this light in CIE with specified x y. More...
 
virtual XYBrightness getColorXY () const
 Const function that returns the current color of the light as xy. More...
 
virtual XYBrightness getColorXY ()
 Function that returns the current color of the light as xy. More...
 
virtual bool setColorRGB (const RGB &rgb, uint8_t transition=4)
 Function to set the color of this light with red green and blue values. More...
 
virtual bool alert ()
 Function that lets the light perform one breath cycle. More...
 
virtual bool alertTemperature (unsigned int mired)
 Function that lets the light perform one breath cycle in specified color temperature. More...
 
virtual bool alertHueSaturation (const HueSaturation &hueSat)
 Function that lets the light perform one breath cycle in specified color. More...
 
virtual bool alertXY (const XYBrightness &xy)
 Function that lets the light perform one breath cycle in specified color. More...
 
virtual bool setColorLoop (bool on)
 Function to turn colorloop effect on/off. More...
 
virtual StateTransaction transaction ()
 Create a transaction for this light. More...
 
- Public Member Functions inherited from hueplusplus::BaseDevice
virtual ~BaseDevice ()=default
 Virtual destructor. More...
 
virtual int getId () const
 Const function that returns the id of this device. More...
 
virtual std::string getType () const
 Const function that returns the device type. More...
 
virtual std::string getName ()
 Function that returns the name of the device. More...
 
virtual std::string getName () const
 Const function that returns the name of the device. More...
 
virtual std::string getModelId () const
 Const function that returns the modelid of the device. More...
 
virtual std::string getUId () const
 Const function that returns the uniqueid of the device. More...
 
virtual std::string getManufacturername () const
 Const function that returns the manufacturername of the device. More...
 
virtual std::string getProductname () const
 Const function that returns the productname of the device. More...
 
virtual std::string getSwVersion ()
 Function that returns the software version of the device. More...
 
virtual std::string getSwVersion () const
 Const function that returns the software version of the device. More...
 
virtual bool setName (const std::string &name)
 Function that sets the name of the device. More...
 
virtual void refresh (bool force=false)
 Refreshes internal cached state. More...
 
virtual void setRefreshDuration (std::chrono::steady_clock::duration refreshDuration)
 Sets custom refresh interval for this device. More...
 

Protected Member Functions

 Light (int id, const HueCommandAPI &commands)
 Protected ctor that is used by LightFactory. More...
 
 Light (int id, const std::shared_ptr< APICache > &baseCache)
 Protected ctor that is used by LightFactory. More...
 
 Light (int id, const HueCommandAPI &commands, std::shared_ptr< const BrightnessStrategy > brightnessStrategy, std::shared_ptr< const ColorTemperatureStrategy > colorTempStrategy, std::shared_ptr< const ColorHueStrategy > colorHueStrategy, std::chrono::steady_clock::duration refreshDuration, const nlohmann::json &currentState)
 Protected ctor that is used by LightFactory, also sets strategies. More...
 
virtual void setBrightnessStrategy (std::shared_ptr< const BrightnessStrategy > strat)
 Protected function that sets the brightness strategy. More...
 
virtual void setColorTemperatureStrategy (std::shared_ptr< const ColorTemperatureStrategy > strat)
 Protected function that sets the colorTemperature strategy. More...
 
virtual void setColorHueStrategy (std::shared_ptr< const ColorHueStrategy > strat)
 Protected function that sets the colorHue strategy. More...
 
- Protected Member Functions inherited from hueplusplus::BaseDevice
 BaseDevice (int id, const std::shared_ptr< APICache > &baseCache)
 Protected ctor that is used by subclasses, construct with shared cache. More...
 
 BaseDevice (int id, const HueCommandAPI &commands, const std::string &path, std::chrono::steady_clock::duration refreshDuration, const nlohmann::json &currentState)
 Protected ctor that is used by subclasses. More...
 
virtual nlohmann::json sendPutRequest (const std::string &subPath, const nlohmann::json &request, FileInfo fileInfo)
 Utility function to send a put request to the device. More...
 

Protected Attributes

ColorType colorType
 holds the ColorType of the light More...
 
std::shared_ptr< const BrightnessStrategybrightnessStrategy
 holds a reference to the strategy that handles brightness commands More...
 
std::shared_ptr< const ColorTemperatureStrategycolorTemperatureStrategy
 holds a reference to the strategy that handles colortemperature commands More...
 
std::shared_ptr< const ColorHueStrategycolorHueStrategy
 holds a reference to the strategy that handles all color commands More...
 
- Protected Attributes inherited from hueplusplus::BaseDevice
int id
 holds the id of the device More...
 
APICache state
 holds the current state of the device More...
 

Friends

class LightFactory
 
class SimpleBrightnessStrategy
 
class SimpleColorHueStrategy
 
class ExtendedColorHueStrategy
 
class SimpleColorTemperatureStrategy
 
class ExtendedColorTemperatureStrategy
 

Detailed Description

Class for Hue Light fixtures.

Provides methods to query and control lights.

Constructor & Destructor Documentation

◆ Light() [1/3]

hueplusplus::Light::Light ( int  id,
const HueCommandAPI commands 
)
protected

Protected ctor that is used by LightFactory.

Parameters
idInteger that specifies the id of this light
commandsHueCommandAPI for communication with the bridge

leaves strategies unset

◆ Light() [2/3]

hueplusplus::Light::Light ( int  id,
const std::shared_ptr< APICache > &  baseCache 
)
protected

Protected ctor that is used by LightFactory.

Parameters
idInteger that specifies the id of this light
baseCacheCache of the light list (must not be null).

leaves strategies unset

◆ Light() [3/3]

hueplusplus::Light::Light ( int  id,
const HueCommandAPI commands,
std::shared_ptr< const BrightnessStrategy brightnessStrategy,
std::shared_ptr< const ColorTemperatureStrategy colorTempStrategy,
std::shared_ptr< const ColorHueStrategy colorHueStrategy,
std::chrono::steady_clock::duration  refreshDuration,
const nlohmann::json &  currentState 
)
protected

Protected ctor that is used by LightFactory, also sets strategies.

Parameters
idInteger that specifies the id of this light
commandsHueCommandAPI for communication with the bridge
brightnessStrategyStrategy for brightness. May be nullptr.
colorTempStrategyStrategy for color temperature. May be nullptr.
colorHueStrategyStrategy for color hue/saturation. May be nullptr.
refreshDurationTime between refreshing the cached state. Can be 0 to always refresh, or steady_clock::duration::max() to never refresh.
currentStateThe current light state, may be null.
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

Member Function Documentation

◆ alert()

bool hueplusplus::Light::alert ( )
virtual

Function that lets the light perform one breath cycle.

Can be used for locating a light.

Returns
bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ alertHueSaturation()

virtual bool hueplusplus::Light::alertHueSaturation ( const HueSaturation hueSat)
inlinevirtual

Function that lets the light perform one breath cycle in specified color.

Note
The breath cylce will only be performed if the light has a reference to a specific ColorHueStrategy.
Parameters
hueSatColor in hue and saturation
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ alertTemperature()

virtual bool hueplusplus::Light::alertTemperature ( unsigned int  mired)
inlinevirtual

Function that lets the light perform one breath cycle in specified color temperature.

Note
The breath cylce will only be performed if the light has a reference to a specific ColorTemperatureStrategy.
Parameters
miredColor temperature in mired
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ alertXY()

virtual bool hueplusplus::Light::alertXY ( const XYBrightness xy)
inlinevirtual

Function that lets the light perform one breath cycle in specified color.

Note
The breath cylce will only be performed if the light has a reference to a specific ColorHueStrategy.
Parameters
xyThe x,y coordinates in CIE and brightness
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ getBrightness() [1/2]

virtual unsigned int hueplusplus::Light::getBrightness ( ) const
inlinevirtual

Const function that returns the brightness of this light.

Note
The brightness will only be returned if the light has a reference to a specific BrightnessStrategy.
This will not refresh the light state The brightness can range from 0 = off to 254 = fully lit.
Returns
Unsigned int that is 0 when function failed

◆ getBrightness() [2/2]

virtual unsigned int hueplusplus::Light::getBrightness ( )
inlinevirtual

Function that returns the brightness of this light.

Note
The brightness will only be returned if the light has a reference to a specific BrightnessStrategy. The brightness can range from 0 = off to 254 = fully lit.
Returns
Unsigned int that is 0 when function failed
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ getColorGamut()

ColorGamut hueplusplus::Light::getColorGamut ( ) const

Get gamut space of possible light colors.

Returns
Used gamut, or gamut::maxGamut when unknown.

◆ getColorHueSaturation() [1/2]

virtual HueSaturation hueplusplus::Light::getColorHueSaturation ( ) const
inlinevirtual

Const function that returns the current color of the light as hue and saturation.

Note
The color hue and saturation will only be returned when the light has a reference to a specific ColorHueStrategy.
This will not refresh the light state
Returns
Current hue and saturation or {0,0} when failed
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ getColorHueSaturation() [2/2]

virtual HueSaturation hueplusplus::Light::getColorHueSaturation ( )
inlinevirtual

Function that returns the current color of the light as hue and saturation.

Note
The color hue and saturation will only be returned when the light has a reference to a specific ColorHueStrategy. Updates the lights state by calling refreshState()
Returns
Current hue and saturation or {0,0} when failed
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ getColorTemperature() [1/2]

virtual unsigned int hueplusplus::Light::getColorTemperature ( ) const
inlinevirtual

Const function that returns the current color temperature of the light.

Note
The color temperature will only be returned when the light has a reference to a specific ColorTemperatureStrategy.
This will not refresh the light state The color temperature in mired ranges from 153 to 500 whereas 153 is cold and 500 is warm.
Returns
Unsigned int representing the color temperature in mired or 0 when failed

◆ getColorTemperature() [2/2]

virtual unsigned int hueplusplus::Light::getColorTemperature ( )
inlinevirtual

Function that returns the current color temperature of the light.

Note
The color temperature will only be returned when the light has a reference to a specific ColorTemperatureStrategy. Updates the lights state by calling refreshState() The color temperature in mired ranges from 153 to 500 whereas 153 is cold and 500 is warm.
Returns
Unsigned int representing the color temperature in mired or 0 when failed
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ getColorType()

ColorType hueplusplus::Light::getColorType ( ) const
virtual

Const function that returns the color type of the light.

Returns
ColorType containig the color type of the light

◆ getColorXY() [1/2]

virtual XYBrightness hueplusplus::Light::getColorXY ( ) const
inlinevirtual

Const function that returns the current color of the light as xy.

Note
The color x and y will only be returned when the light has a reference to a specific ColorHueStrategy.
This does not update the lights state
Returns
XYBrightness with x, y and brightness or an empty one (all 0) when failed

◆ getColorXY() [2/2]

virtual XYBrightness hueplusplus::Light::getColorXY ( )
inlinevirtual

Function that returns the current color of the light as xy.

Note
The color x and y will only be returned when the light has a reference to a specific ColorHueStrategy. Updates the lights state by calling refreshState()
Returns
XYBrightness with x, y and brightness or an empty one (all 0) when failed
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ getLuminaireUId()

std::string hueplusplus::Light::getLuminaireUId ( ) const
virtual

Const function that returns the luminaireuniqueid of the light.

Note
Only working on bridges with versions starting at 1.9
Returns
String containing the luminaireuniqueid or an empty string when the function is not supported

◆ hasBrightnessControl()

virtual bool hueplusplus::Light::hasBrightnessControl ( ) const
inlinevirtual

Const function to check whether this light has brightness control.

Returns
Bool that is true when the light has specified abilities and false when not

◆ hasColorControl()

virtual bool hueplusplus::Light::hasColorControl ( ) const
inlinevirtual

Connst function to check whether this light has full color control.

Returns
Bool that is true when the light has specified abilities and false when not

◆ hasTemperatureControl()

virtual bool hueplusplus::Light::hasTemperatureControl ( ) const
inlinevirtual

Const function to check whether this light has color temperature control.

Returns
Bool that is true when the light has specified abilities and false when not

◆ isOn() [1/2]

bool hueplusplus::Light::isOn ( )
virtual

Function to check whether a light is on or off.

Returns
Bool that is true, when the light is on and false, when off
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ isOn() [2/2]

bool hueplusplus::Light::isOn ( ) const
virtual

Const function to check whether a light is on or off.

Note
This will not refresh the light state
Returns
Bool that is true, when the light is on and false, when off

◆ off()

bool hueplusplus::Light::off ( uint8_t  transition = 4)
virtual

Function that turns the light off.

Parameters
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ on()

bool hueplusplus::Light::on ( uint8_t  transition = 4)
virtual

Function that turns the light on.

Parameters
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setBrightness()

virtual bool hueplusplus::Light::setBrightness ( unsigned int  bri,
uint8_t  transition = 4 
)
inlinevirtual

Function that sets the brightness of this light.

Note
The brightness will only be set if the light has a reference to a specific BrightnessStrategy. The brightness can range from 0 = off to 254 = fully lit.
Parameters
briUnsigned int that specifies the brightness
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setBrightnessStrategy()

virtual void hueplusplus::Light::setBrightnessStrategy ( std::shared_ptr< const BrightnessStrategy strat)
inlineprotectedvirtual

Protected function that sets the brightness strategy.

The strategy defines how specific commands that deal with brightness control are executed

Parameters
strata strategy of type BrightnessStrategy

◆ setColorHue()

virtual bool hueplusplus::Light::setColorHue ( uint16_t  hue,
uint8_t  transition = 4 
)
inlinevirtual

Function to set the color of this light with specified hue.

Note
The color will only be set if the light has a reference to a specific ColorHueStrategy. The hue can range from 0 to 65535, whereas 65535 and 0 are red, 25500 is green and 46920 is blue.
Parameters
hueuint16_t that specifies the hue
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setColorHueSaturation()

virtual bool hueplusplus::Light::setColorHueSaturation ( const HueSaturation hueSat,
uint8_t  transition = 4 
)
inlinevirtual

Function to set the color of this light with specified hue and saturation.

Note
The color will only be set if the light has a reference to a specific ColorHueStrategy.
Parameters
hueSatColor in hue and satuation.
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms.
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setColorHueStrategy()

virtual void hueplusplus::Light::setColorHueStrategy ( std::shared_ptr< const ColorHueStrategy strat)
inlineprotectedvirtual

Protected function that sets the colorHue strategy.

The strategy defines how specific commands that deal with color control are executed

Parameters
strata strategy of type ColorHueStrategy

◆ setColorLoop()

virtual bool hueplusplus::Light::setColorLoop ( bool  on)
inlinevirtual

Function to turn colorloop effect on/off.

Notice this function will only be performed light has a reference to a specific ColorHueStrategy. The colorloop effect will loop through all colors on current hue and saturation levels. Notice that none of the setter functions check whether this feature is enabled and the colorloop can only be disabled with this function or by simply calling off() and then on(), so you could alternatively call off() and then use any of the setter functions.

Parameters
onbool that enables this feature when true and disables it when false
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setColorRGB()

virtual bool hueplusplus::Light::setColorRGB ( const RGB rgb,
uint8_t  transition = 4 
)
inlinevirtual

Function to set the color of this light with red green and blue values.

Note
The color will only be set if the light has a reference to a specific ColorHueStrategy. The values of red, green and blue are ranging from 0 to 255.
Parameters
rgbRGB color that will be mapped to the available color space
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setColorSaturation()

virtual bool hueplusplus::Light::setColorSaturation ( uint8_t  sat,
uint8_t  transition = 4 
)
inlinevirtual

Function to set the color of this light with specified saturation.

Note
The color will only be set if the light has a reference to a specific ColorHueStrategy. The saturation can range from 0 to 254, whereas 0 is least saturated (white) and 254 is most saturated.
Parameters
satuint8_t that specifies the saturation
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setColorTemperature()

virtual bool hueplusplus::Light::setColorTemperature ( unsigned int  mired,
uint8_t  transition = 4 
)
inlinevirtual

Function that sets the color temperature of this light in mired.

Note
The color temperature will only be set if the light has a reference to a specific ColorTemperatureStrategy. The color temperature can range from 153 to 500.
Parameters
miredUnsigned int that specifies the color temperature in Mired
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ setColorTemperatureStrategy()

virtual void hueplusplus::Light::setColorTemperatureStrategy ( std::shared_ptr< const ColorTemperatureStrategy strat)
inlineprotectedvirtual

Protected function that sets the colorTemperature strategy.

The strategy defines how specific commands that deal with colortemperature control are executed

Parameters
strata strategy of type ColorTemperatureStrategy

◆ setColorXY()

virtual bool hueplusplus::Light::setColorXY ( const XYBrightness xy,
uint8_t  transition = 4 
)
inlinevirtual

Function to set the color of this light in CIE with specified x y.

Note
The color will only be set if the light has a reference to a specific ColorHueStrategy. The values of x and y are ranging from 0 to 1.
Parameters
xyThe color in XY and brightness
transitionOptional parameter to set the transition from current state to new, standard is 4 = 400ms
Returns
Bool that is true on success
Exceptions
std::system_errorwhen system or socket operations fail
HueExceptionwhen response contained no body
HueAPIResponseExceptionwhen response contains an error
nlohmann::json::parse_errorwhen response could not be parsed

◆ transaction()

StateTransaction hueplusplus::Light::transaction ( )
virtual

Create a transaction for this light.

The transaction can be used to change more than one value in one request. Only use the functions supported by the current light type.

Example usage:

Friends And Related Function Documentation

◆ ExtendedColorHueStrategy

friend class ExtendedColorHueStrategy
friend

◆ ExtendedColorTemperatureStrategy

friend class ExtendedColorTemperatureStrategy
friend

◆ LightFactory

friend class LightFactory
friend

◆ SimpleBrightnessStrategy

friend class SimpleBrightnessStrategy
friend

◆ SimpleColorHueStrategy

friend class SimpleColorHueStrategy
friend

◆ SimpleColorTemperatureStrategy

friend class SimpleColorTemperatureStrategy
friend

Member Data Documentation

◆ brightnessStrategy

std::shared_ptr<const BrightnessStrategy> hueplusplus::Light::brightnessStrategy
protected

holds a reference to the strategy that handles brightness commands

◆ colorHueStrategy

std::shared_ptr<const ColorHueStrategy> hueplusplus::Light::colorHueStrategy
protected

holds a reference to the strategy that handles all color commands

◆ colorTemperatureStrategy

std::shared_ptr<const ColorTemperatureStrategy> hueplusplus::Light::colorTemperatureStrategy
protected

holds a reference to the strategy that handles colortemperature commands

◆ colorType

ColorType hueplusplus::Light::colorType
protected

holds the ColorType of the light


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