MODBUS_RTU_SET_RTS_D(3)

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

πŸ’– MODBUS_RTU_SET_RTS_D πŸ’–

okay bestie, so this is a page from the libmodbus Manual β€” yes, that libmodbus, the one that lives in section 3 of your man pages and talks to serial hardware like it owns the place. and we're talking about modbus_rtu_set_rts_delay today. it's giving "small function, big responsibility". let's get into it 🫢


✨ NAME ✨

modbus_rtu_set_rts_delay β€” set the RTS delay in RTU

no cap, that's literally the whole job description.


🌸 SYNOPSIS 🌸

int modbus_rtu_set_rts_delay(modbus_t *ctx, int us);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the modbus_rtu_set_rts_delay() function shall set the Request To Send delay period of the libmodbus context ctx. that's it. that's the assignment. RTS delay = set. slay. πŸ’…

and here's the tea, bestie: this function can only be used with a context using an RTU backend. that's the vibe check it has to pass. if your backend isn't RTU, it's not happening, periodt.


πŸŽ€ RETURN VALUE πŸŽ€

  • 0 β€” it worked, we ate, no crumbs. πŸ“
  • -1 β€” it didn't work, and it sets errno to tell you why. 😭

πŸ’€ ERRORS πŸ’€

  • EINVAL β€” the libmodbus backend is not RTU, or a negative delay was specified. like, girl, you can't have negative time. that's not a thing. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

  • Jimmy BergstrΓΆm <jimmy@ekontroll.com> πŸ’–
  • The libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> ✨

no notes, just respect for the people who wrote the docs so we could all understand our serial ports. icons only. 🌈

and that's the page, bestie β€” written with libmodbus v3.1.6, dated 11/17/2025, in the section we call MODBUS_RTU_SET_RTS_D(3). go forth and set those delays. main character energy only. πŸ’…πŸ¦‹β­

πŸ“¦ where this page comes from