⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xbd_chap11.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<p class="tent">300 baud</p></td><td align="left"><p class="tent">B38400</p></td><td align="left"><p class="tent">38400 baud</p></td></tr></table></center><p>The following functions are provided for getting and setting the values of the input and output baud rates in the <b>termios</b>structure: <a href="../functions/cfgetispeed.html"><i>cfgetispeed</i>()</a>, <a href="../functions/cfgetospeed.html"><i>cfgetospeed</i>()</a>, <a href="../functions/cfsetispeed.html"><i>cfsetispeed</i>()</a>, and <ahref="../functions/cfsetospeed.html"><i>cfsetospeed</i>()</a>. The effects on the terminal device shall not become effective andnot all errors need be detected until the <a href="../functions/tcsetattr.html"><i>tcsetattr</i>()</a> function is successfullycalled.</p><p>The CSIZE bits shall specify the number of transmitted or received bits per byte. If ISTRIP is not set, the value of all theother bits is unspecified. If ISTRIP is set, the value of all but the 7 low-order bits shall be zero, but the value of any otherbits beyond CSIZE is unspecified when read. CSIZE shall not include the parity bit, if any. If CSTOPB is set, two stop bits shallbe used; otherwise, one stop bit. For example, at 110 baud, two stop bits are normally used.</p><p>If CREAD is set, the receiver shall be enabled; otherwise, no characters shall be received.</p><p>If PARENB is set, parity generation and detection shall be enabled and a parity bit is added to each byte. If parity is enabled,PARODD shall specify odd parity if set; otherwise, even parity shall be used.</p><p>If HUPCL is set, the modem control lines for the port shall be lowered when the last process with the port open closes the portor the process terminates. The modem connection shall be broken.</p><p>If CLOCAL is set, a connection shall not depend on the state of the modem status lines. If CLOCAL is clear, the modem statuslines shall be monitored.</p><p>Under normal circumstances, a call to the <a href="../functions/open.html"><i>open</i>()</a> function shall wait for the modemconnection to complete. However, if the O_NONBLOCK flag is set (see <a href="../functions/open.html"><i>open</i>()</a>) or ifCLOCAL has been set, the <a href="../functions/open.html"><i>open</i>()</a> function shall return immediately without waiting forthe connection.</p><p>If the object for which the control modes are set is not an asynchronous serial connection, some of the modes may be ignored;for example, if an attempt is made to set the baud rate on a network connection to a terminal on another host, the baud rate neednot be set on the connection between that terminal and the machine to which it is directly connected.</p><p>The initial hardware control value after <a href="../functions/open.html"><i>open</i>()</a> is implementation-defined.</p><h4><a name="tag_11_02_05"></a>Local Modes</h4><p>The <i>c_lflag</i> field of the argument structure is used to control various functions. It is composed of the bitwise-inclusiveOR of the masks shown, which shall be bitwise-distinct. The mask name symbols in this table are defined in <a href="termios.h.html"><i>&lt;termios.h&gt;</i></a> ; not all values specified are required to be supported by the underlyinghardware:</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent"><b>Mask Name</b></p></th><th align="center"><p class="tent"><b>Description</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">ECHO</p></td><td align="left"><p class="tent">Enable echo.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ECHOE</p></td><td align="left"><p class="tent">Echo ERASE as an error correcting backspace.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ECHOK</p></td><td align="left"><p class="tent">Echo KILL.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ECHONL</p></td><td align="left"><p class="tent">Echo &lt;newline&gt;.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ICANON</p></td><td align="left"><p class="tent">Canonical input (erase and kill processing).</p></td></tr><tr valign="top"><td align="left"><p class="tent">IEXTEN</p></td><td align="left"><p class="tent">Enable extended (implementation-defined) functions.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ISIG</p></td><td align="left"><p class="tent">Enable signals.</p></td></tr><tr valign="top"><td align="left"><p class="tent">NOFLSH</p></td><td align="left"><p class="tent">Disable flush after interrupt, quit, or suspend.</p></td></tr><tr valign="top"><td align="left"><p class="tent">TOSTOP</p></td><td align="left"><p class="tent">Send SIGTTOU for background output.</p></td></tr></table></center><p>If ECHO is set, input characters shall be echoed back to the terminal. If ECHO is clear, input characters shall not beechoed.</p><p>If ECHOE and ICANON are set, the ERASE character shall cause the terminal to erase, if possible, the last character in thecurrent line from the display. If there is no character to erase, an implementation may echo an indication that this was the case,or do nothing.</p><p>If ECHOK and ICANON are set, the KILL character shall either cause the terminal to erase the line from the display or shall echothe newline character after the KILL character.</p><p>If ECHONL and ICANON are set, the newline character shall be echoed even if ECHO is not set.</p><p>If ICANON is set, canonical processing shall be enabled. This enables the erase and kill edit functions, and the assembly ofinput characters into lines delimited by NL, EOF, and EOL, as described in <a href="#tag_11_01_06">Canonical Mode InputProcessing</a> .</p><p>If ICANON is not set, read requests shall be satisfied directly from the input queue. A read shall not be satisfied until atleast MIN bytes have been received or the timeout value TIME expired between bytes. The time value represents tenths of a second.See <a href="#tag_11_01_07">Non-Canonical Mode Input Processing</a> for more details.</p><p>If IEXTEN is set, implementation-defined functions shall be recognized from the input data. It is implementation-defined howIEXTEN being set interacts with ICANON, ISIG, IXON, or IXOFF. If IEXTEN is not set, implementation-defined functions shall not berecognized and the corresponding input characters are processed as described for ICANON, ISIG, IXON, and IXOFF.</p><p>If ISIG is set, each input character shall be checked against the special control characters INTR, QUIT, and SUSP. If an inputcharacter matches one of these control characters, the function associated with that character shall be performed. If ISIG is notset, no checking shall be done. Thus these special input functions are possible only if ISIG is set.</p><p>If NOFLSH is set, the normal flush of the input and output queues associated with the INTR, QUIT, and SUSP characters shall notbe done.</p><p>If TOSTOP is set, the signal SIGTTOU shall be sent to the process group of a process that tries to write to its controllingterminal if it is not in the foreground process group for that terminal. This signal, by default, stops the members of the processgroup. Otherwise, the output generated by that process shall be output to the current output stream. Processes that are blocking orignoring SIGTTOU signals are excepted and allowed to produce output, and the SIGTTOU signal shall not be sent.</p><p>The initial local control value after <a href="../functions/open.html"><i>open</i>()</a> is implementation-defined.</p><h4><a name="tag_11_02_06"></a>Special Control Characters</h4><p>The special control character values shall be defined by the array <i>c_cc</i>. The subscript name and description for eachelement in both canonical and non-canonical modes are as follows:</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th colspan="2" align="center"><p class="tent"><b>Subscript Usage</b></p></th><th align="center"><p class="tent"><b>&nbsp;</b></p></th></tr><tr valign="top"><th align="center"><p class="tent"><b>_</b></p></th><th align="center"><p class="tent"><b>_</b></p></th><th align="center"><p class="tent"><b>&nbsp;</b></p></th></tr><tr valign="top"><th align="center"><p class="tent"><b>Canonical</b></p></th><th align="center"><p class="tent"><b>Non-Canonical</b></p></th><th align="center"><p class="tent"><b>&nbsp;</b></p></th></tr><tr valign="top"><th align="center"><p class="tent"><b>Mode</b></p></th><th align="center"><p class="tent"><b>Mode</b></p></th><th align="center"><p class="tent"><b>Description</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">VEOF</p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">EOF character</p></td></tr><tr valign="top"><td align="left"><p class="tent">VEOL</p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">EOL character</p></td></tr><tr valign="top"><td align="left"><p class="tent">VERASE</p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">ERASE character</p></td></tr><tr valign="top"><td align="left"><p class="tent">VINTR</p></td><td align="left"><p class="tent">VINTR</p></td><td align="left"><p class="tent">INTR character</p></td></tr><tr valign="top"><td align="left"><p class="tent">VKILL</p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">KILL character</p></td></tr><tr valign="top"><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">VMIN</p></td><td align="left"><p class="tent">MIN value</p></td></tr><tr valign="top"><td align="left"><p class="tent">VQUIT</p></td><td align="left"><p class="tent">VQUIT</p></td><td align="left"><p class="tent">QUIT character</p></td></tr><tr valign="top"><td align="left"><p class="tent">VSUSP</p></td><td align="left"><p class="tent">VSUSP</p></td><td align="left"><p class="tent">SUSP character</p></td></tr><tr valign="top"><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">VTIME</p></td><td align="left"><p class="tent">TIME value</p></td></tr><tr valign="top"><td align="left"><p class="tent">VSTART</p></td><td align="left"><p class="tent">VSTART</p></td><td align="left"><p class="tent">START character</p></td></tr><tr valign="top"><td align="left"><p class="tent">VSTOP</p></td><td align="left"><p class="tent">VSTOP</p></td><td align="left"><p class="tent">STOP character</p></td></tr></table></center><p>The subscript values are unique, except that the VMIN and VTIME subscripts may have the same values as the VEOF and VEOLsubscripts, respectively.</p><p>Implementations that do not support changing the START and STOP characters may ignore the character values in the <i>c_cc</i>array indexed by the VSTART and VSTOP subscripts when <a href="../functions/tcsetattr.html"><i>tcsetattr</i>()</a> is called, butshall return the value in use when <a href="../functions/tcgetattr.html"><i>tcgetattr</i>()</a> is called.</p><p>The initial values of all control characters are implementation-defined.</p><p>If the value of one of the changeable special control characters (see <a href="#tag_11_01_09">Special Characters</a> ) is_POSIX_VDISABLE, that function shall be disabled; that is, no input data is recognized as the disabled special character. If ICANONis not set, the value of _POSIX_VDISABLE has no special meaning for the VMIN and VTIME entries of the <i>c_cc</i> array.</p><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -