aliro_lat.c
Walk-up latency trace: first-hit phase timestamps + the consolidated budget line.
Overview
Walk-up latency trace: first-hit phase timestamps + the consolidated budget line.
depends on aliro_lab.h aliro_lat.h woz_log.h woz_port.h
API
Fvoid aliro_lat_begin(void)
Initialize latency tracking and record the BLE connection epoch; reset all phase timestamps to zero and clear the lab-dump flag if CONFIG_WOZ_ALIRO_LAB is enabled.
Fint aliro_lat_mark(enum aliro_lat_phase phase)
Record the current uptime for a given Aliro protocol phase if not yet marked; return 1 if newly recorded, 0 if already marked or phase index is out of range.
Fvoid aliro_lat_report(void)
Print a one-line latency summary to stdout showing each Aliro phase as milliseconds offset from BLE connect, or "-" if the phase was never reached; also emit any flight-recorder lab traces if enabled.
aliro_lab_dumpFvoid aliro_lab_set_enabled(bool on)
Enable or disable Aliro latency lab tracing (CONFIG_WOZ_ALIRO_LAB flight-recorder output).
Fbool aliro_lab_enabled(void)
Return true if Aliro latency lab tracing (CONFIG_WOZ_ALIRO_LAB) is enabled; false otherwise.
Fvoid aliro_lab_ev(const char *ev)
Log a timestamped flight-recorder event with description ev to stdout if lab tracing is enabled; no-op if disabled.
Fvoid aliro_lab_evi(const char *ev, const char *key, long val)
Log a timestamped flight-recorder event with description ev and one key=value pair to stdout if lab tracing is enabled; no-op if disabled.
Fvoid aliro_lab_evi2(const char *ev, const char *k1, long v1, const char *k2, long v2)
Log a timestamped flight-recorder event with description ev and two key=value pairs to stdout if lab tracing is enabled; no-op if disabled.
Fvoid aliro_lab_dump(void)
Emit flight-recorder lab traces for every recorded Aliro latency phase to stdout in [ALAB] format if lab tracing is enabled and has not yet been dumped.
aliro_lat_report