Skip to content

Phase 4D-C2: build live-type Oper SBOw and Cancel MMS structures - #27

Closed
masarray wants to merge 6 commits into
agent/phase-4d-c1-guarded-control-corefrom
agent/phase-4d-c2-control-mms-structures
Closed

masarray wants to merge 6 commits into
agent/phase-4d-c1-guarded-control-corefrom
agent/phase-4d-c2-control-mms-structures

Conversation

@masarray

Copy link
Copy Markdown
Owner

Scope

Stacked on Phase 4D-C1. Port the C# smart-control value binder and service-structure contract into C++ using the live MMS TypeSpecification as the source of truth.

Implemented

  • C#-aligned control-value kinds: Boolean, DoublePoint, Integer, Unsigned, FloatingPoint, StepPosition and Raw MMS
  • DPC bit-string mapping with MMS network bit order (Off=01, On=10)
  • live-type validation for boolean, bit-string, integer/BCD, unsigned, floating point, structures, octet/string shapes and raw MMS
  • conservative StepPosition / ValWithTrans binding
  • conservative analogue-structure binding using the exact live structure
  • exact origin structure generation (orCat, orIdent)
  • exact ctlNum integer/unsigned generation
  • timestamp validation for UTC-time/BinaryTime
  • deterministic epoch default for optional operTm
  • exact two-bit Check: bit0 synchrocheck, bit1 interlock-check
  • Oper and SBOw required fields: ctlVal, origin, ctlNum, T, Test, Check; optional operTm
  • Cancel required fields: ctlVal, origin, ctlNum, T, Test; optional Check
  • preserve live component order
  • reject unknown/vendor-specific command components instead of guessing

Golden-wire evidence

A dedicated GCC/Clang strict-warning profile builds and tests the service structures. The Oper oracle checks the exact MMS Data bytes for DPC On, station-control/HMI origin, ctlNum=7, UTC timestamps, Test=false and Check=synchro+interlock, then decodes the bytes back through the existing MMS codec.

Additional failures cover missing required fields, wrong Check width, origin/ctlNum type mismatch, raw MMS mismatch, optional Cancel Check, StepPosition and analogue structures.

Deferred

  • C3: CommandTermination / LastApplError InformationReport correlation and decoding
  • C4: live association smart-control session and physical IED evidence

ESP32-P4 / Sampled Values work remains intentionally out of scope.

masarray commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded by #43, which integrated Smart Control C1–C5 onto current main with the maintained MMS structures and interoperability path. This stacked C2 tranche is obsolete.

@masarray masarray closed this Sep 5, 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