21#ifndef LSHCORE_COMMUNICATION_CONSTANTS_PROTOCOL_HPP
22#define LSHCORE_COMMUNICATION_CONSTANTS_PROTOCOL_HPP
constexpr const char * KEY_PAYLOAD
Payload type (Command enum)
Definition protocol.hpp:31
ProtocolClickType
Defines the valid click types for the 't' (type) key in JSON messages.
Definition protocol.hpp:72
constexpr const char * KEY_BUTTONS_ARRAY
Buttons IDs array.
Definition protocol.hpp:34
Command
Defines the valid command types for the 'p' (payload) key in JSON messages.
Definition protocol.hpp:43
@ FAILOVER_CLICK
Failover for specific click: {"p":16,"i":buttonId,"t":clickType}.
@ ACTUATORS_STATE
Bitpacked state: {"p":2,"s":[byte0,byte1,...]} (each byte = 8 actuators)
@ FAILOVER
General failover: {"p":15}.
@ PING_
Ping/heartbeat: {"p":5}.
@ NETWORK_CLICK_ACK
Acknowledge network click: {"p":14,"i":buttonId,"t":clickType}.
@ SET_STATE
Set all actuators: {"p":12,"s":[byte0,byte1,...]}.
@ SET_SINGLE_ACTUATOR
Set single actuator: {"p":13,"i":id,"s":0|1}.
@ NETWORK_CLICK_CONFIRM
Network click confirm after ACK received.
@ NETWORK_CLICK_REQUEST
Network click request: {"p":3,"i":buttonId,"t":clickType}.
@ REQUEST_DETAILS
Request device details: {"p":10}.
@ DEVICE_DETAILS
Device info: {"p":1,"n":"name","a":[ids],"b":[ids]}.
@ BOOT
Boot notification: {"p":4}.
@ REQUEST_STATE
Request current state: {"p":11}.
constexpr const char * KEY_STATE
Actuators State (bitpacked bytes array)
Definition protocol.hpp:36
constexpr const char * KEY_TYPE
Click Type.
Definition protocol.hpp:37
constexpr const char * KEY_NAME
Device Name.
Definition protocol.hpp:32
constexpr const char * KEY_ID
Actuator/Button ID.
Definition protocol.hpp:35
constexpr const char * KEY_ACTUATORS_ARRAY
Actuators IDs array.
Definition protocol.hpp:33