06/12/2024
I need to map an xml dataType JoiningProcessIdentificationDataType to a class Arguments;
If I open the file Opc.Ua.Ijt.Base.NodeSet2.xml I can see:
<UADataType NodeId="ns=1;i=3029" BrowseName="1:JoiningProcessIdentificationDataType">
<DisplayName>JoiningProcessIdentificationDataType</DisplayName>
<Description Locale="en">This structure contains the identification information of a Joining Process. It is used in set of methods defined in JoiningProcessManagementType.</Description>
<Category>IJT Abort Joining Process</Category>
<Category>IJT Start Selected Joining</Category>
<Category>IJT Select Joining Process</Category>
<Category>IJT Deselect Joining Process</Category>
<Category>IJT Reset Joining Process</Category>
<Category>IJT Increment Joining Process Counter</Category>
<Category>IJT Decrement Joining Process Counter</Category>
<Category>IJT Set Joining Process Size</Category>
<Category>IJT Start Joining Process</Category>
<Documentation>https://reference.opcfoundatio.....on>
<References>
<Reference ReferenceType="HasEncoding">ns=1;i=5121</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5123</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5122</Reference>
<Reference ReferenceType="HasSubtype" IsForward="false">i=22</Reference>
</References>
<Definition Name="1:JoiningProcessIdentificationDataType">
<Field Name="JoiningProcessId" DataType="TrimmedString" IsOptional="true">
<Description>It is the system-wide unique identifier of the joining process.</Description>
</Field>
<Field Name="JoiningProcessOriginId" DataType="TrimmedString" IsOptional="true">
<Description>It is an identifier to track the changes made to the original instance in the system.Example: It can point to the identifier of the object when it was created for the first time. It should be an existing ID in the system if it is available else it can be NULL if it is not tracked in the system.</Description>
</Field>
<Field Name="SelectionName" DataType="TrimmedString" IsOptional="true">
<Description>It is the configured selection name of the joining process in the system.</Description>
</Field>
</Definition>
</UADataType>
Now I need to map this in a java class like this:
public static final Argument JoiningProcessId = new Argument(
"JoiningProcessId",
Identifiers.String,
ValueRanks.Scalar,
null,
new LocalizedText("The argument to JoiningProcessId.")
);
public static final Argument JoiningProcessOriginId = new Argument(
"JoiningProcessOriginId",
Identifiers.String,
ValueRanks.Scalar,
null,
new LocalizedText("The argument to JoiningProcessOriginId.")
);
public static final Argument SelectionName = new Argument(
"SelectionName",
Identifiers.String,
ValueRanks.Scalar,
null,
new LocalizedText("The argument to SelectionName.")
);
I'm not sure if I understood well, for example TrimmedString is a String? can be mapped with Identifiers.String?
Thanks.
Francesco
05/30/2017
Server defined DataTypes fall into 3 categories
1) Subtypes of Structure;
2) Subtypes of Enumeration;
3) Subtypes of any other Built-in DataType.
Subtypes of Structure show up on the wire as a ExtensionObjects
Subtypes of Enumeration show up on the wire as a Int32
All other DataTypes show up on the wire as the built-in type.
i.e. UriString = String, UtcTime = DateTime, Duration = Double
1 Guest(s)