FutureBasic Logo

<<    Index    >> FutureBasic 5

HandShake   statement



Syntax:
HandShake portID, handshakeType

Description:
Sets the handshaking parameter for the open serial port specified by portID (which can be either _modemPort or _printerPort). The handshaking parameter determines how i/o operations will be negotiated when your program subsequently writes to or reads from the specified port. handshakeType can take any of the following values:

ConstantDescription
_none (0)No handshaking. This is the default value.
_CTS (1)CTS (Clear To Send) hardware handshaking. When the computer is ready to send a block of data, it sets the CTS signal. The computer must then wait for a DTR signal from the other device, before sending the data.
_DTR (2)Sets the DTR (Data Terminal Ready) signal on.
_DTRToggle (-2)Sets the DTR signal off.
_XON (-1)XON/XOFF software handshaking. Each device sends an XON character when it's ready to receive data, and sends an XOFF character if its buffer fills up.

To determine the best handshaking format for a device, see the device's manual.

Note:
You must open the serial port (use the open "C"... statement) before executing the HandShake statement.
Powerbooks require an initialization setting of _none to preset the serial port properly.

See Also:
open "C"; lof