LSH-Core
A robust C++ framework for Arduino-based home automation nodes
Loading...
Searching...
No Matches
Serializer Namespace Reference

Provide functions to prepare and serialize Json payloads. More...

Functions

void serializeStaticJson (constants::payloads::StaticType payloadType)
 Send a static json payload.
 
void serializeDetails ()
 Prepare and send json details payload (eg: {"p":1,"n":"c1","a":[1,2,...],"b":[1,3,...]}).
 
void serializeActuatorsState ()
 Prepare and send a json actuators state payload (eg: {"p":2,"s":[0,1,0,1,...]}).
 
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}).
 

Detailed Description

Provide functions to prepare and serialize Json payloads.

Function Documentation

◆ serializeNetworkClick()

void Serializer::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}).

Parameters
clickableIndexThe index of the clickable.
clickTypeThe type of the click (long, super long).
confirmSet to true to confirm the action after an ACK has been received.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serializeStaticJson()

void Serializer::serializeStaticJson ( constants::payloads::StaticType  payloadType)

Send a static json payload.

Parameters
payloadTypetype of the payload.
Here is the call graph for this function:
Here is the caller graph for this function: