-
Notifications
You must be signed in to change notification settings - Fork 46
Data attribute type DAType
Add DAType
- Navigate to the list of
DAType's in the Template editor. - Click on Add DAType.
- Select either a
DATypefrom the template library or leave the value field empty for a new one.
Settings:
- id*: Ensure that the ID is unique within the entire project.
- desc: User-defined description field.
From IEC 61850
OpenSCD templates contain all data attribute types from IEC 61850-7-3. Unlike EnumType, most pre-defined DATypes offer more flexibility in their definition. For example, you can examine the definition of the AnalogueValue as specified in the NSD files.
<ConstructedAttribute name="AnalogueValue"
titleID="IEC61850_7_3.AnalogueValue::AnalogueValue.cl.title">
<SubDataAttribute name="i"
type="INT32"
...
presCond="AtLeastOne"
presCondArgs="1"/>
<SubDataAttribute name="f"
type="FLOAT32"
...
presCond="AtLeastOne"
presCondArgs="1"/>
</ConstructedAttribute>
The definition, especially the attribute presCond, provides the flexibility to decide whether one or both can be children of the AnalogueValue. This means that as a user, you must determine the structure of your AnalogueValue. In OpenSCD templates, most DATypes include all possible children by default. You can then remove unnecessary children to customize the DAType according to your requirements.
NOTE:
DATypes in the OpenSCD templates often include all possible children. Please verify if you truly need all of them. Refer to the standard'sDATypedefinition for clarification.
User-defined
An empty DAType is added to the project, which is often invalid in many cases, so do not consider the process complete at this stage.
Edit DAType
- Navigate to the list of
DATypes in the template editor. - Click on the
DATypeyou wish to edit.
Settings:
- id*: Ensure that the ID is unique across the entire project.
- desc: User-defined description field.
- List of all child
BDA: This section displays the ID and type (bType) of each childBDA. If the type starts with #, it indicates that theBDAis either a constructed attribute or an enumeration.
Example:
<DAType id="OpenSCD_Originator">
<BDA name="orCat" bType="Enum" type="OriginatorCategoryKind"/>
<BDA name="orIdent" bType="Octet64"/>
</DAType>
Remove DAType
- Open the
DATypeyou wish to remove in the Edit DAType wizard. - Click on the Remove button.
WARNING: OpenSCD does not perform validity checks before removal, so exercise caution when deleting elements.