MODBUS_GET_FLOAT_DCB(3)
π MODBUS_GET_FLOAT_DCB(3) π
okay bestie, welcome to the libmodbus Manual β¨ pull up a chair, we're decoding floats today π¦
πΈ NAME πΈ
modbus_get_float_dcba β get a float value from 2 registers in DCBA byte order π
β¨ SYNOPSIS β¨
float modbus_get_float_dcba(const uint16_t *src);
π DESCRIPTION π
so like, modbus_get_float_dcba() shall grab a float out of 4 bytes that are sitting in inversed Modbus format β that's DCBA order instead of the usual ABCD, she's doing it backwards and she's doing it correctly π
your src array must be a pointer to two 16-bit values, no cap. for example, if the first word is set to 0x47F1 and the second one to 0x2000, then the float value gets read as 123456.0. literally that simple π§
ngl bestie,srchas to be a real pointer to twouint16_tvalues β don't be out here handing it something else π
π₯ RETURN VALUE π₯
the function shall return a float. that's it, that's the whole vibe β
π SEE ALSO π
go read the whole float squad, iykyk π
π AUTHORS π
the libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β absolute icon, we stan π«Ά
and that's the page fr fr π this was libmodbus v3.1.6, dated 11/17/2025 β slay, periodt, go read a float πΈβ¨
π¦ where this page comes from
- debian bookworm: libmodbus-dev 3.1.6-2.1+deb12u1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms