# openept/gui architecture

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

- Interactive diagram: https://gitdiagram.com/openept/gui
- Repository: https://github.com/openept/gui

## Overview

OpenEPT is a Qt GUI for embedded-device energy profiling and battery algorithm evaluation. Its main workflow starts with workspace selection, opens the application, and manages device interaction and measurement views. The README also highlights live voltage/current streaming and high-speed acquisition; battery analysis, file handling, and configuration are represented as distinct product areas. Several subsystem links are dashed because the available excerpts and reference index identify modules but do not show their runtime dispatch in detail.

Main entry points: [`Source/devicecontainer.cpp`](https://github.com/openept/gui/blob/master/Source/devicecontainer.cpp) (Device manager), [`Source/device.cpp`](https://github.com/openept/gui/blob/master/Source/device.cpp) (Device control), [`Source/openept.cpp`](https://github.com/openept/gui/blob/master/Source/openept.cpp) (OpenEPT shell), [`Source/Links/controllink.cpp`](https://github.com/openept/gui/blob/master/Source/Links/controllink.cpp) (Control transport)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_workspace["Workspace selection"]
  node_shell["OpenEPT shell<br/>[openept.cpp]"]
  node_manager["Device manager"]
end

subgraph group_device["Device connectivity"]
  node_deviceobj["Device control<br/>[device.cpp]"]
  node_control["Control transport<br/>[controllink.cpp]"]
  node_serial["Serial transport<br/>[seriallink.cpp]"]
  node_status["Status link<br/>[statuslink.cpp]"]
  node_stream["Sample streaming<br/>[streamlink.cpp]"]
  node_edlink["Energy data link<br/>[edlink.cpp]"]
end

subgraph group_processing["Measurement processing"]
  node_dataprocess["Sample processing<br/>[dataprocessing.cpp]"]
  node_batteryextract["Battery extraction"]
  node_charging["Charging analysis"]
  node_files["Measurement files<br/>[fileprocessing.cpp]"]
  node_waveforms["Waveform library<br/>[waveform.cpp]"]
end

subgraph group_views["Profiling interface"]
  node_energyview["Energy control"]
  node_deviceview["Device window<br/>[devicewnd.cpp]"]
  node_batteryview["Battery analysis views"]
  node_analyzer["Data analyzer"]
  node_plot["Plotting<br/>[plot.cpp]"]
  node_plotlib["Plot widget<br/>[qcustomplot.cpp]"]
end

subgraph group_config["Configuration"]
  node_params[("Parameter storage<br/>[parameterstore.cpp]")]
  node_applicationconf["Application settings"]
end

node_user(("Operator"))
node_externaldevice{{"Profiler hardware"}}

node_user -->|"chooses workspace"| node_workspace
node_workspace -->|"opens application"| node_shell
node_shell -.->|"creates device manager"| node_manager
node_manager -.->|"manages devices"| node_deviceobj
node_deviceobj -.->|"uses control link"| node_control
node_deviceobj -.->|"uses status link"| node_status
node_deviceobj -.->|"uses stream link"| node_stream
node_deviceobj -.->|"uses data link"| node_edlink
node_control -->|"delegates serial transfers"| node_serial
node_externaldevice -.->|"receives commands"| node_control
node_externaldevice -.->|"streams samples"| node_stream
node_deviceobj -.->|"configures processing"| node_dataprocess
node_manager -.->|"uses extraction"| node_batteryextract
node_manager -.->|"uses analysis"| node_charging
node_manager -.->|"writes measurements"| node_files
node_energyview -.->|"loads waveforms"| node_waveforms
node_manager -.->|"uses application settings"| node_params
node_manager -.->|"presents device controls"| node_deviceview
node_manager -.->|"opens battery views"| node_batteryview
node_dataprocess -.->|"feeds analysis"| node_analyzer
node_plot -->|"uses plot widget"| node_plotlib
node_energyview -.->|"shows measurement plots"| node_plot
node_shell -.->|"provides settings"| node_applicationconf

click node_workspace "https://github.com/openept/gui/blob/master/Source/Windows/WSSelection/selectworkspace.cpp"
click node_shell "https://github.com/openept/gui/blob/master/Source/openept.cpp"
click node_manager "https://github.com/openept/gui/blob/master/Source/devicecontainer.cpp"
click node_deviceobj "https://github.com/openept/gui/blob/master/Source/device.cpp"
click node_control "https://github.com/openept/gui/blob/master/Source/Links/controllink.cpp"
click node_serial "https://github.com/openept/gui/blob/master/Source/Links/seriallink.cpp"
click node_status "https://github.com/openept/gui/blob/master/Source/Links/statuslink.cpp"
click node_stream "https://github.com/openept/gui/blob/master/Source/Links/streamlink.cpp"
click node_edlink "https://github.com/openept/gui/blob/master/Source/Links/edlink.cpp"
click node_dataprocess "https://github.com/openept/gui/blob/master/Source/Processing/dataprocessing.cpp"
click node_batteryextract "https://github.com/openept/gui/blob/master/Source/Processing/batteryparamsextraction.cpp"
click node_charging "https://github.com/openept/gui/blob/master/Source/Processing/charginganalysis.cpp"
click node_files "https://github.com/openept/gui/blob/master/Source/Processing/fileprocessing.cpp"
click node_waveforms "https://github.com/openept/gui/blob/master/Source/Processing/waveform.cpp"
click node_params "https://github.com/openept/gui/blob/master/Source/Processing/Parameters/parameterstore.cpp"
click node_energyview "https://github.com/openept/gui/blob/master/Source/Windows/Device/energycontrolwnd.cpp"
click node_deviceview "https://github.com/openept/gui/blob/master/Source/Windows/Device/devicewnd.cpp"
click node_batteryview "https://github.com/openept/gui/blob/master/Source/Windows/BatteryParams/batteryparamswnd.cpp"
click node_analyzer "https://github.com/openept/gui/blob/master/Source/Windows/DataAnalyzer/dataanalyzerprofile.cpp"
click node_plot "https://github.com/openept/gui/blob/master/Source/Windows/Plot/plot.cpp"
click node_plotlib "https://github.com/openept/gui/blob/master/Source/Chart/qcustomplot.cpp"
click node_applicationconf "https://github.com/openept/gui/blob/master/Source/Windows/ApplicationConf/applicationconfwnd.cpp"

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_workspace,node_shell,node_manager toneBlue
class node_deviceobj,node_control,node_serial,node_status,node_stream,node_edlink toneAmber
class node_dataprocess,node_batteryextract,node_charging,node_files,node_waveforms toneMint
class node_energyview,node_deviceview,node_batteryview,node_analyzer,node_plot,node_plotlib toneRose
class node_params,node_applicationconf,node_user,node_externaldevice toneIndigo
```

## Components

### Application

- [Workspace selection](https://github.com/openept/gui/blob/master/Source/Windows/WSSelection/selectworkspace.cpp): `Source/Windows/WSSelection/selectworkspace.cpp`
- [OpenEPT shell](https://github.com/openept/gui/blob/master/Source/openept.cpp): `Source/openept.cpp`
- [Device manager](https://github.com/openept/gui/blob/master/Source/devicecontainer.cpp): `Source/devicecontainer.cpp`

### Device connectivity

- [Device control](https://github.com/openept/gui/blob/master/Source/device.cpp): `Source/device.cpp`
- [Control transport](https://github.com/openept/gui/blob/master/Source/Links/controllink.cpp): `Source/Links/controllink.cpp`
- [Serial transport](https://github.com/openept/gui/blob/master/Source/Links/seriallink.cpp): `Source/Links/seriallink.cpp`
- [Status link](https://github.com/openept/gui/blob/master/Source/Links/statuslink.cpp): `Source/Links/statuslink.cpp`
- [Sample streaming](https://github.com/openept/gui/blob/master/Source/Links/streamlink.cpp): `Source/Links/streamlink.cpp`
- [Energy data link](https://github.com/openept/gui/blob/master/Source/Links/edlink.cpp): `Source/Links/edlink.cpp`

### Measurement processing

- [Sample processing](https://github.com/openept/gui/blob/master/Source/Processing/dataprocessing.cpp): `Source/Processing/dataprocessing.cpp`
- [Battery extraction](https://github.com/openept/gui/blob/master/Source/Processing/batteryparamsextraction.cpp): `Source/Processing/batteryparamsextraction.cpp`
- [Charging analysis](https://github.com/openept/gui/blob/master/Source/Processing/charginganalysis.cpp): `Source/Processing/charginganalysis.cpp`
- [Measurement files](https://github.com/openept/gui/blob/master/Source/Processing/fileprocessing.cpp): `Source/Processing/fileprocessing.cpp`
- [Waveform library](https://github.com/openept/gui/blob/master/Source/Processing/waveform.cpp): `Source/Processing/waveform.cpp`

### Profiling interface

- [Energy control](https://github.com/openept/gui/blob/master/Source/Windows/Device/energycontrolwnd.cpp): `Source/Windows/Device/energycontrolwnd.cpp`
- [Device window](https://github.com/openept/gui/blob/master/Source/Windows/Device/devicewnd.cpp): `Source/Windows/Device/devicewnd.cpp`
- [Battery analysis views](https://github.com/openept/gui/blob/master/Source/Windows/BatteryParams/batteryparamswnd.cpp): `Source/Windows/BatteryParams/batteryparamswnd.cpp`
- [Data analyzer](https://github.com/openept/gui/blob/master/Source/Windows/DataAnalyzer/dataanalyzerprofile.cpp): `Source/Windows/DataAnalyzer/dataanalyzerprofile.cpp`
- [Plotting](https://github.com/openept/gui/blob/master/Source/Windows/Plot/plot.cpp): `Source/Windows/Plot/plot.cpp`
- [Plot widget](https://github.com/openept/gui/blob/master/Source/Chart/qcustomplot.cpp): `Source/Chart/qcustomplot.cpp`

### Configuration

- [Parameter storage](https://github.com/openept/gui/blob/master/Source/Processing/Parameters/parameterstore.cpp): `Source/Processing/Parameters/parameterstore.cpp`
- [Application settings](https://github.com/openept/gui/blob/master/Source/Windows/ApplicationConf/applicationconfwnd.cpp): `Source/Windows/ApplicationConf/applicationconfwnd.cpp`

### Other components

- **Operator**
- **Profiler hardware**

## Connections

- Operator → Workspace selection: chooses workspace
- Workspace selection → OpenEPT shell: opens application
- OpenEPT shell → Device manager: creates device manager
- Device manager → Device control: manages devices
- Device control → Control transport: uses control link
- Device control → Status link: uses status link
- Device control → Sample streaming: uses stream link
- Device control → Energy data link: uses data link
- Control transport → Serial transport: delegates serial transfers (evidence: `Source/Links/controllink.cpp`)
- Profiler hardware → Control transport: receives commands
- Profiler hardware → Sample streaming: streams samples
- Device control → Sample processing: configures processing
- Device manager → Battery extraction: uses extraction
- Device manager → Charging analysis: uses analysis
- Device manager → Measurement files: writes measurements
- Energy control → Waveform library: loads waveforms
- Device manager → Parameter storage: uses application settings
- Device manager → Device window: presents device controls
- Device manager → Battery analysis views: opens battery views
- Sample processing → Data analyzer: feeds analysis
- Plotting → Plot widget: uses plot widget
- Energy control → Plotting: shows measurement plots
- OpenEPT shell → Application settings: provides settings
