# malkevich2-ux/scanmatik_logger architecture

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

- Interactive diagram: https://gitdiagram.com/malkevich2-ux/scanmatik_logger
- Repository: https://github.com/malkevich2-ux/scanmatik_logger

## Overview

Scanmatik CAN/J1939 Logger is a Windows diagnostic application with two user workflows: passively capture bus traffic to CSV, or actively query ECUs over UDS for identifiers and DTCs. The active tool also monitors traffic, scans visible ECU addresses, supports custom requests, and provides Volvo-reference lookup; saved captures can be decoded into reports. The Python interfaces use a command-line bridge to reach J2534 hardware, while UDS framing, decoding, and DTC reference/reporting form the diagnostic logic. Relationships for unsampled GUI capabilities follow the README; implementation details beyond shown excerpts are not assumed.

Main entry points: [`can_dtc_reader_gui.py`](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py) (Diagnostic GUI), [`can_logger_gui.py`](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_logger_gui.py) (Logger GUI), [`dtc_report.py`](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_report.py) (Capture report), [`bridge/Program.cs`](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge/Program.cs) (Bridge runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Bus capture"]
  node_logger["Logger GUI<br/>[can_logger_gui.py]"]
  node_csv["CSV capture<br/>[can_logger_gui.py]"]
end

subgraph group_bridge["J2534 bridge"]
  node_device_discovery["Device discovery<br/>[bridge_common.py]"]
  node_bridge_process["Bridge process<br/>[bridge_common.py]"]
  node_bridge_runtime["Bridge runtime<br/>[Program.cs]"]
  node_j2534_api["J2534 API<br/>[J2534.cs]"]
end

subgraph group_diagnostics["UDS diagnostics"]
  node_monitor["Live monitor"]
  node_diagnostic_gui["Diagnostic GUI"]
  node_address_scan["ECU address scan"]
  node_custom_requests["Custom UDS requests"]
  node_request_builder["UDS request builder<br/>[uds_tx.py]"]
end

subgraph group_analysis["Decode and reference"]
  node_response_decoder["UDS decoder<br/>[uds_decoder.py]"]
  node_isotp["ISO-TP reassembly<br/>[uds_decoder.py]"]
  node_dtc_reference["Volvo DTC reference<br/>[dtc_reference.py]"]
  node_reference_data["Reference data"]
  node_file_report["Capture report<br/>[dtc_report.py]"]
  node_saved_capture["Saved capture"]
end

node_operator(("Operator"))
node_adapter{{"J2534 adapter"}}

node_operator -->|"starts capture"| node_logger
node_logger -->|"lists devices"| node_device_discovery
node_logger -->|"launches bridge"| node_bridge_process
node_bridge_process -->|"controls process"| node_bridge_runtime
node_bridge_runtime -->|"calls API"| node_j2534_api
node_j2534_api -.->|"opens channel"| node_adapter
node_adapter -.->|"returns frames"| node_bridge_runtime
node_bridge_runtime -->|"streams frames"| node_bridge_process
node_logger -->|"writes frames"| node_csv
node_operator -->|"queries ECU"| node_diagnostic_gui
node_diagnostic_gui -->|"selects device"| node_device_discovery
node_diagnostic_gui -->|"sends commands"| node_bridge_process
node_diagnostic_gui -->|"builds requests"| node_request_builder
node_diagnostic_gui -.->|"decodes responses"| node_response_decoder
node_diagnostic_gui -->|"monitors traffic"| node_monitor
node_diagnostic_gui -->|"scans addresses"| node_address_scan
node_diagnostic_gui -->|"builds custom"| node_custom_requests
node_diagnostic_gui -->|"looks up codes"| node_dtc_reference
node_response_decoder -->|"reassembles frames"| node_isotp
node_dtc_reference -->|"loads data"| node_reference_data
node_operator -->|"analyzes capture"| node_file_report
node_file_report -->|"reads CSV"| node_saved_capture
node_file_report -->|"feeds frames"| node_response_decoder
node_file_report -->|"shows report"| node_operator

click node_logger "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_logger_gui.py"
click node_monitor "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py"
click node_csv "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_logger_gui.py"
click node_diagnostic_gui "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py"
click node_address_scan "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py"
click node_custom_requests "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py"
click node_device_discovery "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge_common.py"
click node_bridge_process "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge_common.py"
click node_bridge_runtime "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge/Program.cs"
click node_j2534_api "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge/J2534.cs"
click node_request_builder "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/uds_tx.py"
click node_response_decoder "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/uds_decoder.py"
click node_isotp "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/uds_decoder.py"
click node_dtc_reference "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_reference.py"
click node_reference_data "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_reference_ru.json"
click node_file_report "https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_report.py"
click node_saved_capture "https://github.com/malkevich2-ux/scanmatik_logger/tree/master/logs"

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_logger,node_csv toneBlue
class node_device_discovery,node_bridge_process,node_bridge_runtime,node_j2534_api toneAmber
class node_monitor,node_diagnostic_gui,node_address_scan,node_custom_requests,node_request_builder toneMint
class node_response_decoder,node_isotp,node_dtc_reference,node_reference_data,node_file_report,node_saved_capture toneRose
class node_operator,node_adapter toneIndigo
```

## Components

### Bus capture

- [Logger GUI](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_logger_gui.py): `can_logger_gui.py`
- [CSV capture](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_logger_gui.py): `can_logger_gui.py`

### J2534 bridge

- [Device discovery](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge_common.py): `bridge_common.py`
- [Bridge process](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge_common.py): `bridge_common.py`
- [Bridge runtime](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge/Program.cs): `bridge/Program.cs`
- [J2534 API](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/bridge/J2534.cs): `bridge/J2534.cs`

### UDS diagnostics

- [Live monitor](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py): `can_dtc_reader_gui.py`
- [Diagnostic GUI](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py): `can_dtc_reader_gui.py`
- [ECU address scan](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py): `can_dtc_reader_gui.py`
- [Custom UDS requests](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/can_dtc_reader_gui.py): `can_dtc_reader_gui.py`
- [UDS request builder](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/uds_tx.py): `uds_tx.py`

### Decode and reference

- [UDS decoder](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/uds_decoder.py): `uds_decoder.py`
- [ISO-TP reassembly](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/uds_decoder.py): `uds_decoder.py`
- [Volvo DTC reference](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_reference.py): `dtc_reference.py`
- [Reference data](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_reference_ru.json): `dtc_reference_ru.json`
- [Capture report](https://github.com/malkevich2-ux/scanmatik_logger/blob/master/dtc_report.py): `dtc_report.py`
- [Saved capture](https://github.com/malkevich2-ux/scanmatik_logger/tree/master/logs): `logs`

### Other components

- **Operator**
- **J2534 adapter**

## Connections

- Operator → Logger GUI: starts capture (evidence: `README.md`)
- Logger GUI → Device discovery: lists devices (evidence: `README.md`)
- Logger GUI → Bridge process: launches bridge (evidence: `README.md`)
- Bridge process → Bridge runtime: controls process (evidence: `README.md`)
- Bridge runtime → J2534 API: calls API (evidence: `bridge/Program.cs`)
- J2534 API → J2534 adapter: opens channel
- J2534 adapter → Bridge runtime: returns frames
- Bridge runtime → Bridge process: streams frames (evidence: `bridge_common.py`)
- Logger GUI → CSV capture: writes frames (evidence: `README.md`)
- Operator → Diagnostic GUI: queries ECU (evidence: `README.md`)
- Diagnostic GUI → Device discovery: selects device (evidence: `README.md`)
- Diagnostic GUI → Bridge process: sends commands (evidence: `can_dtc_reader_gui.py`)
- Diagnostic GUI → UDS request builder: builds requests (evidence: `can_dtc_reader_gui.py`)
- Diagnostic GUI → UDS decoder: decodes responses (evidence: `can_dtc_reader_gui.py`)
- Diagnostic GUI → Live monitor: monitors traffic (evidence: `README.md`)
- Diagnostic GUI → ECU address scan: scans addresses (evidence: `README.md`)
- Diagnostic GUI → Custom UDS requests: builds custom (evidence: `README.md`)
- Diagnostic GUI → Volvo DTC reference: looks up codes (evidence: `can_dtc_reader_gui.py`)
- UDS decoder → ISO-TP reassembly: reassembles frames (evidence: `uds_decoder.py`)
- Volvo DTC reference → Reference data: loads data (evidence: `dtc_reference.py`)
- Operator → Capture report: analyzes capture (evidence: `README.md`)
- Capture report → Saved capture: reads CSV (evidence: `dtc_report.py`)
- Capture report → UDS decoder: feeds frames (evidence: `dtc_report.py`)
- Capture report → Operator: shows report (evidence: `dtc_report.py`)
