udsdoc
AUTOSAR DCM/CanTp/DEM ARXML → ISO 14229 (UDS) / 15765 / 22901-1 (ODX/PDX) specification documents.
udsdoc parses AUTOSAR diagnostic ARXML (DCM, CanTp, DEM, DoIP, COM, AP) and
renders a complete UDS specification in LaTeX / PDF / HTML / Markdown / RST,
plus ASAM ODX 2.2.0 / PDX (ISO 22901-1) for diagnostic tooling. Drive it from
the command line or a local browser UI — both run the same pipeline.
Renamed from
udsxml2texin v0.66.0. The old package,udsxml2texCLI,UDSXML2TEX_*env vars and pre-commit hook ids keep working as deprecated aliases until v1.0.
Install
pip install udsdoc # core (LaTeX / Markdown / RST)
pip install udsdoc[web] # browser UI (--serve) + inline SVG figures
pip install udsdoc[all] # everything
PDF output needs a LaTeX distribution with xelatex (TeX Live / MiKTeX).
The [all] extra pulls in every optional feature (browser UI, LLM analysis, ECU hardware testing, and more).
Command line
udsdoc dcm.arxml -o spec.tex # single ARXML → LaTeX
udsdoc dcm.arxml cantp.arxml --dem dem.arxml -o spec.tex # merge modules
udsdoc --repo /path/to/bsw-project -o spec.tex # auto-discover a BSW repo
udsdoc dcm.arxml --format html -o spec.html # other formats: html, md, rst, pdx
udsdoc dcm.arxml --pdf # compile to PDF
udsdoc dcm.arxml --lang en+ja -o spec.tex # stacked multi-language output
Python API:
from udsdoc import ArxmlParser, TexGenerator
spec = ArxmlParser().parse_multi(["dcm.arxml", "cantp.arxml"])
TexGenerator().generate(spec, "spec.tex")
Browser UI
pip install udsdoc[web]
udsdoc --serve # opens http://127.0.0.1:8765
A local server with four tabs in the sidebar:
- Generate — point it at a BSW repository folder (or load a built-in sample
bundle). The server scans every ARXML / C file, classifies the Dcm / CanTp /
Dem modules and auto-detects single- vs multi-ECU. Pick output language(s),
then Parse & Preview to inspect the spec and Generate & Download a
LaTeX ZIP (with
spec.pdfwhenxelatexis available) — or Export ODX / PDX for CANalyzer / CANoe. An optional Compliance Matrix CSV adds a requirements-compliance chapter. - Spec — parsed sessions, services, DIDs, RIDs and DTCs as browsable tables.
- Chat — ask questions about the loaded spec via an LLM (Anthropic / OpenAI-compatible / Ollama).
- About — version and build info.
CUI / HPC batch verification
The full pipeline — Compliance Matrix + arxml/c/h → consistency verification
→ pdf/pdx — also runs head-less from the command line (no browser), so it
fits a CI step or a supercomputer batch job. The semantic "does the concluded
OEM↔supplier dialogue match the implementation?" check that the browser UI
exposes as Verify all is available via --verify:
# Single ECU — deterministic, fully offline
udsdoc dcm.arxml cantp.arxml --dem dem.arxml \
--compliance-matrix matrix.csv --verify --format pdx -o out/spec
# Dual uC (Primary + Secondary, IPC forwarding) — per-ECU matrices in the config
udsdoc --system src/udsdoc/samples/system_dual_uc.yaml \
--verify --format pdx --system-output-dir out/
--verify runs a layered engine so real-project scale (10 docs × ~500
requirements) stays tractable instead of sending every row to an LLM:
- status triage — accepted/verified → match, rejected-but-implemented → deviation, others → out of scope (no LLM);
- numeric / session structural checks — BS/STmin/P2/P2*/S3 and session-membership compared against the parsed DcmDspSession / AccessTiming / CanTp config (no LLM);
- lexical fast-path — a hex id / UDS element absent from the parsed config (no LLM);
- LLM — only the prose-ambiguous residue, and only with
--verify-llm.
Each row is written to a machine-readable report (*_verify.json + .md).
Verdicts are de-duplicated and, with --verify-cache DIR, reused across runs.
| flag | effect |
|---|---|
--verify |
run verification, write the report (deterministic, offline) |
--verify-llm |
enable the LLM layer for the residue (uses the --llm-* flags / $UDSDOC_LLM_*) |
--verify-workers N |
parallel LLM workers (I/O-bound) |
--verify-cache DIR |
persistent cross-run verdict cache (biggest speed-up at scale) |
--verify-strict |
exit non-zero when any row deviates (CI / HPC gate) |
In multi-ECU mode each ECU is verified against its own parsed spec, so a
requirement that traces to a Secondary-only DID is checked on the Secondary —
not the Primary. pdx needs no LaTeX; pdf is produced only when xelatex is
available. Ready-to-run wrappers: examples/run_single_uc.sh
and examples/run_dual_uc.sh.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file udsdoc-0.83.4.tar.gz.
File metadata
- Download URL: udsdoc-0.83.4.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ac89b4ea83a69f398e920054519f275a1645dadec66546b50690be0bebe6373
|
|
| MD5 |
657135a63861a4411f6808a9157579ec
|
|
| BLAKE2b-256 |
0662527f45d3e2683ede0a7d1f1d82a62f304cbdbf341cf4f56ed145a0a30cad
|
File details
Details for the file udsdoc-0.83.4-py3-none-any.whl.
File metadata
- Download URL: udsdoc-0.83.4-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65c497e613941b0ee39dd8a170014e08a59ab4df8b33fd1676ac953155f42034
|
|
| MD5 |
8707f18d23aeb3191c83d2797616bc67
|
|
| BLAKE2b-256 |
6ea5cad997dd865e5850615633f8ed5bf457e3421897ec1b7d0a5548e1934713
|