-
Notifications
You must be signed in to change notification settings - Fork 31
Enumeration EnumType
With OpenSCD, you have the option to either add enumerations that are defined in the standard or create your own user-defined EnumType
.
NOTE: In most cases, enumerations defined in IEC 61850-7-4 and IEC 61850-7-3 are sufficient. It is recommended to use those wherever possible.
Add EnumType
- Navigate to the
EnumType
list and click on Add EnumType. - Select the desired
EnumType
from the options available in the values field.
Settings:
- id: Ensure that the id is unique throughout the entire project.
- desc: User-defined description field.
From IEC 61850
OpenSCD templates contain all enumerations from IEC 61850-7-4 and IEC 61850-7-3. The correct EnumType
with all possible EnumVal
child elements are added to the project.
User-defined
To define a user-defined EnumType
from scratch, open the Add EnumType wizard and make sure not to select a value. Exercise caution with this option as it adds a blank EnumType
.
Editing EnumType:
- Navigate to the
EnumType
list within the Template editor and select the desiredEnumType
for editing.
Settings:
- id: Ensure the id is unique throughout the entire project.
- desc: User-defined description field.
- List of all child
EnumVal
elements with their respectiveord
attributes and inner text.
Example:
<EnumType id="BehaviorModeKind">
<EnumVal ord="1">on</EnumVal>
<EnumVal ord="2">blocked</EnumVal>
<EnumVal ord="3">test</EnumVal>
<EnumVal ord="4">test/blocked</EnumVal>
<EnumVal ord="5">off</EnumVal>
</EnumType>
Removing EnumType:
- Open the
EnumType
you wish to remove by selecting Edit EnumType. - Click on the Remove button.
WARNING: OpenSCD does not perform validity checks before removal, so exercise caution when deleting EnumTypes.