Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_mstat()</b> - return modem status http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_mstat() - return modem status

   cStat := tp_mstat(nPort)

   nPort       Serial port number.

   Returns     Modem status state string.

   The modem status mask records the state of various input handshaking
   lines.  (These lines may be used even if the device connected to the
   serial port is not a modem.)  This function reads the status mask and
   returns an empty string if no status bits were set, or a string
   consisting of one or more of the following characters:

       "C" CTS (Clear To Send) asserted.
       "D" DSR (Data Set Ready) asserted.
       "R" RI (Ring Indicator) asserted.
       "K" DCD (Data Carrier Detect) asserted.
       "c" CTS has changed since the last check.
       "d" DSR has changed since the last check.
       "r" RI has changed since the last check.
       "k" DCD has changed since the last check.

   Example:

       if "r" $ tp_mstat(1)
           ? "The phone has rung"
       endif

See Also: tp_iscts() tp_isdcd() tp_isdsr() tp_isri() tp_onmodem()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson