hueplusplus  1.0.0
Public Member Functions | List of all members
hueplusplus::SimpleBrightnessStrategy Class Reference

Class implementing the functions of BrightnessStrategy. More...

#include <hueplusplus/SimpleBrightnessStrategy.h>

+ Inheritance diagram for hueplusplus::SimpleBrightnessStrategy:
+ Collaboration diagram for hueplusplus::SimpleBrightnessStrategy:

Public Member Functions

bool setBrightness (unsigned int bri, uint8_t transition, Light &light) const override
 Function for changing a lights brightness with a specified transition. More...
 
unsigned int getBrightness (Light &light) const override
 Function that returns the current brightness of the light. More...
 
unsigned int getBrightness (const Light &light) const override
 Function that returns the current brightness of the light. More...
 
- Public Member Functions inherited from hueplusplus::BrightnessStrategy
virtual ~BrightnessStrategy ()=default
 Virtual dtor. More...
 

Detailed Description

Class implementing the functions of BrightnessStrategy.

Member Function Documentation

◆ getBrightness() [1/2]

unsigned int hueplusplus::SimpleBrightnessStrategy::getBrightness ( Light light) const
overridevirtual

Function that returns the current brightness of the light.

Updates the lights state by calling refreshState()

Parameters
lightA reference of the light
Returns
Unsigned int representing the brightness

Implements hueplusplus::BrightnessStrategy.

◆ getBrightness() [2/2]

unsigned int hueplusplus::SimpleBrightnessStrategy::getBrightness ( const Light light) const
overridevirtual

Function that returns the current brightness of the light.

Note
This does not update the lights state
Parameters
lightA const reference of the light
Returns
Unsigned int representing the brightness

Implements hueplusplus::BrightnessStrategy.

◆ setBrightness()

bool hueplusplus::SimpleBrightnessStrategy::setBrightness ( unsigned int  bri,
uint8_t  transition,
Light light 
) const
overridevirtual

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

Implements hueplusplus::BrightnessStrategy.


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