Skip to content

Conversation

@ca-d
Copy link
Contributor

@ca-d ca-d commented Mar 7, 2025

Closes #69 , which would be nice. However, we do not yet dereference FCDAs that lack a doName attribute and thus do not support GSSE yet. This we would have to live with for the time being.

Also, does not come with automated tests yet, so needs to be manually tested (ideally by @danyill ) that FCDAs catch all relevant DAs, DAIs, and so on. Constructing sufficient test data is quite a chore, so I'd suggest doing that next month, after the Transpower MVP is in production.

@ca-d ca-d requested a review from danyill March 7, 2025 13:22
@ca-d ca-d enabled auto-merge (rebase) March 7, 2025 13:23
@ca-d ca-d force-pushed the dereference-fcda branch 2 times, most recently from 97eacdd to cba4184 Compare March 7, 2025 20:47
We do not yet dereference FCDAs that lack a doName attribute and thus do
not support GSSE yet.
@ca-d ca-d added this to the MVP Hashing Algorithm milestone Mar 7, 2025
Copy link
Collaborator

@danyill danyill left a comment

Choose a reason for hiding this comment

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

Thank you for the opportunity to comment on this PR.

I have a question and a few comments.

Comment on lines +35 to +36
`:scope>LDevice[inst="${ldInst}"]>LN0[prefix="${prefix}"][lnClass="${lnClass}"],
:scope>LDevice[inst="${ldInst}"]> LN[prefix="${prefix}"][lnClass="${lnClass}"][inst="${lnInst}"]`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Because (regrettably) so many FCDA attributes are optional and because the standard is unclear we have to deal with another special case.

In Ed 2.1 for prefix: "Prefix identifying together with lnInst and lnClass the LN where the DO resides; optional, default value is the empty string". Often we interpret this as prefix="" or prefix missing entirely as equivalent.

Prefix is optional within tLN with a default of "" so I think this is a legitimate case we should consider and for that I am sorry 😉 (and the situation is worse with ExtRef elements!)

Comment on lines +118 to +122
} else if (fc) {
references.push(
...Array.from(doElement.querySelectorAll(`:scope>DA[fc="${fc}"]`)),
);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps a silly question:

If I had an FCDA which only looked at at a DO, would the name of the DO somehow be included here, is this semantic? i.e. two boolean values with the same structure are the same even if the names are different?

This seems like some kind of duck typing vs. structural typing debate.
Somehow in my mind I feel the name of a data object is structural in a different way to, say, the name of an IED or DataSet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems like some kind of duck typing vs. structural typing debate.
Somehow in my mind I feel the name of a data object is structural in a different way to, say, the name of an IED or DataSet.

I think I think this is because these are defined as part of the standard in Parts 7-3 and 7-4 and have a "well defined meaning". But up for discussion 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a very good point. If structural typing is desired, DO/DA names should be excepted from the base filter's exclude list.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we could ask @JakobVogelsang for a comment on this topic

Copy link
Contributor Author

@ca-d ca-d Mar 17, 2025

Choose a reason for hiding this comment

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

Just to be clear: Once #47 is resolved by @stee-re 's current work, whether we do structural typing or duck typing is up to the distributor - or even up to the end user if they're willing to edit the base filter. Jakob's input would still be valuable for deciding which default base filter we want to deliver out of the box.

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.

dereference FCDAs correctly

3 participants