-
Notifications
You must be signed in to change notification settings - Fork 215
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
Message mode PubSub with Json message encoding has value in Binary encoding for complex (multilevel structure) data type #2090
Message mode PubSub with Json message encoding has value in Binary encoding for complex (multilevel structure) data type #2090
Comments
Updated the original description to include the OPC Publisher metadata message as it looks like it might contain relevant information for the bug analysis. |
Hi @marcschier I've seen that you've labeled this issue to be addressed on v2.9.3, is there an ETA that you can share? |
Goal is to release 2.9.3 end of November, but since this bug must be addressed in the OPC UA stack dependency, we might need to push this out to 2.9.4 if we do not have an updated nuget before end of November. |
@marcschier Thanks for the update! Given that this issue might take some time to be fixed and this is blocking us to get access to an important set of data form one of our machines that we've just connected and for which we were not expecting this issue, is there any workaround that you could share that would allow us to solve the problem in the meantime, so that we can get access to the data? If not, any "push" to have this issue addressed sooner would be greatly appreciated 😄 From our end, and if possible, we could even consider to temporarily do and use a private build from the source on this repository once the fix is available from your end and a final release (v2.9.3, v2.9.4) is not published yet. |
Once the fix is checked into the OPC-F repo, I will build a preview image that is using the preview nuget of the stack. using this preview build you could help us confirm that the issue is really addressed. |
Hi @nelsonmorais, I think the issue is fixed in the stack PR because there are types derived from the CartesianCoordinates abstract type used for some structure members, which is the same issue. But to be sure it needs additional verification. |
@mregen Thanks for the update! |
Reopening to track the integration of the preview stack nuget. |
A latest build is available at mcr.microsoft.com/iotedge/opc-publisher:2.9.3-preview2. Closing, please re-open if issues persist. |
Thanks @marcschier! |
Describe the bug
We have OPC Publisher v2.9.2 running with the following command line parameters
--strict --mm=PubSub --me=Json
.We're subscribing to an (internally developed) OPC-UA Server on a node that is a Variable with a DataType of a custom Structure which is made of multiple levels (custom Structure that has fields that are also a custom Structure), and where one of the fields on the inner and deepest level Structures is an optional Field.
Bug: We're publishing the messages to an Azure IoT Hub and observed that the serialization of the Node of this multilevel Structure DataType is not serialized as Json, instead the value is showing the Binary encoding. Other custom Structures with a single level (so none of the Structure Fields point to another custom Structure) are serialized properly.
Here's a sample of the serialization observed on the IoT Hub (see the value of
ns=1;s=PostBondingInspection
that shows the Binary encoding instead of Json, like the other custom Structures on the same message payload:To Reproduce
Steps to reproduce the behavior:
--strict --mm=PubSub --me=Json
.Expected behavior
We expect the custom multilevel Structure to be serialized properly in Json and not in the Binary form.
Screenshots
Here are some screen shots of the Information Model built with the Siemens SiOME Tool as well as the UaExpert while the OPC-UA Server is running.
Object with the exposed Variables (highlighted the Variable where we see the faulty serialization, all the others work as expected):
Some of the inner custom DataTypes (Structures in bold) where the Structure optional Field is defined (DataTypes defined under
Types>DataTypes>BaseDataType>Structure>CartesianCoordinates
):See below the screenshots of another inner Structure (
PbiBondType
) as well as the root DataType Structure (PostBondingInspectionType
) that the VariablePostBondingInspection
shown on the server Objects (EVOMachine.EventsCollection
) points to . See the DataTypes of the fields that point to the other Structures to create the multilevel Structure. See also the Target Node Id name (ns=1;s=PostBondingInspection.Binary
) of the Forward ReferenceTypeHasEncoding
with a TargetDefault Binary
(the same naming convention was applied to all the other Structures defined on the Information Model):In UaExpert, here's the expansion of the DataTypeDefinition of the
PostBondingInspectionType
on the multiple screenshots below (note that theDefaultEncondingId.Identifier
maps to the Forward ReferenceType Identifier indicated above, maybe this is relevant for your analysis):See also the screenshots for the inner Structures:
PbiBondType
2DCartesianCoordinatesDouble
(note that the Theta Field is optional)2DCartesianCoordinatesInt32
(note that the Theta Field is optional)3DCartesianCoordinatesInt32
(note that the Theta Field is optional)Here's the Object with the Variable and a sample value:
Object / Variable
Value
The OPC-UA Server was developed in house using the Traeger SDK, here's an excerpt of the data types definition:
PbiBondType
2DCartesianCoordinatesDouble
(note that the Theta Field is optional)2DCartesianCoordinatesInt32
(note that the Theta Field is optional)3DCartesianCoordinatesInt32
(note that the Theta Field is optional)PbiPostBondingInspection
[UPDATE TO ADD THE PUBLISHED METADATA]
And here is the metadata message published by the OPC Publisher, which contains useful information for the bug analysis, because:
2DCartesianCoordinatesDouble
,2DCartesianCoordinatesInt32
,3DCartesianCoordinatesInt32
DataTypes are not present on the StructureDataTypes.2DCartesianCoordinatesDouble
,2DCartesianCoordinatesInt32
,3DCartesianCoordinatesInt32
incorrectly point toId=18809
which is the parent node (Types>DataTypes>BaseDataType>Structure>CartesianCoordinates
) of where our custom Structures2DCartesianCoordinatesDouble
,2DCartesianCoordinatesInt32
,3DCartesianCoordinatesInt32
are defined.PbiBondType
also doesn't appear on the StructureDataTypes, but it's correctly referenced on thePostBondingInspectionType
field.Desktop (please complete the following information):
Additional context
The problem seems to be similar to the one reported here: #1334 that was closed without conclusion.
@koepalex, @mregen we can provide the information model file (*.Nodeset2.xml) on a direct message if needed.
The text was updated successfully, but these errors were encountered: