![]() |
Edge AI Add-on API 3.0.0
|
| size_t nrf_edgeai_obsv_encode_list_and_reset | ( | nrf_edgeai_obsv_ctx_t *const * | ctxs, |
| uint8_t | n, | ||
| uint8_t * | buf, | ||
| size_t | max_len ) |
#include <include/nrf_edgeai_obsv/nrf_edgeai_obsv.h>
Encode multiple contexts as a CBOR list and reset them atomically.
Same wire format as nrf_edgeai_obsv_encode_list. All n context locks are held across encode and reset, so no update is lost between the snapshot and the reset, and all contexts are snapshotted at the same point. Use it for incremental (per-interval) reporting.
Contexts are reset only when the whole list encodes successfully; on error they keep their data.
Requires CONFIG_NRF_EDGEAI_OBSV_ENCODE.
| ctxs | Array of n distinct initialized context pointers. |
| n | Number of contexts. Must be 1–23 (CBOR tiny integer limit). |
| buf | Output buffer. |
| max_len | Size of buf in bytes. |