MODBUS_RTU_GET_RTS_D(3)

πŸ“¦
version 3.1.6 Β· 3 versions
, in debian bookworm

πŸ’– 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