Smart LEDZ v1 mesh command builders and opcode constants.
More...
#include <array>
#include <cstddef>
#include <cstdint>
Go to the source code of this file.
Smart LEDZ v1 mesh command builders and opcode constants.
◆ make_brightness()
| MeshCommand smartledz_protocol::v1::make_brightness |
( |
uint8_t |
brightness_pct | ) |
|
Builds a brightness command.
- Parameters
-
| brightness_pct | Brightness percentage byte expected by the device. |
- Returns
- Command with opcode
kOpcodeBrightness and payload length 1.
- Note
- The value is forwarded as-is and is not clamped.
◆ make_ct_raw()
| MeshCommand smartledz_protocol::v1::make_ct_raw |
( |
uint8_t |
ct_raw | ) |
|
Builds a color-temperature command using the raw protocol unit.
- Parameters
-
| ct_raw | Raw CT byte from 18 (warmest) to 65 (coolest). |
- Returns
- Command with opcode
kOpcodeColor and payload [0x05, CT].
- Note
- Values are clamped to the supported range
[18, 65].
◆ make_dimming_query()
| MeshCommand smartledz_protocol::v1::make_dimming_query |
( |
| ) |
|
Builds a dimming query command (0xF1 request wrapper).
- Returns
- Command with opcode
kOpcodeDimmingQuery and fixed 5-byte payload.
◆ make_on_off()
| MeshCommand smartledz_protocol::v1::make_on_off |
( |
bool |
on | ) |
|
Builds an on/off command.
- Parameters
-
| on | true sends 0x01, false sends 0x00. |
- Returns
- Command with opcode
kOpcodeOnOff and payload length 1.
◆ make_rgb()
| MeshCommand smartledz_protocol::v1::make_rgb |
( |
uint8_t |
red, |
|
|
uint8_t |
green, |
|
|
uint8_t |
blue |
|
) |
| |
Builds an RGB color command.
- Parameters
-
| red | Red channel (0..255). |
| green | Green channel (0..255). |
| blue | Blue channel (0..255). |
- Returns
- Command with opcode
kOpcodeColor and payload [0x04, R, G, B].
◆ make_status_query()
| MeshCommand smartledz_protocol::v1::make_status_query |
( |
| ) |
|
Builds a status query command.
- Returns
- Command with opcode
kOpcodeStatusQuery and payload [0x10].