Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
23c9be6
Add portable guarded IEC 61850 control model core
masarray Aug 10, 2026
563120c
Implement guarded Direct and SBO control planner
masarray Aug 10, 2026
456ad8b
Harden guarded control pending and expiry semantics
masarray Aug 10, 2026
1d9ad4c
Add guarded control hard-profile oracle
masarray Aug 10, 2026
8ec399d
Add no-exception control hard profile
masarray Aug 10, 2026
0a4b4b5
Gate guarded control semantics in GCC and Clang
masarray Aug 10, 2026
3f57667
Add live-type MMS control structure builder API
masarray Aug 10, 2026
b5bba0e
Implement live-type Oper SBOw and Cancel builder
masarray Aug 10, 2026
8e05c1b
Fix control structure header utility dependency
masarray Aug 10, 2026
ca0fcda
Add MMS control structure golden-wire tests
masarray Aug 10, 2026
67f0764
Add strict control MMS structure validation profile
masarray Aug 10, 2026
e53aa25
Gate control MMS structures on GCC and Clang
masarray Aug 10, 2026
e26c732
Add CommandTermination and LastApplError decoder API
masarray Aug 10, 2026
81d1cf2
Implement correlated CommandTermination decoding
masarray Aug 10, 2026
68f1eb2
Add LastApplError and CommandTermination parity tests
masarray Aug 10, 2026
6458183
Add strict CommandTermination validation profile
masarray Aug 10, 2026
6d8c2bd
Gate CommandTermination parity on GCC and Clang
masarray Aug 10, 2026
c143161
Add non-fatal bounded MMS poll for control completion waits
masarray Aug 10, 2026
8b664a8
Implement non-fatal bounded MMS poll for control waits
masarray Aug 10, 2026
9ce8a93
Add guarded live IEC 61850 control session API
masarray Aug 10, 2026
6cc7bf2
Add production control transport over MMS association runtime
masarray Aug 10, 2026
dd57b97
Implement live ctlModel and TypeSpecification control discovery
masarray Aug 10, 2026
c58635a
Implement guarded Direct SBO and enhanced live control orchestration
masarray Aug 10, 2026
f5923f9
Add deterministic smart-control session parity tests
masarray Aug 10, 2026
cbd1e76
Add strict live control session parity profile
masarray Aug 10, 2026
2f49987
Gate smart-control session parity on GCC and Clang
masarray Aug 10, 2026
1367089
Link MMS PDU dependencies in control session profile
masarray Aug 10, 2026
a65eb96
Fix non-default MMS value fixtures in control session tests
masarray Aug 10, 2026
20dcc18
Link Session codec dependency in control session profile
masarray Aug 10, 2026
ea0a096
Integrate guarded control parity into normal core build
masarray Aug 10, 2026
f2c4e68
Update port status for guarded control parity C1-C4
masarray Aug 10, 2026
9ffc0c3
Add guarded live control interoperability harness
masarray Aug 10, 2026
60c5426
Add standalone C5 control interop build profile
masarray Aug 10, 2026
022659b
Add C5 control interop harness CI
masarray Aug 10, 2026
f5f6302
Document C5 physical control interoperability procedure
masarray Aug 10, 2026
47b5245
Add one-click Windows build for C5 control harness
masarray Aug 10, 2026
2c9abcb
Publish C5 harness binaries with CI evidence
masarray Aug 10, 2026
a9f96ad
Sync migration checklist through Control C5
masarray Aug 10, 2026
2da72e0
Advance port status to Control C5 lab readiness
masarray Aug 10, 2026
d7ea8c5
Advance migration plan through Control C5
masarray Aug 10, 2026
e7aa282
Sync feature matrix through Control C5
masarray Aug 10, 2026
3bd902f
c5: add read-only live control inventory probe
masarray Aug 10, 2026
e59344e
c5: build read-only control inventory companion
masarray Aug 10, 2026
884ee54
c5: surface safe control inventory command after build
masarray Aug 10, 2026
0921d08
c5: validate and publish read-only control inventory probe
masarray Aug 10, 2026
9da0514
C5: add raw read-only ctlModel diagnostic probe
masarray Aug 10, 2026
e6ecf75
C5: build raw ctlModel diagnostic companion
masarray Aug 10, 2026
b9759f2
Harden live Smart Control diagnostics
masarray Aug 10, 2026
f88f3df
docs(control): record C5 simulator interoperability acceptance
masarray Aug 10, 2026
6191e20
docs(control): reconcile parallel simulator acceptance
masarray Aug 10, 2026
9fedd88
Merge current main into Smart Control integration
masarray Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document C5 physical control interoperability procedure
  • Loading branch information
