uwb_rxdiag.c
Diagnostic RX/TX event tallies + ranging heartbeat.
Overview
Diagnostic RX/TX event tallies + ranging heartbeat.
depends on ccc_shim.h uwb_rxdiag.h woz_alloc.h woz_diag.h fira_session.h
API
Fstatic void cad_mark(void)
Bin one RX detection's phase within the 192 ms block grid.
shim_rxerr, shim_rxokFstatic void rxdiag_ev_log(const char *cls, const dwt_cb_data_t *d)
Log one RX event's frame structure until the budget is spent.
shim_rxerr, shim_rxok, shim_rxtoFstatic void shim_rxok(const dwt_cb_data_t *d)
RX-good callback shim: log RX diagnostics, invoke the armed CCC callback, then decode the Pre-POLL frame off the critical path.
d- DW3000 RX callback data (may be NULL on POLL event).
cad_mark, rxdiag_ev_logFstatic void shim_rxto(const dwt_cb_data_t *d)
RX-timeout shim: tally, then run the blob's handler.
rxdiag_ev_logFstatic void shim_rxerr(const dwt_cb_data_t *d)
RX-error shim: tally + latch status (STS/CIA bits), then chain.
cad_mark, rxdiag_ev_logFstatic void shim_txdone(const dwt_cb_data_t *d)
TX-done shim: tally, then run the blob's handler.
Fvoid __wrap_dwt_setcallbacks(dwt_callbacks_s *callbacks)
Intercept the callback registration and insert counting shims.
Fint32_t __wrap_dwt_configure(dwt_config_t *config)
Log every full PHY configuration the blob issues.
Fvoid __wrap_dwt_configurestsmode(uint8_t stsMode)
Log every STS-mode (CP_SPC) write the blob issues, then pass through.
Fstatic void rxdiag_log(struct k_work *work)
Periodic ranging heartbeat (every 2 s); re-arms itself while streaming.
Fvoid uwb_rxdiag_get_counts(uint32_t *rxok, uint32_t *rxerr, uint32_t *rxto, uint32_t *txdone, uint32_t *last_err, uint32_t *last_ok)
Snapshot the running RX/TX event tallies; out-params optional (NULL to skip).
Fvoid uwb_rxdiag_stream_set(bool on)
Arm or cancel the periodic ranging heartbeat (backs aliro log on|off).
Fbool uwb_rxdiag_stream_get(void)
Whether the periodic ranging heartbeat is currently armed.
Fvoid uwb_rxdiag_rng_set(bool on)
Arm or cancel the per-block distance stream (backs aliro frames on|off).
Fbool uwb_rxdiag_rng_get(void)
Whether the per-block distance stream is currently armed.
Fstatic int rxdiag_init(void)
Arm the periodic heartbeat at application init.