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

◆ nrf_edgeai_obsv_register()

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.

Parameters
ctxInitialized context.
metricMetric descriptor to register.
cfgImplementation-specific configuration passed to metric->init. May be NULL for metrics that accept default configuration.
Return values
0Success; metric->init(cfg) was called and the metric was appended.
-EINVALctx or metric is NULL, or metric->snapshot is NULL.
-EALREADYmetric was already registered (init not called again).