Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches

◆ nrf_edgeai_obsv_encode_list()

size_t nrf_edgeai_obsv_encode_list ( 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 (obsv-list format).

Produces the wire format obsv-list = [+ obsv-payload] defined in obsv.cddl: a CBOR array with one obsv-payload element per context, each encoded under its own context lock. Suitable for any transport (Memfault CDR, UART, BLE, etc.).

Requires CONFIG_NRF_EDGEAI_OBSV_ENCODE.

Parameters
ctxsArray of n initialized context pointers.
nNumber of contexts. Must be 1–23 (CBOR tiny integer limit).
bufOutput buffer.
max_lenSize of buf in bytes.
Returns
Encoded byte count on success, 0 on error or buffer overflow.