LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
constants::bridgeSerial Namespace Reference

Constants that configure the serial link shared with lsh-bridge. More...

Variables

constexpr uint16_t PACKED_STATE_BYTES
 Number of bytes required to represent all actuator states on wire.
 
constexpr uint16_t RECEIVED_DOC_MIN_SIZE
 Calculated minimum size for the decoded bridge document.
 
constexpr uint16_t RECEIVED_DOC_SIZE
 Final allocated size for the received document, ensuring a minimum of 48 bytes.
 
constexpr uint16_t RAW_INPUT_BUFFER_FIXED_CMD_SIZE
 Minimum JSON-line buffer size required by the widest fixed-width command.
 
constexpr uint16_t RAW_INPUT_BUFFER_VARIABLE_CMD_SIZE
 Maximum JSON-line size of a packed SET_STATE command.
 
constexpr uint16_t RAW_INPUT_BUFFER_SIZE
 Final allocated size for the raw serial input buffer used by the active codec.
 

Detailed Description

Constants that configure the serial link shared with lsh-bridge.

Variable Documentation

◆ PACKED_STATE_BYTES

constexpr uint16_t constants::bridgeSerial::PACKED_STATE_BYTES
constexpr
Initial value:
=
CONFIG_PACKED_ACTUATOR_STATE_BYTES

Number of bytes required to represent all actuator states on wire.

◆ RAW_INPUT_BUFFER_FIXED_CMD_SIZE

constexpr uint16_t constants::bridgeSerial::RAW_INPUT_BUFFER_FIXED_CMD_SIZE
constexpr
Initial value:
=
etl::bit_ceil(31U)

Minimum JSON-line buffer size required by the widest fixed-width command.

Longest fixed JSON command plus null terminator: {"p":17,"t":2,"i":255,"c":255}\0

◆ RAW_INPUT_BUFFER_SIZE

constexpr uint16_t constants::bridgeSerial::RAW_INPUT_BUFFER_SIZE
constexpr
Initial value:
=
constexpr uint16_t RAW_INPUT_BUFFER_FIXED_CMD_SIZE
Minimum JSON-line buffer size required by the widest fixed-width command.
Definition config.hpp:187
constexpr uint16_t RAW_INPUT_BUFFER_VARIABLE_CMD_SIZE
Maximum JSON-line size of a packed SET_STATE command.
Definition config.hpp:193

Final allocated size for the raw serial input buffer used by the active codec.

◆ RAW_INPUT_BUFFER_VARIABLE_CMD_SIZE

constexpr uint16_t constants::bridgeSerial::RAW_INPUT_BUFFER_VARIABLE_CMD_SIZE
constexpr
Initial value:
=
etl::bit_ceil(17U + (4U * PACKED_STATE_BYTES))

Maximum JSON-line size of a packed SET_STATE command.

Conservative worst case for {"p":12,"s":[255,...]}
\0

◆ RECEIVED_DOC_MIN_SIZE

constexpr uint16_t constants::bridgeSerial::RECEIVED_DOC_MIN_SIZE
constexpr
Initial value:
= etl::bit_ceil(JSON_ARRAY_SIZE(PACKED_STATE_BYTES) + JSON_OBJECT_SIZE(2) +
4U)

Calculated minimum size for the decoded bridge document.

◆ RECEIVED_DOC_SIZE

constexpr uint16_t constants::bridgeSerial::RECEIVED_DOC_SIZE
constexpr
Initial value:
=
? 48U
constexpr uint16_t RECEIVED_DOC_MIN_SIZE
Calculated minimum size for the decoded bridge document.
Definition config.hpp:143

Final allocated size for the received document, ensuring a minimum of 48 bytes.