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

📄 classwin__qextserialport.html

📁 linux qt环境下的串口多线程功能的实现
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Common constructor function, called by all versions of <a class="el" href="classWin__QextSerialPort.html#a0">Win_QextSerialPort::Win_QextSerialPort</a>(). Sets up default port settings (115200 8N1 Hardware flow control where supported, otherwise no flow control, and 500 ms timeout). <p>Reimplemented from <a class="el" href="classQextSerialBase.html#a3">QextSerialBase</a>.    </td>  </tr></table><a name="a9" doxytag="Win_QextSerialPort::flush"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Win_QextSerialPort::flush </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. <p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a11" doxytag="Win_QextSerialPort::getch"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int Win_QextSerialPort::getch </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Returns a single character from the serial port, or -1 on error. This function has no effect if the serial port associated with the class is not currently open. <p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a21" doxytag="Win_QextSerialPort::lineStatus"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> unsigned long Win_QextSerialPort::lineStatus </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned  long with specific bits indicating which lines are high. The following constants should be used  to examine the states of individual lines:<p><div class="fragment"><pre>Mask        Line               ------      ----               LS_CTS      CTSLS_DSR      DSRLS_DCD      DCDLS_RI       RI</pre></div><p>This function will return 0 if the port associated with the class is not currently open. <p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a7" doxytag="Win_QextSerialPort::open"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Win_QextSerialPort::open </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>mode</em> = 0          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Opens a serial port. Note that this function does not specify which device to open. If you need to open a device by name, see <a class="el" href="classQextSerialBase.html#a7">Win_QextSerialPort::open</a>(const char*). This function has no effect if the port associated with the class is already open. The port is also configured to the current settings, as stored in the Settings structure. <p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a12" doxytag="Win_QextSerialPort::putch"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int Win_QextSerialPort::putch </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ch</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Writes a single character to the serial port. Return value is the byte written, or -1 on  error. This function has no effect if the serial port associated with the class is not  currently open. <p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a18" doxytag="Win_QextSerialPort::setBaudRate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Win_QextSerialPort::setBaudRate </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">BaudRateType&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>baudRate</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Sets the baud rate of the serial port. Note that not all rates are applicable on  all platforms. The following table shows translations of the various baud rate  constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.  <div class="fragment"><pre>  RATE          Windows Speed   POSIX Speed  -----------   -------------   -----------   BAUD50                 110          50   BAUD75                 110          75  *BAUD110                110         110   BAUD134                110         134.5   BAUD150                110         150   BAUD200                110         200  *BAUD300                300         300  *BAUD600                600         600  *BAUD1200              1200        1200   BAUD1800              1200        1800  *BAUD2400              2400        2400  *BAUD4800              4800        4800  *BAUD9600              9600        9600   BAUD14400            14400        9600  *BAUD19200            19200       19200  *BAUD38400            38400       38400   BAUD56000            56000       38400  *BAUD57600            57600       57600   BAUD76800            57600       76800  *BAUD115200          115200      115200   BAUD128000          128000      115200   BAUD256000          256000      115200</pre></div> <p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a16" doxytag="Win_QextSerialPort::setDataBits"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Win_QextSerialPort::setDataBits </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">DataBitsType&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>dataBits</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Sets the number of data bits used by the serial port. Possible values of dataBits are: <div class="fragment"><pre>    DATA_5      5 data bits    DATA_6      6 data bits    DATA_7      7 data bits    DATA_8      8 data bits</pre></div><p><dl compact><dt><b>Note: </b><dd>This function is subject to the following restrictions: <p> 5 data bits cannot be used with 2 stop bits. <p> 1.5 stop bits can only be used with 5 data bits. <p> 8 data bits cannot be used with space parity on POSIX systems. </dl><p>Reimplemented from <a class="el" href="classQextSerialBase.html">QextSerialBase</a>.    </td>  </tr></table><a name="a19" doxytag="Win_QextSerialPort::setDtr"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Win_QextSerialPort::setDtr </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">bool&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>set</em> = true          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>

⌨️ 快捷键说明

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