Skip to content
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

Complex type system does not load user defined types with multi dimensional arrays #1826

Closed
3 of 5 tasks
andrerodi opened this issue May 25, 2022 · 1 comment · Fixed by #1915
Closed
3 of 5 tasks
Assignees
Labels
bug A bug was identified and should be fixed. complex Complex Types duplicate
Milestone

Comments

@andrerodi
Copy link

andrerodi commented May 25, 2022

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

I read from a Siemens S7 1500 OPC-UA-Server that is running both versions of the server (1.03 & 1.04).

My client application is using the complex type system package, and it works great for ExtensionObjects with an encoding of type ExtensionsObjectEncoding == Encodeable.

When I read a NodeId that has an ExtensionObject with ExtensionObjectEncoding == Binary, I can't seem to encode the message using the binary encoder to then decode the message using the JsonDecoder.DecodeMessage-Method.

I don't think it will work anyhow, since the incoming bytestring is not encodable in the first place.

I then did look into the ComplexTypeSystem class and found that, after running the method GetDefinedTypes, that it didn't generate the type that's needed to encode the message properly.
The type that wasn't generated has a few two-dimensional-arrays inside of it.

I tried to load the typedefinition for the missing type manually using the namespace uri and the node id for the type, but to no avail.

image

In the picture above you can see that i have two user defined types (UDTs) the first one works fine, but not for the second one.

Is there a way to encode the bytestream anyway somehow?

Expected Behavior

Complex types with two or more dimensional arrays should be encodeable.

Steps To Reproduce

No response

Environment

- OS:Windows 10
- Environment: Visual Studio 2022 17.1.6
- Runtime: .NET 6.0.202
- Nuget Version: 1.4.368.53
- Component: Opc.Ua.Client.ComplexTypes
- Server: Siemens S7 1500 PLC
- Client: Opc.Ua.Client

Anything else?

No response

@mregen mregen added bug A bug was identified and should be fixed. duplicate complex Complex Types labels Jun 9, 2022
@mregen mregen added this to the 1.4.370 milestone Jun 9, 2022
@mregen
Copy link
Contributor

mregen commented Jun 11, 2022

Hi @andrerodi, this is a known issue with the current complex type support, if a structure contains multidimensional array the type is not supported. see #920

@mregen mregen self-assigned this Jun 11, 2022
@mregen mregen mentioned this issue Aug 18, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug was identified and should be fixed. complex Complex Types duplicate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants