# danielhrisca/asammdf architecture

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

- Interactive diagram: https://gitdiagram.com/danielhrisca/asammdf
- Repository: https://github.com/danielhrisca/asammdf

## Overview

asammdf is a Python library and GUI for parsing, editing, analyzing, and exporting ASAM MDF measurement files. The principal workflow loads a measurement through the MDF API, decodes version-specific blocks into channels and Signals, performs selection or time-domain operations, then saves or exports results. Separate branches cover bus-log signal extraction and interactive visualization. README capabilities establish several domain links; sampled source and the SOURCE INDEX support the internal delegation shown. Unsampled modules are represented by their exact paths, with no speculative call edges.

Main entry points: [`src/asammdf/mdf.py`](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/mdf.py) (MDF API), [`src/asammdf/gui/widgets/main.py`](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/main.py) (Main window), [`src/asammdf/signal.py`](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/signal.py) (Signal operations), [`src/asammdf/blocks/mdf_v3.py`](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/mdf_v3.py) (MDF v2/v3)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_measurement["MDF Measurement"]
  node_api["MDF API<br/>[mdf.py]"]
end

subgraph group_format["Format Decoding"]
  node_v2v3["MDF v2/v3<br/>[mdf_v3.py]"]
  node_v4["MDF v4<br/>[mdf_v4.py]"]
  node_legacyblocks["v2/v3 blocks<br/>[v2_v3_blocks.py]"]
  node_legacyconstants["v2/v3 constants<br/>[v2_v3_constants.py]"]
  node_v4blocks["v4 blocks<br/>[v4_blocks.py]"]
  node_v4constants["v4 constants<br/>[v4_constants.py]"]
  node_conversions["Conversions"]
  node_sources["Source metadata<br/>[source_utils.py]"]
  node_options["Runtime options<br/>[options.py]"]
end

subgraph group_analysis["Signal Analysis"]
  node_signal["Signal operations<br/>[signal.py]"]
  node_tool["Format utilities<br/>[tool.py]"]
  node_bus["Bus log signals"]
  node_export["Export and serialize<br/>[serde.py]"]
end

subgraph group_gui["GUI Exploration"]
  node_guiapp["GUI launcher<br/>[asammdfgui.py]"]
  node_main["Main window<br/>[main.py]"]
  node_fileview["Measurement view<br/>[file.py]"]
  node_mdi["Measurement windows<br/>[mdi_area.py]"]
  node_plot["Plot widget<br/>[plot.py]"]
  node_lists["Channel lists<br/>[list.py]"]
  node_dialog["GUI messages<br/>[messagebox.py]"]
  node_resources["GUI resources<br/>[resource_rc.py]"]
end

node_user(("Measurement user"))

node_user -->|"loads and edits"| node_api
node_api -->|"dispatches"| node_v2v3
node_api -->|"dispatches"| node_v4
node_v2v3 -->|"uses blocks"| node_legacyblocks
node_v2v3 -->|"uses constants"| node_legacyconstants
node_v4 -.->|"uses blocks"| node_v4blocks
node_v4blocks -->|"uses constants"| node_v4constants
node_api -->|"returns signals"| node_signal
node_signal -->|"uses conversions"| node_conversions
node_api -->|"configures"| node_options
node_api -.->|"uses metadata"| node_sources
node_user -->|"operates on time"| node_signal
node_api -->|"extracts bus signals"| node_bus
node_user -->|"exports measurements"| node_export
node_api -->|"uses utilities"| node_tool
node_guiapp -->|"launches"| node_main
node_main -->|"opens files"| node_fileview
node_main -->|"manages windows"| node_mdi
node_main -->|"opens plots"| node_plot
node_mdi -->|"hosts plots"| node_plot
node_mdi -->|"uses signals"| node_signal
node_main -->|"shows messages"| node_dialog
node_lists -->|"serializes lists"| node_export
node_main -->|"loads resources"| node_resources

