Closed iotclouddeveloper closed 2 months ago
the device reports a floating point number(11708533.0), I use 03function code,the code is ByteBuf buf = response.getRegisters(); float result = buf.readFloat(); but I can get 11708533.0,What is the reason for this? Kind regards, Thanks.
Your device is probably using little-endian byte order, swapping the word order, or both.
If you can provide an example of the bytes you're receiving I might be able to help you figure out which.
the device reports a floating point number(11708533.0), I use 03function code,the code is
ByteBuf buf = response.getRegisters(); float result = buf.readFloat(); but I can get 11708533.0,What is the reason for this? Kind regards, Thanks.