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

Absent datSet in GSEControl causes console error in Message Binding subscriber plugin #1262

Closed
danyill opened this issue Jun 13, 2023 · 1 comment · Fixed by #1263
Closed
Assignees
Labels
Kind: Bug Something isn't working

Comments

@danyill
Copy link
Collaborator

danyill commented Jun 13, 2023

Describe the bug

While looking at #1261, I realise that the message binding plugins are not robust for a GSEControl (and probably a SampledValueControl) with a missing datSet which we assume to be present.

private async onGooseSubscriptionEvent(event: GooseSubscriptionEvent) {
let iedToSubscribe = event.detail.element;
if (view == View.SUBSCRIBER) {
const dataSetName = event.detail.element.getAttribute('datSet');
this.currentUsedDataset =
event.detail.element.parentElement?.querySelector(
`DataSet[name="${dataSetName}"]`
);
this.currentSelectedGseControl = event.detail.element;
this.currentGooseIedName = event.detail.element
.closest('IED')
?.getAttribute('name');
iedToSubscribe = this.currentSelectedIed!;
}
switch (event.detail.subscribeStatus) {
case SubscribeStatus.Full: {
this.unsubscribe(iedToSubscribe);
break;
}
case SubscribeStatus.Partial: {
this.subscribe(iedToSubscribe);
break;
}
case SubscribeStatus.None: {
this.subscribe(iedToSubscribe);
break;
}
}
}

To Reproduce

Steps to reproduce the behavior:

  1. Use the test file, test/testfiles/editors/MessageBindingGOOSE2007B4.scd
  2. Open the Message Binding (GOOSE) plugin
  3. Select the Subscriber view.
  4. Select IED 3.
  5. Try to connect GCB2 (IED 4)

Observe a console log:

image

Expected behavior

A subscription which does not succeed should not cause a console error.

An absent datSet is allowed according to the standard:

The name of the data set to be sent by the GSE control block. For type=GSSE, the
FCDA definitions in this data set shall be interpreted as DataLabels according to
IEC 61850-7-2. The attribute datSet should only be missing within an ICD-File, or to
indicate an unused control block. It resides in LLN0 like the control block

We should probably filter out control blocks which don't have a datSet attribute before building the lists.

@danyill danyill added the Kind: Bug Something isn't working label Jun 13, 2023
@danyill danyill changed the title Absent datSet in GSEControl causes console error Absent datSet in GSEControl causes console error in Message Binding subscriber plugin Jun 13, 2023
@danyill
Copy link
Collaborator Author

danyill commented Jun 13, 2023

This also causes glitches when subscribing/unsubscribing

There is a similar issue in the publisher view -- we shouldn't show control blocks unless they are linked to a DataSet

danyill added a commit to danyill/open-scd that referenced this issue Jun 13, 2023
Stef3st added a commit that referenced this issue Jun 22, 2023
… presence, closes #1262 (#1263)

* fix: goose subscription reflects state incorrectly

Signed-off-by: Stef3st <steffen.van.den.driest@alliander.com>

* Filter controls with datSet attribute presence, closes #1262

* Update tests

* Update snapshots

---------

Signed-off-by: Stef3st <steffen.van.den.driest@alliander.com>
Co-authored-by: Stef3st <steffen.van.den.driest@alliander.com>
Co-authored-by: Steffen van den Driest <35229971+Stef3st@users.noreply.github.com>
@danyill danyill self-assigned this Jun 28, 2023
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
1 participant