# shaohua0720/link16_jtids architecture

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

- Interactive diagram: https://gitdiagram.com/shaohua0720/link16_jtids
- Repository: https://github.com/shaohua0720/link16_jtids

## Overview

Link16 is a tactical data-link implementation with public APIs, J-series message handling, coding and encryption, radio/physical-layer support, and link simulation. The primary workflow is an application entry point into system functions, with message formation and coding exposed as separate capabilities and physical transmission available for real-radio use. Simulation has both an end-to-end path and a separate engine/configuration path. Some API-to-implementation links are documented or only implied by the available excerpts; those are marked dashed or omitted rather than presented as verified calls.

Main entry points: [`src/simulation/EndToEndSimulation.cpp`](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/EndToEndSimulation.cpp) (End-to-end simulation), [`src/coding/CodingProcessor.cpp`](https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/CodingProcessor.cpp) (Coding processor), [`src/simulation/engine/SimulationEngine.cpp`](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/engine/SimulationEngine.cpp) (Simulation engine), [`src/api/PhysicalAPI.cpp`](https://github.com/shaohua0720/link16_jtids/blob/master/src/api/PhysicalAPI.cpp) (Physical API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and API"]
  node_entry["Application entry<br/>[main.cpp]"]
  node_system["System integration<br/>[Link16System.cpp]"]
  node_realapp["Real-mode app<br/>[Link16App.cpp]"]
  node_simapp["Simulation app<br/>[SimulationApp.cpp]"]
  node_messageapi["Message API<br/>[MessageAPI.cpp]"]
  node_codingapi["Coding API<br/>[CodingAPI.cpp]"]
  node_physicalapi["Physical API<br/>[PhysicalAPI.cpp]"]
  node_simulationapi["Simulation API<br/>[SimulationAPI.cpp]"]
end

subgraph group_protocol["Message protocol"]
  node_stdp["STDP messages<br/>[STDPMsg.h]"]
  node_jseries["J-series formats<br/>[J_Series.cpp]"]
end

subgraph group_coding["Coding and crypto"]
  node_processor["Coding processor"]
  node_rs["Reed-Solomon<br/>[RSCoder.cpp]"]
  node_schifra["RS library backend"]
  node_crc["CRC checks<br/>[CRCCoder.h]"]
  node_interleave["Matrix interleaving"]
  node_aes["AES encryption<br/>[AESCrypto.cpp]"]
end

subgraph group_physical["Physical layer"]
  node_physical["Physical processing"]
  node_modulation["BPSK and QPSK<br/>[BPSKModulator.h]"]
  node_hopping["Frequency hopping"]
  node_freqmgr["Frequency management"]
  node_usrp["USRP radio I/O<br/>[USRPInterface.cpp]"]
  node_sync["Frame and time sync"]
end

subgraph group_simulation["Link simulation"]
  node_e2e["End-to-end simulation"]
  node_engine["Simulation engine"]
  node_config["Simulation config"]
  node_channel["Channel models<br/>[ChannelModel.h]"]
  node_metrics["BER and throughput<br/>[Throughput.h]"]
end

node_user(("Operator or caller"))

node_user -.->|"starts"| node_entry
node_entry -->|"invokes"| node_system
node_system -.->|"selects mode"| node_realapp
node_system -.->|"selects mode"| node_simapp
node_realapp -->|"uses messages"| node_stdp
node_realapp -->|"uses formats"| node_jseries
node_messageapi -.->|"formats messages"| node_stdp
node_codingapi -->|"delegates coding"| node_processor
node_processor -->|"uses"| node_rs
node_processor -->|"uses"| node_aes
node_processor -->|"uses"| node_interleave
node_processor -.->|"checks CRC"| node_crc
node_rs -->|"uses backend"| node_schifra
node_physicalapi -.->|"radio interface"| node_usrp
node_physicalapi -.->|"modulation options"| node_modulation
node_physicalapi -.->|"hopping support"| node_hopping
node_physical -.->|"synchronization support"| node_sync
node_freqmgr -.->|"frequency support"| node_hopping
node_simapp -.->|"runs simulation"| node_e2e
node_simulationapi -.->|"exposes simulation"| node_e2e
node_e2e -->|"initializes"| node_engine
node_e2e -->|"selects model"| node_channel
node_e2e -->|"modulates"| node_modulation
node_e2e -->|"encodes"| node_rs
node_e2e -->|"interleaves"| node_interleave
node_e2e -->|"measures"| node_metrics
node_engine -->|"reads settings"| node_config
node_engine -->|"creates model"| node_channel
node_engine -->|"metric support"| node_metrics

click node_entry "https://github.com/shaohua0720/link16_jtids/blob/master/src/application/main.cpp"
click node_system "https://github.com/shaohua0720/link16_jtids/blob/master/src/application/Link16System.cpp"
click node_realapp "https://github.com/shaohua0720/link16_jtids/blob/master/src/application/real/Link16App.cpp"
click node_simapp "https://github.com/shaohua0720/link16_jtids/blob/master/src/application/simulation/SimulationApp.cpp"
click node_messageapi "https://github.com/shaohua0720/link16_jtids/blob/master/src/api/MessageAPI.cpp"
click node_codingapi "https://github.com/shaohua0720/link16_jtids/blob/master/src/api/CodingAPI.cpp"
click node_physicalapi "https://github.com/shaohua0720/link16_jtids/blob/master/src/api/PhysicalAPI.cpp"
click node_simulationapi "https://github.com/shaohua0720/link16_jtids/blob/master/src/api/SimulationAPI.cpp"
click node_stdp "https://github.com/shaohua0720/link16_jtids/blob/master/src/protocol/message/STDPMsg.h"
click node_jseries "https://github.com/shaohua0720/link16_jtids/blob/master/src/protocol/formats/J_Series.cpp"
click node_processor "https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/CodingProcessor.cpp"
click node_rs "https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/error_correction/reed_solomon/RSCoder.cpp"
click node_schifra "https://github.com/shaohua0720/link16_jtids/blob/master/lib/schifra/schifra_error_processes.hpp"
click node_crc "https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/error_detection/crc/CRCCoder.h"
click node_interleave "https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/interleaving/matrix/MatrixInterleaver.cpp"
click node_aes "https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/crypto/symmetric/aes/AESCrypto.cpp"
click node_physical "https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/PhysicalProcessor.h"
click node_modulation "https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/modulation/digital/PSK/BPSKModulator.h"
click node_hopping "https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/frequency/hopping/FrequencyHopping.cpp"
click node_freqmgr "https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/frequency/management/FrequencyManager.cpp"
click node_usrp "https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/hardware/usrp/USRPInterface.cpp"
click node_sync "https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/synchronization/frame/FrameSynchronizer.cpp"
click node_e2e "https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/EndToEndSimulation.cpp"
click node_engine "https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/engine/SimulationEngine.cpp"
click node_config "https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/engine/SimulationConfig.cpp"
click node_channel "https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/channel/base/ChannelModel.h"
click node_metrics "https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/metrics/Throughput.h"

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_entry,node_system,node_realapp,node_simapp,node_messageapi,node_codingapi,node_physicalapi,node_simulationapi toneBlue
class node_stdp,node_jseries toneAmber
class node_processor,node_rs,node_schifra,node_crc,node_interleave,node_aes toneMint
class node_physical,node_modulation,node_hopping,node_freqmgr,node_usrp,node_sync toneRose
class node_e2e,node_engine,node_config,node_channel,node_metrics,node_user toneIndigo
```

## Components

### Application and API

- [Application entry](https://github.com/shaohua0720/link16_jtids/blob/master/src/application/main.cpp): `src/application/main.cpp`
- [System integration](https://github.com/shaohua0720/link16_jtids/blob/master/src/application/Link16System.cpp): `src/application/Link16System.cpp`
- [Real-mode app](https://github.com/shaohua0720/link16_jtids/blob/master/src/application/real/Link16App.cpp): `src/application/real/Link16App.cpp`
- [Simulation app](https://github.com/shaohua0720/link16_jtids/blob/master/src/application/simulation/SimulationApp.cpp): `src/application/simulation/SimulationApp.cpp`
- [Message API](https://github.com/shaohua0720/link16_jtids/blob/master/src/api/MessageAPI.cpp): `src/api/MessageAPI.cpp`
- [Coding API](https://github.com/shaohua0720/link16_jtids/blob/master/src/api/CodingAPI.cpp): `src/api/CodingAPI.cpp`
- [Physical API](https://github.com/shaohua0720/link16_jtids/blob/master/src/api/PhysicalAPI.cpp): `src/api/PhysicalAPI.cpp`
- [Simulation API](https://github.com/shaohua0720/link16_jtids/blob/master/src/api/SimulationAPI.cpp): `src/api/SimulationAPI.cpp`

### Message protocol

- [STDP messages](https://github.com/shaohua0720/link16_jtids/blob/master/src/protocol/message/STDPMsg.h): `src/protocol/message/STDPMsg.h`
- [J-series formats](https://github.com/shaohua0720/link16_jtids/blob/master/src/protocol/formats/J_Series.cpp): `src/protocol/formats/J_Series.cpp`

### Coding and crypto

- [Coding processor](https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/CodingProcessor.cpp): `src/coding/CodingProcessor.cpp`
- [Reed-Solomon](https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/error_correction/reed_solomon/RSCoder.cpp): `src/coding/error_correction/reed_solomon/RSCoder.cpp`
- [RS library backend](https://github.com/shaohua0720/link16_jtids/blob/master/lib/schifra/schifra_error_processes.hpp): `lib/schifra/schifra_error_processes.hpp`
- [CRC checks](https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/error_detection/crc/CRCCoder.h): `src/coding/error_detection/crc/CRCCoder.h`
- [Matrix interleaving](https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/interleaving/matrix/MatrixInterleaver.cpp): `src/coding/interleaving/matrix/MatrixInterleaver.cpp`
- [AES encryption](https://github.com/shaohua0720/link16_jtids/blob/master/src/coding/crypto/symmetric/aes/AESCrypto.cpp): `src/coding/crypto/symmetric/aes/AESCrypto.cpp`

### Physical layer

- [Physical processing](https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/PhysicalProcessor.h): `src/physical/PhysicalProcessor.h`
- [BPSK and QPSK](https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/modulation/digital/PSK/BPSKModulator.h): `src/physical/modulation/digital/PSK/BPSKModulator.h`
- [Frequency hopping](https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/frequency/hopping/FrequencyHopping.cpp): `src/physical/frequency/hopping/FrequencyHopping.cpp`
- [Frequency management](https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/frequency/management/FrequencyManager.cpp): `src/physical/frequency/management/FrequencyManager.cpp`
- [USRP radio I/O](https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/hardware/usrp/USRPInterface.cpp): `src/physical/hardware/usrp/USRPInterface.cpp`
- [Frame and time sync](https://github.com/shaohua0720/link16_jtids/blob/master/src/physical/synchronization/frame/FrameSynchronizer.cpp): `src/physical/synchronization/frame/FrameSynchronizer.cpp`

### Link simulation

- [End-to-end simulation](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/EndToEndSimulation.cpp): `src/simulation/EndToEndSimulation.cpp`
- [Simulation engine](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/engine/SimulationEngine.cpp): `src/simulation/engine/SimulationEngine.cpp`
- [Simulation config](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/engine/SimulationConfig.cpp): `src/simulation/engine/SimulationConfig.cpp`
- [Channel models](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/channel/base/ChannelModel.h): `src/simulation/channel/base/ChannelModel.h`
- [BER and throughput](https://github.com/shaohua0720/link16_jtids/blob/master/src/simulation/metrics/Throughput.h): `src/simulation/metrics/Throughput.h`

### Other components

- **Operator or caller**

## Connections

- Operator or caller → Application entry: starts
- Application entry → System integration: invokes (evidence: `src/application/main.cpp`)
- System integration → Real-mode app: selects mode
- System integration → Simulation app: selects mode
- Real-mode app → STDP messages: uses messages (evidence: `src/application/real/Link16App.cpp`)
- Real-mode app → J-series formats: uses formats (evidence: `src/application/real/Link16App.cpp`)
- Message API → STDP messages: formats messages (evidence: `README.md`)
- Coding API → Coding processor: delegates coding (evidence: `src/api/CodingAPI.cpp`)
- Coding processor → Reed-Solomon: uses (evidence: `src/coding/CodingProcessor.cpp`)
- Coding processor → AES encryption: uses (evidence: `src/coding/CodingProcessor.cpp`)
- Coding processor → Matrix interleaving: uses (evidence: `src/coding/CodingProcessor.cpp`)
- Coding processor → CRC checks: checks CRC
- Reed-Solomon → RS library backend: uses backend (evidence: `src/coding/error_correction/reed_solomon/RSCoder.cpp`)
- Physical API → USRP radio I/O: radio interface (evidence: `README.md`)
- Physical API → BPSK and QPSK: modulation options (evidence: `README.md`)
- Physical API → Frequency hopping: hopping support (evidence: `README.md`)
- Physical processing → Frame and time sync: synchronization support (evidence: `README.md`)
- Frequency management → Frequency hopping: frequency support
- Simulation app → End-to-end simulation: runs simulation
- Simulation API → End-to-end simulation: exposes simulation (evidence: `README.md`)
- End-to-end simulation → Simulation engine: initializes (evidence: `src/simulation/EndToEndSimulation.cpp`)
- End-to-end simulation → Channel models: selects model (evidence: `src/simulation/EndToEndSimulation.cpp`)
- End-to-end simulation → BPSK and QPSK: modulates (evidence: `src/simulation/EndToEndSimulation.cpp`)
- End-to-end simulation → Reed-Solomon: encodes (evidence: `src/simulation/EndToEndSimulation.cpp`)
- End-to-end simulation → Matrix interleaving: interleaves (evidence: `src/simulation/EndToEndSimulation.cpp`)
- End-to-end simulation → BER and throughput: measures (evidence: `src/simulation/EndToEndSimulation.cpp`)
- Simulation engine → Simulation config: reads settings
- Simulation engine → Channel models: creates model (evidence: `src/simulation/engine/SimulationEngine.cpp`)
- Simulation engine → BER and throughput: metric support (evidence: `src/simulation/engine/SimulationEngine.cpp`)