click node_api "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/mdf.py"
click node_v2v3 "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/mdf_v3.py"
click node_v4 "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/mdf_v4.py"
click node_legacyblocks "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v2_v3_blocks.py"
click node_legacyconstants "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v2_v3_constants.py"
click node_v4blocks "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v4_blocks.py"
click node_v4constants "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v4_constants.py"
click node_conversions "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/conversion_utils.py"
click node_sources "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/source_utils.py"
click node_options "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/options.py"
click node_signal "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/signal.py"
click node_tool "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/tool.py"
click node_bus "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/bus_logging_utils.py"
click node_export "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/serde.py"
click node_guiapp "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/app/asammdfgui.py"
click node_main "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/main.py"
click node_fileview "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/file.py"
click node_mdi "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/mdi_area.py"
click node_plot "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/plot.py"
click node_lists "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/list.py"
click node_dialog "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/dialogs/messagebox.py"
click node_resources "https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/ui/resource_rc.py"

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_api,node_user toneBlue
class node_v2v3,node_v4,node_legacyblocks,node_legacyconstants,node_v4blocks,node_v4constants,node_conversions,node_sources,node_options toneAmber
class node_signal,node_tool,node_bus,node_export toneMint
class node_guiapp,node_main,node_fileview,node_mdi,node_plot,node_lists,node_dialog,node_resources toneRose
```

## Components

### MDF Measurement

- [MDF API](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/mdf.py): `src/asammdf/mdf.py`

### Format Decoding

- [MDF v2/v3](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/mdf_v3.py): `src/asammdf/blocks/mdf_v3.py`
- [MDF v4](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/mdf_v4.py): `src/asammdf/blocks/mdf_v4.py`
- [v2/v3 blocks](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v2_v3_blocks.py): `src/asammdf/blocks/v2_v3_blocks.py`
- [v2/v3 constants](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v2_v3_constants.py): `src/asammdf/blocks/v2_v3_constants.py`
- [v4 blocks](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v4_blocks.py): `src/asammdf/blocks/v4_blocks.py`
- [v4 constants](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/v4_constants.py): `src/asammdf/blocks/v4_constants.py`
- [Conversions](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/conversion_utils.py): `src/asammdf/blocks/conversion_utils.py`
- [Source metadata](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/source_utils.py): `src/asammdf/blocks/source_utils.py`
- [Runtime options](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/options.py): `src/asammdf/blocks/options.py`

### Signal Analysis

- [Signal operations](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/signal.py): `src/asammdf/signal.py`
- [Format utilities](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/tool.py): `src/asammdf/tool.py`
- [Bus log signals](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/blocks/bus_logging_utils.py): `src/asammdf/blocks/bus_logging_utils.py`
- [Export and serialize](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/serde.py): `src/asammdf/gui/serde.py`

### GUI Exploration

- [GUI launcher](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/app/asammdfgui.py): `src/asammdf/app/asammdfgui.py`
- [Main window](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/main.py): `src/asammdf/gui/widgets/main.py`
- [Measurement view](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/file.py): `src/asammdf/gui/widgets/file.py`
- [Measurement windows](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/mdi_area.py): `src/asammdf/gui/widgets/mdi_area.py`
- [Plot widget](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/plot.py): `src/asammdf/gui/widgets/plot.py`
- [Channel lists](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/widgets/list.py): `src/asammdf/gui/widgets/list.py`
- [GUI messages](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/dialogs/messagebox.py): `src/asammdf/gui/dialogs/messagebox.py`
- [GUI resources](https://github.com/danielhrisca/asammdf/blob/master/src/asammdf/gui/ui/resource_rc.py): `src/asammdf/gui/ui/resource_rc.py`

### Other components

- **Measurement user**

## Connections

- Measurement user → MDF API: loads and edits
- MDF API → MDF v2/v3: dispatches (evidence: `src/asammdf/mdf.py`)
- MDF API → MDF v4: dispatches (evidence: `src/asammdf/mdf.py`)
- MDF v2/v3 → v2/v3 blocks: uses blocks (evidence: `src/asammdf/blocks/mdf_v3.py`)
- MDF v2/v3 → v2/v3 constants: uses constants (evidence: `src/asammdf/blocks/mdf_v3.py`)
- MDF v4 → v4 blocks: uses blocks
- v4 blocks → v4 constants: uses constants (evidence: `src/asammdf/blocks/v4_blocks.py`)
- MDF API → Signal operations: returns signals (evidence: `src/asammdf/mdf.py`)
- Signal operations → Conversions: uses conversions (evidence: `src/asammdf/signal.py`)
- MDF API → Runtime options: configures (evidence: `src/asammdf/mdf.py`)
- MDF API → Source metadata: uses metadata (evidence: `src/asammdf/mdf.py`)
- Measurement user → Signal operations: operates on time
- MDF API → Bus log signals: extracts bus signals
- Measurement user → Export and serialize: exports measurements
- MDF API → Format utilities: uses utilities (evidence: `src/asammdf/mdf.py`)
- GUI launcher → Main window: launches (evidence: `src/asammdf/app/asammdfgui.py`)
- Main window → Measurement view: opens files (evidence: `src/asammdf/gui/widgets/main.py`)
- Main window → Measurement windows: manages windows (evidence: `src/asammdf/gui/widgets/main.py`)
- Main window → Plot widget: opens plots (evidence: `src/asammdf/gui/widgets/main.py`)
- Measurement windows → Plot widget: hosts plots (evidence: `src/asammdf/gui/widgets/mdi_area.py`)
- Measurement windows → Signal operations: uses signals (evidence: `src/asammdf/gui/widgets/mdi_area.py`)
- Main window → GUI messages: shows messages (evidence: `src/asammdf/gui/widgets/main.py`)
- Channel lists → Export and serialize: serializes lists (evidence: `src/asammdf/gui/widgets/list.py`)
- Main window → GUI resources: loads resources (evidence: `src/asammdf/gui/widgets/main.py`)
