-
Notifications
You must be signed in to change notification settings - Fork 49
Template Updater
With this plugin you can update existing logical node type definition in an SCL file. It does so by creating a new logical node type from the selection and removing the "old" logical node type and its sub data structures. With this approach we make sure that all hashes are always up-to-date.
Due to this procedure this plugin is very closely related to the template generator. Both generate data type elements LNodeType, DOType, DAType and EnumType from a user selection.
With the template generator the user selection at the beginning is all mandatory data. With this plugin user selection is parsed from the data type templates section of the SCL file. As a result a user can see what data is already selected for a given logical node type. Similar to the template generator, the user can select or deselect data from a given logical node type. On saving the selection, a new logical node type is created in the same way as with the template generator. In addition to the template generator, the "old" logical node type and all orphan data structures are removed from the SCL file to avoid clutter with an update.
This plugin is centered around a UI component called tree-grid which is able to render a tree structures. This is necessary, because a logical node is a structured variable with different depth, like a tree is.
Actually, the tree grid holds two tree structures.
The first tree structure is a super set displaying you all the choices that the IEC 61850 namespace for a given logical node class has to over. This complete tree is initially being parsed from the NSD files. Which means that initially the user can only select what is offered in the IEC 61850 namespace. You can extend the super set using the Add Data Object button (see ...).
The user can select data objects, data attributes or enumeration values, by clicking on it. Selected data is highlighted through the primary color set in your distribution. In the above picture is green. You can deselect by clicking on a selected value. Data that is of the presence condition M (mandatory) cannot be selected or deselected. The selection tree is at the end transformed into LNodeType, DOType, DAType and EnumType elements.
Initially, the super tree is parsed from the NSD files and represents the namespace as is standardized in the IEC 61850. There are multiple ways on how the namespace can be extended to cover aspects of a PAC function that are not covered by the IEC 61850 namespace. Among those, adding user defined data objects is probably the most important one. A user can add a data object to all logical node classes so long the data object name is within the pattern restriction and so long the data object structures follows one of the standardized CDCs.
In this plugin you can add a data object clicking on the Add Data Object button. Such an imported data object is being added to the super set and from there on can be selected by the user to add to SCL file.
This plugin is using hashing techniques for the id attribute. The hash is depending on the content of the data type element, which comes with two main advantages: 1. A simple compare between two data type by simply comparing the id of the data type. 2. This allows to prevent code duplication and keep the SCL file small.
NOTE: When you use other plugins to change the content of a data type element without updating the hash you break with this strategy.