[collectd] Modbus and Mixed endian devices.

PJ Bostley pbostley at gmail.com
Thu Jan 11 01:30:37 CET 2018

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

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..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20180110/b7cbf330/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd.patch
Type: application/octet-stream
Size: 4856 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20180110/b7cbf330/attachment.obj>

More information about the collectd mailing list