Create virtual IED does not consider multiple instances of a LNType within a function
Describe the bug
When the user assigns multiple instances of a same LNType (even though instance numbers/prefixes are different) to a Function element;
They are visualized just as normal with no problem like below;
Next, user creates a Virtual IED out of Functions which should turn out to LDs including those LNs within; (expected)
But at the end, it turns out to only last or first LN is included in the datamodel, and others are ignored.
Expected behavior Expectation is all LNs are part of the datamodel of virtual IED, allocated under LD that is the name of Function element.
Sample SCL below: DigSub 2 (5) (6).zip
Thanks for the report!
@DavoodSooran can you take a look at it?
I just tried it out myself and can confirm it is a bug!
@Sander3003
As Burak explained, I also added some additional explanations to help developers resolve this issue. In the substation plug-in, when a user assigns multiple instances of the same LNType to a Function element, it should be visualized as shown below:
After that, when the user creates a Virtual IED from the Functions, the LDs should include all the defined LNs.
However, the current issue is that only the last LN is included in the data model, while the others are ignored.
Expected behavior As Burak mentioned, the expected result is that all LNs should be included in the data model of the virtual IED, allocated under the LD that corresponds to the name of the Function element. Below is the expected outcome after creating the virtual IED:
Notes for takeover
Done
- Added
lnInstconsideration on element string creation (seepackages/openscd/src/foundation.ts)
Next steps
- Take a closer look at the manually adjusted tests. Were they generated automatically using `web/test-runner'? Does it make sense to customize them manually?
Hi Illia, thanks for taking this issue on!
I'm curious: What's the lnInst consideration? And: Can web/test-runner really automatically generate tests?