Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] OPC UA structure bug - where could be problem?

I don't think it's a problem with the server, I think you've written the fields in the wrong way.

You would need to check the server's DataTypeDictionary or if it's a 1.04 server maybe the DataType Node for this type has a definition attribute on it.

On Wed, Mar 17, 2021 at 4:57 AM Jakub Znamenáček <znamenacekjakub@xxxxxxxxx> wrote:
Hi Kevin,

So you think there could be problem on server side? I don’t have possibility to test it with another server unfortunately. Is there any way how to check it using UaExpert? 

Jakub Znamenáček
On 17. 3. 2021 12:49 +0100, Kevin Herron <kevinherron@xxxxxxxxx>, wrote:
Jakub,

Did you hand-code these definitions against some other server? I can only imagine that this is happening because the fields are encoded/decoded in the wrong order in your Codec implementation.

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
On Wed, Mar 17, 2021 at 1:46 AM Jakub Znamenáček <znamenacekjakub@xxxxxxxxx> wrote:
Hi,

I am trying to read custom datatype over OPC UA and everything is working great except that my values are mixed up. 

When I use this for decoding:
@Overridepublic CurveStructure decode(        SerializationContext context,        UaDecoder decoder) throws UaSerializationException {    Float[] torqueArray = decoder.readFloatArray("torque");    Float[] speedArray = decoder.readFloatArray("speed");    return new CurveStructure(torqueArray,speedArray);}
I end up with torque values in speedArray and speed values in torqueArray. But using UaExpert for browsing the values for speed are named correctly (BrowseName is "speed“). Does anyone have idea where could be problem?

Whole code can be found here: https://github.com/bzumik1/metalForming/blob/master/src/main/java/com/siemens/metal_forming/connection/opcua/structure/CurveStructure.java


Jakub Znamenáček
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top