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

Mutex-protected context, portable state, metrics, and optional CBOR encoding. More...

Topics

 Memfault CDR transport
 Stages CBOR-encoded observability snapshots as Memfault Custom Data Recordings.
 
 Observability CBOR encoding (buffer sizing)
 
 Observability metrics
 Metric descriptors, storage macros, and snapshot types.
 
 Portable observability state
 Mutex-free observability core usable without Zephyr dependencies.
 

Data Structures

struct  nrf_edgeai_obsv_ctx
 Zephyr RTOS synchronization for one observability context. More...
 

Typedefs

typedef struct nrf_edgeai_obsv_ctx nrf_edgeai_obsv_ctx_t
 Zephyr RTOS synchronization for one observability context.
 

Functions

int nrf_edgeai_obsv_init (nrf_edgeai_obsv_ctx_t *ctx, const nrf_edgeai_obsv_model_info_t *model)
 Initialize an observability context.
 
int nrf_edgeai_obsv_register (nrf_edgeai_obsv_ctx_t *ctx, nrf_edgeai_obsv_metric_t *metric, const void *cfg)
 Register a metric with the context.
 
int nrf_edgeai_obsv_deregister (nrf_edgeai_obsv_ctx_t *ctx, nrf_edgeai_obsv_metric_t *metric)
 Deregister a previously registered metric.
 
int nrf_edgeai_obsv_reset (nrf_edgeai_obsv_ctx_t *ctx)
 Reset inference counters and all registered metrics.
 
int nrf_edgeai_obsv_update_probs (nrf_edgeai_obsv_ctx_t *ctx, const float *probs)
 Feed one inference result to all registered metrics.
 
int nrf_edgeai_obsv_update_features (nrf_edgeai_obsv_ctx_t *ctx, const float *feats, uint16_t n)
 Feed one extracted-feature vector to all FEATURES-source metrics.
 
int nrf_edgeai_obsv_for_each_metric (nrf_edgeai_obsv_ctx_t *ctx, nrf_edgeai_obsv_metric_cb_t cb, void *user)
 Iterate over all registered metrics under the context lock.
 
size_t nrf_edgeai_obsv_encode (nrf_edgeai_obsv_ctx_t *ctx, uint8_t *buf, size_t max_len)
 Encode all metrics as a CBOR blob under the context lock.
 
size_t nrf_edgeai_obsv_encode_list (nrf_edgeai_obsv_ctx_t *const *ctxs, uint8_t n, uint8_t *buf, size_t max_len)
 Encode multiple contexts as a CBOR list (obsv-list format).
 

Detailed Description

Mutex-protected context, portable state, metrics, and optional CBOR encoding.