Closed trusz closed 1 year ago
Hi @trusz and welcome here.
I am not fully sure about the scope of this library, yet. My first thought is described in the README. All of those have one thing in common, that is the edit of SCL files. What you want to have is a function returning information from the SCL - let's call them query functions. I am still a bit hesitant to have them here as those might become a never ending story :(. To not have that, I was thinking about exporting only those query functions that are also used in this library.
E.g when I do unsubscribe I need to make a query on all control block that are connected with this subscription. This function then is exported.
With your proposal, I can imagine adding a function that get the subnetwork for a GOOSE as this might be necessary for subscription anyway. With the rest of the information, that could be as easy as:
doc.querySelectorAll(`IED[name="${iedName}"] GSEControl`).map(gseControl => {
const name = ...
const datSet = ...
const subnetwork = theComplicatedFunctionToGetThat();
return {name, datSet, subnetwork}
} )`
So to understand it a bit better. Let's take subscribing to a GOOSE Subscription
ExtRefs
to an Inputs
inside an LDevice
of an IED
would be in the libraryIED
a target IED
and a GSEControl
's name to create a subscription, would not be in the library
(e.g.: function subscribe(publisher:IED, GSEControlName: string, subscriber: IED)
)But manipulate XML and can be in the library. Btw. the subscribe function is released. The call signature is a bit different from what you proposed here, but you can overcome with a simple wrapper function.
I don't know if this would be in the scope of this library but I would like to get details about all published GOOSE messages by an IED. The details would be the following:
name
on theGSEControl
)datSet
on theGSEControl