Serial Channel
Usage
dp_connect serial -device serDev
-block bBlock -readonly bRead
Comments
serDev is the Tcl-DP name of the given serial
port. In order to make Tcl-DP scripts as portable as
possible, DP names the serial ports "serial1",
"serial2", "serial3", etc. The DP name
is then translated internally to the OS specific name (COM1,
/dev/ttyb, etc).
- bBlock is a boolean that determines
whether the serial port will block while waiting for
input. The default is true.
- bRead is a boolean that determines whether the
serial port will be opened with readonly access. Often,
UNIX serial ports are writable only by the
superuser. If this is the case, using this flag will at
least allow one to possibly read from the serial port.
The default is false.
Options like baudrate, parity and character size can be set
using fconfigure after the channel is opened.
Examples
- dp_connect serial -device serial2
- dp_connect serial -device serial1 -readonly true