|
| 1 | + |
| 2 | +**Add DAType** |
| 3 | + |
| 4 | +<img align="right" src="https://user-images.githubusercontent.com/66802940/132105466-55a9ace1-84d5-4ab3-83b8-ad4cb4195cf7.png" alt="alt text" width="250"> |
| 5 | + |
| 6 | +1. Navigate to the list of `DAType`'s in the **template editor** |
| 7 | +2. Click on **Add DAType** |
| 8 | +3. Select either a `DAType` from the template library or an empty on (empty **value** field) |
| 9 | + |
| 10 | +*Settings*: |
| 11 | +1. **id***: make sure that id is unique in the whole project. |
| 12 | +2. **desc**: user-defined description field |
| 13 | + |
| 14 | +*From IEC 61850* |
| 15 | + |
| 16 | +OpenSCD templates contains all data attribute types from IEC 61850‑7‑3. Other than `EnumType` most pre-defined `DAType` have more flexibility in their definition. As an example you can see the definition of the `AnalogueValue` as defined in the [NSD]() files. |
| 17 | + |
| 18 | +``` |
| 19 | +<ConstructedAttribute name="AnalogueValue" |
| 20 | + titleID="IEC61850_7_3.AnalogueValue::AnalogueValue.cl.title"> |
| 21 | + <SubDataAttribute name="i" |
| 22 | + type="INT32" |
| 23 | + ... |
| 24 | + presCond="AtLeastOne" |
| 25 | + presCondArgs="1"/> |
| 26 | + <SubDataAttribute name="f" |
| 27 | + type="FLOAT32" |
| 28 | + ... |
| 29 | + presCond="AtLeastOne" |
| 30 | + presCondArgs="1"/> |
| 31 | +</ConstructedAttribute> |
| 32 | +``` |
| 33 | + |
| 34 | +The definition especially the attribute `presCond` gives the freedom to decide if one or both can be children of the `AnalogueValue`. This means for you as a user that you have to decide how your `AnalogueValue` can look like. For OpenSCD templates this means that most `DAType` contain all possible children. From there on you can remove children so that the `DAType` does fit your needs. |
| 35 | + |
| 36 | +> NOTE: `DAType` in the OpenSCD templates contain often all possible children. Please check if you really need all of them. Check the definition of the `DAType` definition of the standard. |
| 37 | +
|
| 38 | + |
| 39 | +*User-defined* |
| 40 | + |
| 41 | +An black `DAType` is added to the project, that in a lot of cases is invalid so do not stop here. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +**Edit DAType** |
| 46 | + |
| 47 | +<img align="right" src="https://user-images.githubusercontent.com/66802940/132105442-e3518994-5369-4342-ab1a-8a70a9133ed1.png" alt="alt text" width="250"> |
| 48 | + |
| 49 | +1. Navigate to the `DAType`'s list in the **template editor** |
| 50 | +2. Click on the `DAType` you want to edit |
| 51 | + |
| 52 | +*Settings*: |
| 53 | + |
| 54 | +1. **id***: make sure that id is unique in the whole project. |
| 55 | +2. **desc**: user-defined description field |
| 56 | +3. List of all child `BDA`. The item shows the `id` as well as the type - `bType`. When the type starts with **#** than the `BDA` is either a constructed attribute or an enumeration. |
| 57 | + |
| 58 | + |
| 59 | +*Example*: |
| 60 | +``` |
| 61 | +<DAType id="OpenSCD_Originator"> |
| 62 | + <BDA name="orCat" bType="Enum" type="OriginatorCategoryKind"/> |
| 63 | + <BDA name="orIdent" bType="Octet64"/> |
| 64 | +</DAType> |
| 65 | +``` |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +**Remove EnumType** |
| 70 | + |
| 71 | +1. Open the `DAType` you want to remove **Edit DAType** |
| 72 | +2. Click on **Remove** button |
| 73 | + |
| 74 | +> **WARNING**: OpenSCD does not check for validity before removal so be careful! |
| 75 | +
|
0 commit comments