nauful / LibUA

Open-source OPC UA client and server library
Apache License 2.0
257 stars 93 forks source link

UaClient error to read a matrix #139

Closed VitorKawao closed 11 months ago

VitorKawao commented 11 months ago

Hello Nauful,

I am having some problems when I try to read a matrix (array with two dimensions). With an array with 1 dimension, it works perfectly

I am using your api to connect to KepServer. I create there a matrix 3x3

image

Using Kepware Click Client, it can read correctly: [0;0;0][0;0;0][0;0;0]

image

When I try to read with you api, it returns an ushort[9], but with a invalid 2

image

But if I change the values of the matrix, it returns null

image image

Am I doing something wrong?

Thank you, Vítor Guedes

nauful commented 11 months ago

Hello Vitor!

Could you please rerun that test while capturing with Wireshark and security mode set to None? I wonder what data is coming back. I may be deserializing incorrectly, 2D matrix has been a rare case for testing. I can look at the Wireshark capture to see what was read.

Thanks, Nauful

VitorKawao commented 11 months ago

Hello,

I ziped two captures. Wireshark.zip

The capture1 is with the Matrix empty [0;0;0][0;0;0][0;0;0] The capture2 is with the Matrix [1;2;3][4;5;6][7;8;9]

Thank you, Vítor Guedes

nauful commented 11 months ago

Hello Vitor,

Please try the latest change. If it works I'll make a new nuget package.

Thanks, Nauful

VitorKawao commented 11 months ago

I downloaded the latest version, but it still has the same errors

nauful commented 11 months ago

Hello Vitor,

Do you have this commit? https://github.com/nauful/LibUA/commit/cef29f87ec0c2b2b44c8077b065390de97721897

I am able to reproduce the issue before but not after this change. Let me know if that still fails with the latest commit.

Thanks, Nauful

VitorKawao commented 11 months ago

I am sorry, I think I haven't. Now I have it, and it worked

image

Thank you, Vítor Guedes

nauful commented 11 months ago

Hello Vitor,

Glad it worked! Feel free to let me know if you come across anything else.

Happy holidays, Nauful