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

Main public entry point for the lsh-core library. More...

Include dependency graph for lsh.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void lsh::core::setup ()
 Initialize the runtime once from Arduino setup().
 
void lsh::core::loop ()
 Run one firmware iteration from Arduino loop().
 

Detailed Description

Main public entry point for the lsh-core library.

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.

Function Documentation

◆ loop()

void lsh::core::loop ( )

Run one firmware iteration from Arduino loop().

Execute one controller loop iteration.

This function is the hot runtime path and must be called from Arduino loop() forever. It refreshes the cached time, scans local inputs, handles inbound bridge traffic, manages network-click timeouts and actuator auto-off timers, then publishes the latest local state back to the bridge when a refresh is pending and the receive grace period has elapsed.

< Previous cached loop timestamp; one 32-bit delta feeds every periodic gate.

< True when the bridge must receive a fresh actuator snapshot.

< Number of bridge payloads already dispatched in this loop iteration.

< Raw UART bytes already consumed in this loop iteration.

< Previous cached loop timestamp; one 32-bit delta feeds every periodic gate.

< True when the bridge must receive a fresh actuator snapshot.

< Number of bridge payloads already dispatched in this loop iteration.

< Raw UART bytes already consumed in this loop iteration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

void lsh::core::setup ( )

Initialize the runtime once from Arduino setup().

Initialize the lsh-core runtime.

This entry point must be called exactly once from Arduino setup(). It initializes the optional debug serial, refreshes the cached loop time, starts the controller-to-bridge serial link, applies the user-defined topology, and then starts the bridge resynchronization handshake so the bridge must request fresh details and state before sending mutating commands.

Here is the call graph for this function:
Here is the caller graph for this function: