decoding JoiningProcessIdentificationDataType|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
decoding JoiningProcessIdentificationDataType
Avatar
Francesco Viscomi
Member
Members
Forum Posts: 8
Member Since:
06/12/2024
sp_UserOfflineSmall Offline
1
07/15/2024 - 10:10
sp_Permalink sp_Print

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://newwebsite.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://newwebsite.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?
Avatar
Mohit Agarwal
Member
Members
Forum Posts: 54
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
2
07/16/2024 - 04:44
sp_Permalink sp_Print

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.

Avatar
Randy Armstrong
Admin
Forum Posts: 1549
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
3
07/16/2024 - 15:06
sp_Permalink sp_Print

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.

Avatar
Francesco Viscomi
Member
Members
Forum Posts: 8
Member Since:
06/12/2024
sp_UserOfflineSmall Offline
4
07/17/2024 - 02:55
sp_Permalink sp_Print

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.

Avatar
Francesco Viscomi
Member
Members
Forum Posts: 8
Member Since:
06/12/2024
sp_UserOfflineSmall Offline
5
07/17/2024 - 03:07
sp_Permalink sp_Print

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? 

Avatar
Randy Armstrong
Admin
Forum Posts: 1549
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
07/22/2024 - 18:12
sp_Permalink sp_Print

Eclipse Milo likely does not support Structures with optional Fields and you will need to manually parse the body.

The HasEncoding references are explained here:

https://reference.opcfoundatio…..4/docs/5.8

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1423
Posts: 4813