MODBUS_GET_FLOAT_ABC(3)
π MODBUS_GET_FLOAT_ABCD π
okay bestie, welcome to the libmodbus Manual β yes that's the manual name, we're being fancy today. This one's about modbus_get_float_abcd, and it's genuinely not that deep, I promise. π
β¨ NAME β¨
modbus_get_float_abcd β get a float value from 2 registers in ABCD byte order
πΈ SYNOPSIS πΈ
float modbus_get_float_abcd(const uint16_t *src);
π¦ DESCRIPTION π¦
so like. modbus_get_float_abcd() shall get a float from 4 bytes in the usual Modbus format. that's it, that's the whole job. π
The src array must be a pointer on two 16 bits values. no cap. like, for example, if the first word is set to 0x0020 and the second to 0xF147, then the float value will be read as 123456.0. math ate that fr fr. π₯
bestie please actually make sure src points at two 16-bit values, because that's the requirement and I'm not gonna pretend otherwise. π
π RETURN VALUE π
The function shall return a float. literally just a float. iconic behavior. β¨
π SEE ALSO π
the whole byte-order squad, go read them too, iykyk π
π«Ά AUTHORS π«Ά
The libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β thank you for the lore, king π₯Ή
libmodbus v3.1.6 Β· 11/17/2025 β and that's the vibe check, bestie, we're done here. go read some registers. mwah ππΈπ¦
π¦ 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