Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Later Binding on specific file does not work #1005

Closed
JakobVogelsang opened this issue Sep 16, 2022 · 3 comments · Fixed by #1026
Closed

Later Binding on specific file does not work #1005

JakobVogelsang opened this issue Sep 16, 2022 · 3 comments · Fixed by #1026
Labels
Kind: Bug Something isn't working

Comments

@JakobVogelsang
Copy link
Collaborator

JakobVogelsang commented Sep 16, 2022

Describe the bug
The GOOSE type later binding plugin does not show any ExtRef when clicking on data

To Reproduce
Open appending file

  1. Go to Subscribe - Later Binding (GOOSE)
  2. Click on '´data'
  3. See no reaction in possible inputs

Expected behavior
A selection of inputs or a warning that there are none

Additional context
See file
LaterBindingGOOSEError.scd.zip

@JakobVogelsang JakobVogelsang added the Kind: Bug Something isn't working label Sep 16, 2022
@danyill
Copy link
Collaborator

danyill commented Sep 25, 2022

I have the same issue for both GOOSE and SV when using Edition 2.1 with Siemens SIPROTEC 5 devices.

The attached scd may help reproduce this.

XAT_Prot2_Base_Configuration.scd_1.zip

@danyill
Copy link
Collaborator

danyill commented Oct 1, 2022

@JakobVogelsang I'm a bit confused by your specific file. There is a single IED, and I would not expect there to be any possibility of subscribing to anything else. There are no ExtRefs in this file.

image

What did I miss?

@danyill
Copy link
Collaborator

danyill commented Oct 1, 2022

I thought I might try to diagnose the issue I'm having with Edition 2.1 DIGSI 5 SCL files. It is caused by:

private isSubscribedTo(extRefElement: Element): boolean {
return (
extRefElement.getAttribute('iedName') ===
this.currentIedElement?.getAttribute('name') &&
this.sameAttributeValue(extRefElement, 'ldInst') &&
this.sameAttributeValue(extRefElement, 'prefix') &&
this.sameAttributeValue(extRefElement, 'lnClass') &&
this.sameAttributeValue(extRefElement, 'lnInst') &&
this.sameAttributeValue(extRefElement, 'doName') &&
this.sameAttributeValue(extRefElement, 'daName') &&
this.checkEditionSpecificRequirements(extRefElement)
);
}

Specifically in L141: this.sameAttributeValue(extRefElement, 'prefix') && .

When we do the comparison:

the FCDA might be:

<FCDA ldInst="Application" prefix="" lnClass="LPHD" lnInst="1" doName="Sim" fc="ST" />

And the ExtRef might be something like (not an exact match):

<ExtRef desc="RxPos1" intAddr="RxPos1;/Pos/stVal" pServT="GOOSE" pDO="Pos" pDA="stVal" iedName="XAT_232_M2" ldInst="CB1" lnClass="XCBR" lnInst="1" doName="Pos" daName="stVal" serviceType="GOOSE" srcLDInst="CB1" srcLNClass="LLN0" srcCBName="Ind_0" />

Note, there is no prefix. This is optional and the default is the empty string in the standard:

image

What we do is:

  private sameAttributeValue(
    extRefElement: Element,
    attributeName: string
  ): boolean {
    return (
      extRefElement.getAttribute(attributeName) ===
      this.currentSelectedFcdaElement?.getAttribute(attributeName)
    );
  }

Where: extRefElement.getAttribute(attributeName) = null (there is no prefix is the extRef)
And this.currentSelectedFcdaElement?.getAttribute(attributeName) = ""

So what happens is we end up comparing null with an empty string which fails and so the subscribed ExtRef is not shown.

Do we need to compare the prefix? Is the FCDA fully qualified without it if it is an optional field?

danyill added a commit that referenced this issue Oct 5, 2022
… binding subscription (#1026)

* Resolve absent prefix in ExtRef for later binding subscription, part of #1005

* Correct approach from review feedback

* Add tests

* Update snapshots

* Tidy up, update snapshots, update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kind: Bug Something isn't working
Projects
None yet
2 participants