Skip to content

Add offline DataSet and MMS report monitoring - #11

Merged
masarray merged 4 commits into
mainfrom
agent/offline-reporting-foundation
Aug 6, 2026
Merged

masarray merged 4 commits into
mainfrom
agent/offline-reporting-foundation

Conversation

@masarray

@masarray masarray commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Scope

Phase 4A adds offline DataSet/RCB inventory, DataSet directory decoding, InformationReport parsing, RCB state interpretation, and bounded report continuity monitoring directly above the merged Phase 3C MMS service layer.

DataSet and RCB inventory

  • Build a bounded discovery snapshot from supplied GetNameList domain, variable, and named-variable-list evidence.
  • Deduplicate DataSets and retain their MMS ObjectName identity.
  • Detect buffered and unbuffered RCB candidates from $BR$ and $RP$ variable names.
  • Group discovered RCB attributes without opening an association or querying an IED.

DataSet directory and RCB state

  • Add GetNamedVariableListAttributes service tag 12 request/response codecs.
  • Decode DataSet members from raw MMS or Presentation P-DATA.
  • Normalize IEC 61850 functional-constraint references while preserving the original MMS ObjectName and mapping confidence.
  • Build bounded multi-variable Read requests for common BRCB/URCB attributes.
  • Interpret DatSet, RptID, ConfRev, IntgPd, BufTm, SqNum, RptEna, Resv, ResvTms, Owner, EntryID, TimeOfEntry, TrgOps, and OptFlds.
  • Produce conservative availability states for available, in-use, caller-owned, no-DataSet, unreadable, and empty controls.

InformationReport parsing

  • Strictly decode Unconfirmed-PDU InformationReport envelopes and access-result lists.
  • Preserve optional variable references, successful MMS Data values, and per-item DataAccessError results.
  • Map IEC 61850 report fields in exact OptFlds order: RptID, OptFlds, SqNum, TimeOfEntry, DatSet, BufOvfl, EntryID, ConfRev, segmentation, inclusion, values, data references, and reasons.
  • Decode data-change, quality-change, data-update, integrity, GI, and application-trigger reason bits.
  • Validate DataSet directory indexes and reject trailing or structurally inconsistent report results.

Offline monitoring

  • Track first, in-order, duplicate, gap, wrap, and reset sequence states.
  • Detect configuration revision changes, DataSet changes, and buffer overflow.
  • Track segmented report start, continuation, completion, and gap states.
  • Bound stream count and retained frame count with deterministic least-recent eviction.

Validation

  • Eleven deterministic Phase 4A regression groups; repository total 15 CTest entries.
  • C#-derived realistic buffered-report semantic vector.
  • DataSet inventory/directory, RCB state, optional-field, partial-failure, sequence, segmentation, and monitor-bound tests.
  • Deterministic mutation-smoke coverage.
  • LLVM libFuzzer target with two intentional reporting seeds.
  • Local GCC and Clang warnings-as-errors validation passed: 15/15.
  • Local ASan/UBSan validation passed: 15/15.
  • Local reporting libFuzzer passed 5,000 runs without a crash artifact.

Safety boundary

Offline deterministic parsing, inventory construction, and monitoring only. This phase does not open TCP sockets, create an MMS association, query an IED, enable an RCB, send GI, transmit a Read/Write request, acknowledge reports, or perform control operations.

@masarray
masarray marked this pull request as ready for review August 6, 2026 09:54
@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 merged commit 846ccae into main Aug 6, 2026
15 checks passed
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