Skip to content

P2: deterministic SCL-assisted MMS connect and initial FC-root snapshot #85

Open

Description

@masarray

Goal

Implement the trusted-CID/SCL online path as a distinct, bounded MMS workflow rather than repeating full live discovery.

Reference behavior comes from the captured external IEC 61850 client/SCL-assisted sequence already documented for the reference IEC 61850 model model.

Required wire contract

  1. Parse/trust the selected SCL model locally.
  2. Establish MMS association using the normal proven association runtime.
  3. GetNameList(Domain) only for online identity validation.
  4. Compare online domains to the trusted SCL domain inventory:
    • expected-but-missing => preserve SCL identity, mark unavailable, diagnostic;
    • extra online domain => evidence only, never silently merge into the SCL model.
  5. Do not repeat full NamedVariable discovery by default.
  6. Do not repeat GVAA probing by default.
  7. Do not rebuild DataSet directories by default.
  8. Build the initial FC-root Read plan from the trusted SCL model.
  9. Batch per Logical Node with at most 10 variable references per Read.
  10. Keep initial snapshot requests strictly sequential (outstanding=1).
  11. Preserve request/result order exactly.
  12. Map nested MMS Data through the SCL type/tree projection. Structural mismatch must fail closed for that root; no partial leaf shifting.
  13. Keep the MMS association active after the initial snapshot.

Capture-derived acceptance shape

For the reference reference IEC 61850 model CID the target shape is:

  • 32 MMS domains
  • 119 Logical Nodes
  • 617 FC-root references
  • 120 Read requests
  • an LN with 11 FC roots splits as 10 + 1, and the residual is not mixed with the next LN.

These counts are reference-model evidence, not universal constants. The invariant is deterministic per-LN planning and a max of 10 refs/Read.

Implementation checkpoint

Initial implementation is on PR #82:

  • 336067511b5165a276d7eadacbf9e1d1fdd3065e — MmsSclAssistedConnectClient, InitialFcReadPlanner, domain validator, fail-closed nested mapper.
  • 9c12a163519bffb2cf2b7b4b483e7dcee2c89c8b — exposes MmsTcpLiveDiscoverySession::synchronize_scl(...).
  • bed921426a9e9be5937119693cc4c2e2b823fb25 — wire-profile regression.
  • f607cb2b58c75c76e7c2ab3a9c9f77b925277401 / 5ef96f01dbaf5aada0e9cdd45d49f1445321c4c9 — cross-platform P2 test project and C++ CI gate.

Explicit boundary / P2.1 evidence gap

The current SclDocument parser does not expose MMS ConnectedAP/Address OSI association fields (AP-title, AE-qualifier, P/S/T selectors), and the repository fixtures do not currently contain those parameters. Do not hard-code a vendor numeric profile. Engineering-address sourcing must be added only with a real/fixture SCL vector and regression, while retaining the proven Balanced/Legacy association profiles as fallback.

Closure gates

  • Dedicated SCL-Assisted Connect CI passes.
  • C++ CI passes on GCC, Clang, and MSVC with the P2 wire-profile regression.
  • IED Simulator/Release Hardening retained regression stays green.
  • Windows RC built from the exact final P2 head.
  • Actual external IEC 61850 client/target-client comparison confirms the expected Domain + FC-root progression for the reference CID before claiming external parity.

Keep this issue OPEN until those gates are met.

Activity

  1. masarray commented on Sep 14, 2026

    @masarray
    OwnerAuthor

    P2 internal implementation checkpoint — exact runtime/test head 2284f3de9923a7c46a564ce333220e7e585cd6ea.

    Evidence completed on that exact head:

    • IED Simulator Qt #636: SUCCESS.
    • IED Simulator Release Hardening PTP-P1.5: complete portable runtime and ESP control bridge #64: SUCCESS on Linux and Windows.
      • Linux: product readiness, MMS reconnect association soak, app-close child/socket lifecycle all pass.
      • Windows: MSVC release build, deploy, portable ZIP + NSIS installer, staged + installed verification all pass.
    • Windows RC artifact: 10357930325, 60,584,557 bytes, SHA256 07ea97759bca32307e75ae630d84670d013408bd0fa35d5fe36d30fb3bc2e28c.
    • Final regression commit 2284f3de models successful FC-root reads as nested MMS structures, matching the actual P2 mapping contract rather than shallow scalar fixtures.

    Still pending due GitHub Actions queue/concurrency, not test failure:

    • dedicated SCL-Assisted Connect profile;
    • C++ GCC/Clang/MSVC matrix.

    I have re-run the cancelled dedicated job. Keep this issue OPEN until those protocol gates finish. External vendor external IEC 61850 client/target-client parity also remains a separate field claim; internal CI does not close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions