29 constexpr operator uint8_t()
const {
return static_cast<uint8_t
>(
val_); }
30 constexpr operator bool()
const {
return static_cast<uint8_t
>(
val_) != 0; }
36 return static_cast<ColorCapability>(
static_cast<uint8_t
>(lhs) &
static_cast<uint8_t
>(rhs));
39 return static_cast<ColorCapability>(
static_cast<uint8_t
>(lhs) &
static_cast<uint8_t
>(rhs));
42 return static_cast<ColorCapability>(
static_cast<uint8_t
>(lhs) |
static_cast<uint8_t
>(rhs));
45 return static_cast<ColorCapability>(
static_cast<uint8_t
>(lhs) |
static_cast<uint8_t
>(rhs));
82 constexpr operator uint8_t()
const {
return static_cast<uint8_t
>(
val_); }
83 constexpr operator bool()
const {
return static_cast<uint8_t
>(
val_) != 0; }
89 return static_cast<ColorMode>(
static_cast<uint8_t
>(lhs) &
static_cast<uint8_t
>(rhs));
92 return static_cast<ColorMode>(
static_cast<uint8_t
>(lhs) &
static_cast<uint8_t
>(rhs));
95 return static_cast<ColorMode>(
static_cast<uint8_t
>(lhs) &
static_cast<uint8_t
>(rhs));
98 return static_cast<ColorMode>(
static_cast<uint8_t
>(lhs) |
static_cast<uint8_t
>(rhs));
101 return static_cast<ColorMode>(
static_cast<uint8_t
>(lhs) |
static_cast<uint8_t
>(rhs));
104 return static_cast<ColorMode>(
static_cast<uint8_t
>(lhs) |
static_cast<uint8_t
>(rhs));
Helper class to allow bitwise operations on ColorCapability.
constexpr ColorCapabilityHelper(ColorCapability val)
Helper class to allow bitwise operations on ColorMode with ColorCapability.
constexpr ColorModeHelper(ColorMode val)
constexpr ColorCapabilityHelper operator|(ColorCapability lhs, ColorCapability rhs)
constexpr ColorCapabilityHelper operator&(ColorCapability lhs, ColorCapability rhs)
ColorMode
Color modes are a combination of color capabilities that can be used at the same time.
@ RGB_COLD_WARM_WHITE
RGB color output, and separate cold and warm white outputs.
@ UNKNOWN
No color mode configured (cannot be a supported mode, only active when light is off).
@ RGB_WHITE
RGB color output and a separate white output.
@ RGB_COLOR_TEMPERATURE
RGB color output and a separate white output with controllable color temperature.
ColorCapability
Color capabilities are the various outputs that a light has and that can be independently controlled ...
@ ON_OFF
Light can be turned on/off.
@ BRIGHTNESS
Master brightness of the light can be controlled.
@ RGB
Color can be controlled using RGB format (includes a brightness control for the color).
@ COLOR_TEMPERATURE
Color temperature can be controlled.
@ WHITE
Brightness of white channel can be controlled separately from other channels.
@ COLD_WARM_WHITE
Brightness of cold and warm white output can be controlled.
Providing packet encoding functions for exchanging data with a remote host.