Skip to content

Fix IEC 61850 report DataRef/value alignment - #80

Merged
masarray merged 2 commits into
mainfrom
fix/report-dataref-value-alignment
Aug 16, 2026
Merged

Fix IEC 61850 report DataRef/value alignment#80
masarray merged 2 commits into
mainfrom
fix/report-dataref-value-alignment

Conversation

@masarray

Copy link
Copy Markdown
Owner

Field regression

ARSAS field capture from AA1C1F13R4 showed StaticUrcb updates where a .stVal telegram was displayed as bits(...), while later MMS verification produced the correct scalar.

Root cause

For reports with OptFlds.data-reference, IEC 61850 wire order is inclusion -> DataRef entries -> process values -> reason-for-inclusion. ARIEC61850's projection path expects its decoded item list as inclusion -> process values -> DataRef -> reason. The decoder previously preserved wire order, so DataRef-enabled reports could shift metadata/value positions.

Fix

  • Normalize only unambiguous DataRef-enabled InformationReport frames before projection.
  • Require a valid report header, inclusion bit-string, included count, and a complete VisibleString DataRef block before reordering.
  • Preserve all values/failures and reindex the normalized list.
  • Add regression coverage reproducing DataRef-before-value wire order and proving Boolean process values remain process values.

The normalization is intentionally bounded and leaves reports without DataRef unchanged.

@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 e23b295 into main Aug 16, 2026
1 check 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