![]() |
Edge AI Add-on API 2.2.0
|
| 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.
| p_ctx | Initialized core. |
| p_metric | Metric descriptor to register. |
| p_cfg | Implementation-specific configuration forwarded to p_metric->init. May be NULL for default configuration. |
| 0 | Success; p_metric->init(p_cfg) was called and the metric was appended. |
| -EINVAL | p_ctx or p_metric is NULL, or p_metric->snapshot is NULL. |
| -EALREADY | p_metric was already registered (init not called again). |