13#include "src/system/component/time_handling.h"
36 static constexpr uint8_t maxDataSize = 8;
38 Type get_type()
const {
return _type; }
169 std::array<uint8_t, maxDataSize> _data;
Define a command destined to the user layer. Command can only be created by the static make_* methods...
Definition: user_commands.h:21
static UserCommand make_set_mode_command(const uint8_t groupId, const uint8_t modeId)
Set this commant to handle mode switch.
Definition: user_commands.cpp:29
bool parse_set_sunset_to_time_command(component::time::RealTime &time) const
Parse the current command for a set sunset to time value.
Definition: user_commands.cpp:155
bool parse_set_mode(uint8_t &groupId, uint8_t &modeId) const
Parse the current command for a set_mode values.
Definition: user_commands.cpp:122
bool parse_ramp(uint8_t &ramp) const
Parse the current command for a ramp value.
Definition: user_commands.cpp:100
bool parse_set_ble_mode_command(uint8_t &index) const
Parse the current command for a set current mode to BLE mode.
Definition: user_commands.cpp:180
static UserCommand make_set_ramp_command(const uint8_t ramp)
Set this commant to handle user ramp change.
Definition: user_commands.cpp:10
static UserCommand make_set_sunset_to_time_command(const component::time::RealTime &time)
Set this commant to set sunset to real time.
Definition: user_commands.cpp:60
Type
Command type.
Definition: user_commands.h:25
@ SetSunsetToTime
set the sunset to a target real time
@ SetRealTime
set the system real time
@ SetBleMode
switch to a target BLE mode
@ Invalid
invalid placeholder message
@ SetBleCustomColorMode
switch to BLE custom color mode
@ Brightness
set brightness
@ SetUserRamp
set the user ramp value
static UserCommand make_set_real_time_command(const component::time::RealTime &time)
Set this commant to set system real time.
Definition: user_commands.cpp:48
bool parse_brightness(brightness_t &brightness) const
Parse the current command for a brightness value.
Definition: user_commands.cpp:108
bool parse_turn_onoff(bool &shouldTurnOn) const
Parse the current command for a on/off value.
Definition: user_commands.cpp:131
bool parse_set_ble_custom_color_mode_command(uint32_t &color) const
Parse the current command for a set current mode to BLE custom color.
Definition: user_commands.cpp:171
UserCommand()
Protected constructor to prevent unallowed uses.
Definition: user_commands.cpp:8
static UserCommand make_set_ble_mode_command(const uint8_t index)
Set this commant to set ble mode.
Definition: user_commands.cpp:85
static UserCommand make_brightness_command(const brightness_t brightness)
Set this commant to handle brightness.
Definition: user_commands.cpp:19
static UserCommand make_turn_onoff_command(const bool shouldTurnOn)
Set this commant to handle turn on/off.
Definition: user_commands.cpp:39
static UserCommand make_set_ble_custom_color_mode_command(const uint8_t red, const uint8_t green, const uint8_t blue)
Set this commant to set ble custom color.
Definition: user_commands.cpp:72
bool parse_set_real_time_command(component::time::RealTime &time) const
Parse the current command for a set real time value.
Definition: user_commands.cpp:139
Program scope.
Definition: control_fixed_modes.hpp:12
uint16_t brightness_t
Define the type of the brightness parameters.
Definition: constants.h:147
Store a real time reference.
Definition: time_handling.h:18
Define the system hardware constants.