![]() |
Edge AI Add-on API 2.2.0
|
| int nrf_edgeai_obsv_memfault_collect | ( | void | ) |
#include <include/nrf_edgeai_obsv/nrf_edgeai_obsv_memfault.h>
Encodes observability metrics as CBOR and stages them for Memfault.
Overwrites any previously staged payload. The CBOR blob is stored internally and handed out by the registered CDR source on the next transport drain cycle.
ctx->lock) while encoding. NRF_EDGEAI_OBSV_ENCODE_LIST_BUFSZ-byte buffer on the calling thread's stack. When invoked from the system workqueue (e.g. via CONFIG_NRF_EDGEAI_OBSV_MEMFAULT_AUTO_COLLECT), increase CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE accordingly.| 0 | Success; payload staged and ready for the next drain cycle. |
| -EINVAL | Not initialized (no context registered). |
| -ENODATA | CBOR encoding failed. |