MODBUS_RTU_GET_RTS(3)

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

πŸ’– MODBUS_RTU_GET_RTS(3) πŸ’–

okay bestie, welcome to the libmodbus Manual page for modbus_rtu_get_rts β€” yes the title is shouty in all caps, that's just how man pages are, they woke up and chose drama πŸ’…


✨ NAME ✨

modbus_rtu_get_rts β€” get the current RTS mode in RTU

like. it literally tells you what RTS mode you're in rn. that's the whole job. queen behavior.


🌸 SYNOPSIS 🌸

int modbus_rtu_get_rts(modbus_t *ctx);

one function, one pointer, zero drama (well, almost β€” see ERRORS πŸ‘€)


πŸ¦‹ DESCRIPTION πŸ¦‹

so the modbus_rtu_get_rts() function shall get the current Request To Send mode of the libmodbus context ctx. it's giving "hey what's your RTS vibe rn" and the answer comes back as one of these three icons:

  • MODBUS_RTU_RTS_NONE
  • MODBUS_RTU_RTS_UP
  • MODBUS_RTU_RTS_DOWN

that's it, that's the whole menu, no secret fourth option, no deluxe combo, periodt πŸ’…

heads up bestie: this function can only be used with a context using a RTU backend. it's an RTU-only girlie, she does not do other backends, no cap.

πŸŽ€ RETURN VALUE πŸŽ€

if everything's cute: the function shall return the current RTS mode. slay ✨

if everything's NOT cute: it shall return -1 and set errno. yes we're getting a -1, yes we're checking errno, that's just the vibe check failing 😭


πŸ”₯ ERRORS πŸ”₯

  • EINVAL β€” the libmodbus backend is not RTU. she said "wrong backend bestie" and hung up πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


🌈 AUTHORS 🌈

the libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β€” thank you for the lore, icon 🫢


and that's the whole page fr fr!! this was libmodbus v3.1.6, dated 11/17/2025, and honestly? iconic of it. go forth and check your RTS mode, bestie πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from