Skip to content

IED simulator: IEC 61850 DPC control command golden parity - #101

Merged
masarray merged 13 commits into
feat/ied-sim-ux-performance-foundationfrom
fix/iedsim-control-command-golden-parity
Sep 18, 2026
Merged

masarray merged 13 commits into
feat/ied-sim-ux-performance-foundationfrom
fix/iedsim-control-command-golden-parity

Conversation

@masarray

@masarray masarray commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Goal

Implement ARStack Simulator control-command behavior to match the successful external IEC 61850 client Server ↔ ARSAS Client reference while preserving the already-merged Static Reporting milestone.

Golden sequence

ARSAS successfully controls external IEC 61850 client with:

  1. SBOw
  2. Operate
  3. positive CommandTermination
  4. process feedback reaching the requested DPC state

For DPC Pos control, the live MMS CO service contract is:

  • ctlVal: BOOLEAN (Open=false / Close=true)
  • origin.orCat: INTEGER
  • origin.orIdent: OCTET STRING
  • ctlNum: UNSIGNED
  • T: UTC-Time
  • Test: BOOLEAN
  • Check: BIT STRING(2)

The process ST Pos.stVal remains DBPOS BIT STRING(2).

Implementation

  • accept golden INTEGER orCat while retaining UNSIGNED compatibility
  • map DPC Open/Close to BOOLEAN CO ctlVal
  • compile DPC CTL entries into exact SBOw/Oper/Cancel virtual objects
  • keep DPC process stVal as DBPOS 2-bit
  • allow ARSAS synchro + interlock Check bits
  • echo exact Oper structure for positive CommandTermination
  • synchronize successful Oper into process ManifestValue and notify RCB change paths
  • add dedicated external IEC 61850 client DPC control integration gate

Safety

Static Reporting parity was merged first in PR #100. This PR is intentionally separate and remains Draft until ARSAS external command acceptance passes.

Exact-head synthetic acceptance

Current head: 3205d448b473afafd2d5f79f36f7d659408d38f1

Golden DPC control parity now distinguishes two layers explicitly:

  • engineering/SCL authority: CTL ... DPC ... ctlModel=4
  • live MMS control-service shape: BOOLEAN ctlVal + INTEGER orCat, matching external IEC 61850 client

The integration gate requires:

  • SBOw and Oper exact type shape:
    ctlVal:boolean, origin(orCat:integer,orIdent:octet-string), ctlNum:unsigned, T:utc-time, Test:boolean, Check:bit-string
  • Cancel exact type shape:
    ctlVal:boolean, origin(orCat:integer,orIdent:octet-string), ctlNum:unsigned, T:utc-time, Test:boolean
  • ARSAS-style Check=0xC0 accepted
  • exactly two control writes: SBOw → Oper
  • positive CommandTermination
  • DPC process feedback transitions DBPOS Open 0x0640 → Closed 0x0680
  • no control retry

The external IEC 61850 client parity matrix passes on Windows, Linux GCC, and Linux Clang for this head in workflow run 35327939101; interop_parity_dpc_control passes on all three platforms.

A stricter lifecycle regression now also enforces server-side ordering: process-state/report feedback cannot commit while positive CommandTermination is still pending behind the Oper WriteResponse. The server therefore preserves SBOw → Operate → positive CommandTermination → process feedback, matching the supplied external IEC 61850 client/ARSAS golden sequence.

Qt and all control-specific profile gates that have completed for this head remain green. Keep this PR Draft until real ARSAS ↔ ARStack Close/Open acceptance confirms the synthetic result, Static Reporting remains 58/58, and external BRCB/URCB behavior shows no regression.

masarray commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner Author

Golden control parity update:

  • Static Reporting milestone remains locked in merged PR fix(iedsim): preserve IEC 61850 MMS structured ordering for ARSAS parity #100 / merge commit 258d583cdf15ffbb877fd0eda77890952e774329.
  • Current control head: 3205d448b473afafd2d5f79f36f7d659408d38f1.
  • Root discovery mismatch fixed: origin.orCat=INTEGER, origin.orIdent=OCTET STRING, Test=BOOLEAN; ctlVal=BOOLEAN for DPC CO while process stVal remains DBPOS(2).
  • SBOw, Oper, and Cancel live TypeSpecifications are pinned by the integration gate.
  • ARSAS Check=0xC0 (synchro + interlock) is accepted.
  • Positive CommandTermination echoes the exact Oper structure.
  • Process feedback is now deferred while pending_termination=true, preventing status/report feedback from preceding CommandTermination.
  • external IEC 61850 client Parity Server CI run 35327939101: Windows PASS, Linux GCC PASS, Linux Clang PASS; interop_parity_dpc_control passes on all three.

