# vinaykalariya/opc-ua- architecture

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

- Interactive diagram: https://gitdiagram.com/vinaykalariya/opc-ua-
- Repository: https://github.com/vinaykalariya/opc-ua-

## Overview

This repository is a collection of industrial-automation data acquisition and bridging programs, rather than a single clearly documented application. Its most evident runtime path collects PLC/SCADA values and exposes them through shared memory to an OPC UA server. It also contains separate Modbus and SCADA readers, a Qt desktop application, and smaller logging and alarm-XML utilities. No README is present, and sampled excerpts do not establish how the GUI launches or configures the collectors, so those connections are omitted.

Main entry points: [`scada/scada.cpp`](https://github.com/vinaykalariya/opc-ua-/blob/main/scada/scada.cpp) (SCADA Reader), [`opc_da/opc_fast_reader.cpp`](https://github.com/vinaykalariya/opc-ua-/blob/main/opc_da/opc_fast_reader.cpp) (OPC DA Reader), [`modbus/modbus.cpp`](https://github.com/vinaykalariya/opc-ua-/blob/main/modbus/modbus.cpp) (Modbus Collector), [`ofs_opc/opc_fast_reader.cpp`](https://github.com/vinaykalariya/opc-ua-/blob/main/ofs_opc/opc_fast_reader.cpp) (OFS Reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collect["Data Collection"]
  node_scada_reader["SCADA Reader<br/>[scada.cpp]"]
  node_opc_reader["OPC DA Reader"]
  node_modbus_reader["Modbus Collector<br/>[modbus.cpp]"]
  node_ofs_reader["OFS Reader"]
  node_scada_service["AVEVA Plant SCADA"]
  node_opc_da_service["OPC DA Server"]
  node_modbus_device["Modbus Devices"]
  node_ofs_service["Schneider OFS"]
end

subgraph group_bridge["OPC UA Bridge"]
  node_shared_memory[("Shared Memory")]
  node_ua_server["OPC UA Server<br/>[opc_ua_server.py]"]
  node_ua_clients(("OPC UA Clients"))
end

subgraph group_desktop["Desktop Tools"]
  node_gui["Multilink GUI<br/>[mainwindow.cpp]"]
end

subgraph group_utilities["Data Utilities"]
  node_avg_logger["Average Logger<br/>[avg_logger.py]"]
  node_alarm_xml["Alarm XML Editor<br/>[xml_edit.cpp]"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_gui
node_opc_da_service -->|"provides values"| node_opc_reader
node_opc_reader -->|"writes values"| node_shared_memory
node_modbus_device -->|"provides values"| node_modbus_reader
node_modbus_reader -->|"writes values"| node_shared_memory
node_ofs_service -->|"provides values"| node_ofs_reader
node_ofs_reader -->|"writes values"| node_shared_memory
node_scada_reader -->|"reads tags"| node_scada_service
node_scada_reader -->|"uses control memory"| node_shared_memory
node_shared_memory -->|"supplies tag values"| node_ua_server
node_ua_server -->|"serves data"| node_ua_clients

click node_gui "https://github.com/vinaykalariya/opc-ua-/blob/main/MultilinkServer/mainwindow.cpp"
click node_scada_reader "https://github.com/vinaykalariya/opc-ua-/blob/main/scada/scada.cpp"
click node_opc_reader "https://github.com/vinaykalariya/opc-ua-/blob/main/opc_da/opc_fast_reader.cpp"
click node_modbus_reader "https://github.com/vinaykalariya/opc-ua-/blob/main/modbus/modbus.cpp"
click node_ofs_reader "https://github.com/vinaykalariya/opc-ua-/blob/main/ofs_opc/opc_fast_reader.cpp"
click node_ua_server "https://github.com/vinaykalariya/opc-ua-/blob/main/opc_ua/opc_ua_server.py"
click node_avg_logger "https://github.com/vinaykalariya/opc-ua-/blob/main/excel_avg/avg_logger.py"
click node_alarm_xml "https://github.com/vinaykalariya/opc-ua-/blob/main/xml_alarm_category/xml_edit.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_scada_reader,node_opc_reader,node_modbus_reader,node_ofs_reader,node_scada_service,node_opc_da_service,node_modbus_device,node_ofs_service toneBlue
class node_shared_memory,node_ua_server,node_ua_clients toneAmber
class node_gui toneMint
class node_avg_logger,node_alarm_xml toneRose
class node_operator toneIndigo
```

## Components

### Data Collection

- [SCADA Reader](https://github.com/vinaykalariya/opc-ua-/blob/main/scada/scada.cpp): `scada/scada.cpp`
- [OPC DA Reader](https://github.com/vinaykalariya/opc-ua-/blob/main/opc_da/opc_fast_reader.cpp): `opc_da/opc_fast_reader.cpp`
- [Modbus Collector](https://github.com/vinaykalariya/opc-ua-/blob/main/modbus/modbus.cpp): `modbus/modbus.cpp`
- [OFS Reader](https://github.com/vinaykalariya/opc-ua-/blob/main/ofs_opc/opc_fast_reader.cpp): `ofs_opc/opc_fast_reader.cpp`
- **AVEVA Plant SCADA**
- **OPC DA Server**
- **Modbus Devices**
- **Schneider OFS**

### OPC UA Bridge

- **Shared Memory**
- [OPC UA Server](https://github.com/vinaykalariya/opc-ua-/blob/main/opc_ua/opc_ua_server.py): `opc_ua/opc_ua_server.py`
- **OPC UA Clients**

### Desktop Tools

- [Multilink GUI](https://github.com/vinaykalariya/opc-ua-/blob/main/MultilinkServer/mainwindow.cpp): `MultilinkServer/mainwindow.cpp`

### Data Utilities

- [Average Logger](https://github.com/vinaykalariya/opc-ua-/blob/main/excel_avg/avg_logger.py): `excel_avg/avg_logger.py`
- [Alarm XML Editor](https://github.com/vinaykalariya/opc-ua-/blob/main/xml_alarm_category/xml_edit.cpp): `xml_alarm_category/xml_edit.cpp`

### Other components

- **Operator**

## Connections

- Operator → Multilink GUI: uses
- OPC DA Server → OPC DA Reader: provides values
- OPC DA Reader → Shared Memory: writes values
- Modbus Devices → Modbus Collector: provides values
- Modbus Collector → Shared Memory: writes values
- Schneider OFS → OFS Reader: provides values
- OFS Reader → Shared Memory: writes values
- SCADA Reader → AVEVA Plant SCADA: reads tags
- SCADA Reader → Shared Memory: uses control memory
- Shared Memory → OPC UA Server: supplies tag values
- OPC UA Server → OPC UA Clients: serves data
