SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
Loading...
Searching...
No Matches
Set pseudo-indices and the legacy translation

A set is several models listening to the same sensor data. Sets live at the top of the uint8 range, not just above the registry:

Constant Value Members
AI_PARALLEL_MIC 255 every microphone model
AI_PARALLEL_ROOM 254 radar plus the room-suited microphone models
AI_PARALLEL_INTRUDER 253 motion, radar and the alarm models (contains an IMU model — raises the CM33 sensor push rate)
AI_PARALLEL_ALL 252 every registered model — the widest watch
AI_PARALLEL_FIRST = AI_PARALLEL_ALL anything at or above this is a set, not a model

The older spellings 13 / 14 / 15 (INTRUDER / ROOM / MIC) still work: the firmware translates them, and ai_engine_active() answers with the value in the table. So edge_ai.select(13) followed by active() == 253 is CORRECT, not a mismatch. The translation exists in two places — model_link_resolve_set() on the MicroPython side and the CM55 receive path in deepcraft_task.c:785-787 — kept consistent by the _Static_assert block at ai_engine.h:121-126; when they drifted, every Sound Watch select reported "not confirmed" on a board that had in fact switched.

Two hard facts about sets:

  • AI_PARALLEL_ALL (252) has no definable slot — ai_engine_set_define() returns -1 for it unconditionally. An archive predating ALL rejected 252 on hardware; the shipped archive was re-cut 2026-08-28 and honours it.
  • ai_engine_snapshot() is not valid inside a set: it is last-writer-wins, so three quiet members bury a detection before it is read. The detection is not late, it is gone. Use ai_engine_snapshot_model() per member.