|
LSH-Core
A robust C++ framework for Arduino-based home automation nodes
|
"static class" Used to store and check network clicks More...
Functions | |
| void | request (uint8_t clickableIndex, constants::ClickType clickType) |
| Initiates a network click action. | |
| auto | confirm (uint8_t clickableIndex, constants::ClickType clickType) -> bool |
| Confirms a pending network click action after receiving an ACK. | |
| void | storeNetworkClickTime (uint8_t clickableIndex, constants::ClickType clickType) |
| Store click time for a network attached clickable. | |
| auto | thereAreActiveNetworkCLicks () -> bool |
| Get if there are active stored network clicks. | |
| void | eraseNetworkClick (uint8_t clickableIndex, constants::ClickType clickType) |
| Erase a stored network click. | |
| auto | isNetworkClickExpired (uint8_t clickableIndex, constants::ClickType clickType) -> bool |
| Checks if a pending network click has expired. | |
| auto | checkNetworkClickTimer (uint8_t clickableIndex, constants::ClickType clickType, bool failover) -> bool |
| Checks a specific pending network click for expiration or forced failover. | |
| auto | checkAllNetworkClicksTimers (bool failover) -> bool |
| Timeout checks for all network clicked clickables. | |
Variables | |
| etl::map< uint8_t, uint32_t, CONFIG_MAX_CLICKABLES > | longClickedNetworkClickables {} |
| Map of long clicked network clickable (<Clickable index, stored time>) | |
| etl::map< uint8_t, uint32_t, CONFIG_MAX_CLICKABLES > | superLongClickedNetworkClickables {} |
| Map of super long clicked network clickable (<Clickable index, stored time>) | |
"static class" Used to store and check network clicks
| auto NetworkClicks::checkAllNetworkClicksTimers | ( | bool | failover | ) | -> bool |
Timeout checks for all network clicked clickables.
If the time is over it performs local action and resets the timer
| failover | to perform local action regardless the state of the timer. |


| auto NetworkClicks::checkNetworkClickTimer | ( | uint8_t | clickableIndex, |
| constants::ClickType | clickType, | ||
| bool | failover | ||
| ) | -> bool |
Checks a specific pending network click for expiration or forced failover.
If the timer has expired, or if failover is true, this function triggers the configured fallback action (if any) and removes the click from the pending map.
| clickableIndex | The index of the clickable to check. |
| clickType | The type of the pending click. |
| failover | If true, force the fallback action regardless of the timer's state. |

| auto NetworkClicks::confirm | ( | uint8_t | clickableIndex, |
| constants::ClickType | clickType | ||
| ) | -> bool |
Confirms a pending network click action after receiving an ACK.
Sends the final confirmation message and removes the click from the pending list.
| clickableIndex | The index of the clickable to confirm. |
| clickType | The type of click to confirm. |

| void NetworkClicks::eraseNetworkClick | ( | uint8_t | clickableIndex, |
| constants::ClickType | clickType | ||
| ) |
Erase a stored network click.
| clickableIndex | index of the clickable. |
| clickType | type of the click. |

| auto NetworkClicks::isNetworkClickExpired | ( | uint8_t | clickableIndex, |
| constants::ClickType | clickType | ||
| ) | -> bool |
Checks if a pending network click has expired.
If the click has expired, it is removed from the pending list as a side effect.
| clickableIndex | The index of the clickable to check. |
| clickType | The type of the pending click (long or super long). |

| void NetworkClicks::request | ( | uint8_t | clickableIndex, |
| constants::ClickType | clickType | ||
| ) |
Initiates a network click action.
Sends the initial network click request and starts the fallback timer. This function does not return a value; the caller is responsible for managing any necessary state changes.
| clickableIndex | The index of the clickable that was pressed. |
| clickType | The type of click (LONG or SUPER_LONG). |


| void NetworkClicks::storeNetworkClickTime | ( | uint8_t | clickableIndex, |
| constants::ClickType | clickType | ||
| ) |
Store click time for a network attached clickable.
| clickableIndex | the index of the clickable. |
| clickType | the type of the click (long or super long). |


| auto NetworkClicks::thereAreActiveNetworkCLicks | ( | ) | -> bool |
Get if there are active stored network clicks.
