Home  Contents

Control signals

Rawio Core4 Lua Event System

SYNOPSIS

  1. handle:setDtr(flag)
  2. handle:setRts(flag)

DESCRIPTION

Sets the state of the serial port control outputs DTR or RTS.

RETURN VALUE

On success, returns true. On failure, returns nil. In case of an error, the error can be retrieved using rawio:lastError().

ERRORS

Fails if the handle is not a serial port (TTY device).

NOTES

It depends on the underlying hardware which control signals are actually available. On normal RS232 ports, often only RTS/CTS is available. On RS485 ports, there are no control signals.

SEE ALSO