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

◆ nrf_edgeai_obsv_core_register()

int nrf_edgeai_obsv_core_register ( nrf_edgeai_obsv_core_t * p_ctx,
nrf_edgeai_obsv_metric_t * p_metric,
const void * p_cfg )

#include <include/nrf_edgeai_obsv/nrf_edgeai_obsv_core.h>

Register a metric with the core.

Calls p_metric->init(p_cfg) and appends p_metric to the tail of the metric list. Returns -EALREADY without calling init if p_metric is already in the list.

Parameters
p_ctxInitialized core.
p_metricMetric descriptor to register.
p_cfgImplementation-specific configuration forwarded to p_metric->init. May be NULL for default configuration.
Return values
0Success; p_metric->init(p_cfg) was called and the metric was appended.
-EINVALp_ctx or p_metric is NULL, or p_metric->snapshot is NULL.
-EALREADYp_metric was already registered (init not called again).