# uholeschak/ediabaslib architecture

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

- Interactive diagram: https://gitdiagram.com/uholeschak/ediabaslib
- Repository: https://github.com/uholeschak/ediabaslib

## Overview

The repository combines the Ediabas interpreter library with the Deep OBD Android client and a broader PSdZ client library. The primary user workflow is configuring a vehicle job, connecting through an OBD adapter, executing diagnostic operations, and viewing results. The README also documents BMW/VAG protocol support and API-compatible wrappers. Several app and library relationships are visible in the index or excerpts; unsampled feature links are intentionally omitted or marked unverified.

Main entry points: [`BmwDeepObd/CarAppService.cs`](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/CarAppService.cs) (Car app service), [`EdiabasLib/EdiabasLib/EdiabasNet.cs`](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/EdiabasLib/EdiabasNet.cs) (Ediabas interpreter), [`Tools/Psdz/PsdzClientLibrary/Core/CoreFramework.cs`](https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/CoreFramework.cs) (Core framework), [`BmwDeepObd/MainActivity.cs`](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/MainActivity.cs) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Deep OBD app"]
  node_main["App entry<br/>[MainActivity.cs]"]
  node_config["Job configuration<br/>[ActivityCommon.cs]"]
  node_jobreader["Job reader<br/>[JobReader.cs]"]
  node_service["Car app service<br/>[CarAppService.cs]"]
  node_foreground["Foreground service"]
  node_ediabasthread["Job execution<br/>[EdiabasThread.cs]"]
  node_broadcast["Local broadcasts"]
  node_resultui["Result presentation"]
end

subgraph group_runtime["Diagnostic runtime"]
  node_adapter["Adapter connection<br/>[EdInterfaceBase.cs]"]
  node_interpreter["Ediabas interpreter<br/>[EdiabasNet.cs]"]
  node_api32["API32 wrapper<br/>[ApiDll.cpp]"]
  node_apinet["APINET wrapper<br/>[API.cs]"]
end

subgraph group_vehicle["Vehicle data"]
  node_vehicleidentify["BMW identification"]
  node_ecufunctions["ECU functions"]
  node_vagreader["VAG UDS reader<br/>[UdsReader.cs]"]
end

subgraph group_psdz["PSdZ services"]
  node_configsettings["PSdZ configuration<br/>[ConfigSettings.cs]"]
  node_coreframework["Core framework<br/>[CoreFramework.cs]"]
  node_reactor["Vehicle reactor<br/>[ReactorEngine.cs]"]
  node_connectionmanager["Connection manager"]
end

node_driver(("Driver"))
node_externaladapter{{"OBD adapter"}}
node_vehicle{{"Vehicle ECU"}}

node_driver -->|"starts"| node_main
node_main -.->|"configures"| node_config
node_config -.->|"defines jobs"| node_jobreader
node_service -->|"reads pages"| node_jobreader
node_service -->|"checks status"| node_foreground
node_service -->|"reads job state"| node_ediabasthread
node_service -->|"uses broadcasts"| node_broadcast
node_ediabasthread -.->|"executes jobs"| node_interpreter
node_interpreter -->|"uses interface"| node_adapter
node_adapter -.->|"communicates"| node_externaladapter
node_externaladapter -.->|"exchanges diagnostics"| node_vehicle
node_interpreter -.->|"runs jobs"| node_vehicle
node_driver -->|"calls compatible API"| node_api32
node_driver -->|"uses compatible API"| node_apinet
node_vehicleidentify -->|"uses structures"| node_ecufunctions
node_vagreader -.->|"interprets UDS data"| node_vehicle
node_coreframework -->|"loads settings"| node_configsettings
node_reactor -->|"uses framework"| node_coreframework
node_connectionmanager -->|"uses framework"| node_coreframework
node_service -.->|"presents results"| node_resultui

