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?

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.

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:
@Override
public 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

Back to the top