Expand description
The embedded demo project: a realistic two-ECU powertrain description and the CAN database that binds it.
These are the fixtures the crate’s own tests, doctests, and the
calibrate example run against. They are embedded (include_str!) so
every downstream user gets a working example without a data directory,
and they are deliberately realistic: vendor IF_DATA, AXIS_DESCR,
and COMPU_TAB blocks the A2L parser must skip, every conversion type,
and limits on every adjustable.
§COMPU_TAB points are registered, not parsed
The A2L text carries its COMPU_TAB/COMPU_VTAB blocks for fidelity,
but a2l_parse skips them (they are unknown sub-blocks of
COMPU_METHOD). tables holds the same points as data;
sample_project registers them so the TABLE conversions resolve.
§Element counts are declared
a2l_parse does not retain the ASAP2 NUMBER/NO_AXIS_PTS keywords, so
element_counts carries them for
CalibrationProject::declare_elements
— again, a declaration rather than a guess.
Constants§
- SAMPLE_
A2L - A realistic two-ECU A2L description: 15 characteristics (including a
CURVE, twoMAPs, aVAL_BLK, and anASCIIidentifier), 5 measurements, and COMPU_METHODs covering every conversion type (LINEAR,RAT_FUNCin both its reducible and quadratic forms,TABLEin both interpolated and stepped form, andIDENTITY). - SAMPLE_
DBC - The CAN database that binds
SAMPLE_A2L’s characteristics to message signals — Intel and Motorola layouts,UWORD/UBYTEwidths.
Functions§
- element_
counts - The element counts of the sample project’s multi-element
characteristics — the
NUMBER/NO_AXIS_PTSdeclarations thata2l_parsedoes not retain. - sample_
project - Build the demo project:
SAMPLE_A2Lparsed, its tables registered, and its element counts declared. - seed_
memory - The ECU memory the demo project starts from:
(address, bytes)seeds, one per address the tests and example read before their first write. - tables
- The
COMPU_TABpoints ofSAMPLE_A2L, as(name, points)pairs.