masarray committed Aug 10, 2026
commit f5f630273d62e2687002e825a9e14137f7cededc
297 changes: 297 additions & 0 deletions docs/CONTROL_INTEROP_RUNBOOK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
# IEC 61850 Control Interoperability Runbook

## Purpose

This runbook is the physical/laboratory acceptance procedure for Phase 4D-C5.
It validates the guarded C++ control path against a real IED or a vendor simulator.
It is not an IEC 61850 conformance certificate.

Sampled Values / ESP32-P4 testing is deliberately out of scope here.

## Safety boundary

Use only an isolated, non-operational laboratory IED or simulator whose controlled
output cannot operate primary plant. Verify the physical/control circuit is safe
before arming any Write.

`ariec61850_control_interop_probe` is read-only by default. A control Write is
blocked unless the exact token below is supplied:

```text
--arm IEC61850-LAB-CONTROL
```

The harness never retries a command automatically.

## Build

### Windows / MSVC

```powershell
cmake -S tools/control_interop_probe -B build-control-interop
cmake --build build-control-interop --config Release --parallel
ctest --test-dir build-control-interop -C Release --output-on-failure
```

Executable:

```text
build-control-interop\Release\ariec61850_control_interop_probe.exe
```

### Linux

```bash
cmake -S tools/control_interop_probe -B build-control-interop
cmake --build build-control-interop --parallel
ctest --test-dir build-control-interop --output-on-failure
```

Executable:

```text
build-control-interop/ariec61850_control_interop_probe
```

## 0. Offline safety gate

Run this before connecting to an IED:

```bash
ariec61850_control_interop_probe --self-test
```

Expected:

```text
CONTROL_INTEROP_SELF_TEST PASS readOnlyDefault=true armGate=true noAutoRetry=true
```

## 1. Start packet capture

Start Wireshark before connecting.

Recommended display filter after the run:

```text
tcp.port == 102 && ip.addr == <IED_IP>
```

Retain the original PCAP/PCAPNG together with the JSON evidence produced by the
harness. Keep capture timestamps synchronized with the engineering workstation.

## 2. Read-only discovery gate

Example:

```bash
ariec61850_control_interop_probe 192.168.1.10 102 \
--object LD0/CSWI1.Pos \
--evidence c5-discovery.json
```

This may perform MMS Read, GVAA and GetNameList, but no Write.

Accept when the output proves:

- the object root resolves as `LD/LN.DO`;
- `ctlModel` is one of Direct normal, SBO normal, Direct enhanced or SBO enhanced;
- exact live `Oper` TypeSpecification is available;
- `SBOw` TypeSpecification is available for SBO enhanced;
- `Cancel` TypeSpecification is available for an SBO model;
- the inferred CDC/control value type is credible;
- `sboTimeout` / `operTimeout` are read when exposed, otherwise bounded fallbacks are explicit;
- the best matching ST/MX status object is identified when exposed;
- evidence JSON reports `mmsControlWriteCount: 0`.

Do not proceed to Write if discovery is incomplete or vendor-specific command
fields cannot be bound conservatively.

## 3. Direct normal acceptance

Example DPC command:

```bash
ariec61850_control_interop_probe 192.168.1.10 102 \
--object LD0/CSWI1.Pos \
--action operate \
--value on \
--value-kind dpc \
--origin ARSTACK-C5 \
--origin-category station \
--interlock-check on \
--synchro-check on \
--arm IEC61850-LAB-CONTROL \
--evidence c5-direct-normal-on.json
```

Acceptance:

- discovered model is `direct-normal`;
- exactly one `CO/.../Oper` Write is recorded;
- no second command Write appears in the PCAP;
- MMS service completion is accepted;
- status feedback is recorded when the IED exposes a readable ST/MX value.

Repeat only as a new deliberate operator action if an opposite command is needed.
A second manual action is not an automatic retry.

## 4. SBO normal acceptance

Use explicit sequencing so Select and Oper are visible as separate phases:

