# jopohl/urh architecture

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

- Interactive diagram: https://gitdiagram.com/jopohl/urh
- Repository: https://github.com/jopohl/urh

## Overview

URH is a desktop suite for investigating wireless protocols. The principal workflow is to capture or load radio signals, inspect and decode them into protocol messages, identify fields manually or automatically, then generate or fuzz transmissions; it also supports stateful simulation. The graph includes the main UI controllers, protocol and signal-processing layers, AWRE, SDR backends, project persistence, and plugins. Relationships are limited to README claims and SOURCE INDEX references; unsampled subsystems are represented at their existing directory paths.

Main entry points: [`src/urh/controller/MainController.py`](https://github.com/jopohl/urh/blob/master/src/urh/controller/MainController.py) (Main Window), [`src/urh/controller/CompareFrameController.py`](https://github.com/jopohl/urh/blob/master/src/urh/controller/CompareFrameController.py) (Protocol Analysis UI), [`src/urh/util/ProjectManager.py`](https://github.com/jopohl/urh/blob/master/src/urh/util/ProjectManager.py) (Project Persistence), [`src/urh/controller/GeneratorTabController.py`](https://github.com/jopohl/urh/blob/master/src/urh/controller/GeneratorTabController.py) (Generator UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_main["Main Window<br/>[MainController.py]"]
  node_compare["Protocol Analysis UI"]
  node_generator["Generator UI"]
  node_simulator_ui["Simulator UI"]
  node_signal_ui["Signal UI"]
end

subgraph group_radio["Radio and Signals"]
  node_sdr["SDR Backends"]
  node_signal["Signal Model<br/>[Signal.py]"]
  node_iq["IQ Samples<br/>[IQArray.py]"]
end

subgraph group_protocol["Protocol Analysis"]
  node_analyzer["Protocol Analyzer"]
  node_message["Messages<br/>[Message.py]"]
  node_encoding["Decoding<br/>[Encoding.py]"]
  node_message_type["Message Types<br/>[MessageType.py]"]
  node_labels["Protocol Labels<br/>[ProtocoLabel.py]"]
  node_field["Field Types<br/>[FieldType.py]"]
  node_awre["Automatic Field Inference"]
  node_common_range["Common Ranges<br/>[CommonRange.py]"]
  node_engine["Inference Engine<br/>[Engine.py]"]
end

subgraph group_attacks["Generation and Attacks"]
  node_modulator["Modulation<br/>[Modulator.py]"]
  node_fuzz["Fuzzing<br/>[FuzzingDialog.py]"]
  node_simulator["Stateful Simulation<br/>[Simulator.py]"]
end

subgraph group_state["Project and Extensions"]
  node_project["Project Persistence<br/>[ProjectManager.py]"]
  node_file_io["Signal File I/O<br/>[FileOperator.py]"]
  node_plugins["Plugins<br/>[PluginManager.py]"]
  node_settings[("Preferences<br/>[settings.py]")]
  node_formatter["Formatting<br/>[Formatter.py]"]
  node_crc["CRC Utilities<br/>[GenericCRC.py]"]
end

node_user(("Investigator"))
node_radio_device(("Radio Device"))

node_user -->|"uses"| node_main
node_main -->|"opens analysis"| node_compare
node_main -->|"opens generator"| node_generator
node_main -->|"opens simulator"| node_simulator_ui
node_main -->|"opens signal tools"| node_signal_ui
node_radio_device -->|"provides radio I/O"| node_sdr
node_sdr -.->|"receives or sends"| node_signal
node_signal_ui -.->|"handles signals"| node_signal
node_compare -->|"uses"| node_analyzer
node_analyzer -->|"uses messages"| node_message
node_analyzer -->|"applies decoding"| node_encoding
node_compare -->|"edits types"| node_message_type
node_message_type -->|"holds labels"| node_labels
node_labels -->|"uses field types"| node_field
node_compare -->|"invokes inference"| node_awre
node_awre -.->|"uses engines"| node_engine
node_engine -->|"finds ranges"| node_common_range
node_generator -->|"uses modulation"| node_modulator
node_generator -->|"opens fuzzing"| node_fuzz
node_simulator_ui -->|"configures simulation"| node_simulator
node_main -->|"manages project"| node_project
node_project -->|"loads signal state"| node_signal
node_project -->|"uses file I/O"| node_file_io
node_compare -->|"uses plugins"| node_plugins
node_project -->|"uses settings"| node_settings
node_encoding -->|"uses CRC"| node_crc
node_message -.->|"formats values"| node_formatter
node_file_io -->|"loads samples"| node_iq

click node_main "https://github.com/jopohl/urh/blob/master/src/urh/controller/MainController.py"
click node_compare "https://github.com/jopohl/urh/blob/master/src/urh/controller/CompareFrameController.py"
click node_generator "https://github.com/jopohl/urh/blob/master/src/urh/controller/GeneratorTabController.py"
click node_simulator_ui "https://github.com/jopohl/urh/blob/master/src/urh/controller/SimulatorTabController.py"
click node_signal_ui "https://github.com/jopohl/urh/blob/master/src/urh/controller/SignalTabController.py"
click node_sdr "https://github.com/jopohl/urh/tree/master/src/urh/dev"
click node_signal "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Signal.py"
click node_iq "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/IQArray.py"
click node_analyzer "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/ProtocolAnalyzer.py"
click node_message "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Message.py"
click node_encoding "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Encoding.py"
click node_message_type "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/MessageType.py"
click node_labels "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/ProtocoLabel.py"
click node_field "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/FieldType.py"
click node_awre "https://github.com/jopohl/urh/tree/master/src/urh/awre"
click node_common_range "https://github.com/jopohl/urh/blob/master/src/urh/awre/CommonRange.py"
click node_engine "https://github.com/jopohl/urh/blob/master/src/urh/awre/engines/Engine.py"
click node_modulator "https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Modulator.py"
click node_fuzz "https://github.com/jopohl/urh/blob/master/src/urh/controller/dialogs/FuzzingDialog.py"
click node_simulator "https://github.com/jopohl/urh/blob/master/src/urh/simulator/Simulator.py"
click node_project "https://github.com/jopohl/urh/blob/master/src/urh/util/ProjectManager.py"
click node_file_io "https://github.com/jopohl/urh/blob/master/src/urh/util/FileOperator.py"
click node_plugins "https://github.com/jopohl/urh/blob/master/src/urh/plugins/PluginManager.py"
click node_settings "https://github.com/jopohl/urh/blob/master/src/urh/settings.py"
click node_formatter "https://github.com/jopohl/urh/blob/master/src/urh/util/Formatter.py"
click node_crc "https://github.com/jopohl/urh/blob/master/src/urh/util/GenericCRC.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_main,node_compare,node_generator,node_simulator_ui,node_signal_ui toneBlue
class node_sdr,node_signal,node_iq toneAmber
class node_analyzer,node_message,node_encoding,node_message_type,node_labels,node_field,node_awre,node_common_range,node_engine toneMint
class node_modulator,node_fuzz,node_simulator toneRose
class node_project,node_file_io,node_plugins,node_settings,node_formatter,node_crc,node_user,node_radio_device toneIndigo
```

## Components

### Application

- [Main Window](https://github.com/jopohl/urh/blob/master/src/urh/controller/MainController.py): `src/urh/controller/MainController.py`
- [Protocol Analysis UI](https://github.com/jopohl/urh/blob/master/src/urh/controller/CompareFrameController.py): `src/urh/controller/CompareFrameController.py`
- [Generator UI](https://github.com/jopohl/urh/blob/master/src/urh/controller/GeneratorTabController.py): `src/urh/controller/GeneratorTabController.py`
- [Simulator UI](https://github.com/jopohl/urh/blob/master/src/urh/controller/SimulatorTabController.py): `src/urh/controller/SimulatorTabController.py`
- [Signal UI](https://github.com/jopohl/urh/blob/master/src/urh/controller/SignalTabController.py): `src/urh/controller/SignalTabController.py`

### Radio and Signals

- [SDR Backends](https://github.com/jopohl/urh/tree/master/src/urh/dev): `src/urh/dev`
- [Signal Model](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Signal.py): `src/urh/signalprocessing/Signal.py`
- [IQ Samples](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/IQArray.py): `src/urh/signalprocessing/IQArray.py`

### Protocol Analysis

- [Protocol Analyzer](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/ProtocolAnalyzer.py): `src/urh/signalprocessing/ProtocolAnalyzer.py`
- [Messages](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Message.py): `src/urh/signalprocessing/Message.py`
- [Decoding](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Encoding.py): `src/urh/signalprocessing/Encoding.py`
- [Message Types](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/MessageType.py): `src/urh/signalprocessing/MessageType.py`
- [Protocol Labels](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/ProtocoLabel.py): `src/urh/signalprocessing/ProtocoLabel.py`
- [Field Types](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/FieldType.py): `src/urh/signalprocessing/FieldType.py`
- [Automatic Field Inference](https://github.com/jopohl/urh/tree/master/src/urh/awre): `src/urh/awre`
- [Common Ranges](https://github.com/jopohl/urh/blob/master/src/urh/awre/CommonRange.py): `src/urh/awre/CommonRange.py`
- [Inference Engine](https://github.com/jopohl/urh/blob/master/src/urh/awre/engines/Engine.py): `src/urh/awre/engines/Engine.py`

### Generation and Attacks

- [Modulation](https://github.com/jopohl/urh/blob/master/src/urh/signalprocessing/Modulator.py): `src/urh/signalprocessing/Modulator.py`
- [Fuzzing](https://github.com/jopohl/urh/blob/master/src/urh/controller/dialogs/FuzzingDialog.py): `src/urh/controller/dialogs/FuzzingDialog.py`
- [Stateful Simulation](https://github.com/jopohl/urh/blob/master/src/urh/simulator/Simulator.py): `src/urh/simulator/Simulator.py`

### Project and Extensions

- [Project Persistence](https://github.com/jopohl/urh/blob/master/src/urh/util/ProjectManager.py): `src/urh/util/ProjectManager.py`
- [Signal File I/O](https://github.com/jopohl/urh/blob/master/src/urh/util/FileOperator.py): `src/urh/util/FileOperator.py`
- [Plugins](https://github.com/jopohl/urh/blob/master/src/urh/plugins/PluginManager.py): `src/urh/plugins/PluginManager.py`
- [Preferences](https://github.com/jopohl/urh/blob/master/src/urh/settings.py): `src/urh/settings.py`
- [Formatting](https://github.com/jopohl/urh/blob/master/src/urh/util/Formatter.py): `src/urh/util/Formatter.py`
- [CRC Utilities](https://github.com/jopohl/urh/blob/master/src/urh/util/GenericCRC.py): `src/urh/util/GenericCRC.py`

### Other components

- **Investigator**
- **Radio Device**

## Connections

- Investigator → Main Window: uses
- Main Window → Protocol Analysis UI: opens analysis (evidence: `src/urh/controller/MainController.py`)
- Main Window → Generator UI: opens generator (evidence: `src/urh/controller/MainController.py`)
- Main Window → Simulator UI: opens simulator (evidence: `src/urh/controller/MainController.py`)
- Main Window → Signal UI: opens signal tools (evidence: `src/urh/controller/MainController.py`)
- Radio Device → SDR Backends: provides radio I/O
- SDR Backends → Signal Model: receives or sends
- Signal UI → Signal Model: handles signals
- Protocol Analysis UI → Protocol Analyzer: uses (evidence: `src/urh/controller/CompareFrameController.py`)
- Protocol Analyzer → Messages: uses messages (evidence: `src/urh/signalprocessing/ProtocolAnalyzer.py`)
- Protocol Analyzer → Decoding: applies decoding (evidence: `src/urh/signalprocessing/ProtocolAnalyzer.py`)
- Protocol Analysis UI → Message Types: edits types (evidence: `src/urh/controller/CompareFrameController.py`)
- Message Types → Protocol Labels: holds labels (evidence: `src/urh/signalprocessing/MessageType.py`)
- Protocol Labels → Field Types: uses field types (evidence: `src/urh/signalprocessing/ProtocoLabel.py`)
- Protocol Analysis UI → Automatic Field Inference: invokes inference (evidence: `src/urh/controller/CompareFrameController.py`)
- Automatic Field Inference → Inference Engine: uses engines (evidence: `src/urh/awre/engines/AddressEngine.py`)
- Inference Engine → Common Ranges: finds ranges (evidence: `src/urh/awre/engines/Engine.py`)
- Generator UI → Modulation: uses modulation (evidence: `src/urh/controller/GeneratorTabController.py`)
- Generator UI → Fuzzing: opens fuzzing (evidence: `src/urh/controller/GeneratorTabController.py`)
- Simulator UI → Stateful Simulation: configures simulation (evidence: `src/urh/controller/SimulatorTabController.py`)
- Main Window → Project Persistence: manages project (evidence: `src/urh/controller/MainController.py`)
- Project Persistence → Signal Model: loads signal state (evidence: `src/urh/util/ProjectManager.py`)
- Project Persistence → Signal File I/O: uses file I/O (evidence: `src/urh/util/ProjectManager.py`)
- Protocol Analysis UI → Plugins: uses plugins (evidence: `src/urh/controller/CompareFrameController.py`)
- Project Persistence → Preferences: uses settings (evidence: `src/urh/util/ProjectManager.py`)
- Decoding → CRC Utilities: uses CRC (evidence: `src/urh/signalprocessing/Encoding.py`)
- Messages → Formatting: formats values
- Signal File I/O → IQ Samples: loads samples (evidence: `src/urh/util/FileOperator.py`)
