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

Implements the logic for handling network click requests, confirmations, and timeouts. More...

Include dependency graph for network_clicks.cpp:

Namespaces

namespace  NetworkClicks
 "static class" Used to store and check network clicks
 

Functions

void NetworkClicks::request (uint8_t clickableIndex, constants::ClickType clickType)
 Initiates a network click action.
 
auto NetworkClicks::confirm (uint8_t clickableIndex, constants::ClickType clickType) -> bool
 Confirms a pending network click action after receiving an ACK.
 
void NetworkClicks::storeNetworkClickTime (uint8_t clickableIndex, constants::ClickType clickType)
 Store click time for a network attached clickable.
 
auto NetworkClicks::thereAreActiveNetworkCLicks () -> bool
 Get if there are active stored network clicks.
 
void NetworkClicks::eraseNetworkClick (uint8_t clickableIndex, constants::ClickType clickType)
 Erase a stored network click.
 
auto NetworkClicks::isNetworkClickExpired (uint8_t clickableIndex, constants::ClickType clickType) -> bool
 Checks if a pending network click has expired.
 
auto NetworkClicks::checkNetworkClickTimer (uint8_t clickableIndex, constants::ClickType clickType, bool failover) -> bool
 Checks a specific pending network click for expiration or forced failover.
 
auto NetworkClicks::checkAllNetworkClicksTimers (bool failover) -> bool
 Timeout checks for all network clicked clickables.
 

Variables

etl::map< uint8_t, uint32_t, CONFIG_MAX_CLICKABLES > NetworkClicks::longClickedNetworkClickables {}
 Map of long clicked network clickable (<Clickable index, stored time>)
 
etl::map< uint8_t, uint32_t, CONFIG_MAX_CLICKABLES > NetworkClicks::superLongClickedNetworkClickables {}
 Map of super long clicked network clickable (<Clickable index, stored time>)
 

Detailed Description

Implements the logic for handling network click requests, confirmations, and timeouts.

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.