14#ifndef NRF_EDGEAI_OBSV_H
15#define NRF_EDGEAI_OBSV_H
20#include <zephyr/kernel.h>
160 uint8_t *buf,
size_t max_len);
bool(* nrf_edgeai_obsv_metric_cb_t)(const nrf_edgeai_obsv_metric_snapshot_t *snap, void *user)
Callback invoked once per registered metric by nrf_edgeai_obsv_core_for_each_metric().
Definition nrf_edgeai_obsv_core.h:71
int nrf_edgeai_obsv_deregister(nrf_edgeai_obsv_ctx_t *ctx, nrf_edgeai_obsv_metric_t *metric)
Deregister a previously registered metric.
int nrf_edgeai_obsv_init(nrf_edgeai_obsv_ctx_t *ctx, const nrf_edgeai_obsv_model_info_t *model)
Initialize an observability context.
int nrf_edgeai_obsv_for_each_metric(nrf_edgeai_obsv_ctx_t *ctx, nrf_edgeai_obsv_metric_cb_t cb, void *user)
Iterate over all registered metrics under the context lock.
struct nrf_edgeai_obsv_ctx nrf_edgeai_obsv_ctx_t
Zephyr RTOS synchronization for one observability context.
int nrf_edgeai_obsv_update_features(nrf_edgeai_obsv_ctx_t *ctx, const float *feats, uint16_t n)
Feed one extracted-feature vector to all FEATURES-source metrics.
int nrf_edgeai_obsv_register(nrf_edgeai_obsv_ctx_t *ctx, nrf_edgeai_obsv_metric_t *metric, const void *cfg)
Register a metric with the context.
size_t nrf_edgeai_obsv_encode_list(nrf_edgeai_obsv_ctx_t *const *ctxs, uint8_t n, uint8_t *buf, size_t max_len)
Encode multiple contexts as a CBOR list (obsv-list format).
int nrf_edgeai_obsv_update_probs(nrf_edgeai_obsv_ctx_t *ctx, const float *probs)
Feed one inference result to all registered metrics.
int nrf_edgeai_obsv_reset(nrf_edgeai_obsv_ctx_t *ctx)
Reset inference counters and all registered metrics.
size_t nrf_edgeai_obsv_encode(nrf_edgeai_obsv_ctx_t *ctx, uint8_t *buf, size_t max_len)
Encode all metrics as a CBOR blob under the context lock.
Portable observability core (no RTOS).
Definition nrf_edgeai_obsv_core.h:51
struct k_mutex lock
Serializes observability API for this context.
Definition nrf_edgeai_obsv.h:38
nrf_edgeai_obsv_core_t state
Portable observability state (shared with encode/snapshot paths).
Definition nrf_edgeai_obsv.h:40
Zephyr RTOS synchronization for one observability context.
Definition nrf_edgeai_obsv.h:36
Observability metric operation table and list node.
Definition nrf_edgeai_obsv_metrics.h:87
Static model metadata included in observability snapshots.
Definition nrf_edgeai_obsv_core.h:31