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

Declares the low-level serial communication helpers used to talk with lsh-bridge. More...

#include <stdint.h>
#include "communication/deserializer.hpp"
Include dependency graph for bridge_serial.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BridgeSerial::ReceiveResult
 

Namespaces

namespace  BridgeSerial
 Controller-side serial link used to exchange payloads with lsh-bridge.
 

Functions

void BridgeSerial::init ()
 Initialize the serial port used to talk with lsh-bridge.
 
auto BridgeSerial::receiveAndDispatch (uint16_t maxBytesToConsume) -> ReceiveResult
 Consume a bounded amount of serial input and dispatch at most one payload.
 
void BridgeSerial::tickSendIdleTimer (uint16_t elapsed_ms)
 Advance the ping idle timer used by canPing().
 
auto BridgeSerial::canPing () -> bool
 Check whether the bridge link may emit another heartbeat.
 
void BridgeSerial::updateLastSentTime ()
 Record that a payload has just been transmitted to the bridge.
 
auto BridgeSerial::isConnected () -> bool
 Check whether the bridge is still considered connected.
 

Detailed Description

Declares the low-level serial communication helpers used to talk 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.