CHANOPT Verb

Syntax

CHANOPT (channelno{,MODE=str})str

Description

For BBj-specific information, see CHANOPT Verb - BBj.

The CHANOPT verb is intended for advanced utilities developers and should not be used without a thorough understanding of the hardware system.

The CHANOPT verb controls features in a single file or device. In general, the CHANOPT verb can be used to modify parameters returned when the CHANOPT() function is used for devices. Currently, the CHANOPT verb is primarily for the control of serial port parameters.

Serial Port Modes

The following modes apply to serial communication ports. To disable a mode, add a minus sign (-) to the beginning.

Mode Description

BAUD=val

Sets the baud rate to val.

WORD SIZE

Sets the Word Size value to 5, 6, 7, or 8.

PARITY

Sets the Parity to E(ven), O(dd), M(ark), or N(one).

STOP BITS

Sets the Stop Bits to 1 or 2.

XON

Sends XON/XOFF.

XOFF

Responds to XON/XOFF.

XON/XOFF

Equivalent of sending XON and XOFF.

XANY

Responds to any character as XON. This mode does not work under Visual PRO/5.

CLOCAL

Uses modem control signals. This mode does not work under Visual PRO/5.

CTS

Uses CTS flow control. This mode is for Visual PRO/5 only.

DSR

Uses DSR flow control. This mode is for Visual PRO/5 only.

For devices accepting MODE commands, the MODE=str option may be used to set or modify the channel's options.

Examples

The following example uses CHANOPT to set a modem's baud rate to 9600, with a Word Size of 8-Bits, No Parity, 1 Stop Bit, and XON/XOFF.

10 OPEN (1)"/dev/com1"
20 CHANOPT (1)"BAUD=9600,MODE=8N1,XON/XOFF"

See Also

Verbs - Alphabetical Listing