-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTypes created in Profile Designer are missing required Encoding #119
Comments
An example implementation is here: |
Part of the solution is includes an Object for the DefaultBinary encoding. I copied and pasted this from the above example to the end of the offending extension Nodeset.
Another part of the solution is to include a reference to this Object in the References section of the extended Type definition
This gets past the Encoding error, but throws another error -- likely because I don't have the full inheritance path of the UAObject node above. |
This "BEFORE" Nodeset is exactly as exported from the Profile Designer, and exhibits the above error in Siome: This "AFTER" Nodeset is with the partial solution from the previous post, and throws a different (but less severe) error in Siome. |
This (three lines of "HasEncoding" within References) seems to fix it. Apparently perfectly valid OPC/UA definition, since many examples exist:
<SomeDataType NodeId="ns=1;i=99999" BrowseName="1:SomeDataType">
<DisplayName>SomeDataType</DisplayName>
<Description>Extension to an existing data type</Description>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">SomeBaseDataType</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5017</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5019</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5018</Reference>
</References>
<Definition Name="1:SomeDataType">
<Field Name="FirstField" DataType="String" IsOptional="true">
<Description></Description>
</Field>
<Field Name="SecondField" DataType="String" IsOptional="true">
<Description></Description>
</Field>
<Field Name="ThirdField" DataType="String">
<Description></Description>
</Field>
</Definition>
</UADataType>
From: Jonathan Wise ***@***.***>
Sent: Thursday, August 8, 2024 1:08 PM
To: cesmii/ProfileDesigner ***@***.***>
Cc: Paul Yao ***@***.***>; Comment ***@***.***>
Subject: Re: [cesmii/ProfileDesigner] DataTypes created in Profile Designer are missing required Encoding (Issue #119)
This "BEFORE" Nodeset is exactly as exported from the Profile Designer, and exhibits the above error in Siome:
jonathanwise.net.profiles.material.BEFORE.nodeset2.xml.txt<https://github.com/user-attachments/files/16552900/jonathanwise.net.profiles.material.BEFORE.nodeset2.xml.txt>
This "AFTER" Nodeset is with the partial solution from the previous post, and throws a different (but less severe) error in Siome.
[jonathanwise.net.profiles.material.AFTER.nodeset2.xml.txt](https://github.com/user-attachments/files/16552898/jonathanwise.net.profiles.material.AFTER.nodeset2.xml.txt
—
Reply to this email directly, view it on GitHub<#119 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADIZ3R36USOANDATKXCD6XLZQPF25AVCNFSM6AAAAABMDKLMUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZWGU3DONRZGM>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
I don't see how that HasEncoding references the Default Binary encoding type. Can you modify the "BEFORE" nodeset to fix it? |
This "AFTER" Nodeset almost works, because:
However, we still have a problem passing validation because a node relationship is still missing. I think this is because the Default Binary definition (copy and pasted from opcfoundation.org.ua.machiner.jobs.nodeset2.xml) has a reference relationship of HasTypeDefinition with i=76 -- but I don't know where that comes from. |
Guidance from Randy Armstrong from the OPC Foundation:
|
OK, the attached shows how to fix it properly. This MUST be added to the Profile Designer to make it compliant.
Each new DataType will have its own pair of default encoding UAObjects (since each reverse relationship is unique) jonathanwise.net.profiles.material.AFTER3.nodeset2.xml.txt Please fix in Profile Designer ASAP. |
User reports we might also need an Alias (in the Aliases section):
I don't know how to validate that, but other (official) Nodesets include this Alias, so it seems required -- see attached. |
When a user creates or extends a DataType in Profile Designer, the exported Nodeset is missing the required DataType Encoding element, causing import to fail in other tools:
The error is shown in the screenshot below from Siome, but is the result of a defect in Profile Designer. Per OPC UA Part 3, DataType definitions MUST be accompanied by DataTypeEncoding definitions: https://reference.opcfoundation.org/Core/Part3/v105/docs/5.8.4
The text was updated successfully, but these errors were encountered: