TIOCMGET

QNX SDP8.0Devctl and Ioctl CommandsDeveloper

Get all modem bits

Synopsis:

#include <sys/ioctl.h>

#define TIOCMGET        _IOR('t', 106, int)

Arguments to ioctl():

Argument Value
fd A file descriptor that you obtained by opening the device
request TIOCMGET
Additional argument A pointer to an int

Description:

This command gets all modem status bits for the terminal device. It's also implemented as the DCMD_CHR_LINESTATUS devctl() command.

Input:

None.

Output:

The modem bits, a combination of the following:

  • TIOCM_DTR — data terminal ready.
  • TIOCM_RTS — request to send.
  • TIOCM_CTS — clear to send.
  • TIOCM_DSR — data set ready.
  • TIOCM_RI or TIOCM_RNG — ring.
  • TIOCM_CAR or TIOCM_CD — carrier detect.

See also:

DCMD_CHR_LINESTATUS, TIOCMBIC, TIOCMBIS, TIOCMSET

ioctl() in the QNX OS C Library Reference

Page updated: