# aklira/freetase2 architecture

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

- Interactive diagram: https://gitdiagram.com/aklira/freetase2
- Repository: https://github.com/aklira/freetase2

## Overview

FreeTase2 is a Python client library for IEC 60870-6 TASE.2/ICCP, using libIEC61850’s MMS bindings. Its visible workflow loads client configuration, establishes an MMS connection, builds VCC/association state, then prepares datasets and transfer sets. The common layer defines protocol objects, while data-object classes represent points and controls. The README describes broader ICCP capabilities, including reporting and device control, but the sampled implementation is partial; the server module is only a stub. Connections below reflect shown imports, calls, or README statements.

Main entry points: [`tase2/client/client.py`](https://github.com/aklira/freetase2/blob/master/tase2/client/client.py) (MMS connection), [`tase2/common/iccpcommon.py`](https://github.com/aklira/freetase2/blob/master/tase2/common/iccpcommon.py) (VCC and protocol objects), [`tase2/common/iccpdataobjects.py`](https://github.com/aklira/freetase2/blob/master/tase2/common/iccpdataobjects.py) (Data value objects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client runtime"]
  node_configuration["Client configuration<br/>[client.py]"]
  node_connection["MMS connection<br/>[client.py]"]
  node_setup["VCC setup<br/>[client.py]"]
  node_dataset_workflow["Dataset transfer setup<br/>[client.py]"]
end

subgraph group_model["ICCP model"]
  node_common_model["VCC and protocol objects<br/>[iccpcommon.py]"]
  node_data_objects["Data value objects<br/>[iccpdataobjects.py]"]
end

subgraph group_peers["Protocol peers"]
  node_server_stub["Server stub<br/>[server.py]"]
  node_mms["IEC 61850 MMS"]
end

node_application(("Client application"))

node_application -->|"provides config"| node_configuration
node_application -->|"uses client"| node_connection
node_configuration -->|"configures"| node_connection
node_connection -->|"connects through"| node_mms
node_setup -->|"creates VCC"| node_common_model
node_dataset_workflow -->|"creates transfer sets"| node_common_model
node_dataset_workflow -->|"creates points"| node_data_objects
node_data_objects -->|"extends data value"| node_common_model

click node_configuration "https://github.com/aklira/freetase2/blob/master/tase2/client/client.py"
click node_connection "https://github.com/aklira/freetase2/blob/master/tase2/client/client.py"
click node_setup "https://github.com/aklira/freetase2/blob/master/tase2/client/client.py"
click node_dataset_workflow "https://github.com/aklira/freetase2/blob/master/tase2/client/client.py"
click node_common_model "https://github.com/aklira/freetase2/blob/master/tase2/common/iccpcommon.py"
click node_data_objects "https://github.com/aklira/freetase2/blob/master/tase2/common/iccpdataobjects.py"
click node_server_stub "https://github.com/aklira/freetase2/blob/master/tase2/server/server.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_configuration,node_connection,node_setup,node_dataset_workflow,node_application toneBlue
class node_common_model,node_data_objects toneAmber
class node_server_stub,node_mms toneMint
```

## Components

### Client runtime

- [Client configuration](https://github.com/aklira/freetase2/blob/master/tase2/client/client.py): `tase2/client/client.py`
- [MMS connection](https://github.com/aklira/freetase2/blob/master/tase2/client/client.py): `tase2/client/client.py`
- [VCC setup](https://github.com/aklira/freetase2/blob/master/tase2/client/client.py): `tase2/client/client.py`
- [Dataset transfer setup](https://github.com/aklira/freetase2/blob/master/tase2/client/client.py): `tase2/client/client.py`

### ICCP model

- [VCC and protocol objects](https://github.com/aklira/freetase2/blob/master/tase2/common/iccpcommon.py): `tase2/common/iccpcommon.py`
- [Data value objects](https://github.com/aklira/freetase2/blob/master/tase2/common/iccpdataobjects.py): `tase2/common/iccpdataobjects.py`

### Protocol peers

- [Server stub](https://github.com/aklira/freetase2/blob/master/tase2/server/server.py): `tase2/server/server.py`
- **IEC 61850 MMS**

### Other components

- **Client application**

## Connections

- Client application → Client configuration: provides config (evidence: `README.md`)
- Client application → MMS connection: uses client (evidence: `README.md`)
- Client configuration → MMS connection: configures (evidence: `tase2/client/client.py`)
- MMS connection → IEC 61850 MMS: connects through (evidence: `tase2/client/client.py`)
- VCC setup → VCC and protocol objects: creates VCC (evidence: `tase2/client/client.py`)
- Dataset transfer setup → VCC and protocol objects: creates transfer sets (evidence: `tase2/client/client.py`)
- Dataset transfer setup → Data value objects: creates points (evidence: `tase2/client/client.py`)
- Data value objects → VCC and protocol objects: extends data value (evidence: `tase2/common/iccpdataobjects.py`)
