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

Virtual base class for all BrightnessStrategies. More...

#include <hueplusplus/BrightnessStrategy.h>

+ Inheritance diagram for hueplusplus::BrightnessStrategy:

Public Member Functions

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...
 

Detailed Description

Virtual base class for all BrightnessStrategies.

Constructor & Destructor Documentation

◆ ~BrightnessStrategy()

virtual hueplusplus::BrightnessStrategy::~BrightnessStrategy ( )
virtualdefault

Virtual dtor.

Member Function Documentation

◆ 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
lightA 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
lightA 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
briThe brightness raning from 0 = off to 255 = fully lit
transitionThe time it takes to fade to the new brightness in multiples of 100ms, 4 = 400ms and should be seen as the default
lightA reference of the light

Implemented in hueplusplus::SimpleBrightnessStrategy.


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