{"id":41928092,"url":"https://github.com/eclipse-opensovd/classic-diagnostic-adapter","last_synced_at":"2026-01-25T17:34:00.317Z","repository":{"id":307302353,"uuid":"1025564384","full_name":"eclipse-opensovd/classic-diagnostic-adapter","owner":"eclipse-opensovd","description":"🚗 Classic Diagnostic Adapter 🏥","archived":false,"fork":false,"pushed_at":"2026-01-20T14:33:15.000Z","size":1320,"stargazers_count":19,"open_issues_count":31,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-20T16:27:16.209Z","etag":null,"topics":["automotive","classic-diagnostic-adapter","doip","sovd","uds"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-opensovd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-24T12:54:38.000Z","updated_at":"2026-01-20T12:12:30.000Z","dependencies_parsed_at":"2025-07-30T15:59:19.939Z","dependency_job_id":"f27648b7-cbca-4d0a-bc34-91315d1fdf46","html_url":"https://github.com/eclipse-opensovd/classic-diagnostic-adapter","commit_stats":null,"previous_names":["eclipse-opensovd/classic-diagnostic-adapter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-opensovd/classic-diagnostic-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-opensovd%2Fclassic-diagnostic-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-opensovd%2Fclassic-diagnostic-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-opensovd%2Fclassic-diagnostic-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-opensovd%2Fclassic-diagnostic-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-opensovd","download_url":"https://codeload.github.com/eclipse-opensovd/classic-diagnostic-adapter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-opensovd%2Fclassic-diagnostic-adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automotive","classic-diagnostic-adapter","doip","sovd","uds"],"created_at":"2026-01-25T17:33:59.776Z","updated_at":"2026-01-25T17:34:00.310Z","avatar_url":"https://github.com/eclipse-opensovd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚗 Classic Diagnostic Adapter 🏥\n\nThis repository will contain the Classic Diagnostic Adapter of the Eclipse OpenSOVD project and its documentation.\n\nIn the SOVD (Service-Oriented Vehicle Diagnostics) context, a Classic Diagnostic Adapter serves as a\ncompatibility bridge between traditional (legacy) diagnostic interfaces and the modern SOVD-based\ndiagnostic architecture used in next-generation vehicles.\n\nIt facilitates the communication to the actual ECUs, by translating the SOVD calls with the\ndiagnostic description of the ECU to its UDS via DoIP counterpart.\n\nIt handles the communication to the ECUs, by using the communication parameters from the diagnostic description.\n\n## goals\n\n- 🚀 high performance (asynchronous I/O)\n- 🤏 low memory and disk-space consumption\n- 🛡️ safe \u0026 secure\n- ⚡ fast startup\n- 🧩 modularity / reusability\n\n## introduction\n\n### usage\n\n### prerequisites\n\nTo run the CDA you will need at least one `MDD` file. Check out [eclipse-opensovd/odx-converter](https://github.com/eclipse-opensovd/odx-converter) on how to get started with creating `MDD`(s) from ODX.\n\nOnce you have the `MDD`(s) you can update the config in `opensovd-cda.toml` to point `databases_path` to the directory containing the files. Alternatively you can pass the config via arg `--databases-path MY_PATH`.\n\n### running\n\nEnsure that the config (`opensovd-cda.toml`) fits your setup:\n - tester_address is set to the IP of your DoIP interface.\n - databases_path points to a valid path containing one or more `.mdd` files.\n\nRun the cda via `cargo run --release` or after building from the target directory `./opensovd-cda`\n\nTo see the available command line options run `./opensovd-cda -h`\n\n## building\n\n### prerequisites\n\nYou need to install a rust compiler \u0026 sdk - we recommend using [rustup](https://rustup.rs/) for this.\nThe minimum required version of the toolchain is [Rust 1.88.0](https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/).\n\n### build the executable\n\n```shell\ncargo build --release\n```\n\n## developing\n\n### codestyle\n\nsee [codestyle](CODESTYLE.md)\n\n### testing\n\n#### unit tests\n\nUnittests are placed in the relevant module as usual in rust:\n```rust\n...\n#[cfg(test)]\nmod test {\n    ...\n}\n```\n\nRun unit tests with:\n```shell\ncargo test --locked --lib\n```\n\n#### integration tests\n\nIntegration tests are located in the `integration-tests/` directory and test the complete CDA system end-to-end, including:\n- SOVD API endpoints\n- ECU communication via DoIP\n- Session management and locking\n\n\nThe integration test framework automatically manages the test environment by:\n1. Starting an ECU simulator\n2. Starting the CDA with appropriate configuration\n3. Running tests against the running system\n4. Cleaning up resources after tests complete\n\n##### running integration tests\n\n**Using Docker (Recommended):**\n\nDocker mode spins up the ECU simulator and CDA in isolated containers:\n\n```shell\ncargo test --locked --features integration-tests\n```\n\n**Without Docker (For Development/Debugging):**\n\nRunning locally allows easier debugging but requires manual setup:\n\n```shell\n# Set environment variable to disable Docker\nexport CDA_INTEGRATION_TEST_USE_DOCKER=false\n\n# Optional set an IP address to bind the tester interface to\n# export CDA_INTEGRATION_TEST_TESTER_ADDRESS=\n\n# Run the tests\ncargo test --locked --features integration-tests\n```\n\nWhen running without Docker, the ECU simulator and CDA will run as local processes with default ports (20002 for CDA, 13400 for DoIP gateway, 8181 for ECU sim control).\nFurthermore the local setup does _not_ automatically build the MDD files from ODX data, so ensure that the required MDD files are already present.\n\n##### environment variables\n\nThe integration test framework supports the following environment variables:\n\n- **`CDA_INTEGRATION_TEST_USE_DOCKER`** (default: `true`)\n  Controls whether to use Docker Compose or run services locally.\n  - `true`: Uses Docker Compose to run CDA and ECU simulator in containers\n  - `false`: Runs services as local processes (useful for debugging)\n\n  Example:\n  ```shell\n  export CDA_INTEGRATION_TEST_USE_DOCKER=false\n  ```\n\n- **`CDA_INTEGRATION_TEST_TESTER_ADDRESS`** (default: `0.0.0.0`)\n  Override the tester address used by the CDA when running without Docker.\n  Some systems may require using a specific interface address (e.g., `127.0.0.1` or a specific network interface IP) for proper ECU simulator connectivity.\n\n  Example:\n  ```shell\n  export CDA_INTEGRATION_TEST_TESTER_ADDRESS=127.0.0.1\n  ```\n\n##### test structure\n\nTests use a shared runtime to avoid repeatedly starting/stopping the CDA and ECU simulator:\n- Tests can request exclusive or shared access to the test runtime\n- Exclusive tests hold a mutex lock to prevent concurrent execution\n- The test framework automatically finds available ports when using Docker\n- Test resources (Docker containers, processes) are automatically cleaned up on exit\n\nExample test:\n```rust\n#[tokio::test]\nasync fn test_ecu_session_switching() {\n    // Request exclusive access to prevent concurrent modifications\n    let (runtime, _lock) = setup_integration_test(true).await.unwrap();\n\n    // runtime.config contains CDA configuration\n    // runtime.ecu_sim contains ECU simulator connection info\n\n    // ... perform test operations ...\n}\n```\n\n### generate module dependency graph for workspace\nWith the help of [cargo-depgraph](https://github.com/jplatte/cargo-depgraph) a simple diagram showing\nthe relations between the workspace crates can be generated. To create a png from the output of\ncargo-depgraph, [Graphviz](https://graphviz.org/) is required.\n\n```shell\ncargo depgraph --target-deps --dedup-transitive-deps --workspace-only | dot -Tpng \u003e depgraph.png\n```\n\n### build with tokio-tracing for tokio-console\nTo analyze the runtime during execution you can build and run the cda with\n[tokio-console](https://github.com/tokio-rs/console) support.\n\n#### install tokio-console\n```shell\ncargo install --locked tokio-console\n```\n\nYou need to enable tokio-experimental in the rustflags.\n```shell\nRUSTFLAGS=\"--cfg tokio_unstable\" cargo run --release --features tokio-tracing\n```\n\nIf you don't want to specify the env all the time, you can add this to your `.cargo/config.toml`\n```toml\n[build]\nrustflags = [\"--cfg\", \"tokio_unstable\"]\n```\n\nIn a second terminal window start `tokio-console` and it should automatically connect.\n\n\n\n### architecture\n\nsee [overview](docs/architecture/index.adoc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-opensovd%2Fclassic-diagnostic-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-opensovd%2Fclassic-diagnostic-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-opensovd%2Fclassic-diagnostic-adapter/lists"}