LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
Clickables Namespace Reference

Globally stores all clickables (like buttons) and to operates over them. More...

Functions

auto getId (uint8_t clickableIndex) -> uint8_t
 Return the static wire ID for one registered clickable index.
 
auto getClickable (uint8_t clickableId) -> Clickable *
 Get a single clickable.
 
auto getIndex (uint8_t clickableId) -> uint8_t
 Get a single clickable index (in device vector of clickable).
 
auto tryGetIndex (uint8_t clickableId, uint8_t &clickableIndex) -> bool
 Resolves a clickable ID to its dense runtime index with a single map lookup.
 
auto clickableExists (uint8_t clickableId) -> bool
 Get if the clickable actually exists.
 
void finalizeSetup ()
 Validate the configured clickable table before runtime checks start.
 

Detailed Description

Globally stores all clickables (like buttons) and to operates over them.

Function Documentation

◆ clickableExists()

auto Clickables::clickableExists ( uint8_t  clickableId) -> bool

Get if the clickable actually exists.

Parameters
clickableIdUnique ID of the clickable.
Returns
true if clickable exists.
false if clickable doesn't exist.
Here is the call graph for this function:

◆ finalizeSetup()

void Clickables::finalizeSetup ( )

Validate the configured clickable table before runtime checks start.

Click actions are generated as static dispatch code, so setup only has to validate the dense object table and ensure every clickable has at least one executable action.

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

◆ getClickable()

auto Clickables::getClickable ( uint8_t  clickableId) -> Clickable *

Get a single clickable.

Parameters
clickableIdclickable UUID.
Returns
Clickable* A single clickable when the ID exists.
nullptr When the ID is unknown.
Here is the call graph for this function:

◆ getId()

auto Clickables::getId ( uint8_t  clickableIndex) -> uint8_t

Return the static wire ID for one registered clickable index.

Parameters
clickableIndexdense runtime clickable index.
Returns
uint8_t clickable ID, or zero when the index is outside the static profile.
Here is the caller graph for this function:

◆ getIndex()

auto Clickables::getIndex ( uint8_t  clickableId) -> uint8_t

Get a single clickable index (in device vector of clickable).

Parameters
clickableIdclickable UUID.
Returns
uint8_t A single clickable index (in device vector of clickables).
UINT8_MAX When the ID is unknown.
Here is the call graph for this function:

◆ tryGetIndex()

auto Clickables::tryGetIndex ( uint8_t  clickableId,
uint8_t &  clickableIndex 
) -> bool

Resolves a clickable ID to its dense runtime index with a single map lookup.

Parameters
clickableIdClickable UUID.
clickableIndexOutput runtime index when the ID exists.
Returns
true if the clickable exists.
false otherwise.
Here is the caller graph for this function: