MODBUS_SET_FLOAT_DCB(3)
MODBUS_SET_FLOAT_DCB(3) π
okay bestie, welcome to the libmodbus Manual β¨ this one's a lil cutie from section 3, and no cap it's short and sweet.
πΈ NAME πΈ
modbus_set_float_dcba β set a float value in 2 registers using DCBA byte order π
π¦ SYNOPSIS π¦
void modbus_set_float_dcba(float f, uint16_t *dest);
β¨ DESCRIPTION β¨
so the way that modbus_set_float_dcba() works is: it shall set a float to 4 bytes in inverted Modbus format (aka DCBA order). iconic, honestly.
and listen β the dest array must be a pointer on two 16 bits values so it can actually store the full result of the conversion. like, two. not one. not three. two. π the math has to math.
not me warning you: if dest isn't big enough for those two 16-bit values, you're gonna have a bad time π it literally cannot hold the whole conversion otherwise.
π RETURN VALUE π
There is no return values. π like, none. void behavior, void energy, nothing comes back to you. periodt.
π SEE ALSO π
go read those too, bestie, iykyk π«Ά
π AUTHORS π
The libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β thank you legend, we appreciate you fr fr π
and that's the whole vibe check! this page came to you courtesy of libmodbus v3.1.6, dated 11/17/2025 β slay, bye bestie π β¨π¦πΈ
π¦ 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