Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 5a817b8

Browse files
committed
I4AAS changes related to Bill Of Material and fixed UA native References
1 parent 0c4bb80 commit 5a817b8

10 files changed

Lines changed: 94 additions & 101 deletions

File tree

dataformat-uanodeset/nodeset/i4aas/Opc.Ua.I4AAS_V3Draft.NodeSet2.csv

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ AASAssetAdministrationShellType_DataSpecification,5001,Object
5555
AASEnvironmentType_AAS,5002,Object
5656
AASEnvironmentType_AAS_Administration,5003,Object
5757
AASAssetAdministrationShellType_Submodel,5004,Object
58+
AASAssetInformationType_BillOfMaterial,5005,Object
5859
AASAssetAdministrationShellType_View,5006,Object
5960
AASAssetAdministrationShellType_DerivedFrom,5007,Object
6061
AASAssetType_DataSpecification,5008,Object
@@ -90,11 +91,12 @@ AASIdentifiableType_Identification,5037,Object
9091
AASKeyDataType_Encoding_DefaultBinary,5038,Object
9192
AASKeyDataType_Encoding_DefaultXml,5039,Object
9293
AASKeyDataType_Encoding_DefaultJson,5040,Object
93-
AASReferenceType_Referable,5041,Object
9494
AASOrderedSubmodelElementCollectionType_SubmodelElement,5042,Object
9595
AASCustomConceptDescriptionType_DataSpecification,5043,Object
9696
AASIrdiConceptDescriptionType_IsCaseOf,5044,Object
97+
AASAssetAdministrationShellType_AssetInformation_BillOfMaterial,5045,Object
9798
AASIriConceptDescriptionType_IsCaseOf,5046,Object
99+
AASEnvironmentType_AAS_AssetInformation_BillOfMaterial,5047,Object
98100
AASCustomConceptDescriptionType_IsCaseOf,5048,Object
99101
AASAssetInformationType_SpecificAssetId,5049,Object
100102
AASAssetAdministrationShellType_AssetInformation_SpecificAssetId,5050,Object
@@ -113,7 +115,6 @@ AASIriConceptDescriptionType_Administration,5159,Object
113115
AASIriConceptDescriptionType_Identification,5160,Object
114116
AASAssetInformationType_GlobalAssetId,5359,Object
115117
AASEnvironmentType_AAS_AssetInformation_SpecificAssetId,5360,Object
116-
AASAssetInformationType_BillOfMaterial,5361,Object
117118
AASAssetInformationType_DefaultThumbnail,5362,Object
118119
AASIdentifierKeyValuePairType_ExternalSubjectId,5363,Object
119120
AASSubmodelType_SubmodelElement_DataSpecification,5364,Object
@@ -236,7 +237,6 @@ Server_Namespaces_http___opcfoundation_org_UA_I4AAS_V3__NamespaceVersion,6115,Va
236237
Server_Namespaces_http___opcfoundation_org_UA_I4AAS_V3__StaticNodeIdTypes,6116,Variable
237238
Server_Namespaces_http___opcfoundation_org_UA_I4AAS_V3__StaticNumericNodeIdRange,6117,Variable
238239
Server_Namespaces_http___opcfoundation_org_UA_I4AAS_V3__StaticStringNodeIdPattern,6118,Variable
239-
AASReferenceType_Referable_Category,6119,Variable
240240
AASAssetAdministrationShellType_AssetInformation_AssetKind,6120,Variable
241241
AASEnvironmentType_AAS_AssetInformation_AssetKind,6121,Variable
242242
AASIdentifierKeyValuePairList_AASIdentifierKeyValuePair_Key,6124,Variable
@@ -260,7 +260,6 @@ AASIriConceptDescriptionType_Identification_Id,6241,Variable
260260
AASIriConceptDescriptionType_Identification_IdType,6242,Variable
261261
AASAssetInformationType_AssetKind,6441,Variable
262262
AASAssetInformationType_GlobalAssetId_Keys,6442,Variable
263-
AASAssetInformationType_BillOfMaterial_Keys,6443,Variable
264263
AASAssetInformationType_DefaultThumbnail_MimeType,6444,Variable
265264
AASAssetInformationType_DefaultThumbnail_Category,6445,Variable
266265
AASAssetInformationType_DefaultThumbnail_ModelingKind,6446,Variable

