Modbus is Big endian. With 32 bit and float it would follow that the 16bit registers that are combined to form a 32bit value would also be big endian. Sadly some folks don't do it this way and we have a mixed endian world.
Instead of ABCD with register[n] having AB and register[n+1] having CD, you end up with CDAB. with register[n] having the low order bytes (CD) and register[n+1} having the high order bytes. Here is a patch against tip as of an hour ago that adds: Uint32LE, FloatLE, and Int32LE types to handle this. I can put this up in GIT but before I hastle with that: Does anyone have any feedback on this? It's pretty straight forward but somefolks have strong feelings about variable names, etc..
collectd.patch
Description: Binary data
_______________________________________________ collectd mailing list [email protected] https://mailman.verplant.org/listinfo/collectd
