archie/tcl-dp/doc/serial.html
2024-05-27 16:13:40 +02:00

55 lines
1.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="Author" content>
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Serial Channel</title>
</head>
<body bgcolor="#C0C0C0" text="#000000" link="#0000EE"
vlink="#551A8B" alink="#FF0000">
<h3>Serial Channel</h3>
<p><b>Usage</b></p>
<p><tt>dp_connect serial -device </tt><em><tt>serDev</tt></em><tt>
-block </tt><em><tt>bBlock</tt></em><tt> -readonly </tt><em><tt>bRead</tt></em></p>
<p><b>Comments</b></p>
<p><i>serDev</i> is the Tcl-DP&nbsp;name of the given serial
port. In order to make Tcl-DP&nbsp;scripts as portable as
possible, DP&nbsp;names the serial ports &quot;serial1&quot;,
&quot;serial2&quot;, &quot;serial3&quot;, etc. The DP&nbsp;name
is then translated internally to the OS&nbsp;specific name (COM1,
/dev/ttyb, etc).</p>
<ul>
<li><i>bBlock</i><b><i> </i></b>is a boolean that determines
whether the serial port will block while waiting for
input. The default is true.</li>
<li><i>bRead</i> is a boolean that determines whether the
serial port will be opened with readonly access. Often,
UNIX&nbsp;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.</li>
</ul>
<p>Options like baudrate, parity and character size can be set
using fconfigure after the channel is opened.</p>
<p><b>Examples</b></p>
<dl>
<dt><tt>dp_connect serial -device serial2</tt></dt>
<dt><tt>dp_connect serial -device serial1 -readonly true</tt></dt>
</dl>
</body>
</html>