PR remains Draft pending real ARSAS Close/Open acceptance and external Static Reporting/BRCB/URCB regression checks.

masarray commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner Author

External acceptance RC is ready.

  • Head: 3205d448b473afafd2d5f79f36f7d659408d38f1
  • Branch: fix/iedsim-control-command-golden-parity
  • Release Hardening run: 35327939476 — SUCCESS
  • Windows package job: 105545307144 — SUCCESS
  • Artifact: arstack-iec61850-workbench-windows-rc
  • Artifact ID: 10540555195
  • Artifact digest: sha256:4b0b342f7268e0eeddb2cdd19b7c5d23c5c29fd7efe2ecba968b22a948844e67
  • Expires: 2026-10-02T09:19:22Z
  • Direct GitHub artifact: https://github.com/masarray/arstack61850/actions/runs/35327939476/artifacts/10540555195

Package verification marker:
WINDOWS_RELEASE_PACKAGE_PASS staged_smoke=pass installed_smoke=pass qt_runtime=pass helper_server=pass npcap_guidance=pass installer=nsis portable=zip reconnect_cycles=24

Artifact contains:

  • ARStack-IEC61850-Workbench-Setup-win64.exe
  • ARStack-IEC61850-Workbench-portable-win64.zip

All exact-head workflows are green, including external IEC 61850 client parity Windows/Linux GCC/Linux Clang and the stricter DPC control lifecycle gate. PR remains Draft pending real ARSAS Close/Open + 58/58 reporting + external external IEC 61850 client BRCB/URCB acceptance.

masarray commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner Author

External ARSAS acceptance — COMMAND WIRE PASS, SERVER IDENTITY NEEDS ONE FINAL CONFIRMATION

Validated client-side against endpoint 192.168.81.103:102 using the exact-head Windows RC for 3205d448b473afafd2d5f79f36f7d659408d38f1.

Strong positive evidence:

  • Association accepted and MMS ready.
  • Static DataSet authority: Digital 36/36, Analog 22/22, total 58/58; unresolved 0; cyclic MMS process polling 0; projectionErrors=0.
  • Actual InformationReport traffic observed with 58 report-backed runtime points.
  • Close/Open commands repeated successfully with SBOw → Operate → positive CommandTermination → process feedback.
  • ctlNum progressed 1 → 2 → 3 → 4, with matching Closed/Open process feedback.
  • Exactly two ordered MMS control responses per command; no local origin.orCat ... utc-time preparation failure.

Important caveat discovered while correlating the simulator diagnostics:

  • The ARStack UI diagnostic captured around the same test window reports MMS endpoint stopped (exit 2) and bind() failed: 10013, with fleet 0 running.
  • ARSAS nevertheless connected successfully to 192.168.81.103:102 shortly afterward.
  • Therefore the wire-level command behavior is proven, but this test alone does not conclusively prove that the newly launched ARStack process owned TCP/102. A previous ARStack process or another IEC 61850 server could have been listening.

Reporting diagnostics also contain four REPORT_SEMANTIC_STRUCT warnings; each says the exact static DataSet schema overrode generic heuristics, while 58/58 reporting and zero projection errors remained healthy.

PR #101 is merged intentionally as a code checkpoint because exact-head CI is fully green and the implementation matches the external IEC 61850 client golden contract. Keep issue #95 open and perform one final clean-room verification with all other IEC 61850 servers/old ARStack processes closed, then confirm the ARStack UI shows the endpoint actually Running before ARSAS Close/Open.

@masarray
masarray marked this pull request as ready for review September 18, 2026 09:39
@masarray
masarray merged commit 3514437 into feat/ied-sim-ux-performance-foundation Sep 18, 2026
35 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@masarray masarray changed the title IED simulator: IEDScout DPC control command golden parity IED simulator: external IEC 61850 client DPC control command golden parity Sep 19, 2026
@masarray masarray changed the title IED simulator: external IEC 61850 client DPC control command golden parity IED simulator: IEC 61850 DPC control command golden parity Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant