06/12/2024
Hi all,
when I’m trying to call AbortJoiningProcess, I cannot decode in the right way the bytes I receive in my instance of the server;
This seems a problem related that the codec register in my platform is not correct; I know that I’m going to decode the following structure:
Structures with optional fields
or if I take the fragment in the NodeSet2.xml (for this this information model):
<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.opcfoundation.org/IJT/Base/v100/docs/10.21</Documentation> <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> <UAVariable NodeId="ns=1;i=6251" BrowseName="1:JoiningProcessIdentificationDataType" ParentNodeId="ns=1;i=6212" DataType="String"> <DisplayName>JoiningProcessIdentificationDataType</DisplayName> <References> <Reference ReferenceType="HasTypeDefinition">i=69</Reference> <Reference ReferenceType="HasDescription" IsForward="false">ns=1;i=5121</Reference> <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=6212</Reference> </References> <Value> <uax:String xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd">JoiningProcessIdentificationDataType</uax:String> </Value> </UAVariable> <UAVariable NodeId="ns=1;i=6252" BrowseName="1:JoiningProcessIdentificationDataType" ParentNodeId="ns=1;i=6214" DataType="String"> <DisplayName>JoiningProcessIdentificationDataType</DisplayName> <References> <Reference ReferenceType="HasTypeDefinition">i=69</Reference> <Reference ReferenceType="HasDescription" IsForward="false">ns=1;i=5122</Reference> <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=6214</Reference> </References> <Value> <uax:String xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd">//xs:element[@name='JoiningProcessIdentificationDataType']</uax:String> </Value> </UAVariable>
Now the question are 2:
- How can I find out the codec that I need to store in my dictionary in order to decode in the right way (also having human readable data) what I receive when making a call with UaExpert
- Why there are 2 tag element namend UAVariable, and what is the useful for them?
10/18/2019
Hello,
It is NOT a complete answwer to your question but adding some information.
We have a complete reference Server Simulator in the following location: https://github.com/umati/UA-fo…..s/Release2
It works with UaExpert and any other OPC UA Clients which can support the UA core Structures.
The Codec implementation would depend on the SDK used and what type of SDK you are using?
For example, this DOES NOT work with NodeOPCUA as NodeOPC UA DID NOT add the support for IJT Structures at least till April 2024 when I checked.
It works with .NET SDK, Python SDK which are open source.
Coming to commerical SDKs, as long as they support the UA 1.05.02 Structures, it would work.
05/30/2017
Structures with optional fields have a extra 32 bit EncodingMask at the start of the encoded data:
https://reference.opcfoundatio…..docs/5.2.7
It is possible that a client supports regular structures but not structures with optional fields.
Clients use the value of the DataTypeDefinition attribute to parse a unknown Structure. The value of this Attribute is derived from the NodeSet but the Server has to do the mapping correctly. You need to check the value of DataTypeDefinition rather than NodeSet.
The DataTypeDefinition attribute was added in 1.04. Prior to 1.04 the custom DataType was represented by schema fragments stored in the value of DataTypeDescription Variables. The additional Variables exist to provide support for 1.03 clients and simply duplicate information that is provided by the DataTypeDefinition attribute.
06/12/2024
Mohit Agarwal said
Hello,
It is NOT a complete answwer to your question but adding some information.
We have a complete reference Server Simulator in the following location: https://github.com/umati/UA-fo…..s/Release2
It works with UaExpert and any other OPC UA Clients which can support the UA core Structures.
The Codec implementation would depend on the SDK used and what type of SDK you are using?
For example, this DOES NOT work with NodeOPCUA as NodeOPC UA DID NOT add the support for IJT Structures at least till April 2024 when I checked.
It works with .NET SDK, Python SDK which are open source.
Coming to commerical SDKs, as long as they support the UA 1.05.02 Structures, it would work.
I’m using SDK Eclipse Milo, I do not know if it support that I just have to decode “Structures with optional fields”; in other words I have to find out how to decode it in the server; Thanks for your replay.
06/12/2024
Randy Armstrong said
Structures with optional fields have a extra 32 bit EncodingMask at the start of the encoded data:https://reference.opcfoundatio…..docs/5.2.7
It is possible that a client supports regular structures but not structures with optional fields.
Clients use the value of the DataTypeDefinition attribute to parse a unknown Structure. The value of this Attribute is derived from the NodeSet but the Server has to do the mapping correctly. You need to check the value of DataTypeDefinition rather than NodeSet.
The DataTypeDefinition attribute was added in 1.04. Prior to 1.04 the custom DataType was represented by schema fragments stored in the value of DataTypeDescription Variables. The additional Variables exist to provide support for 1.03 clients and simply duplicate information that is provided by the DataTypeDefinition attribute.
I’m on the server side and I’m using Eclipse Milo, I make a call with UaExpert I get the data on the server, but for JoinProcessIdentificationDataType the bytes I receive I cannot decode, while for the remaing argument Localized text and String they are well decoded;
Ok how I can read DataTypeDefinition (I’m using 1.05), and also I have see that there are three encoding reference:
<Reference ReferenceType="HasEncoding">ns=1;i=5121</Reference> <Reference ReferenceType="HasEncoding">ns=1;i=5123</Reference> <Reference ReferenceType="HasEncoding">ns=1;i=5122</Reference>
What is the meaning of that?
2 Guest(s)