LSH-Core
A robust C++ framework for Arduino-based home automation nodes
Loading...
Searching...
No Matches
esp_com.hpp File Reference

Declares functions for managing the low-level serial communication with the ESP bridge. More...

#include <ArduinoJson.h>
#include <stdint.h>
#include "communication/constants/config.hpp"
#include "communication/deserializer.hpp"
#include "internal/user_config_bridge.hpp"
Include dependency graph for esp_com.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  EspCom
 Perform communication via Serial.
 

Functions

void EspCom::init ()
 Init serial.
 
void EspCom::sendJson (const JsonDocument &json)
 Sends a JsonDocument via Serial.
 
auto EspCom::receiveAndDispatch () -> Deserializer::DispatchResult
 Reads from the communication serial port, processes complete messages, and dispatches commands.
 
auto EspCom::canPing () -> bool
 Ping minimum interval check.
 
void EspCom::updateLastSentTime ()
 Set last time payload has been sent to now.
 
auto EspCom::isConnected () -> bool
 Checks if the ESP is considered connected.
 

Detailed Description

Declares functions for managing the low-level serial communication with the ESP bridge.

Author
Jacopo Labardi (labodj)

Copyright 2025 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.