```bash
ariec61850_control_interop_probe 192.168.1.10 102 \
--object LD0/CSWI1.Pos \
--action select-operate \
--value on \
--value-kind dpc \
--arm IEC61850-LAB-CONTROL \
--evidence c5-sbo-normal-operate.json
```

Acceptance:

- discovered model is `sbo-normal`;
- Select is an MMS Read of `SBO`;
- selection response identifies the selected object or an accepted opaque token;
- Oper uses the immutable selected sequence;
- exactly one command Write is `Oper`;
- no automatic retry appears.

Explicit Cancel test:

```bash
ariec61850_control_interop_probe 192.168.1.10 102 \
--object LD0/CSWI1.Pos \
--action select-cancel \
--value on \
--value-kind dpc \
--arm IEC61850-LAB-CONTROL \
--evidence c5-sbo-normal-cancel.json
```

Acceptance:

- SBO Select succeeds;
- exactly one `Cancel` Write releases the selection;
- no Oper Write is sent.

Selection timeout should be tested only with a deliberate bounded lab procedure.
Do not automate repeated Select attempts.

## 5. Direct enhanced acceptance

```bash
ariec61850_control_interop_probe 192.168.1.10 102 \
--object LD0/CSWI1.Pos \
--action operate \
--value on \
--value-kind dpc \
--termination-timeout-ms 10000 \
--arm IEC61850-LAB-CONTROL \
--evidence c5-direct-enhanced.json
```

Acceptance:

- exactly one `Oper` Write is sent;
- MMS Write acceptance alone does not complete the command;
- ordinary ST/MX reports are ignored as completion;
- a correlated `CommandTermination` completes the command;
- positive termination is recorded as `positive-termination`, or a negative
LastApplError path records ControlError/AddCause without a retry;
- lack of termination becomes a control timeout without automatically faulting a
healthy MMS association.

## 6. SBO enhanced acceptance

```bash
ariec61850_control_interop_probe 192.168.1.10 102 \
--object LD0/CSWI1.Pos \
--action select-operate \
--value on \
--value-kind dpc \
--termination-timeout-ms 10000 \
--arm IEC61850-LAB-CONTROL \
--evidence c5-sbo-enhanced.json
```

Acceptance:

- one `SBOw` Write establishes the value-bearing selection;
- the asynchronous application-error grace window is observed;
- one `Oper` Write follows only after successful selection;
- correlated CommandTermination is required for completion;
- JSON/PCAP therefore show two deliberate command-service Writes (`SBOw`, `Oper`),
not duplicate retries of either service.

Explicit Cancel test uses `--action select-cancel`. For SBO enhanced the expected
write sequence is `SBOw`, then `Cancel`.

## 7. Negative-path evidence

Capture at least one negative enhanced-security result when it can be produced
safely by the lab IED/simulator. Preferred cases are a simulator-configured
interlock or synchrocheck rejection.

Acceptance evidence should preserve:

- raw ControlError;
- raw AddCause;
- mapped AddCause text such as `blocked-by-interlocking` or
`blocked-by-synchrocheck`;
- the exact control object;
- the number and identity of Write services;
- proof that no retry follows the rejection.

Do not deliberately defeat a real interlock merely to create a negative test.

## 8. Association-loss evidence

Use a simulator or otherwise safe lab setup. Establish an SBO selection, then
cause the MMS association to disappear before Oper. Verify the client fails
closed and the next command requires a new explicit action/selection.

For enhanced control, separately exercise association loss while waiting for
CommandTermination where possible.

## Evidence bundle

For each accepted case retain:

```text
C5_<IED>_<object>_<case>/
evidence.json
capture.pcapng
notes.txt
optional_ied_event_log.txt
```

Minimum `notes.txt` content:

```text
IED vendor/model/firmware:
IED IP:
Control object:
ctlModel:
Test case:
Expected safe plant/simulator response:
Observed response:
PC clock/time source:
Operator:
Date/time:
```

The JSON field `mmsControlWriteCount` and `mmsControlWrites` must agree with the
PCAP. A mismatch is a failed evidence gate and must be investigated before any
production-control claim.

## Acceptance state

Hosted CI can mark the harness `SOFTWARE_READY_FOR_LAB`.

Only retained physical/simulator evidence for the required model(s) can move the
specific tested IED profile to `LAB_INTEROP_PASSED`.

Neither state means IEC 61850 conformance certification.