![]() |
Edge AI Add-on API 2.2.0
|
Read-only view over one metric's accumulated counters. More...
#include <nrf_edgeai_obsv_metrics.h>
Data Fields | |
| uint32_t | metric_id |
| On-wire metric identifier. | |
| uint32_t | version |
| Metric payload version. | |
| uint16_t | num_rows |
| Number of rows in the counter matrix. | |
| uint16_t | num_cols |
| Number of columns in the counter matrix. | |
| const uint32_t * | counts |
Row-major counter matrix, num_rows x num_cols uint32s. | |
Read-only view over one metric's accumulated counters.
Produced by nrf_edgeai_obsv_metric_t::snapshot() and consumed by transport layers (e.g. the Memfault CDR glue) to encode counters into whatever wire format the transport chooses. counts points directly into the metric's priv storage and remains valid for the lifetime of the metric instance.
Counters are a row-major 2-D uint32_t matrix of num_rows x num_cols elements. Metrics with 1-D data set num_cols to 1.
Thread safety: snapshot() is not synchronized against concurrent nrf_edgeai_obsv_core_update_probs() calls. Callers must ensure update() does not overlap snapshot() (e.g. hold the context lock for the duration of for_each_metric() or encode()).