Python parser engine for EB Tresos XDM (XML Data Model) files used in AUTOSAR automotive software development. Extracts configuration data from proprietary XML formats and exports to Excel for analysis and reporting.
- 50+ Module Support: Covers core AUTOSAR modules including OS, RTE, NvM, EcuC, and communication stacks
- Unified CLI: Single
eb-convertcommand with auto-detection of module types - Batch Processing: Convert multiple XDM files in one operation
- Standards Compliant: ISO/IEC/IEEE 29119 compliant testing and requirements traceability
- Enterprise Ready: Comprehensive documentation, requirements traceability, and integration testing
pip install py_eb_model# Convert a single file
eb-convert Os.xdm output/
# Convert multiple files
eb-convert Os.xdm NvM.xdm Rte.xdm output/
# With verbose logging
eb-convert --verbose Os.xdm output/
# With file logging
eb-convert --log conversion.log Os.xdm output/The CLI automatically detects module type from the XDM file's MODULE-CONFIGURATION tag. No need to specify module names - they're extracted from the file itself.
For each input file, an Excel file is generated in the output directory:
Os.xdm→output/Os.xlsxNvM.xdm→output/NvM.xlsxRte.xdm→output/Rte.xlsx- etc.
- Os: Operating System configuration (tasks, ISRs, resources, schedule tables, counters)
- Rte: Runtime Environment configuration (entities, events, data mappings)
- NvM: Non-Volatile Memory manager (block descriptors, datasets)
- EcuC: ECU Configuration (partitions, core definitions)
- BswM: Basic Software Mode manager
- Tm: Trigger Manager
- PbcfgM: Port Configuration Manager
- EcuM: ECU State Manager
- Det: Development Error Tracer
- CAN Stack: CanIf, CanNm, CanSM, CanTp
- LIN Stack: LinIf, LinSM, LinTp
- FlexRay Stack: FrIf, FrNm, FrSM, FrTp, FrArTp
- Ethernet Stack: EthIf, EthSM, TcpIp, SoAd, UdpNm, DoIP, SomeIpTp
- Com: Communication layer
- ComM: Communication Manager
- PduR: PDU Router
- IpduM: IPDU Manager
- LdCom: Low-Level COM
- Nm: Network Management
- Crc: Cyclic Redundancy Check
- MemIf: Memory Abstraction Interface
- Fee: Flash EEPROM Emulation
- Ea: EEPROM Abstraction
- MemMap: Memory Mapping
- MemAcc: Memory Access
- Crypto: Cryptographic services
- CryIf: Crypto Interface
- Csm: Cryptographic Service Manager
- SecOC: Secure Onboard Communication
- FiM: Function Inhibition Manager
- Dcm: Diagnostic Communication Manager
- Dem: Diagnostic Event Manager
- Dlt: Diagnostic Log and Trace
- J1939Dcm: J1939 Diagnostic Communication Manager
- J1939Nm: J1939 Network Management
- J1939Rm: J1939 Route Manager
- J1939Tp: J1939 Transport Protocol
# Build distribution
python -m build
# Verify distribution
twine check dist/*
# Upload to PyPI
twine upload dist/*# Run all tests
pytest
# Run with coverage
pytest --cov=src/eb_model --cov-report=term-missing
# Run only unit tests
pytest -m "not integration"
# Run only integration tests
pytest -m integration# Using ruff
ruff check .
# Using flake8
flake8 . --max-line-length=150 --ignore=F401,W293,F403eb-convert <input.xdm> [<input2.xdm> ...] <output_dir/> [options]Options:
-v, --verbose: Enable verbose (DEBUG) logging--log LOG: Log file path for file-based logging--skip-os-task: Skip generating Os task (OS module only)
The following legacy commands are still available but deprecated:
os-xdm-xlsx,rte-xdm-xlsx,nvm-xdm-xlsx,ecuc-xdm-xlsx(core modules)bswm-xdm-xlsx,tm-xdm-xlsx,pbcfgm-xdm-xlsx,ecum-xdm-xlsx,det-xdm-xlsx(system)- 52+ additional module-specific commands
Please migrate to eb-convert for new usage.
Reads EB preference XDM and generates ARXML file lists or AUTOSAR builder projects.
pref-system-importer [options] INPUTS [INPUTS ...] OUTPUTKey Options:
--base-path BASE_PATH: Base path for EB tresos project--file-list: Generate ARXML file list (default)--ab-project: Generate AUTOSAR builder project--project PROJECT: Project name for AUTOSAR builder project--env ENV [ENV ...]: Specify environment variables
Example:
# Generate ARXML file list
pref-system-importer --base-path /path/to/project .prefs/pref_imp_exp_Imp_System.xdm output.lst
# Generate AUTOSAR builder project
pref-system-importer --base-path /path/to/project --ab-project --project MyProject .prefs/pref_system.xdm .project- CLAUDE.md: Development guide for contributors
- docs/usage/cli.md: Detailed CLI usage documentation
- docs/requirements/: Software requirements organized by stack (273 requirements)
- docs/tests/: ISO/IEC/IEEE 29119 compliant test documentation (765 test cases)
- docs/tests/requirements-traceability-matrix.md: Complete requirements-to-tests traceability
Maintenance Release - Redundancy Removal and Bug Fixes
-
Model Simplification
- Removed redundant version fields from
PublishedInformation(OS and EcuC modules), as these fields are already defined inCommonPublishedInformation - Added
PbcfgMSupportflag toPublishedInformationmodel - Added
getTargetRef()/setTargetRef()convenience methods toEcucPartitionSoftwareComponentInstanceRef
- Removed redundant version fields from
-
Parser Fixes
- Changed
OsEventMaskparsing fromread_valuetoread_optional_valueto handle optional fields correctly - Temporarily disabled non-functional parser methods (
OsSpinlock,OsOS,OsHooks) to prevent confusion during export - Fixed
Os.publishedInformationtype fromPublishedInformationtoCommonPublishedInformation
- Changed
-
Reporter Fixes
- Removed
skip_os_taskguard — OS tasks are now always written regardless of the skip option
- Removed
-
CI Improvements
- PyPI publish workflow updated with OIDC authentication
- Comprehensive Python
.gitignoreadded
Major Release - Complete XDM Model Coverage
-
CLI Refactoring
- Unified
eb-convertcommand replacing 52+ module-specific CLI commands - Auto-detection of module types from XDM files
- Batch processing support for multiple files
- Enhanced logging with file and console output
- Unified
-
Module Expansion
- Added J1939 stack: J1939Dcm, J1939Nm, J1939Rm, J1939Tp
- Added diagnostic stack: FiM, Dcm, Dem, Dlt
- Added crypto/security stack: Crypto, CryIf, Csm, SecOC
- Added memory stack: MemIf, Fee, Ea, MemMap, MemAcc, Crc
- Added communication stack: Com, LdCom, PduR, IpduM, Nm, ComM
- Added Ethernet and FlexRay communication stack modules
-
Testing Improvements
- Integration tests for XDM file parsing
- ISO/IEC/IEEE 29119 compliant test documentation
- Test reorganization following modern Python layout
- Expanded test coverage for new modules
-
Documentation
- Requirements traceability matrix linking code to SWR documents
- Comprehensive CLI usage documentation
- Enterprise-standard software requirements documentation
- Architecture design specifications
-
Code Quality
- Migration from setup.py to pyproject.toml
- Type annotations throughout codebase
- Linting tooling configuration (ruff, flake8)
- Code quality improvements and bug fixes
- Import hygiene improvements with explicit imports
-
Infrastructure
- Parser-writer registry with auto-discovery
- CLI options registry for module-specific arguments
- Modern Python project layout with src/ directory
- Enhanced error handling and logging
Version 1.2.3
- Implement OsApplication parser.
Version 1.2.2
- Fix TARGET of EcucPartitionSoftwareComponentInstanceRef is empty and skipped to added.
Version 1.2.1
- Read EcucPartition from EcuC.xdm
- Read EcucPartitionSoftwareComponentInstanceRef from EcuC.xdm
Version 1.2.0
- Fix AbstractEbModelParser::_convert_value error.
- Add structure for Ecuc.xdm and BswM.xdm.
Version 1.1.9
- Parse OsAppAlarmRef List of OsApplication
- Parse OsAppCounterRef List of OsApplication
- Parse OsAppScheduleTableRef Lis of OsApplication
- Add read_eb_origin_value method to read optional EB extended configuration
- Fix OsIsrPriority and OsIsrVector issue.
Version 1.1.8
- Support to read NvM configuration from EB tresos Xdm file
- Export NvM Configuration to excel file.
Version 1.1.7
- Solve case issue of read_optional_value enables attribute.
- Support to read IMPORT_INFO for OsResource.
- Add test cases for OsXdmParser.
Version 1.1.6
- Add OsResource support in Os Module:
- Os::getOsResourceList
- Os::addOsResource
- Read NvMBlockDescriptor List
Version 1.1.5
- Add new interfaces to support to get the instance by name:
- Rte::getRteBswModuleInstance
- Rte::getRteBswModuleInstance
Version 1.1.4
- Fix incorrect attribute of osTaskAutostart.
- Add isOsTaskAutostart method to get enabled flag of osTaskAutostart.
- Add flake8 change rules.
Version 1.1.3
- Support to read Isr Priority and Vector for R52+ core.
- Export Isr Priority and Vector to Excel.
- Read OsAppResourceRef, OsAppIsrRef from OsApplication.
Version 1.1.2
- Read OsAppTaskRef from OsApplication.
Version 1.1.1
- Add support to append SystemMod/EcuExtract.arxml into list automatically for PrefSystemImporter.
Version 1.0.3
- Generate System import file list based on EB preference Xdm.
- Add support to read OsTaskAutostart element.
- Add support to read OsTaskType element.
Version 1.0.2
- Fix setOsAlarmCallbackName bug
Version 1.0.1
- Change attribute to start with lowercase
- read_ref_value and read_optional_ref_value method returns EcucRefType.
- Read OsScheduleTable and export to excel
- Read OsCounter and export to excel
Version 0.8.0
- Create basic model for EB xdm. (Issue #1)
- Support to extract Os Tasks/Isrs from EB xdm and store them in excel files. (Issue #1)
MIT License - see LICENSE file for details