|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| bool | ai_engine_init (void) |
| Create the inference task (idempotent); it must precede ai_engine_start(). | |
| bool | ai_engine_start (uint32_t index) |
| Activate a model (or set) by index and begin inferring; check the return. | |
| void | ai_engine_stop (void) |
| Stop the active model (idempotent); pair with a sensor-rate walk-down. | |
| int | ai_engine_active (void) |
| The LOADED model (s_current), or -1; lags requested by a cold-init window. | |
| int | ai_engine_requested (void) |
| The REQUESTED model (s_active), or -1; the correct guard for a fallback. | |
| uint32_t | ai_engine_stack_words (void) |
| Stack the inference task got, in words; 0 = engine never started — the universal gate. | |
| uint32_t | ai_engine_stack_free_words (void) |
| All-time minimum of unused stack words; O(stack) scan — read at ~1 Hz at most. | |
Seven functions: create the inference task, start and stop a model, read which model is requested versus loaded, and the two stack readings that gate everything else. Read The select → confirm → start discipline before using any of them.
| bool ai_engine_init | ( | void | ) |
Create the inference task (idempotent); it must precede ai_engine_start().
Create the inference task (idle until ai_engine_start). Call after the sensor sources exist; safe to call once from the display bring-up.
| bool ai_engine_start | ( | uint32_t | index | ) |
Activate a model (or set) by index and begin inferring; check the return.
Activate a model by registry index and begin inferring. Stops any model already running first. Returns false on a bad index or init failure.
| void ai_engine_stop | ( | void | ) |
Stop the active model (idempotent); pair with a sensor-rate walk-down.
Stop the active model (idempotent).
| int ai_engine_active | ( | void | ) |
The LOADED model (s_current), or -1; lags requested by a cold-init window.
Index of the active model, or -1 when idle.
| int ai_engine_requested | ( | void | ) |
The REQUESTED model (s_active), or -1; the correct guard for a fallback.
Index of the REQUESTED model (last ai_engine_start), or -1 when stopped. Leads ai_engine_active() by up to one inference-task tick. Guard a default-model fallback on this, never on ai_engine_active().
| uint32_t ai_engine_stack_words | ( | void | ) |
Stack the inference task got, in words; 0 = engine never started — the universal gate.
Stack the inference task actually got, in words; 0 if it was never created. Reported on the Edge AI page so a heap squeeze is visible, not silent.
| uint32_t ai_engine_stack_free_words | ( | void | ) |
All-time minimum of unused stack words; O(stack) scan — read at ~1 Hz at most.
Unused words left in the inference task's stack (all-time minimum); 0 if the task was never created. Read at about 1 Hz — the call scans the stack.