MODBUS_RTU_GET_RTS_D(3)
π MODBUS_RTU_GET_RTS_DELAY β bestie edition π
okay so this is a page from the libmodbus Manual, and it's about one lil function called modbus_rtu_get_rts_delay, and honestly? she's simple, she's iconic, she does exactly one thing. let's get into it π«Ά
β¨ NAME β¨
modbus_rtu_get_rts_delay β get the current RTS delay in RTU
like. that's the whole job. she reads the RTS delay. that's it. that's her whole personality and we respect it π
πΈ SYNOPSIS πΈ
int modbus_rtu_get_rts_delay(modbus_t *ctx);
π¦ DESCRIPTION π¦
so modbus_rtu_get_rts_delay() shall get the current Request To Send delay period of the libmodbus context ctx. that's the RTS delay, bestie. it's giving "how long do we wait before we start talking" energy β¨
β οΈ real talk though β this function can only be used with a context that's using a RTU backend. not TCP, not anything else. RTU only. no exceptions, periodt.
π RETURN VALUE π
if it goes well, modbus_rtu_get_rts_delay() shall return the current RTS delay in microseconds π (yes, microseconds, not seconds, not milliseconds, read it again bestie, it's micro).
otherwise? she shall return -1 and set errno. that's the sad path. we don't love her there but we accept her π
π ERRORS π
EINVALβ the libmodbus backend is not RTU. like, wrong backend, wrong vibe, go home. the function literally cannot do the thing.
π₯ SEE ALSO π₯
modbus_rtu_set_rts_delay(3)β the setter to this getter, her other half, her soulmate, the duo we didn't know we needed π
π AUTHORS π
- Jimmy BergstrΓΆm
<jimmy@ekontroll.com> - The libmodbus documentation was written by StΓ©phane Raimbault
<stephane.raimbault@gmail.com>
π and that's the whole page bestie, no cap. this was libmodbus v3.1.6, dated 11/17/2025, and you were reading MODBUS_RTU_GET_RTS_D(3). slay, stay curious, go read the source πβ¨ππ¦πΈ
π¦ 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