LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
msgpack_serial_framing.hpp File Reference

Declares the serial framing helpers used for MsgPack payloads exchanged with lsh-bridge. More...

#include <stdint.h>
Include dependency graph for msgpack_serial_framing.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  lsh::core::transport::MsgPackFrameReceiver
 Incremental receiver for the SLIP-like MsgPack framing used on the bridge serial link. More...
 

Enumerations

enum class  lsh::core::transport::MsgPackFrameConsumeResult : uint8_t { Incomplete , FrameComplete , FrameDiscarded }
 Outcome of feeding one raw serial byte into the MsgPack frame receiver. More...
 

Variables

constexpr uint8_t lsh::core::transport::MSGPACK_FRAME_END = 0xC0U
 Delimiter byte that separates adjacent framed MsgPack payloads.
 
constexpr uint8_t lsh::core::transport::MSGPACK_FRAME_ESCAPE = 0xDBU
 Escape marker emitted before reserved payload bytes.
 
constexpr uint8_t lsh::core::transport::MSGPACK_FRAME_ESCAPED_END = 0xDCU
 Escaped representation of MSGPACK_FRAME_END.
 
constexpr uint8_t lsh::core::transport::MSGPACK_FRAME_ESCAPED_ESCAPE = 0xDDU
 Escaped representation of MSGPACK_FRAME_ESCAPE.
 

Detailed Description

Declares the serial framing helpers used for MsgPack payloads exchanged with lsh-bridge.

Author
Jacopo Labardi (labodj)

Copyright 2026 Jacopo Labardi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Enumeration Type Documentation

◆ MsgPackFrameConsumeResult

Outcome of feeding one raw serial byte into the MsgPack frame receiver.

Enumerator
Incomplete 

The byte has been consumed, but no full payload is ready yet.

FrameComplete 

One complete deframed payload is ready in the destination buffer.

FrameDiscarded 

One corrupted or oversized frame has just been dropped at its closing delimiter.