Skip to content

fix(WPF): instant IEC-101 live Trace and engineer-readable full line monitor - #42

Merged
masarray merged 2 commits into
masterfrom
fix/iec101-live-trace-ase2000-parity-20261029
Oct 28, 2026
Merged

masarray merged 2 commits into
masterfrom
fix/iec101-live-trace-ase2000-parity-20261029

Conversation

@masarray

@masarray masarray commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Field evidence / reproduction

Screenshots show IEC-101 COM1 at 1200 8E1 Link 105 flashing TX/RX/FC9 while Trace is blank until navigating away and back. independent IEC-101 reference benchmark displays every direction with raw+interpreted FT1.2/ASDU, class request, FC9, ACD/DFC, COT and value/time.

One focused implementation batch (from M2 merged master aa9f009)

  • Connect / passive capture / offline replay clear stale Follow Live/Hold/selection/deferred snapshots. First received event gets one early dispatcher flush; normal processing still uses the bounded 75ms adaptive batch timer.
  • First nonempty Trace view materialized from authoritative bounded ring, one deferred WPF layout measure; later batches append/trim. No per-frame dispatcher invokes or WPF view reload loops.
  • Raw TX/RX Trace frames retained in bounded 1200-row history even while other tab active. No Balanced-verbosity silent omission of standard polls/ACK/FC9; separate, reported queue-backpressure guard remains.
  • New single pure formatter Iec101TraceNarrator reads already-decoded LinkControlInfo + AsduDetails, no second parser, produces arrow direction + Class 1/2 request, FC9 no data + Class1 available ACD=1, flow-control DFC, FC8 decoded ASDU Type/COT/CA/IOA/value/quality/RTU time, link status, reset, ACK/NACK and E5 contextual caveat.
  • Retains raw selectable HEX and Inspector. No changes to RTU polling, link FCB/FCV, transport or passive RX-only capture. Compact typography, no new heavy grids.
  • Added 6 behavior regressions for line decoding incl. Class 2 no-data, ACD1, unknown class, timestamp, E5 and ACK. See docs/IEC101_LIVE_TRACE_independent IEC-101 reference_PARITY_20261029.md for operator FAT acceptance checklist.

Gates

Windows Release build, formatter, 19 protocol smoke, full xUnit, GUI package, CodeQL, dependency/hygiene. Merge only on green and exact SHA. Physical SICAM/ETERA/independent IEC-101 reference same-session FAT remains outstanding; CI does not prove physical hardware parity.

@masarray
masarray marked this pull request as ready for review October 28, 2026 21:10
@masarray
masarray merged commit f1b13c5 into master Oct 28, 2026
5 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:12:45.499669Z 4bca8ed Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bca8eddee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +111 to +112
if (item.Frame is { IsChecksumValid: false })
return ($"{prefix} INVALID FT1.2 FRAME", "Checksum/format invalid or incomplete; consult exact raw bytes.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate frame integrity before narrating link responses

For checksum-invalid IEC-101 frames that still have a decoded control byte, every path inside if (link is not null) returns before this integrity check. Both Ft12Parser and the passive monitor populate LinkControl for such frames, so a corrupted FC0 or FC9 is now displayed as an ordinary LINK ACK or DATA NOT AVAILABLE response, replacing the previous quality warning in ProtocolTraceMeaning. This hides relevant line-fault evidence during passive capture and replay. Check checksum and format validity before interpreting link functions, or explicitly retain the integrity warning alongside the tentative interpretation.

Useful? React with 👍 / 👎.

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