IEC 61850 / MMS / GOOSE / Sampled Values / SCL

Clean-room IEC 61850 stack for C# engineering tools.

Build reusable protocol engines for MMS discovery, smart reads, guarded reporting, GOOSE traffic, Sampled Values publishing, SCL-driven validation, and future station testing workbenches.

Current milestone
MMS reporting lab MVP
Validation
68 tests passed
Runtime
Dotnet 8
SV live publisher 4000 fps target
dotnet run --project .\apps\AR.Iec61850.Cli -- \
  publish-sv-live ".\samples\scl\01_SV_Stream_4I+4V_(9-2LE).scd" \
  --adapter 5 --stream-index 1 --continuous --yes
svID OMICRON_CMC_SV1 APPID 0x4000 payload 64 B VLAN 0 prio 4
SCL SCD, CID, ICD, IID import
SV Frame builder, parser, live publisher
GOOSE Frame builder, parser, live publisher
MMS Discovery, smart read, DataSet and reports

Capability map

Reusable stack first, tester apps second.

Protocol logic lives in libraries under `src/`. CLI and future WPF workbench projects consume the stack without owning protocol rules.

SCL engineering model

Parse expected IEDs, DataSets, GOOSE, SV, ReportControl blocks, APPID, destination MAC, VLAN, and duplicate/conflict evidence.

Process-bus frame codecs

Generate and parse Ethernet/VLAN GOOSE and Sampled Values frames with deterministic round-trip tests and live adapter smoke paths.

Replaceable transports

Run the same publisher session against in-memory tests, generated PCAP workflows, or selected raw Ethernet adapters through Npcap.

Validation-first CLI

Inspect SCL, generate PCAP, inspect PCAP, stream decoded events, list adapters, publish SV/GOOSE from SCL profiles, discover MMS IED models, and run guarded report smoke tests.

Validation evidence

Live protocol proof, not only offline bytes.

The stack now has live SV publishing, live GOOSE publishing, smart MMS reads, and guarded static/dynamic reporting evidence against a lab IED.

Frames 20,000 five second bounded live run
Rate ~4,000 fps software-paced smoke test
Payload 64 B 4I+4V DataSet order
MMS 286 RCB live discovery inventory
Tests 68 passed unit and round-trip coverage

Clean architecture

Protocol engine boundaries are explicit.

Layer 0

Byte primitives

BER, MMS data values, Ethernet, VLAN, MAC, UTC time.

Layer 1

SCL engineering model

IEDs, DataSets, control blocks, addresses, reports, conflicts.

Layer 2

Process bus services

GOOSE and SV publishers now, subscribers next.

Layer 3+

MMS stack

TPKT, COTP, ACSE, discovery, smart reads, guarded reports.

Quick start

Try the stack from PowerShell.

dotnet run --project .\apps\AR.Iec61850.Cli -- inspect-scl .\samples\scl\01_SV_Stream_4I+4V_(9-2LE).scd

Active publishing sends raw multicast Ethernet frames. Live report commands write RCB attributes. Use only isolated lab equipment.