21#ifndef LSHCORE_COMMUNICATION_CONSTANTS_CONFIGS_HPP
22#define LSHCORE_COMMUNICATION_CONSTANTS_CONFIGS_HPP
24#include <ArduinoJson.h>
37 namespace espComConfigs
40#ifndef CONFIG_PING_INTERVAL_MS
41 static constexpr const uint16_t PING_INTERVAL_MS = 10000U;
43 static constexpr const uint16_t PING_INTERVAL_MS = CONFIG_PING_INTERVAL_MS;
46#ifndef CONFIG_CONNECTION_TIMEOUT_MS
47 static constexpr const uint16_t CONNECTION_TIMEOUT_MS = PING_INTERVAL_MS + 200U;
49 static constexpr const uint16_t CONNECTION_TIMEOUT_MS = CONFIG_CONNECTION_TIMEOUT_MS;
52#ifndef CONFIG_COM_SERIAL_BAUD
53 static constexpr const uint32_t COM_SERIAL_BAUD = 250000U;
55 static constexpr const uint32_t COM_SERIAL_BAUD = CONFIG_COM_SERIAL_BAUD;
58#ifndef CONFIG_COM_SERIAL_TIMEOUT_MS
59 static constexpr const uint8_t COM_SERIAL_TIMEOUT_MS = 5U;
61 static constexpr const uint8_t COM_SERIAL_TIMEOUT_MS = CONFIG_COM_SERIAL_TIMEOUT_MS;
78 constexpr uint16_t
RECEIVED_DOC_MIN_SIZE = etl::bit_ceil(JSON_ARRAY_SIZE(CONFIG_MAX_ACTUATORS) + JSON_OBJECT_SIZE(2) + 4U);
90 ? etl::bit_ceil(16U + (2U * CONFIG_MAX_ACTUATORS))
101 constexpr uint16_t
SENT_DOC_DETAILS_SIZE = JSON_ARRAY_SIZE(CONFIG_MAX_ACTUATORS) + JSON_ARRAY_SIZE(CONFIG_MAX_CLICKABLES) + JSON_OBJECT_SIZE(4);
constexpr uint16_t RECEIVED_DOC_MIN_SIZE
Calculated minimum size for the JSON document received from the bridge.
Definition config.hpp:78
constexpr uint16_t SENT_DOC_NETWORK_CLICK_SIZE
Calculated size for the JSON document sent for network clicks.
Definition config.hpp:116
constexpr uint16_t RAW_INPUT_BUFFER_VARIABLE_CMD_SIZE
Calculated size for the longest variable-length command ({"p":12,"s":[0,1,0,1,0,.....
Definition config.hpp:89
constexpr uint16_t SENT_DOC_MAX_SIZE
The maximum possible size for any JSON document sent by the device.
Definition config.hpp:118
constexpr uint16_t RAW_INPUT_BUFFER_MIN_SIZE
Defines the size of the temporary on-stack buffer for reading raw serial messages.
Definition config.hpp:84
constexpr uint16_t SENT_DOC_DETAILS_SIZE
Calculated size for the JSON document sent with device details.
Definition config.hpp:101
constexpr uint16_t RECEIVED_DOC_SIZE
Final allocated size for the received JSON document, ensuring a minimum of 48 bytes.
Definition config.hpp:79
constexpr uint16_t SENT_DOC_STATE_SIZE
Calculated size for the JSON document sent with actuator states.
Definition config.hpp:109
constexpr uint16_t RAW_INPUT_BUFFER_SIZE
Final allocated size for the raw serial input buffer.
Definition config.hpp:93
namespace for constants.
Definition config.hpp:33
Internal bridge that imports user-defined macros into the library's scope.