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

Implements the logic for managing and operating on all system Clickables. More...

Include dependency graph for clickable_manager.cpp:

Namespaces

namespace  Clickables
 Forward declaration.
 

Functions

void Clickables::addClickable (Clickable *const clickable)
 Adds a clickable to the system.
 
auto Clickables::getClickable (uint8_t clickableId) -> Clickable *
 Get a single clickable.
 
auto Clickables::getIndex (uint8_t clickableId) -> uint8_t
 Get a single clickable index (in device vector of clickable).
 
auto Clickables::clickableExists (uint8_t clickableId) -> bool
 Get if the clickable actually exists.
 
auto Clickables::click (const Clickable *const clickable, constants::ClickType clickType) -> bool
 Perform a click.
 
auto Clickables::click (uint8_t clickableIndex, constants::ClickType clickType) -> bool
 Perform a click action.
 
void Clickables::finalizeSetup ()
 Resize vectors of all clickables to the actual needed size.
 

Variables

uint8_t Clickables::totalClickables = 0U
 Device real total Clickables.
 
etl::array< Clickable *, CONFIG_MAX_CLICKABLES > Clickables::clickables {}
 Device clickables.
 
etl::map< uint8_t, uint8_t, CONFIG_MAX_CLICKABLES > Clickables::clickablesMap {}
 Device clickables map (UUID -> clickables index)
 

Detailed Description

Implements the logic for managing and operating on all system Clickables.

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.