# gentlman2006/hslcommunication architecture

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

- Interactive diagram: https://gitdiagram.com/gentlman2006/hslcommunication
- Repository: https://github.com/gentlman2006/hslcommunication

## Overview

HslCommunication is a .NET utility and communications library. Its principal workflow is for an application to request data from a PLC or network peer, exchange protocol data, and receive an operation result. The repository also provides Ethernet file/network services, serial support, logging, authorization, and general-purpose helpers. The graph reflects calls and references visible in excerpts or the SOURCE INDEX; links to unsampled capabilities are omitted where their wiring cannot be established.

Main entry points: [`HslCommunication_Net35/Core/Net/NetBase.cs`](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Net/NetBase.cs) (Socket transport), [`HslCommunication_Net35/Profinet/SiemensNet.cs`](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/SiemensNet.cs) (Siemens driver), [`HslCommunication_Net35/LogNet/LogNetManagment.cs`](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/LogNetManagment.cs) (Log management), [`HslCommunication_Net35/Core/Types/OperateResult.cs`](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Types/OperateResult.cs) (Operation results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transport["Network transport"]
  node_netbase["Socket transport<br/>[NetBase.cs]"]
  node_file_net["File services<br/>[ClassFileNet.cs]"]
  node_multi_net["Multi-client network<br/>[ClassMultiNet.cs]"]
  node_udp_net["UDP services<br/>[ClassUdpNet.cs]"]
  node_simplify["Simplified networking<br/>[ClassSimplify.cs]"]
  node_soft_update["Update service<br/>[ClassSoftUpdate.cs]"]
end

subgraph group_protocols["Device protocols"]
  node_plc_base["PLC base<br/>[PlcNetBase.cs]"]
  node_siemens["Siemens driver<br/>[SiemensNet.cs]"]
  node_melsec["Melsec driver<br/>[MelsecNet.cs]"]
  node_serial["Serial transport"]
  node_crc["CRC support<br/>[CRCSupport.cs]"]
end

subgraph group_logging["Logging"]
  node_log_api["Logging interface<br/>[ILogNet.cs]"]
  node_log_manager["Log management<br/>[LogNetManagment.cs]"]
  node_log_base["Log base<br/>[LogBase.cs]"]
  node_log_sinks["File loggers<br/>[LogNetDateTime.cs]"]
  node_log_view["Log analysis UI"]
end

subgraph group_utilities["Framework utilities"]
  node_results["Operation results<br/>[OperateResult.cs]"]
  node_timeout["Timeout handling<br/>[HslTimeOut.cs]"]
  node_security["Wire security<br/>[Security.cs]"]
  node_soft_authorize["Software authorization<br/>[SoftAuthorize.cs]"]
  node_soft_security["Security helpers<br/>[SoftSecurity.cs]"]
  node_soft_basic["Basic helpers<br/>[SoftBasic.cs]"]
  node_soft_painting["Painting helpers<br/>[SoftPainting.cs]"]
  node_version["Version resources<br/>[SoftVersion.cs]"]
  node_strings["Message resources<br/>[StringResources.cs]"]
end

node_app(("Application"))

node_netbase -->|"checks timeouts"| node_timeout
node_netbase -->|"writes logs"| node_log_api
node_netbase -->|"returns results"| node_results
node_netbase -->|"uses helpers"| node_soft_basic
node_netbase -->|"uses messages"| node_strings
node_file_net -->|"uses security"| node_security
node_file_net -->|"returns results"| node_results
node_multi_net -->|"uses security"| node_security
node_multi_net -->|"returns results"| node_results
node_udp_net -->|"uses transport"| node_netbase
node_plc_base -->|"extends transport"| node_netbase
node_siemens -->|"extends base"| node_plc_base
node_siemens -->|"uses timeouts"| node_timeout
node_siemens -->|"returns results"| node_results
node_melsec -->|"extends base"| node_plc_base
node_melsec -->|"uses timeouts"| node_timeout
node_soft_authorize -->|"uses security"| node_security
node_soft_authorize -->|"uses helpers"| node_soft_security
node_soft_authorize -->|"uses helpers"| node_soft_basic
node_soft_security -->|"uses security"| node_security
node_log_manager -->|"configures logger"| node_log_api
node_log_base -->|"uses management"| node_log_manager
node_log_sinks -->|"implements interface"| node_log_api
node_log_sinks -->|"uses management"| node_log_manager
node_log_view -->|"uses painting"| node_soft_painting
node_log_view -->|"uses management"| node_log_manager
node_app -.->|"reads or writes"| node_siemens
node_app -.->|"reads or writes"| node_melsec
node_app -.->|"uses services"| node_file_net

click node_netbase "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Net/NetBase.cs"
click node_file_net "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassFileNet.cs"
click node_multi_net "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassMultiNet.cs"
click node_udp_net "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassUdpNet.cs"
click node_simplify "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassSimplify.cs"
click node_soft_update "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassSoftUpdate.cs"
click node_plc_base "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/PlcNetBase.cs"
click node_siemens "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/SiemensNet.cs"
click node_melsec "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/MelsecNet.cs"
click node_serial "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Serial/SerialCommunicationBase.cs"
click node_crc "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Serial/CRCSupport.cs"
click node_log_api "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/Core/ILogNet.cs"
click node_log_manager "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/LogNetManagment.cs"
click node_log_base "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/Core/LogBase.cs"
click node_log_sinks "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/Logs/LogNetDateTime.cs"
click node_log_view "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/View/LogNetAnalysisControl.cs"
click node_results "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Types/OperateResult.cs"
click node_timeout "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Types/HslTimeOut.cs"
click node_security "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Security/Security.cs"
click node_soft_authorize "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftAuthorize.cs"
click node_soft_security "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftSecurity.cs"
click node_soft_basic "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftBasic.cs"
click node_soft_painting "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftPainting.cs"
click node_version "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftVersion.cs"
click node_strings "https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/StringResources.cs"

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_netbase,node_file_net,node_multi_net,node_udp_net,node_simplify,node_soft_update toneBlue
class node_plc_base,node_siemens,node_melsec,node_serial,node_crc toneAmber
class node_log_api,node_log_manager,node_log_base,node_log_sinks,node_log_view toneMint
class node_results,node_timeout,node_security,node_soft_authorize,node_soft_security,node_soft_basic,node_soft_painting,node_version,node_strings toneRose
class node_app toneIndigo
```

## Components

### Network transport

- [Socket transport](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Net/NetBase.cs): `HslCommunication_Net35/Core/Net/NetBase.cs`
- [File services](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassFileNet.cs): `HslCommunication_Net35/Enthernet/ClassFileNet.cs`
- [Multi-client network](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassMultiNet.cs): `HslCommunication_Net35/Enthernet/ClassMultiNet.cs`
- [UDP services](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassUdpNet.cs): `HslCommunication_Net35/Enthernet/ClassUdpNet.cs`
- [Simplified networking](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassSimplify.cs): `HslCommunication_Net35/Enthernet/ClassSimplify.cs`
- [Update service](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Enthernet/ClassSoftUpdate.cs): `HslCommunication_Net35/Enthernet/ClassSoftUpdate.cs`

### Device protocols

- [PLC base](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/PlcNetBase.cs): `HslCommunication_Net35/Profinet/PlcNetBase.cs`
- [Siemens driver](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/SiemensNet.cs): `HslCommunication_Net35/Profinet/SiemensNet.cs`
- [Melsec driver](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Profinet/MelsecNet.cs): `HslCommunication_Net35/Profinet/MelsecNet.cs`
- [Serial transport](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Serial/SerialCommunicationBase.cs): `HslCommunication_Net35/Serial/SerialCommunicationBase.cs`
- [CRC support](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Serial/CRCSupport.cs): `HslCommunication_Net35/Serial/CRCSupport.cs`

### Logging

- [Logging interface](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/Core/ILogNet.cs): `HslCommunication_Net35/LogNet/Core/ILogNet.cs`
- [Log management](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/LogNetManagment.cs): `HslCommunication_Net35/LogNet/LogNetManagment.cs`
- [Log base](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/Core/LogBase.cs): `HslCommunication_Net35/LogNet/Core/LogBase.cs`
- [File loggers](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/Logs/LogNetDateTime.cs): `HslCommunication_Net35/LogNet/Logs/LogNetDateTime.cs`
- [Log analysis UI](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/LogNet/View/LogNetAnalysisControl.cs): `HslCommunication_Net35/LogNet/View/LogNetAnalysisControl.cs`

### Framework utilities

- [Operation results](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Types/OperateResult.cs): `HslCommunication_Net35/Core/Types/OperateResult.cs`
- [Timeout handling](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Types/HslTimeOut.cs): `HslCommunication_Net35/Core/Types/HslTimeOut.cs`
- [Wire security](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/Core/Security/Security.cs): `HslCommunication_Net35/Core/Security/Security.cs`
- [Software authorization](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftAuthorize.cs): `HslCommunication_Net35/BasicFramework/SoftAuthorize.cs`
- [Security helpers](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftSecurity.cs): `HslCommunication_Net35/BasicFramework/SoftSecurity.cs`
- [Basic helpers](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftBasic.cs): `HslCommunication_Net35/BasicFramework/SoftBasic.cs`
- [Painting helpers](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftPainting.cs): `HslCommunication_Net35/BasicFramework/SoftPainting.cs`
- [Version resources](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/BasicFramework/SoftVersion.cs): `HslCommunication_Net35/BasicFramework/SoftVersion.cs`
- [Message resources](https://github.com/gentlman2006/hslcommunication/blob/master/HslCommunication_Net35/StringResources.cs): `HslCommunication_Net35/StringResources.cs`

### Other components

- **Application**

## Connections

- Socket transport → Timeout handling: checks timeouts (evidence: `HslCommunication_Net35/Core/Net/NetBase.cs`)
- Socket transport → Logging interface: writes logs (evidence: `HslCommunication_Net35/Core/Net/NetBase.cs`)
- Socket transport → Operation results: returns results (evidence: `HslCommunication_Net35/Core/Net/NetBase.cs`)
- Socket transport → Basic helpers: uses helpers (evidence: `HslCommunication_Net35/Core/Net/NetBase.cs`)
- Socket transport → Message resources: uses messages (evidence: `HslCommunication_Net35/Core/Net/NetBase.cs`)
- File services → Wire security: uses security (evidence: `HslCommunication_Net35/Enthernet/ClassFileNet.cs`)
- File services → Operation results: returns results (evidence: `HslCommunication_Net35/Enthernet/ClassFileNet.cs`)
- Multi-client network → Wire security: uses security (evidence: `HslCommunication_Net35/Enthernet/ClassMultiNet.cs`)
- Multi-client network → Operation results: returns results (evidence: `HslCommunication_Net35/Enthernet/ClassMultiNet.cs`)
- UDP services → Socket transport: uses transport (evidence: `HslCommunication_Net35/Enthernet/ClassUdpNet.cs`)
- PLC base → Socket transport: extends transport (evidence: `HslCommunication_Net35/Profinet/PlcNetBase.cs`)
- Siemens driver → PLC base: extends base (evidence: `HslCommunication_Net35/Profinet/SiemensNet.cs`)
- Siemens driver → Timeout handling: uses timeouts (evidence: `HslCommunication_Net35/Profinet/SiemensNet.cs`)
- Siemens driver → Operation results: returns results (evidence: `HslCommunication_Net35/Profinet/SiemensNet.cs`)
- Melsec driver → PLC base: extends base (evidence: `HslCommunication_Net35/Profinet/MelsecNet.cs`)
- Melsec driver → Timeout handling: uses timeouts (evidence: `HslCommunication_Net35/Profinet/MelsecNet.cs`)
- Software authorization → Wire security: uses security (evidence: `HslCommunication_Net35/BasicFramework/SoftAuthorize.cs`)
- Software authorization → Security helpers: uses helpers (evidence: `HslCommunication_Net35/BasicFramework/SoftAuthorize.cs`)
- Software authorization → Basic helpers: uses helpers (evidence: `HslCommunication_Net35/BasicFramework/SoftAuthorize.cs`)
- Security helpers → Wire security: uses security (evidence: `HslCommunication_Net35/BasicFramework/SoftSecurity.cs`)
- Log management → Logging interface: configures logger (evidence: `HslCommunication_Net35/LogNet/LogNetManagment.cs`)
- Log base → Log management: uses management (evidence: `HslCommunication_Net35/LogNet/Core/LogBase.cs`)
- File loggers → Logging interface: implements interface (evidence: `HslCommunication_Net35/LogNet/Logs/LogNetDateTime.cs`)
- File loggers → Log management: uses management (evidence: `HslCommunication_Net35/LogNet/Logs/LogNetDateTime.cs`)
- Log analysis UI → Painting helpers: uses painting (evidence: `HslCommunication_Net35/LogNet/View/LogNetAnalysisControl.cs`)
- Log analysis UI → Log management: uses management (evidence: `HslCommunication_Net35/LogNet/View/LogNetAnalysisControl.cs`)
- Application → Siemens driver: reads or writes
- Application → Melsec driver: reads or writes
- Application → File services: uses services
