Skip to content

M2C: indexed IEC FCDA Global Data refresh with bounded MMS targets - #161

Merged
masarray merged 3 commits into
mainfrom
fix/workbench-canonical-watch-read-m2c
Oct 14, 2026
Merged

masarray merged 3 commits into
mainfrom
fix/workbench-canonical-watch-read-m2c

Conversation

@masarray

Copy link
Copy Markdown
Owner

Baseline

Stacked after integrated M2B PR #160 on main (d527c894). Native Workbench only; no changes to SMV/PTP/ESP32 or MMS protocol engine.

Bug fixed

DataSets are now displayed via canonical IEC/MMS reference alias lookup, but Global Data → Refresh watched still used a linear scan requiring a literal node.reference. IEC FCDA references (e.g. LD/LN.DO.DA [ST]) therefore could fail to produce actual MMS targets even when DataSets resolved correctly.

Implementation

  • Reuse canonical referenceIndex_ from M2B to resolve watched DO/DA with exact FC filtering, including IEC and MMS spellings.
  • Expand DO only to real child DAs; deduplicate aliases, respect caller maximumTargets (64 from Global Data), and fail closed on unresolved references.
  • Coalesce changes to the watched-value grid at most once per 50ms event window rather than repainting up to 256 entries per individual MMS value event. No cyclic read/polling.
  • Extend large-model QA covering IEC FCDA alias, MMS duplicate, DO expansion (MX), mismatching ST, and caller bound.

Acceptance

  • Native Qt build, QML smoke, Browser convergence, and 60k-node QA pass on exact head.
  • SCL-Assisted Workbench regression remains unaffected.
  • Offline references do not generate synthetic values; only explicitly requested/connected MMS Read may refresh.
  • No unrelated CI matrix or Windows packaging triggered during iterating.

Do not merge until exact-head CI success. This fixes data authority, not full q/t bit-level decoding or pixel-perfect visual parity.

… references

Resolve watched DATA and DataSet DO/DA members through the indexed canonical IEC/MMS alias map instead of repeatedly scanning every node and comparing incompatible reference spellings. Deduplicate MMS targets, honor FC, hard-bound the requested read count, and fail closed on unmatched members. Coalesce observed UI value updates over 50ms without any cyclic MMS polling. Add large-model regression for IEC/MMS aliases, DO FC filtering, and bounded refresh.
…lidation

Extend canonical indexed Global Data resolver for LD/LN$FC$DO references previously supported by literal prefix matching. Normalize to exact indexed IEC DO, enforce matching FC, and reject incomplete/ambiguous prefixes. Add regression for four MX children and FC mismatch negative case.
Replace forbidden QML timer with Qt.callLater(root.syncRows), coalescing hot canonical dataChanged/valuesChanged notifications without cyclic polling, new runner schedules, or background reads. Extend P6A contract to enforce event-driven refresh.
@masarray
masarray marked this pull request as ready for review October 14, 2026 09:55
@masarray
masarray merged commit d437443 into main Oct 14, 2026
2 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T09:59:27.797642Z 5a5fdd2 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: 5a5fdd2e55

ℹ️ 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".

const auto [reference, fc] = splitDataSetMemberReference(raw);
if (reference.isEmpty()) continue;
QString effectiveFc = fc;
auto found = referenceIndex_.constFind(reference);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Normalize opened-SCL FCDA references before lookup

In the SCL-assisted-connect path, this exact lookup cannot resolve DataSet members: build_signal_reference() produces references such as IED/LD/LN.DO.DA [MX], while IedEngineeringContextController::dataSets() appends another FC suffix and the tree index uses the MMS domain form IEDLD/LN.DO.DA. splitDataSetMemberReference() removes only the final suffix, leaving a key that never exists, and the $ fallback does not apply, so refreshing an opened-SCL DataSet returns no read targets. Convert the canonical SCL reference to the indexed MMS-domain identity, or pass/index the member's existing mms_reference, so Open SCL and live discovery resolve through the same semantics.

AGENTS.md reference: AGENTS.md:L299-L301

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