Skip to content

SV core: unify generic analysis and measurement ownership#45

Draft
masarray wants to merge 39 commits into
mainfrom
agent/sv-core-unification
Draft

SV core: unify generic analysis and measurement ownership#45
masarray wants to merge 39 commits into
mainfrom
agent/sv-core-unification

Conversation

@masarray

@masarray masarray commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Purpose

Make ARIEC61850 the single source of truth for reusable IEC 61850 Sampled Values protocol, measurement, evidence, Publisher-support, and Subscriber-analysis behavior that had diverged inside ARSVIN's embedded engine.

This PR is paired with masarray/arsvin#51. Both PRs remain draft and must not be merged before local paired PCAP/SCL testing.

Migrated reusable core

  • generic APDU/ASDU and raw seqOfData inspection
  • evidence-gated engineering scaling with raw fallback
  • timebase resolution without a hidden 50/60 Hz assumption
  • profile-neutral smpCnt continuity, wrap, restart, duplicate, gap, and out-of-order analysis
  • semantic IEC 61850 quality decoding and Publisher quality encoding
  • explicit CT/VT ratio and primary/secondary measurement-domain context
  • versioned measurement-context JSON
  • multi-ASDU Publisher profile/session behavior
  • Sampled Values payload generation, frame preview, validation, PCAP export, and Publisher evidence contracts
  • transmitter timing-health evidence
  • unified live/PCAP observation windows and stable logical stream keys
  • SCL-versus-wire configuration comparison
  • vendor-neutral profile evidence and confidence model
  • Subscriber evidence serialization and regression comparison

Generic architecture rule

Manufacturer or product identity never selects:

  • parser or BER layout
  • ordered dataset mapping
  • scaling or engineering unit
  • quality interpretation
  • nominal frequency or timebase
  • stream health result

ABB, Siemens, SEL, and other device captures may be regression fixtures only. Runtime semantics come from the protocol, SCL, an explicit standard fixed layout, explicit user context, or known-injection evidence.

Compatibility fixes found by paired integration

  • restored value-based equality and hashing for MacAddress; equivalent octets no longer compare unequal because of different backing arrays
  • retained the IEC quality validity encoding 00=Good, 01=Invalid, 10=Reserved, 11=Questionable
  • restored application-compatible Publisher evidence heading and explicit TX-side safety boundary

Validation at head fcc05de1f4b11560195e2589aa032e1d4c4b95f7

.NET CI run 235 passed:

  • source hygiene, provenance, wording, and license boundaries
  • full solution restore
  • full solution build
  • complete deterministic test suite
  • uploaded test diagnostics

The paired ARSVIN PR pins this exact 40-character engine SHA rather than a moving branch name.

Paired local test

Expected workspace:

<workspace>/
├── ARIEC61850/
└── arsvin/

Checkout this exact engine revision before running the companion validation script:

git -C ..\ARIEC61850 fetch origin fcc05de1f4b11560195e2589aa032e1d4c4b95f7
git -C ..\ARIEC61850 checkout --detach fcc05de1f4b11560195e2589aa032e1d4c4b95f7
.\scripts\test-paired-engine.ps1

Remaining evidence gate

Still pending before merge:

  • local Publisher → PCAP → ArSubsv end-to-end test
  • generic no-SCL raw fallback inspection
  • matching-SCL ordered dataset mapping test
  • nofASDU=1 and multi-ASDU replay
  • known-injection scaling/RMS/phasor comparison
  • authorized isolated live MU test

This is engineering software and deterministic regression evidence, not formal IEC 61850 conformance certification or calibrated measurement validation.

masarray added 30 commits July 23, 2026 09:18
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