Home  Contents

Control signals

Rawio Core4 Lua Event System

SYNOPSIS

  1. flag = handle:rawio:rts()
  2. flag = handle:rawio:cts()
  3. flag = handle:rawio:dtr()
  4. flag = handle:rawio:dsr()
  5. flag = handle:rawio:dcd()
  6. flag = handle:rawio:rng()

DESCRIPTION

This is a set of functions to retrieve the current state of the serial port control signals RTS, CTS, DTR, DSR, DCD, and RNG (Ring).

RETURN VALUE

On success, returns a boolean indicating the state of the control signal. On failure, returns nil.

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