click node_main "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/MainActivity.cs"
click node_config "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/ActivityCommon.cs"
click node_jobreader "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/JobReader.cs"
click node_service "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/CarAppService.cs"
click node_foreground "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/ForegroundService.cs"
click node_ediabasthread "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/EdiabasThread.cs"
click node_broadcast "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/InternalBroadcastManager/InternalBroadcastManager.cs"
click node_resultui "https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/ResultListAdapter.cs"
click node_adapter "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/EdiabasLib/EdInterfaceBase.cs"
click node_interpreter "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/EdiabasLib/EdiabasNet.cs"
click node_api32 "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/Api32/ApiDll.cpp"
click node_apinet "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/apiNET/API.cs"
click node_vehicleidentify "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/BmwFileReader/DetectVehicleBmw.cs"
click node_ecufunctions "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/BmwFileReader/EcuFunctionStructs.cs"
click node_vagreader "https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/UdsFileReader/UdsReader.cs"
click node_configsettings "https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/ConfigSettings.cs"
click node_coreframework "https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/CoreFramework.cs"
click node_reactor "https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/ReactorEngine.cs"
click node_connectionmanager "https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Psdz/ConnectionManager.cs"

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_main,node_config,node_jobreader,node_service,node_foreground,node_ediabasthread,node_broadcast,node_resultui toneBlue
class node_adapter,node_interpreter,node_api32,node_apinet toneAmber
class node_vehicleidentify,node_ecufunctions,node_vagreader toneMint
class node_configsettings,node_coreframework,node_reactor,node_connectionmanager toneRose
class node_driver,node_externaladapter,node_vehicle toneIndigo
```

## Components

### Deep OBD app

- [App entry](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/MainActivity.cs): `BmwDeepObd/MainActivity.cs`
- [Job configuration](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/ActivityCommon.cs): `BmwDeepObd/ActivityCommon.cs`
- [Job reader](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/JobReader.cs): `BmwDeepObd/JobReader.cs`
- [Car app service](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/CarAppService.cs): `BmwDeepObd/CarAppService.cs`
- [Foreground service](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/ForegroundService.cs): `BmwDeepObd/ForegroundService.cs`
- [Job execution](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/EdiabasThread.cs): `BmwDeepObd/EdiabasThread.cs`
- [Local broadcasts](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/InternalBroadcastManager/InternalBroadcastManager.cs): `BmwDeepObd/InternalBroadcastManager/InternalBroadcastManager.cs`
- [Result presentation](https://github.com/uholeschak/ediabaslib/blob/master/BmwDeepObd/ResultListAdapter.cs): `BmwDeepObd/ResultListAdapter.cs`

### Diagnostic runtime

- [Adapter connection](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/EdiabasLib/EdInterfaceBase.cs): `EdiabasLib/EdiabasLib/EdInterfaceBase.cs`
- [Ediabas interpreter](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/EdiabasLib/EdiabasNet.cs): `EdiabasLib/EdiabasLib/EdiabasNet.cs`
- [API32 wrapper](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/Api32/ApiDll.cpp): `EdiabasLib/Api32/ApiDll.cpp`
- [APINET wrapper](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/apiNET/API.cs): `EdiabasLib/apiNET/API.cs`

### Vehicle data

- [BMW identification](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/BmwFileReader/DetectVehicleBmw.cs): `EdiabasLib/BmwFileReader/DetectVehicleBmw.cs`
- [ECU functions](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/BmwFileReader/EcuFunctionStructs.cs): `EdiabasLib/BmwFileReader/EcuFunctionStructs.cs`
- [VAG UDS reader](https://github.com/uholeschak/ediabaslib/blob/master/EdiabasLib/UdsFileReader/UdsReader.cs): `EdiabasLib/UdsFileReader/UdsReader.cs`

### PSdZ services

- [PSdZ configuration](https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/ConfigSettings.cs): `Tools/Psdz/PsdzClientLibrary/Core/ConfigSettings.cs`
- [Core framework](https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/CoreFramework.cs): `Tools/Psdz/PsdzClientLibrary/Core/CoreFramework.cs`
- [Vehicle reactor](https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Core/ReactorEngine.cs): `Tools/Psdz/PsdzClientLibrary/Core/ReactorEngine.cs`
- [Connection manager](https://github.com/uholeschak/ediabaslib/blob/master/Tools/Psdz/PsdzClientLibrary/Psdz/ConnectionManager.cs): `Tools/Psdz/PsdzClientLibrary/Psdz/ConnectionManager.cs`

### Other components

- **Driver**
- **OBD adapter**
- **Vehicle ECU**

## Connections

- Driver → App entry: starts
- App entry → Job configuration: configures
- Job configuration → Job reader: defines jobs
- Car app service → Job reader: reads pages (evidence: `BmwDeepObd/CarAppService.cs`)
- Car app service → Foreground service: checks status (evidence: `BmwDeepObd/CarAppService.cs`)
- Car app service → Job execution: reads job state (evidence: `BmwDeepObd/CarAppService.cs`)
- Car app service → Local broadcasts: uses broadcasts (evidence: `BmwDeepObd/CarAppService.cs`)
- Job execution → Ediabas interpreter: executes jobs
- Ediabas interpreter → Adapter connection: uses interface (evidence: `EdiabasLib/EdiabasTest/Program.cs`)
- Adapter connection → OBD adapter: communicates
- OBD adapter → Vehicle ECU: exchanges diagnostics
- Ediabas interpreter → Vehicle ECU: runs jobs
- Driver → API32 wrapper: calls compatible API
- Driver → APINET wrapper: uses compatible API
- BMW identification → ECU functions: uses structures
- VAG UDS reader → Vehicle ECU: interprets UDS data
- Core framework → PSdZ configuration: loads settings (evidence: `Tools/Psdz/PsdzClientLibrary/Core/CoreFramework.cs`)
- Vehicle reactor → Core framework: uses framework (evidence: `Tools/Psdz/PsdzClientLibrary/Core/ReactorEngine.cs`)
- Connection manager → Core framework: uses framework (evidence: `Tools/Psdz/PsdzClientLibrary/Psdz/ConnectionManager.cs`)
- Car app service → Result presentation: presents results
