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

◆ snapshot

void(* nrf_edgeai_obsv_metric_s::snapshot) (nrf_edgeai_obsv_metric_snapshot_t *out, void *priv)

Populates a read-only view over the metric's counters.

Implementations set every field of out and point out->counts directly at the live counter array inside priv. The pointer remains valid as long as priv is live (i.e. the metric instance exists). Callers must ensure update() cannot run concurrently while the snapshot is being read (e.g. hold the context lock for the duration of for_each_metric() or encode()).

Parameters
outOutput snapshot to populate.
privOpaque per-instance storage pointer.