# waelhechmi/industrialcontroller architecture

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

- Interactive diagram: https://gitdiagram.com/waelhechmi/industrialcontroller
- Repository: https://github.com/waelhechmi/industrialcontroller

## Overview

IndustrialController is a Qt-based industrial dashboard simulator. The user starts or stops a timed simulation; each update generates temperature and pressure readings, stores them in sensors, evaluates alarm states, and refreshes the dashboard gauges and warning indicators. The core also contains a standalone limit-checking Controller and Logger, but the excerpts do not show them participating in the GUI workflow. The graph reflects the sampled call paths and documented dashboard capabilities; no external services or persistence are shown.

Main entry points: [`src/gui/MainWindow.cpp`](https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp) (Sensor Simulation), [`src/core/AlarmManager.cpp`](https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/AlarmManager.cpp) (Alarm Evaluation), [`src/core/Sensor.cpp`](https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Sensor.cpp) (Sensor State), [`src/main.cpp`](https://github.com/waelhechmi/industrialcontroller/blob/main/src/main.cpp) (Application Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gui["Dashboard UI"]
  node_app_entry["Application Entry<br/>[main.cpp]"]
  node_window["Main Window<br/>[MainWindow.cpp]"]
  node_simulation["Sensor Simulation<br/>[MainWindow.cpp]"]
  node_dashboard["Live Dashboard<br/>[MainWindow.cpp]"]
end

subgraph group_core["Control Core"]
  node_sensor["Sensor State<br/>[Sensor.cpp]"]
  node_alarms["Alarm Evaluation<br/>[AlarmManager.cpp]"]
  node_controller["Limit Controller<br/>[Controller.cpp]"]
end

subgraph group_support["Core Utilities"]
  node_logger["Logger<br/>[Logger.cpp]"]
end

node_operator(("Operator"))

node_operator -.->|"operates"| node_window
node_app_entry -->|"creates"| node_window
node_window -->|"starts updates"| node_simulation
node_simulation -->|"sets readings"| node_sensor
node_simulation -->|"checks sensors"| node_alarms
node_alarms -->|"reads value"| node_sensor
node_simulation -->|"updates displays"| node_dashboard

click node_app_entry "https://github.com/waelhechmi/industrialcontroller/blob/main/src/main.cpp"
click node_window "https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp"
click node_simulation "https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp"
click node_dashboard "https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp"
click node_sensor "https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Sensor.cpp"
click node_alarms "https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/AlarmManager.cpp"
click node_controller "https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Controller.cpp"
click node_logger "https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Logger.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_app_entry,node_window,node_simulation,node_dashboard toneBlue
class node_sensor,node_alarms,node_controller toneAmber
class node_logger toneMint
class node_operator toneIndigo
```

## Components

### Dashboard UI

- [Application Entry](https://github.com/waelhechmi/industrialcontroller/blob/main/src/main.cpp): `src/main.cpp`
- [Main Window](https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp): `src/gui/MainWindow.cpp`
- [Sensor Simulation](https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp): `src/gui/MainWindow.cpp`
- [Live Dashboard](https://github.com/waelhechmi/industrialcontroller/blob/main/src/gui/MainWindow.cpp): `src/gui/MainWindow.cpp`

### Control Core

- [Sensor State](https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Sensor.cpp): `src/core/Sensor.cpp`
- [Alarm Evaluation](https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/AlarmManager.cpp): `src/core/AlarmManager.cpp`
- [Limit Controller](https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Controller.cpp): `src/core/Controller.cpp`

### Core Utilities

- [Logger](https://github.com/waelhechmi/industrialcontroller/blob/main/src/core/Logger.cpp): `src/core/Logger.cpp`

### Other components

- **Operator**

## Connections

- Operator → Main Window: operates (evidence: `README.md`)
- Application Entry → Main Window: creates (evidence: `src/main.cpp`)
- Main Window → Sensor Simulation: starts updates (evidence: `src/gui/MainWindow.cpp`)
- Sensor Simulation → Sensor State: sets readings (evidence: `src/gui/MainWindow.cpp`)
- Sensor Simulation → Alarm Evaluation: checks sensors (evidence: `src/gui/MainWindow.cpp`)
- Alarm Evaluation → Sensor State: reads value (evidence: `src/core/AlarmManager.cpp`)
- Sensor Simulation → Live Dashboard: updates displays (evidence: `src/gui/MainWindow.cpp`)
