aliro_lab.py
Aliro Lab: score a captured reader serial log.
Overview
Aliro Lab: score a captured reader serial log.
Usage: python3 tools/aliro_lab.py <capture.log> [report.html]
Parses the structured "[ALAB] t=<us> ev=..." trace lines the firmware emits when CONFIG_WOZ_ALIRO_LAB is enabled (see modules/woz_aliro/src/aliro_lab.h), groups them into walk-up transactions, and reports phase timings, the flow taken (fast vs standard), and pass/warn/fail invariant checks — to the terminal and as a self-contained HTML report (default: <capture.log>.html).
Every check encodes an invariant of this repo's reader implementation (see internal notes in the check text), nothing else. Exit status: 0 = no failing check, 1 = at least one FAIL, 2 = usage/input error.
used by aliro_gait.py
API
Fsdu_label(ev)
Human name for an rtx/rrx event, e.g. "rtx M1".
Captures from firmware before the id-based latency stamping carry no
proto, and there the id alone is ambiguous; those render as "rrx id=1".
render_html, render_terminalCclass Transaction
One walk-up: the events between a session.start and its session.end.
split_transactionsFTransaction.t0(self)
Walk-up zero: the connect stamp, else the session.start line.
Transaction.offset_ms, render_approach_svg, render_html, render_terminal, run_checks · calls Transaction.firstFsplit_transactions(events)
Group by session boundaries in LINE order (the ph.* dump lines carry historical timestamps, so t order can't delimit walk-ups).
main · calls Transaction, Transaction.finishFrun_checks(txn)
Invariant checks; each returns (id, class, status, detail) with class the worst it can score (fail/warn) and status pass/warn/fail/n-a.
main · calls Transaction.has, Transaction.last_phase, Transaction.named, Transaction.offset_ms, Transaction.t0, addFrender_approach_svg(txn)
Distance-over-time chart of the approach: one dot per trusted range, dashed markers at grant/bolt/relock. Inline SVG, themed via the CSS vars.
render_html · calls Transaction.named, Transaction.t0, sx, syUndocumented (19)
Event, Event.__init__, Transaction.__init__, Transaction.finish, Transaction.has, Transaction.first, Transaction.named, Transaction.offset_ms, Transaction.last_phase, parse_events, add, worst_status, fmt_ms, render_terminal, paint, sx, sy, render_html, main