Virtual base class for all BrightnessStrategies.
More...
#include <hueplusplus/BrightnessStrategy.h>
|
virtual bool | setBrightness (unsigned int bri, uint8_t transition, Light &light) const =0 |
| Virtual function for changing a lights brightness with a specified transition. More...
|
|
virtual unsigned int | getBrightness (Light &light) const =0 |
| Virtual function that returns the current brightnessof the light. More...
|
|
virtual unsigned int | getBrightness (const Light &light) const =0 |
| Virtual function that returns the current brightness of the light. More...
|
|
virtual | ~BrightnessStrategy ()=default |
| Virtual dtor. More...
|
|
Virtual base class for all BrightnessStrategies.
◆ ~BrightnessStrategy()
virtual hueplusplus::BrightnessStrategy::~BrightnessStrategy |
( |
| ) |
|
|
virtualdefault |
◆ getBrightness() [1/2]
virtual unsigned int hueplusplus::BrightnessStrategy::getBrightness |
( |
Light & |
light | ) |
const |
|
pure virtual |
Virtual function that returns the current brightnessof the light.
Should update the lights state by calling refreshState()
- Parameters
-
light | A reference of the light |
- Returns
- Unsigned int representing the brightness
Implemented in hueplusplus::SimpleBrightnessStrategy.
◆ getBrightness() [2/2]
virtual unsigned int hueplusplus::BrightnessStrategy::getBrightness |
( |
const Light & |
light | ) |
const |
|
pure virtual |
Virtual function that returns the current brightness of the light.
- Note
- This should not update the lights state
- Parameters
-
light | A const reference of the light |
- Returns
- Unsigned int representing the brightness
Implemented in hueplusplus::SimpleBrightnessStrategy.
◆ setBrightness()
virtual bool hueplusplus::BrightnessStrategy::setBrightness |
( |
unsigned int |
bri, |
|
|
uint8_t |
transition, |
|
|
Light & |
light |
|
) |
| const |
|
pure virtual |
Virtual function for changing a lights brightness with a specified transition.
- Parameters
-
bri | The brightness raning from 0 = off to 255 = fully lit |
transition | The time it takes to fade to the new brightness in multiples of 100ms, 4 = 400ms and should be seen as the default |
light | A reference of the light |
Implemented in hueplusplus::SimpleBrightnessStrategy.
The documentation for this class was generated from the following file: