This is the repository of the ODX to MDD Converter! This tool transforms packed ODX files (.pdx) into a custom format called "Marvelous Diagnostic Description" (MDD).
OpenSOVDs Classic Diagnostic Adapter (CDA) solution is designed for embedded systems, and needs manageable file sizes with simple processing. Enter the MDD format, developed to tackle these challenges.
PDX files are essentially compressed archives of multiple ODX files, which follow the ISO-22091 standard in the automotive industry for exchanging diagnostic descriptions of electronic control units (ECUs). These XML-based files can be quite large, often reaching hundreds of megabytes, making their use impractical due to their size and processing complexity. This is also why many diagnostic testers opt for proprietary formats.
Compression sizes vary, but here are some typical values:
| ODX | PDX | MDD |
|---|---|---|
| 66MB | 3.6MB | 300k |
| 154MB | 7.5MB | 653k |
| 42MB | 2.7MB | 202k |
- This software is in early development, the output format may change in incompatible ways, until the first release (1.0.0)
- Due to copyright, we can't provide the required odx-schema at the moment. You'll have to provide it yourself.
Please read the schema NOTICE.
java -jar converter/build/libs/converter-all.jar --helpOutput:
Usage: converter [<options>] [<pdx-files>]...
Options:
-O, --output-directory=<path> output directory for files (default: same as pdx-file)
-L, --lenient
--include-job-files Include job files & libraries referenced in single ecu jobs
--partial-job-files=<text>... Include job files partially, and spread the contents as individual chunks. Argument can be repeated, and are in the format: <regex for job-file-name pattern> <regex for content file-name pattern>.
-h, --help Show this message and exit
Arguments:
<pdx-files> pdx files to convert
Prerequisites:
- Installed JDK 21 β we recommend Eclipse Temurin Java JDK 21
Provide ODX schema: Place the files odx_2_2_0.xsd and odx-xhtml.xsd in converter/src/main/resources/schema/
Execute Gradle:
./gradlew clean build shadowJarThis will create converter/build/libs/converter-all.jar, which can be run using the java executable.
Example:
java -jar converter/build/libs/converter-all.jar ECU.pdx GATEWAY.pdx This will convert the given pdx files into mdd.
The MDD format is defined using two protobuf files, ensuring compatibility across various programming languages.
- Container Format: Defined in file_format.proto, it includes metadata like versioning and a collection of chunks. Each chunk is a byte stream with chunk-specific metadata, including optional encryption, signatures, compression algorithms, and vendor-specific metadata in a key-value map.
- Diagnostic Description Format: Derived from the ODX-schema, and defined in data_format.proto, it efficiently represents the ODX structures in a binary format, with simplifications and minor omissions to minimize size and maximize usability.
- Data types (e.g., END-OF-PDU, LEADING-LENGTH-FIELD, STRUCTURE, MUX, DTC, etc.) are combined into a single message with a type and fields for the different data types, and composition is used instead of inheritance.
- No support for cross-file references outside the pdx and runtime resolution
- Most data is referenced via integer identifiers, the original text identifiers are discarded
The converter is built in Kotlin, chosen for its mature XML tooling through the Java ecosystem. Kotlin's features like garbage collection, object generation through XML schema, extension functions and extended streams api enabled efficient development. Plus, it's a favorite of the author!
See CONTRIBUTORS