hueplusplus  1.0.0
Public Member Functions | List of all members
hueplusplus::ColorTemperatureStrategy Class Referenceabstract

Virtual base class for all ColorTemperatureStrategies. More...

#include <hueplusplus/ColorTemperatureStrategy.h>

+ Inheritance diagram for hueplusplus::ColorTemperatureStrategy:

Public Member Functions

virtual bool setColorTemperature (unsigned int mired, uint8_t transition, Light &light) const =0
 Virtual function for changing a lights color temperature in mired with a specified transition. More...
 
virtual bool alertTemperature (unsigned int mired, Light &light) const =0
 Virtual function that lets the light perform one breath cycle in the specified color. More...
 
virtual unsigned int getColorTemperature (Light &light) const =0
 Virtual function that returns the current color temperature of the light. More...
 
virtual unsigned int getColorTemperature (const Light &light) const =0
 Virtual function that returns the current color temperature of the light. More...
 
virtual ~ColorTemperatureStrategy ()=default
 Virtual dtor. More...
 

Detailed Description

Virtual base class for all ColorTemperatureStrategies.

Constructor & Destructor Documentation

◆ ~ColorTemperatureStrategy()

virtual hueplusplus::ColorTemperatureStrategy::~ColorTemperatureStrategy ( )
virtualdefault

Virtual dtor.

Member Function Documentation

◆ alertTemperature()

virtual bool hueplusplus::ColorTemperatureStrategy::alertTemperature ( unsigned int  mired,
Light light 
) const
pure virtual

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

The color temperature in mired ranges from 153 to 500 whereas 153 is cold and 500 is warm.

Parameters
miredThe color temperature in mired
lightA reference of the light

Implemented in hueplusplus::SimpleColorTemperatureStrategy, and hueplusplus::ExtendedColorTemperatureStrategy.

◆ getColorTemperature() [1/2]

virtual unsigned int hueplusplus::ColorTemperatureStrategy::getColorTemperature ( Light light) const
pure virtual

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

Should update the lights state by calling refreshState() The color temperature in mired ranges from 153 to 500 whereas 153 is cold and 500 is warm.

Parameters
lightA reference of the light
Returns
Unsigned int representing the color temperature in mired

Implemented in hueplusplus::SimpleColorTemperatureStrategy.

◆ getColorTemperature() [2/2]

virtual unsigned int hueplusplus::ColorTemperatureStrategy::getColorTemperature ( const Light light) const
pure virtual

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

The color temperature in mired ranges from 153 to 500 whereas 153 is cold and 500 is warm.

Note
This should not update the lights state
Parameters
lightA const reference of the light
Returns
Unsigned int representing the color temperature in mired

Implemented in hueplusplus::SimpleColorTemperatureStrategy.

◆ setColorTemperature()

virtual bool hueplusplus::ColorTemperatureStrategy::setColorTemperature ( unsigned int  mired,
uint8_t  transition,
Light light 
) const
pure virtual

Virtual function for changing a lights color temperature in mired with a specified transition.

The color temperature in mired ranges from 153 to 500 whereas 153 is cold and 500 is warm.

Parameters
miredThe color temperature in mired
transitionThe time it takes to fade to the new color in multiples of 100ms, 4 = 400ms and should be seen as the default
lightA reference of the light

Implemented in hueplusplus::SimpleColorTemperatureStrategy.


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