BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions
BeeeOn::ColorBrightness Class Reference

The class stores color represent by red, green and blue component. It allows to count the brightness according to the biggest RGB component. More...

#include <ColorBrightness.h>

Public Member Functions

 ColorBrightness (const uint8_t red, const uint8_t green, const uint8_t blue, const uint8_t maxColorElement=0xff)
 
uint8_t brightness () const
 Returns brightness in percents.
 
void setBrightness (const uint8_t brightness)
 
uint8_t red () const
 
uint8_t green () const
 
uint8_t blue () const
 
void setColor (const uint8_t red, const uint8_t green, const uint8_t blue)
 

Detailed Description

The class stores color represent by red, green and blue component. It allows to count the brightness according to the biggest RGB component.

Constructor & Destructor Documentation

ColorBrightness::ColorBrightness ( const uint8_t  red,
const uint8_t  green,
const uint8_t  blue,
const uint8_t  maxColorElement = 0xff 
)
Parameters
maxColorElementmaximum allowed value of RGB component

Member Function Documentation

void ColorBrightness::setBrightness ( const uint8_t  brightness)
Parameters
brightnessin percents
Exceptions
IllegalStateExceptionin case of the brightness is bigger then 100
void ColorBrightness::setColor ( const uint8_t  red,
const uint8_t  green,
const uint8_t  blue 
)
Exceptions
IllegalStateExceptionin case of some component is bigger than max color element

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