[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
 COM_HARD()
 Turns the hardware handshake (automatic CTS) on/off
------------------------------------------------------------------------------
 Syntax
     COM_HARD(<nComPort>,<lNewHandshake>,[<lDTR/DSR>])
        --> lOldHandshake
 Arguments
     <nComPort>  Designates the port (1 to 4) for which the hardware
     handshake is switched on or off.
     <lNewHandshake>  Designates whether the handshake is on (.T.) or off
     (.F.).
     <lDTR/DSR>  Designates whether the function uses the DTR/DSR
     handshake or the RTS/CTS handshake.  When passed as .T., the function
     uses the DTR/DSR handshake instead of the RTS/CTS handshake.
 Returns
     When called only with <nComPort>, the COM_HARD() returns .T. if the
     hardware handshake is on and .F.  if the hardware handshake is off.
     When <lNewHandshake> is passed, the function returns the status prior to
     the new setting.
 Description
     The size of a receiving buffer is always limited.  To avoid overflow,
     and thereby a loss of characters, software or hardware handshakes are
     usually implemented.  During a hardware handshake, the port monitors the
     RTS signal.  If you use this function to switch this handshake on, the
     signal is activated as soon as the buffer is 75% full.  As soon as the
     buffer content is once again reduced to 50% or less, the port (the RTS
     signal) is once again released.  Some printers use the port signals, DTR
     (output like RTS) and DSR (entry like CTS) instead of RTS/CTS, to avoid
     buffer overflow.  In this case, <lDTR/DSR> can be passed with .T..
 Notes
     .  The hardware handshake only supports background transmission
        (when COM_OPEN() is implemented with the third parameter
        <nBufferOut>).
     .  This function works for data input as well as output.
     .  If you use a hardware handshake, then the RTS signal should no
        longer be affected by COM_RTS() or COM_MCR().
 Example
     Turn on the hardware handshake at a port:
     COM_OPEN(2, 1000, 1000)          // Open COM2, background send
                                      // buffer
     COM_HARD(2, .T.)                 // RTS/CTS Hardware handshake
                                      // for port 2
See Also:
COM_READ()
COM_SEND()
COM_SOFT()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson