LSH-Core
A robust C++ framework for Arduino-based home automation nodes
Loading...
Searching...
No Matches
serializer.hpp
Go to the documentation of this file.
1
21#ifndef LSHCORE_COMMUNICATION_SERIALIZER_HPP
22#define LSHCORE_COMMUNICATION_SERIALIZER_HPP
23
24#include <ArduinoJson.h>
25#include <stdint.h>
26
33namespace Serializer
34{
35 void serializeStaticJson(constants::payloads::StaticType payloadType); // Send a static json payload
36 void serializeDetails(); // Prepare and send json details payload
37 void serializeActuatorsState(); // Prepare and send a json actuators state payload
38 void serializeNetworkClick(uint8_t clickableIndex, constants::ClickType clickType, bool confirm); // Prepare and send a json network click payload
39} // namespace Serializer
40
41#endif // LSHCORE_COMMUNICATION_SERIALIZER_HPP
Defines enums for various click types and fallback behaviors.
Provide functions to prepare and serialize Json payloads.
Definition serializer.cpp:48
void serializeDetails()
Prepare and send json details payload (eg: {"p":1,"n":"c1","a":[1,2,...],"b":[1,3,...
Definition serializer.cpp:84
void serializeActuatorsState()
Prepare and send a json actuators state payload (eg: {"p":2,"s":[0,1,0,1,...]}).
Definition serializer.cpp:113
void serializeStaticJson(constants::payloads::StaticType payloadType)
Send a static json payload.
Definition serializer.cpp:58
void serializeNetworkClick(uint8_t clickableIndex, constants::ClickType clickType, bool confirm)
Prepares and sends a JSON network click payload (e.g., {"p":3,"t":1,"i":1,"c":0}).
Definition serializer.cpp:140
ClickType
Clickable (like button) click types.
Definition clicktypes.hpp:36
Defines pre-serialized static message payloads stored in Flash.
StaticType
Defines the types of pre-serialized static payloads.
Definition static_payloads.hpp:33