Skip to content

M2.17 Browser SSOT: IEC DPC Open [01] / Close [10] from exact typed Pos evidence - #603

Closed
masarray wants to merge 10 commits into
fix/m216-browser-time-quality-files-20261016from
fix/m217-typed-dpc-live-model-presentation-20261016
Closed

masarray wants to merge 10 commits into
fix/m216-browser-time-quality-files-20261016from
fix/m217-typed-dpc-live-model-presentation-20261016

Conversation

@masarray

Copy link
Copy Markdown
Owner

Field requirement

User requests IEC 61850 DPC position state, not generic on/off: Open [01], Close [10], with the important additional valid codes Intermediate [00] and Bad state [11]. A raw 00 on XCBR.Pos must remain intermediate, not be silently treated as Open.

Core behavior

  • Reuse the existing Iec61850ValueFormatter.FormatReportProcessValue(..., "Dbpos", ...) — do not invent a second MMS enum decoder.
  • Build one cheap exact reference + FC typed DPC index from the current per-IED LiveDiscoveryModel/SCL-backed model. Proof is declared DPC CDC, Dbpos attribute BType, or standard IEC XCBR/XSWI/CSWI.Pos.stVal [ST] when the CDC isn't explicitly contradicted.
  • Both logical DO Pos and declared Pos.stVal rows get the same presentation, across Data Model, DataSets and Reports via the already common Browser visible-value refresh. The canonical IedBrowserLiveValues ledger remains raw and association-scoped; no extra cache, polling, read, write or RCB changes.
  • Remove unsafe generic Enum=1 => Open and Enum=2 => Closed in the non-DPC formatter. Mod/Beh/health and arbitrary vendor enumerations must never be shown as circuit-breaker position without exact typing.
  • Respect explicit contrary CDC metadata; unknown or unverified Pos in an unrecognized LN remains raw.

Regression and qualification

  • IEC all four 2-bit codes in numeric/text/raw MMS BIT STRING representations; XCBR, XSWI and CSWI; vendor DPC via exact CDC/BType; exact FC, reference and sibling isolation; leave Mod/Beh/generic enums unchanged; project a single canonical Report observation to both Browser views without modifying raw value/quality/association.
  • Stacked on #602. One exact-SHA CI validation only; keep draft until BCUGE hardware acceptance. This is the typed presentation/SSOT consumption slice of M2.17, not a claim that connect-time Data Model hydration is complete.

Copy link
Copy Markdown
Owner Author

D7 complete five-file typed DPC owner/value semantic reconciliation

Disposition A: close historical PR unmerged after full original→RC per-file source+regression inspection. Historic head b59f4951065db528d657f0f6c7ef680c6c4e01ed is exact ancestor of protected draft RC 817c3910e8223fa2ac531a4426ada5d2d4bbbe50 (+1243/−0, merge-base historic HEAD), with all five paths semantically retained or tightened. Original branch and raw evidence are recoverable; do NOT merge obsolete implementation over current RC.

Canonical replacement: protected draft RC #727 / #729 at 817c3910e8223fa2ac531a4426ada5d2d4bbbe50.

Unique delta, exact path proof:

  1. Models/IedBrowserDoublePointPresentation.cs: original blob 9ac4b65db122904f7b03a6898f019cda5496c21b → current 97672095520873b661121e08d32b9e7a83cff0f7; still converts only model-authorized DPC/Dbpos exact value owner to IEC Intermediate [00], Open [01], Close [10], Bad state [11], preserving underlying raw ledger/Report/Read. Current implementation adds tightly gated SV substituted-value and two-bit status-candidate handling, with separate 13-bit subQ quality projection. This is additive and not equivalent to mapping arbitrary enums by name.
  2. Models/IedBrowserSchemaIndex.cs: original blob 979468d162eebd78e1e8b752dea1f702778667f0 → 7ef8005052527d2e70e4b5228309bf4f0c172f9d; original exact ST stVal/DO declaration set _declaredDoublePointValues, IsDeclaredDoublePointValue, verified CDC DPC or Dbpos BType, and narrowly standard XCBR/XSWI/CSWI Pos fallback persist. Conflicting explicit CDC and unrelated LN remain disallowed. Current schema gates extra wire-backed formats, never a name-only value cache.
  3. Services/Iec61850ValueFormatter.cs: old 040edb34bf91d8c85bd7565db4c4a9d4b1492368 → RC 2c1646b60815c612eb111c5aaca4863adb6e2510; generic int i => AppendUnit(...) no longer mislabels every Enum=1/2 as breaker Open/Closed. DPC interpretation remains in explicitly typed process formatter.
  4. MainWindow.IedBrowser.cs: old b1a512535f0227f2e41fba9194961c673d8cb337 → RC 21a0551413a5437a562c463f011204868aab7b3e; retains read-only IedBrowserDoublePointPresentation.Format for current canonical observedReference + exact row ref/FC, and only for non-evidence field, before engineering display, with no ledger mutation or Report ownership overwrite.
  5. tests/ARSAS.Tests/M217TypedDoublePointLiveModelTests.cs: historic c7efb4fec3053ceb6caea4fd0e90349a92a4179a → RC ec680b4ad8d72faf6720fac8b98057e96a9d5ba3. All 8 original test methods and EVERY original Assert / InlineData line remain, including four 2-bit value states, standard switching LN and vendor DPC, contradictory CDC failure, Data Model & DataSets same raw SSOT evidence, and generic Enum no false switch state. RC adds extra SV/fallback and quality regressions.

Safety: Administrative closure only. No source write, main merge, engine repin, Control/Write/RCB/GOOSE transmission, stable v1.6.42, or new physical trial. #753 six-file exact-head Windows/native/portable and SCL CI succeeded but does not independently qualify DPC state mapping on real relay, nor hardware R7/R10. #606 and #615 stay OPEN.

Follow-up: Validate exact IEC four-state display using typed C264/F650 observed stVal and connected latest model, verifying contradictory CDC/FC remains fail-closed. No process command or assumed q/t is authorized by this historical closure.

@masarray masarray closed this Oct 26, 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