Skip to main content

Module routing

Module routing 

Source
Expand description

Routing engine: applies a device input primitive against the active mappings to produce zero or more (service_type, target, intent) triples.

Structs§

RoutedIntent
A concrete intent destined for a specific service target.
RoutingEngine
Thread-safe registry of currently-active mappings, keyed by (device_type, device_id) for O(1) lookup per input event.
SelectionMode
Per-(device_type, device_id) transient state used by target-selection mode. Keyed off the mapping that declared target_switch_on. While this struct is in RoutingEngine::selection, the device has entered mode: Rotate browses cursor, Press commits, any other input cancels.

Enums§

RouteOutcome
One outcome of routing a single input primitive. Normal is the existing “route to zero or more intents” path; the other variants are target-selection side effects that the caller must translate into LED feedback or a server-bound SwitchTarget frame.

Constants§

SELECTION_ROTATION_STEP
Fraction of a full Nuimo turn required to advance the selection cursor by one candidate. 1.0 = one full 360° turn; 0.25 = a quarter turn. Tuned experimentally: for the typical 2-4 candidate case this gives roughly one candidate per thumb-flick, versus the pre-damping behaviour where a finger slip cycled through every candidate in the list.