tools/aliro_lab.py
asxeem/openaliro
Module

aliro_lab.py

Aliro Lab: score a captured reader serial log.

tools/aliro_lab.py6 documented symbols

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)

tools/aliro_lab.py:74

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".

called by render_html, render_terminal

Cclass Transaction

tools/aliro_lab.py:109

One walk-up: the events between a session.start and its session.end.

called by split_transactions

FTransaction.t0(self)

tools/aliro_lab.py:150

Walk-up zero: the connect stamp, else the session.start line.

called by Transaction.offset_ms, render_approach_svg, render_html, render_terminal, run_checks  ·  calls Transaction.first

Fsplit_transactions(events)

tools/aliro_lab.py:179

Group by session boundaries in LINE order (the ph.* dump lines carry historical timestamps, so t order can't delimit walk-ups).

called by main  ·  calls Transaction, Transaction.finish

Frun_checks(txn)

tools/aliro_lab.py:200

Invariant checks; each returns (id, class, status, detail) with class the worst it can score (fail/warn) and status pass/warn/fail/n-a.

called by main  ·  calls Transaction.has, Transaction.last_phase, Transaction.named, Transaction.offset_ms, Transaction.t0, add

Frender_approach_svg(txn)

tools/aliro_lab.py:486

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.

called by render_html  ·  calls Transaction.named, Transaction.t0, sx, sy
Undocumented (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