Skip to content

Preserve authoritative IED identity in live SCL export#34

Merged
masarray merged 9 commits into
mainfrom
fix/live-scl-ied-identity
Jul 20, 2026
Merged

Preserve authoritative IED identity in live SCL export#34
masarray merged 9 commits into
mainfrom
fix/live-scl-ied-identity

Conversation

@masarray

@masarray masarray commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Problem

MMS discovery exposes communication-level Logical Device domain names, not a guaranteed enclosing SCL IED name. A relay can identify itself as OCR7SJ8Mod2 while exposing domains such as OCR7SJ8Application and OCR7SJ8CB1. Treating the first domain as IED identity generates broken CID references and can prevent a SAS client from associating correctly.

Fix

  • add caller-supplied LiveIedSclExportOptions.IedNameOverride;
  • add AuthoritativeLiveIedSclExporter, which uses the proven live exporter and then normalizes identity on a cloned/generated document;
  • set <IED name>, ConnectedAP@iedName, and Header identity from the authoritative physical IED name;
  • preserve original MMS Logical Device domains through LDevice@ldName whenever the domain is not the implicit IEDName + LDevice.inst form;
  • validate that every discovered MMS domain remains represented after normalization;
  • preserve existing implicit product naming where the domain genuinely is IEDName + ldInst;
  • keep DataSets, FCDA mappings, ReportControls, Edition selection, and existing export evidence on the established exporter path.

Regression coverage

The tests reproduce the reported relay pattern:

  • physical IED: OCR7SJ8Mod2;
  • legacy/wrong model identity: OCR7SJ8Application;
  • MMS domains: OCR7SJ8Application, OCR7SJ8CB1;
  • selected URCB and cross-domain FCDA preserved;
  • no invalid concatenation such as OCR7SJ8Mod2OCR7SJ8Application.

Validation

  • final PR contains only the export option, authoritative normalizer, and focused tests;
  • .NET CI passed on the final head.

@masarray
masarray marked this pull request as ready for review July 20, 2026 07:33
@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 526f16f into main Jul 20, 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