# nguyendinhtuan-dev/automotive_sil_testing_devops_automation architecture

> Architecture diagram of the GitHub repository nguyendinhtuan-dev/automotive_sil_testing_devops_automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation
- Repository: https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation

## Overview

This repository is a vECU SIL diagnostic validation platform: users run JSON-defined tests from the desktop or CLI, generate Tcl where needed, execute tests against a DoIP/UDS virtual ECU, and inspect and retain results. The graph also preserves the documented fault-injection, DTC, persistence, and closed-loop simulation capabilities. Source excerpts show the desktop orchestration and vECU implementation, but not the runner’s Tcl/socket internals or the Simulink bridge implementation; those links are therefore omitted or marked unverified.

Main entry points: [`apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs`](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs) (Tcl test runner), [`apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs`](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs) (Desktop dashboard), [`apps/vecu/src/memory.c`](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/memory.c) (vECU state and DTC memory), [`apps/vecu/src/doip_server.c`](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/doip_server.c) (DoIP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User Interfaces"]
  node_desktop["Desktop dashboard<br/>[MainViewModel.cs]"]
  node_cli["CLI runner<br/>[Program.cs]"]
end

subgraph group_runner["Test Execution"]
  node_tclgen["Tcl generation"]
  node_testrunner["Tcl test runner"]
  node_logparser["Log parsing"]
  node_reportstore[("Report storage")]
  node_tclwrapper["Tcl socket wrapper<br/>[tclsh_wrapper.c]"]
  node_jenkins["Jenkins regression pipeline"]
end

subgraph group_ecu["Virtual ECU"]
  node_doip["DoIP server<br/>[doip_server.c]"]
  node_udsdriver["UDS diagnostic handler<br/>[uds_driver.c]"]
  node_memory[("vECU state and DTC memory<br/>[memory.c]")]
  node_ecuentry["vECU startup<br/>[main.c]"]
  node_eeprom[("DTC EEPROM persistence<br/>[memory.c]")]
end

subgraph group_domain["Diagnostic Domain"]
  node_testcases["Test definitions"]
  node_runmodel["Run results<br/>[TestRun.cs]"]
  node_udsprotocol["UDS protocol model<br/>[UdsProtocol.cs]"]
end

subgraph group_simulation["Vehicle Simulation"]
  node_plant["Simulink thermal plant"]
  node_fim["FiM limp-home control"]
end

node_engineer(("Test engineer"))

node_engineer -->|"operates"| node_desktop
node_engineer -->|"runs"| node_cli
node_desktop -->|"generates scripts"| node_tclgen
node_desktop -->|"runs tests"| node_testrunner
node_desktop -->|"loads history"| node_reportstore
node_desktop -->|"displays results"| node_runmodel
node_cli -->|"runs tests"| node_testrunner
node_tclgen -->|"consumes definitions"| node_testcases
node_testrunner -->|"parses output"| node_logparser
node_testrunner -->|"saves runs"| node_reportstore
node_logparser -->|"interprets responses"| node_udsprotocol
node_testrunner -->|"produces run"| node_runmodel
node_testrunner -.->|"sends diagnostics"| node_doip
node_doip -->|"dispatches UDS"| node_udsdriver
node_udsdriver -->|"reads and updates"| node_memory
node_ecuentry -->|"starts server"| node_doip
node_ecuentry -->|"initializes diagnostics"| node_udsdriver
node_ecuentry -->|"initializes state"| node_memory
node_tclwrapper -.->|"connects by socket"| node_doip
node_memory -.->|"persists DTCs"| node_eeprom
node_plant -.->|"updates vehicle state"| node_memory
node_memory -.->|"fault state informs"| node_fim
node_jenkins -.->|"runs regression"| node_testrunner

click node_desktop "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs"
click node_cli "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.CliRunner/Program.cs"
click node_testcases "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Cores/Models/TestCaseDefinition.cs"
click node_tclgen "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/TclScriptGeneratorService.cs"
click node_testrunner "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs"
click node_logparser "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/LogParserService.cs"
click node_runmodel "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Cores/Models/TestRun.cs"
click node_reportstore "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/JsonReportStorageService.cs"
click node_udsprotocol "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Cores/Diagnostics/UdsProtocol.cs"
click node_doip "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/doip_server.c"
click node_udsdriver "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/uds_driver.c"
click node_memory "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/memory.c"
click node_ecuentry "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/main.c"
click node_tclwrapper "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/tclsh_wrapper.c"
click node_eeprom "https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/memory.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_cli toneBlue
class node_tclgen,node_testrunner,node_logparser,node_reportstore,node_tclwrapper,node_jenkins toneAmber
class node_doip,node_udsdriver,node_memory,node_ecuentry,node_eeprom toneMint
class node_testcases,node_runmodel,node_udsprotocol toneRose
class node_plant,node_fim,node_engineer toneIndigo
```

## Components

### User Interfaces

- [Desktop dashboard](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs): `apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs`
- [CLI runner](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.CliRunner/Program.cs): `apps/test-runner/src/AutVecu.CliRunner/Program.cs`

### Test Execution

- [Tcl generation](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/TclScriptGeneratorService.cs): `apps/test-runner/src/AutVecu.Services/Implement/TclScriptGeneratorService.cs`
- [Tcl test runner](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs): `apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs`
- [Log parsing](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/LogParserService.cs): `apps/test-runner/src/AutVecu.Services/Implement/LogParserService.cs`
- [Report storage](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Services/Implement/JsonReportStorageService.cs): `apps/test-runner/src/AutVecu.Services/Implement/JsonReportStorageService.cs`
- [Tcl socket wrapper](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/tclsh_wrapper.c): `apps/vecu/src/tclsh_wrapper.c`
- **Jenkins regression pipeline**

### Virtual ECU

- [DoIP server](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/doip_server.c): `apps/vecu/src/doip_server.c`
- [UDS diagnostic handler](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/uds_driver.c): `apps/vecu/src/uds_driver.c`
- [vECU state and DTC memory](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/memory.c): `apps/vecu/src/memory.c`
- [vECU startup](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/main.c): `apps/vecu/src/main.c`
- [DTC EEPROM persistence](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/vecu/src/memory.c): `apps/vecu/src/memory.c`

### Diagnostic Domain

- [Test definitions](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Cores/Models/TestCaseDefinition.cs): `apps/test-runner/src/AutVecu.Cores/Models/TestCaseDefinition.cs`
- [Run results](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Cores/Models/TestRun.cs): `apps/test-runner/src/AutVecu.Cores/Models/TestRun.cs`
- [UDS protocol model](https://github.com/nguyendinhtuan-dev/automotive_sil_testing_devops_automation/blob/main/apps/test-runner/src/AutVecu.Cores/Diagnostics/UdsProtocol.cs): `apps/test-runner/src/AutVecu.Cores/Diagnostics/UdsProtocol.cs`

### Vehicle Simulation

- **Simulink thermal plant**
- **FiM limp-home control**

### Other components

- **Test engineer**

## Connections

- Test engineer → Desktop dashboard: operates
- Test engineer → CLI runner: runs
- Desktop dashboard → Tcl generation: generates scripts (evidence: `apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs`)
- Desktop dashboard → Tcl test runner: runs tests (evidence: `apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs`)
- Desktop dashboard → Report storage: loads history (evidence: `apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs`)
- Desktop dashboard → Run results: displays results (evidence: `apps/test-runner/src/AutVecu.Desktop/ViewModels/MainViewModel.cs`)
- CLI runner → Tcl test runner: runs tests (evidence: `apps/test-runner/src/AutVecu.CliRunner/Program.cs`)
- Tcl generation → Test definitions: consumes definitions (evidence: `apps/test-runner/src/AutVecu.Services/Implement/TclScriptGeneratorService.cs`)
- Tcl test runner → Log parsing: parses output (evidence: `apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs`)
- Tcl test runner → Report storage: saves runs (evidence: `apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs`)
- Log parsing → UDS protocol model: interprets responses (evidence: `apps/test-runner/src/AutVecu.Services/Implement/LogParserService.cs`)
- Tcl test runner → Run results: produces run (evidence: `apps/test-runner/src/AutVecu.Services/Implement/TclTestRunnerService.cs`)
- Tcl test runner → DoIP server: sends diagnostics
- DoIP server → UDS diagnostic handler: dispatches UDS (evidence: `apps/vecu/src/doip_server.c`)
- UDS diagnostic handler → vECU state and DTC memory: reads and updates (evidence: `apps/vecu/src/uds_driver.c`)
- vECU startup → DoIP server: starts server (evidence: `apps/vecu/src/main.c`)
- vECU startup → UDS diagnostic handler: initializes diagnostics (evidence: `apps/vecu/src/main.c`)
- vECU startup → vECU state and DTC memory: initializes state (evidence: `apps/vecu/src/main.c`)
- Tcl socket wrapper → DoIP server: connects by socket
- vECU state and DTC memory → DTC EEPROM persistence: persists DTCs (evidence: `apps/vecu/src/memory.c`)
- Simulink thermal plant → vECU state and DTC memory: updates vehicle state
- vECU state and DTC memory → FiM limp-home control: fault state informs
- Jenkins regression pipeline → Tcl test runner: runs regression