dataformat-uanodeset/nodeset/i4aas/Opc.Ua.I4AAS_V3Draft.NodeSet2.xml

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</Aliases>
4747
<Extensions>
4848
<Extension>
49-
<ua:ModelInfo Tool="UaModeler" Hash="96UVu2JzZvy9KUfFJpHpVA==" Version="1.6.4"/>
49+
<ua:ModelInfo Tool="UaModeler" Hash="PzzaYTLsdLW7kqMSVumYXQ==" Version="1.6.4"/>
5050
</Extension>
5151
</Extensions>
5252
<UADataType NodeId="ns=1;i=3003" BrowseName="1:AASAssetKindDataType">
@@ -1731,7 +1731,7 @@ Note: In an object oriented view, an instance denotes an object of a template (c
17311731
<References>
17321732
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
17331733
<Reference ReferenceType="HasProperty">ns=1;i=6441</Reference>
1734-
<Reference ReferenceType="HasComponent">ns=1;i=5361</Reference>
1734+
<Reference ReferenceType="HasComponent">ns=1;i=5005</Reference>
17351735
<Reference ReferenceType="HasComponent">ns=1;i=5362</Reference>
17361736
<Reference ReferenceType="HasComponent">ns=1;i=5359</Reference>
17371737
<Reference ReferenceType="HasComponent">ns=1;i=5049</Reference>
@@ -1745,23 +1745,14 @@ Note: In an object oriented view, an instance denotes an object of a template (c
17451745
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
17461746
</References>
17471747
</UAVariable>
1748-
<UAObject ParentNodeId="ns=1;i=1031" NodeId="ns=1;i=5361" BrowseName="1:BillOfMaterial">
1748+
<UAObject ParentNodeId="ns=1;i=1031" NodeId="ns=1;i=5005" BrowseName="1:BillOfMaterial">
17491749
<DisplayName>BillOfMaterial</DisplayName>
17501750
<References>
1751-
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1004</Reference>
1751+
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1036</Reference>
17521752
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1031</Reference>
1753-
<Reference ReferenceType="HasProperty">ns=1;i=6443</Reference>
1754-
<Reference ReferenceType="HasModellingRule">i=80</Reference>
1755-
</References>
1756-
</UAObject>
1757-
<UAVariable DataType="AASKeyDataType" ParentNodeId="ns=1;i=5361" ValueRank="1" NodeId="ns=1;i=6443" ArrayDimensions="0" BrowseName="1:Keys" AccessLevel="3">
1758-
<DisplayName>Keys</DisplayName>
1759-
<References>
1760-
<Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5361</Reference>
17611753
<Reference ReferenceType="HasModellingRule">i=78</Reference>
1762-
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
17631754
</References>
1764-
</UAVariable>
1755+
</UAObject>
17651756
<UAObject ParentNodeId="ns=1;i=1031" NodeId="ns=1;i=5362" BrowseName="1:DefaultThumbnail">
17661757
<DisplayName>DefaultThumbnail</DisplayName>
17671758
<References>
@@ -2258,12 +2249,12 @@ Note: In an object oriented view, an instance denotes an object of a template (c
22582249
<DisplayName>AASAssetAdministrationShellType</DisplayName>
22592250
<Documentation>https://reference.opcfoundation.org/v104/I4AAS/v100/docs/6.2</Documentation>
22602251
<References>
2261-
<Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1007</Reference>
22622252
<Reference ReferenceType="HasComponent">ns=1;i=5156</Reference>
22632253
<Reference ReferenceType="HasComponent">ns=1;i=5001</Reference>
22642254
<Reference ReferenceType="HasComponent">ns=1;i=5007</Reference>
22652255
<Reference ReferenceType="HasInterface">ns=1;i=1034</Reference>
22662256
<Reference ReferenceType="HasComponent">ns=1;i=5004</Reference>
2257+
<Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1007</Reference>
22672258
</References>
22682259
</UAObjectType>
22692260
<UAObject ParentNodeId="ns=1;i=1002" NodeId="ns=1;i=5156" BrowseName="1:AssetInformation">
@@ -2272,6 +2263,7 @@ Note: In an object oriented view, an instance denotes an object of a template (c
22722263
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1031</Reference>
22732264
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1002</Reference>
22742265
<Reference ReferenceType="HasProperty">ns=1;i=6120</Reference>
2266+
<Reference ReferenceType="HasComponent">ns=1;i=5045</Reference>
22752267
<Reference ReferenceType="HasModellingRule">i=78</Reference>
22762268
<Reference ReferenceType="HasComponent">ns=1;i=5050</Reference>
22772269
</References>
@@ -2284,6 +2276,14 @@ Note: In an object oriented view, an instance denotes an object of a template (c
22842276
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
22852277
</References>
22862278
</UAVariable>
2279+
<UAObject ParentNodeId="ns=1;i=5156" NodeId="ns=1;i=5045" BrowseName="1:BillOfMaterial">
2280+
<DisplayName>BillOfMaterial</DisplayName>
2281+
<References>
2282+
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1036</Reference>
2283+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
2284+
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5156</Reference>
2285+
</References>
2286+
</UAObject>
22872287
<UAObject ParentNodeId="ns=1;i=5156" NodeId="ns=1;i=5050" BrowseName="1:SpecificAssetId">
22882288
<DisplayName>SpecificAssetId</DisplayName>
22892289
<References>
@@ -2329,9 +2329,9 @@ Note: In an object oriented view, an instance denotes an object of a template (c
23292329
<DisplayName>AASAssetType</DisplayName>
23302330
<Documentation>https://reference.opcfoundation.org/v104/I4AAS/v100/docs/6.6</Documentation>
23312331
<References>
2332-
<Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1007</Reference>
23332332
<Reference ReferenceType="HasComponent">ns=1;i=5008</Reference>
23342333
<Reference ReferenceType="HasInterface">ns=1;i=1034</Reference>
2334+
<Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1007</Reference>
23352335
</References>
23362336
</UAObjectType>
23372337
<UAObject ParentNodeId="ns=1;i=1005" NodeId="ns=1;i=5008" BrowseName="1:DataSpecification">
@@ -2347,18 +2347,18 @@ Note: In an object oriented view, an instance denotes an object of a template (c
23472347
<Documentation>https://reference.opcfoundation.org/v104/I4AAS/v100/docs/6.7</Documentation>
23482348
<References>
23492349
<Reference ReferenceType="HasComponent">ns=1;i=5010</Reference>
2350-
<Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1007</Reference>
23512350
<Reference ReferenceType="HasComponent">ns=1;i=5009</Reference>
23522351
<Reference ReferenceType="HasInterface">ns=1;i=1034</Reference>
23532352
<Reference ReferenceType="HasProperty">ns=1;i=6009</Reference>
23542353
<Reference ReferenceType="HasComponent">ns=1;i=5032</Reference>
2354+
<Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1007</Reference>
23552355
</References>
23562356
</UAObjectType>
23572357
<UAObject SymbolicName="SubmodelElement" ParentNodeId="ns=1;i=1006" NodeId="ns=1;i=5010" BrowseName="1:&lt;SubmodelElement>">
23582358
<DisplayName>&lt;SubmodelElement></DisplayName>
23592359
<References>
2360-
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1009</Reference>
23612360
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1006</Reference>
2361+
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1009</Reference>
23622362
<Reference ReferenceType="HasProperty">ns=1;i=6127</Reference>
23632363
<Reference ReferenceType="HasComponent">ns=1;i=5364</Reference>
23642364
<Reference ReferenceType="HasProperty">ns=1;i=6014</Reference>
@@ -3377,28 +3377,10 @@ Note: In an object oriented view, an instance denotes an object of a template (c
33773377
<DisplayName>AASReferenceType</DisplayName>
33783378
<Documentation>https://reference.opcfoundation.org/v104/I4AAS/v100/docs/6.3</Documentation>
33793379
<References>
3380-
<Reference ReferenceType="HasAddIn">ns=1;i=5041</Reference>
3381-
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
33823380
<Reference ReferenceType="HasProperty">ns=1;i=6001</Reference>
3381+
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
33833382
</References>
33843383
</UAObjectType>
3385-
<UAObject SymbolicName="Referable" ParentNodeId="ns=1;i=1004" NodeId="ns=1;i=5041" BrowseName="1:&lt;Referable>">
3386-
<DisplayName>&lt;Referable></DisplayName>
3387-
<References>
3388-
<Reference ReferenceType="HasAddIn" IsForward="false">ns=1;i=1004</Reference>
3389-
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1003</Reference>
3390-
<Reference ReferenceType="HasProperty">ns=1;i=6119</Reference>
3391-
<Reference ReferenceType="HasModellingRule">i=11508</Reference>
3392-
</References>
3393-
</UAObject>
3394-
<UAVariable DataType="String" ParentNodeId="ns=1;i=5041" NodeId="ns=1;i=6119" BrowseName="1:Category" AccessLevel="3">
3395-
<DisplayName>Category</DisplayName>
3396-
<References>
3397-
<Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5041</Reference>
3398-
<Reference ReferenceType="HasModellingRule">i=78</Reference>
3399-
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
3400-
</References>
3401-
</UAVariable>
34023384
<UAVariable DataType="AASKeyDataType" ParentNodeId="ns=1;i=1004" ValueRank="1" NodeId="ns=1;i=6001" ArrayDimensions="0" BrowseName="1:Keys" AccessLevel="3">
34033385
<DisplayName>Keys</DisplayName>
34043386
<References>
@@ -3752,6 +3734,7 @@ Note: In an object oriented view, an instance denotes an object of a template (c
37523734
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1031</Reference>
37533735
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5002</Reference>
37543736
<Reference ReferenceType="HasProperty">ns=1;i=6121</Reference>
3737+
<Reference ReferenceType="HasComponent">ns=1;i=5047</Reference>
37553738
<Reference ReferenceType="HasModellingRule">i=78</Reference>
37563739
<Reference ReferenceType="HasComponent">ns=1;i=5360</Reference>
37573740
</References>
@@ -3764,6 +3747,14 @@ Note: In an object oriented view, an instance denotes an object of a template (c
37643747
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
37653748
</References>
37663749
</UAVariable>
3750+
<UAObject ParentNodeId="ns=1;i=5610" NodeId="ns=1;i=5047" BrowseName="1:BillOfMaterial">
3751+
<DisplayName>BillOfMaterial</DisplayName>
3752+
<References>
3753+
<Reference ReferenceType="HasTypeDefinition">ns=1;i=1036</Reference>
3754+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
3755+
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5610</Reference>
3756+
</References>
3757+
</UAObject>
37673758
<UAObject ParentNodeId="ns=1;i=5610" NodeId="ns=1;i=5360" BrowseName="1:SpecificAssetId">
37683759
<DisplayName>SpecificAssetId</DisplayName>
37693760
<References>

dataformat-uanodeset/nodeset/i4aas/changelog.csv

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ note: SubmodelReferences and AssetReferences can contain the optional and native
99
6;ConceptDictionary;Bugfix;OPC UA Dictionary is used as ConceptDictionary, thus the dedicated Types AASConceptDictionaryType is not needed anymore. ;AASConceptDictionaryType removed. Also legacy references are removed;ok;
1010
7;AssetInformation;V3 Change;introduced;AASAssetInformationType introduced;ok;
1111
8;AASReference;Bugfix;"AASReference is non-hierarchical. Also See: https://reference.opcfoundation.org/v104/Core/docs/Part3/7.4/
12-
""The semantic of NonHierarchicalReferences is to denote that its subtypes do not span a hierarchy and should not be followed when trying to present a hierarchy."" But this is the whole point of the AASReference, to follow the hierarchy which could be denoted by the AASReferenceType.";"removed AASReference and uses the hierachical reference HasAddIn to avoid confusion about ""a AASRerence Type which has a component referenced by a AASReference"". ";ok;
12+
""The semantic of NonHierarchicalReferences is to denote that its subtypes do not span a hierarchy and should not be followed when trying to present a hierarchy."" But this is the whole point of the AASReference, to follow the hierarchy which could be denoted by the AASReferenceType.";"removed AASReference and uses the hierachical reference HasAddIn to avoid confusion about ""a AASRerence Type which has a component referenced by a AASReference"".
13+
Also this can only happen for an object instance at runtime, when the referable exists. Thus it is not possible to add this with modeling rules because this will predefine some attribtues like browsename, which is IdShort of the actual Referable.";ok;
1314
9;AASReferenceType;Bugfix;OptionalPlaceholder Referable is a BaseObjectType and as HasComponent defined, but it should be used the AASReference Type with Target AASReferableType.;using AASReference Type with Target AASReferableType. Removed legacy, non-hierachical Reference, see #8.;ok;
1415
10;HasInterface;Bugfix;HasInterface already exists in OPC UA Standard but has been introduced within the I4AAS Namespace;removed proprietary HasInterface Reference Type;ok;
1516
11;AASKeyDataType;V3 Change;"""local"" Attribute has been removed";"removed ""local"" attribute";ok;
@@ -23,7 +24,7 @@ changed Modeling Rule for Value";ok;
2324
added specificAssetId
2425
removed ""Asset""";;ok;
2526
17;IdentifierKeyValuePair;added in V3;completely new type;added as AASIdentifierKeyValuePairType;ok;
26-
18;AASDataTypeIEC62…;Bugfix;messed up, INTEGER_MEASURE missing;rearranged as in the AAS Meta Model Spec;ok;
27+
18;AASDataTypeIEC62…;Bugfix;messed up, INTEGER_MEASURE missing;rearranged as in the AAS Meta Model Spec;ok;
2728
19;Identifier;Enhancement;modeled as Type, but could be Structure;just proposed since issues with structures are known;;should be considered in an updated version
2829
20;HasExtension / Extension;added in V3;new Class and Type Defintion;;;
2930
21;AssetAdministrationShell/conceptDictionaries;changed in V3;;removed;ok;
@@ -35,7 +36,7 @@ removed ""Asset""";;ok;
3536
""The identifier in the respective external dictionary shall be a unique URI string. This identifier is used for the NodeId and the BrowseName Attributes of instances of the DictionaryEntryType. The IdentifierType of the NodeId shall be STRING_1 with the identifier from the external dictionary as the value.""
3637

3738
Currently the NodeId does not follow this convention.";no action, see #27;ok;
38-
26;General;Design Flaw;Many list are modeled as optional placeholder. Therefore, the attribute name of such a list given by the AAS Spec gets lost. It will lead to inconsistencies, e.g. when the order of such a list matters, if there are two list of the same type but with different attribute names, …;"affected attribtues:
39+
26;General;Design Flaw;Many list are modeled as optional placeholder. Therefore, the attribute name of such a list given by the AAS Spec gets lost. It will lead to inconsistencies, e.g. when the order of such a list matters, if there are two list of the same type but with different attribute names, …;"affected attribtues:
3940
AssetInformation/specificAssetId
4041
HasDataSpecification/dataSpecification
4142
AnnotatedRelationshipElement/annotation
@@ -54,6 +55,6 @@ fix by using introducing a (mandatory) folder which contains the list element (a
5455
29;AASDataSpecificationIEC61360Type;Bugfix;contains Administraton and Category;must be removed;ok;
5556
30;Qualifiable;Bugfix;not implemented in I4AAS;introduce Interface?;;
5657
31;AASQualifierType;Bugfix;some attribute types do not fit;changed according to AAS V4;ok;
57-
;;;;;;
58+
32;BillOfMaterial;V3 Changes;The definition for BillOfMaterial was not that clear. It seems like BillOfMaterial is a List of References, no a single Reference.;should be solved by using a AASReferenceList;ok;
5859
;;;;;;
5960
;;;;;;

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/AssetInformationMapper.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package io.adminshell.aas.v3.dataformat.i4aas.mappers;
1717

18+
import java.util.List;
19+
1820
import org.opcfoundation.ua._2011._03.uanodeset.UAObject;
1921
import org.opcfoundation.ua._2011._03.uanodeset.UAVariable;
2022

@@ -37,7 +39,8 @@ public AssetInformationMapper(AssetInformation src, MappingContext ctx) {
3739
@Override
3840
protected UAObject createTargetObject() {
3941
target = UAObject.builder().withNodeId(ctx.newModelNodeIdAsString())
40-
.withBrowseName(createI4AASBrowseName("AssetInformation")).withDisplayName(createLocalizedText("AssetInformation")).build();
42+
.withBrowseName(createI4AASBrowseName("AssetInformation"))
43+
.withDisplayName(createLocalizedText("AssetInformation")).build();
4144
addTypeReference(I4AASIdentifier.AASAssetInformationType);
4245
return target;
4346
}
@@ -54,10 +57,12 @@ protected void mapAndAttachChildren() {
5457
attachAsComponent(target, uaIdentification);
5558
}
5659

57-
if (!source.getBillOfMaterials().isEmpty()) {
58-
Reference bom = source.getBillOfMaterials().get(0); // workaround, should be just one entry
59-
UAObject uaBom = new ReferenceMapper(bom, ctx, "BillOfMaterial").map();
60-
attachAsComponent(target, uaBom);
60+
UAObject uaBomList = createReferenceList("BillOfMaterial");
61+
List<Reference> billOfMaterials = source.getBillOfMaterials();
62+
for (int i = 0; i < billOfMaterials.size(); i++) {
63+
Reference reference = billOfMaterials.get(i);
64+
UAObject uaBomListEntry = new ReferenceMapper(reference, ctx, "BillOfMaterial_" + i).map();
65+
attachAsComponent(uaBomList, uaBomListEntry);
6166
}
6267

6368
File defaultThumbnail = source.getDefaultThumbnail();

0 commit comments

Comments
 (0)