# pds-technology/etp-devkit architecture

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

- Interactive diagram: https://gitdiagram.com/pds-technology/etp-devkit
- Repository: https://github.com/pds-technology/etp-devkit

## Overview

ETP DevKit is a .NET library for building ETP clients and servers. Its principal workflow is to configure endpoint capabilities and protocol handlers, establish a WebSocket-backed session, then dispatch ETP messages to protocol handlers that implement customer/store behavior and return responses. The library also provides protocol support for ETP 1.1 and 1.2, URI/message data types, and a sample application. Protocol coverage is documented, but most individual handlers and transport implementations were not sampled; their internal links are therefore omitted.

Main entry points: [`src/DevKit/Common/EtpServerManagerBase.cs`](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpServerManagerBase.cs) (Server manager), [`src/DevKit/v12/Protocol/Etp12ProtocolHandler.cs`](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/v12/Protocol/Etp12ProtocolHandler.cs) (ETP 1.2 handlers), [`src/DevKit/Common/EtpSession.cs`](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpSession.cs) (ETP session), [`src/DevKit/Common/IProtocolHandler.cs`](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/IProtocolHandler.cs) (Protocol handler API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_endpoint["Endpoint and transport"]
  node_client["ETP client<br/>[EtpClient.cs]"]
  node_servermanager["Server manager"]
  node_native_manager["Native manager"]
  node_websocket["WebSocket transport"]
  node_endpointconfig["Endpoint configuration"]
end

subgraph group_core["Session foundation"]
  node_session["ETP session<br/>[EtpSession.cs]"]
  node_message["ETP message<br/>[EtpMessage.cs]"]
  node_handlerbase["Protocol handler API"]
  node_uri["ETP URI types<br/>[EtpUri.cs]"]
  node_factory["ETP factory<br/>[EtpFactory.cs]"]
end

subgraph group_protocols["ETP protocols"]
  node_v11["ETP 1.1 handlers"]
  node_v12["ETP 1.2 handlers"]
  node_discovery["Discovery"]
  node_store["Store operations"]
  node_channels["Channel data"]
  node_growing["Growing objects"]
end

subgraph group_sample["Sample application"]
  node_demo["Demo application<br/>[Program.cs]"]
  node_demohandler["Demo handlers<br/>[Handler.cs]"]
  node_demostore[("Demo data store<br/>[TestDataStore.cs]")]
  node_mockobject["Mock domain objects<br/>[MockObject.cs]"]
end

node_user(("Client application"))
node_peer(("ETP peer"))

node_user -.->|"uses"| node_client
node_user -.->|"configures"| node_servermanager
node_endpointconfig -->|"configures"| node_servermanager
node_servermanager -->|"creates capabilities"| node_factory
node_native_manager -->|"extends"| node_servermanager
node_servermanager -->|"creates server"| node_websocket
node_peer -.->|"connects"| node_websocket
node_websocket -.->|"opens session"| node_session
node_client -.->|"uses"| node_session
node_session -->|"hosts handlers"| node_handlerbase
node_handlerbase -->|"handles messages"| node_message
node_v11 -.->|"implements"| node_handlerbase
node_v12 -->|"implements"| node_handlerbase
node_discovery -.->|"uses base"| node_v12
node_store -.->|"uses base"| node_v12
node_growing -.->|"uses base"| node_v12
node_v11 -.->|"supports streaming"| node_channels
node_v12 -.->|"supports channel data"| node_channels
node_demo -->|"initializes handlers"| node_demohandler
node_demohandler -.->|"uses store"| node_demostore
node_demostore -.->|"stores objects"| node_mockobject
node_demohandler -->|"receives session"| node_session

click node_client "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Native/EtpClient.cs"
click node_servermanager "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpServerManagerBase.cs"
click node_native_manager "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Native/EtpServerManager.cs"
click node_websocket "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Native/EtpServerWebSocket.cs"
click node_endpointconfig "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpEndpointParameters.cs"
click node_session "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpSession.cs"
click node_message "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpMessage.cs"
click node_handlerbase "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/IProtocolHandler.cs"
click node_uri "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/Datatypes/EtpUri.cs"
click node_factory "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/EtpFactory.cs"
click node_v11 "https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v11/Protocol"
click node_v12 "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/v12/Protocol/Etp12ProtocolHandler.cs"
click node_discovery "https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/Discovery"
click node_store "https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/Store"
click node_channels "https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/ChannelStreaming"
click node_growing "https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/GrowingObject"
click node_demo "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Program.cs"
click node_demohandler "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Handlers/Handler.cs"
click node_demostore "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Handlers/TestDataStore.cs"
click node_mockobject "https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Data/MockObject.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_client,node_servermanager,node_native_manager,node_websocket,node_endpointconfig,node_user toneBlue
class node_session,node_message,node_handlerbase,node_uri,node_factory toneAmber
class node_v11,node_v12,node_discovery,node_store,node_channels,node_growing toneMint
class node_demo,node_demohandler,node_demostore,node_mockobject toneRose
class node_peer toneIndigo
```

## Components

### Endpoint and transport

- [ETP client](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Native/EtpClient.cs): `src/DevKit/Native/EtpClient.cs`
- [Server manager](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpServerManagerBase.cs): `src/DevKit/Common/EtpServerManagerBase.cs`
- [Native manager](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Native/EtpServerManager.cs): `src/DevKit/Native/EtpServerManager.cs`
- [WebSocket transport](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Native/EtpServerWebSocket.cs): `src/DevKit/Native/EtpServerWebSocket.cs`
- [Endpoint configuration](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpEndpointParameters.cs): `src/DevKit/Common/EtpEndpointParameters.cs`

### Session foundation

- [ETP session](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpSession.cs): `src/DevKit/Common/EtpSession.cs`
- [ETP message](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/EtpMessage.cs): `src/DevKit/Common/EtpMessage.cs`
- [Protocol handler API](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/IProtocolHandler.cs): `src/DevKit/Common/IProtocolHandler.cs`
- [ETP URI types](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/Common/Datatypes/EtpUri.cs): `src/DevKit/Common/Datatypes/EtpUri.cs`
- [ETP factory](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/EtpFactory.cs): `src/DevKit/EtpFactory.cs`

### ETP protocols

- [ETP 1.1 handlers](https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v11/Protocol): `src/DevKit/v11/Protocol`
- [ETP 1.2 handlers](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit/v12/Protocol/Etp12ProtocolHandler.cs): `src/DevKit/v12/Protocol/Etp12ProtocolHandler.cs`
- [Discovery](https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/Discovery): `src/DevKit/v12/Protocol/Discovery`
- [Store operations](https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/Store): `src/DevKit/v12/Protocol/Store`
- [Channel data](https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/ChannelStreaming): `src/DevKit/v12/Protocol/ChannelStreaming`
- [Growing objects](https://github.com/pds-technology/etp-devkit/tree/master/src/DevKit/v12/Protocol/GrowingObject): `src/DevKit/v12/Protocol/GrowingObject`

### Sample application

- [Demo application](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Program.cs): `src/DevKit.TestApp/Program.cs`
- [Demo handlers](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Handlers/Handler.cs): `src/DevKit.TestApp/Handlers/Handler.cs`
- [Demo data store](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Handlers/TestDataStore.cs): `src/DevKit.TestApp/Handlers/TestDataStore.cs`
- [Mock domain objects](https://github.com/pds-technology/etp-devkit/blob/master/src/DevKit.TestApp/Data/MockObject.cs): `src/DevKit.TestApp/Data/MockObject.cs`

### Other components

- **Client application**
- **ETP peer**

## Connections

- Client application → ETP client: uses (evidence: `README.md`)
- Client application → Server manager: configures (evidence: `README.md`)
- Endpoint configuration → Server manager: configures (evidence: `src/DevKit/Common/EtpServerManagerBase.cs`)
- Server manager → ETP factory: creates capabilities (evidence: `src/DevKit/Common/EtpServerManagerBase.cs`)
- Native manager → Server manager: extends (evidence: `src/DevKit/Native/EtpServerManager.cs`)
- Server manager → WebSocket transport: creates server (evidence: `src/DevKit/Common/EtpServerManagerBase.cs`)
- ETP peer → WebSocket transport: connects (evidence: `README.md`)
- WebSocket transport → ETP session: opens session
- ETP client → ETP session: uses (evidence: `README.md`)
- ETP session → Protocol handler API: hosts handlers (evidence: `src/DevKit/Common/IProtocolHandler.cs`)
- Protocol handler API → ETP message: handles messages (evidence: `src/DevKit/Common/IProtocolHandler.cs`)
- ETP 1.1 handlers → Protocol handler API: implements (evidence: `README.md`)
- ETP 1.2 handlers → Protocol handler API: implements (evidence: `src/DevKit/v12/Protocol/Etp12ProtocolHandler.cs`)
- Discovery → ETP 1.2 handlers: uses base
- Store operations → ETP 1.2 handlers: uses base
- Growing objects → ETP 1.2 handlers: uses base
- ETP 1.1 handlers → Channel data: supports streaming (evidence: `README.md`)
- ETP 1.2 handlers → Channel data: supports channel data (evidence: `README.md`)
- Demo application → Demo handlers: initializes handlers (evidence: `src/DevKit.TestApp/Program.cs`)
- Demo handlers → Demo data store: uses store (evidence: `src/DevKit.TestApp/Handlers/StoreChannelHandler.cs`)
- Demo data store → Mock domain objects: stores objects
- Demo handlers → ETP session: receives session (evidence: `src/DevKit.TestApp/Handlers/Handler.cs`)
