![]() |
Edge AI Add-on API 2.2.0
|
| int nrf_edgeai_obsv_register | ( | nrf_edgeai_obsv_ctx_t * | ctx, |
| nrf_edgeai_obsv_metric_t * | metric, | ||
| const void * | cfg ) |
#include <include/nrf_edgeai_obsv/nrf_edgeai_obsv.h>
Register a metric with the context.
Calls metric->init(cfg) and appends metric to the context's list. Returns -EALREADY without calling init if metric is already registered.
| ctx | Initialized context. |
| metric | Metric descriptor to register. |
| cfg | Implementation-specific configuration passed to metric->init. May be NULL for metrics that accept default configuration. |
| 0 | Success; metric->init(cfg) was called and the metric was appended. |
| -EINVAL | ctx or metric is NULL, or metric->snapshot is NULL. |
| -EALREADY | metric was already registered (init not called again). |