source: projects/punch-card/punch-card-editor/src/libs/qextserialport/html/classWin__QextSerialPort.html @ 53

Last change on this file since 53 was 53, checked in by sven, 10 years ago

Punch Card Editor, ongoing development

  • Extended new Deck interface, expanding the undo framework
  • Implemented editor changes via undo framework
  • revised the menu and toolbar actions and structure (now dynamic construction at deck load time), implemented undo viewer
  • Started implementation of device driver framework in menu
  • Embedded the Qextserialport library (http://qextserialport.sourceforge.net/)
  • Started the Documation M200 Client device driver (well, just created the directory structure and qmake project file infrastructure)
  • At the current state, the complete project compiles :-)

Statistics: About 3500 Lines of code (without libqextserialport)

-- sven @ workstation

  • Property svn:executable set to *
File size: 155.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>QextSerialPort: Win_QextSerialPort Class Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.7 -->
8<div class="tabs">
9  <ul>
10    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
11    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
12    <li><a href="files.html"><span>Files</span></a></li>
13  </ul></div>
14<div class="tabs">
15  <ul>
16    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
17    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
18    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
19    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
20  </ul></div>
21<h1>Win_QextSerialPort Class Reference</h1><!-- doxytag: class="Win_QextSerialPort" --><!-- doxytag: inherits="QextSerialBase" --><code>#include &lt;win_qextserialport.h&gt;</code>
22<p>
23<p>Inheritance diagram for Win_QextSerialPort:
24<p><center><img src="classWin__QextSerialPort.png" usemap="#Win_QextSerialPort_map" border="0" alt=""></center>
25<map name="Win_QextSerialPort_map">
26<area href="classQextSerialBase.html" alt="QextSerialBase" shape="rect" coords="0,56,122,80">
27<area doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html" alt="QIODevice" shape="rect" coords="0,0,122,24">
28<area href="classQextBaseType.html" alt="QextBaseType" shape="rect" coords="0,168,122,192">
29<area href="classQextSerialPort.html" alt="QextSerialPort" shape="rect" coords="0,224,122,248">
30</map>
31<a href="classWin__QextSerialPort-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
32<tr><td></td></tr>
33<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
34<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#aboutToClose">aboutToClose</a> ()</td></tr>
35
36<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#atEnd">atEnd</a> ()</td></tr>
37
38<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#573bd8fdf0ea5e4fb6caddc13a0ed5eb">atEnd</a> () const </td></tr>
39
40<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a> () const </td></tr>
41
42<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#8c76fa901fd01f97f57addad088c3e2c">bytesAvailable</a> ()</td></tr>
43
44<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#bytesToWrite">bytesToWrite</a> ()</td></tr>
45
46<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#bytesWritten">bytesWritten</a> (qint64 bytes)</td></tr>
47
48<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#canReadLine">canReadLine</a> ()</td></tr>
49
50<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#fd2a4f6a94c877e5ae2dbf742af61b1d">close</a> ()</td></tr>
51
52<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#7495b472b5e269d04c0c2e856901207f">construct</a> ()</td></tr>
53
54<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a> () const </td></tr>
55
56<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#errorString">errorString</a> ()</td></tr>
57
58<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790">FlowType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#ad41090da77578cfae4b24510fe8c9b7">flowControl</a> () const </td></tr>
59
60<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#c72e737e24bda9c14a9388eac8ef2622">flush</a> ()</td></tr>
61
62<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#getChar">getChar</a> (char *c)</td></tr>
63
64<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a> ()</td></tr>
65
66<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isReadable">isReadable</a> ()</td></tr>
67
68<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isSequential">isSequential</a> ()</td></tr>
69
70<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#099fb47548a3566ed32d4d878fa57f4c">isSequential</a> () const </td></tr>
71
72<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isTextModeEnabled">isTextModeEnabled</a> ()</td></tr>
73
74<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isWritable">isWritable</a> ()</td></tr>
75
76<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ulong&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#e4029cb49127422b7e76586930366b05">lastError</a> () const </td></tr>
77
78<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ulong&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#5aecf6de25391bb59ad4d18f3562eef3">lineStatus</a> (void)</td></tr>
79
80<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#48e6b76953155180647f0b1a1ace8c2a">open</a> (OpenMode mode=0)</td></tr>
81
82<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#openMode">openMode</a> ()</td></tr>
83
84<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#94d64c3eae955a98eea5fc583f850d87">operator=</a> (const <a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> &amp;s)</td></tr>
85
86<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace">ParityType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#d1ea7aa9d42563f6473b5c6dc9643e31">parity</a> () const </td></tr>
87
88<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#peek-2">peek</a> (qint64 maxSize)</td></tr>
89
90<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#peek">peek</a> (char *data, qint64 maxSize)</td></tr>
91
92<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#b890631914790729980569e38f3f8b6e">portName</a> () const </td></tr>
93
94<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#pos">pos</a> ()</td></tr>
95
96<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#putChar">putChar</a> (char c)</td></tr>
97
98<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#read-2">read</a> (qint64 maxSize)</td></tr>
99
100<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#read">read</a> (char *data, qint64 maxSize)</td></tr>
101
102<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#readAll">readAll</a> ()</td></tr>
103
104<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#readLine-2">readLine</a> (qint64 maxSize=0)</td></tr>
105
106<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#ee681a896845c9594c84dcd47d7eb566">readLine</a> (char *data, qint64 maxSize)</td></tr>
107
108<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#readLineData">readLineData</a> (char *data, qint64 maxSize)</td></tr>
109
110<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#readyRead">readyRead</a> ()</td></tr>
111
112<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#reset">reset</a> ()</td></tr>
113
114<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#seek">seek</a> (qint64 <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#pos">pos</a>)</td></tr>
115
116<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#a5578e4862e3743da2a923f082f821d6">setBaudRate</a> (<a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a>)</td></tr>
117
118<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#33168191b03365b429b8413f6286f4c8">setDataBits</a> (<a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a>)</td></tr>
119
120<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#a8b9bd3cb0ad482d90cb85e386aaeb77">setDtr</a> (bool set=true)</td></tr>
121
122<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#setErrorString">setErrorString</a> (const QString &amp;str)</td></tr>
123
124<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#7660b3b66f45ce087ea14572e753f44d">setFlowControl</a> (<a class="el" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790">FlowType</a>)</td></tr>
125
126<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#setOpenMode">setOpenMode</a> (OpenMode <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#openMode">openMode</a>)</td></tr>
127
128<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#bae5c88ee4e09908766febede36a682a">setParity</a> (<a class="el" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace">ParityType</a>)</td></tr>
129
130<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#1c9f83f00f0ea53ee06b757e197cdf64">setPortName</a> (const QString &amp;name)</td></tr>
131
132<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#1186404a1c53db1c473cfb63b682e52c">setRts</a> (bool set=true)</td></tr>
133
134<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#67fc083cb06b6b1872fc4360cd599821">setStopBits</a> (<a class="el" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f">StopBitsType</a>)</td></tr>
135
136<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#setTextModeEnabled">setTextModeEnabled</a> (bool enabled)</td></tr>
137
138<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#40f1d5f9474e35c227e2d7ac681bb9a7">setTimeout</a> (ulong, ulong)</td></tr>
139
140<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#size">size</a> ()</td></tr>
141
142<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#e6bace09ede746112be8e485fceda26c">size</a> () const </td></tr>
143
144<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f">StopBitsType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#253c4b9419d2f541ba93fe3e6f73e495">stopBits</a> () const </td></tr>
145
146<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#bf215448e265ab0bc8d06cb05e0f7778">translateError</a> (ulong)</td></tr>
147
148<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#02ce5d55c51cca1862f2154f680d6e3c">ungetChar</a> (char c)</td></tr>
149
150<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#waitForBytesWritten">waitForBytesWritten</a> (int msecs)</td></tr>
151
152<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#waitForReadyRead">waitForReadyRead</a> (int msecs)</td></tr>
153
154<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#5701350b1c29e6187e4f50946b88a855">Win_QextSerialPort</a> (const QString &amp;name, const <a class="el" href="structPortSettings.html">PortSettings</a> &amp;settings)</td></tr>
155
156<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#8eebc2f042fe2b9b782fcac8cee7689c">Win_QextSerialPort</a> (const <a class="el" href="structPortSettings.html">PortSettings</a> &amp;settings)</td></tr>
157
158<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#b88b54d3b5d528b75b7a5fbfe83ca673">Win_QextSerialPort</a> (const QString &amp;name)</td></tr>
159
160<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#a2968038a33b91c0f21e43f2a267a35c">Win_QextSerialPort</a> (<a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> const &amp;s)</td></tr>
161
162<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#3f96ad148dd04e48d2251d85866f2bb7">Win_QextSerialPort</a> ()</td></tr>
163
164<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#write-2">write</a> (const QByteArray &amp;byteArray)</td></tr>
165
166<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#write">write</a> (const char *data, qint64 maxSize)</td></tr>
167
168<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#6700be65cee973991ccf77a6afdf131a">~Win_QextSerialPort</a> ()</td></tr>
169
170<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
171<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#39d6d73caac12dc1ca58d88b6e08dcb9">readData</a> (char *data, qint64 maxSize)</td></tr>
172
173<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#be7e2c0f77000edfcf814fccae66fcd9">writeData</a> (const char *data, qint64 maxSize)</td></tr>
174
175<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
176<tr><td class="memItemLeft" nowrap align="right" valign="top">ulong&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a></td></tr>
177
178<tr><td class="memItemLeft" nowrap align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a></td></tr>
179
180<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structPortSettings.html">PortSettings</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a></td></tr>
181
182<tr><td class="memItemLeft" nowrap align="right" valign="top">COMMCONFIG&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a></td></tr>
183
184<tr><td class="memItemLeft" nowrap align="right" valign="top">COMMTIMEOUTS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a></td></tr>
185
186<tr><td class="memItemLeft" nowrap align="right" valign="top">HANDLE&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a></td></tr>
187
188<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
189<tr><td class="memItemLeft" nowrap align="right" valign="top">static QMutex *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#f3d14f4614db4415c5f89746633cf197">mutex</a> = NULL</td></tr>
190
191<tr><td class="memItemLeft" nowrap align="right" valign="top">static ulong&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialBase.html#e5df0cdbbf84781c17f02b8dbc99c93a">refCount</a> = 0</td></tr>
192
193</table>
194<hr><a name="_details"></a><h2>Detailed Description</h2>
195<dl compact><dt><b>Version:</b></dt><dd>1.0.0 </dd></dl>
196<dl compact><dt><b>Author:</b></dt><dd>Stefan Sander</dd></dl>
197A cross-platform serial port class. This class encapsulates the Windows portion of <a class="el" href="classQextSerialPort.html">QextSerialPort</a>. The user will be notified of errors and possible portability conflicts at run-time by default - this behavior can be turned off by defining _TTY_NOWARN_ (to turn off all warnings) or _TTY_NOWARN_PORT_ (to turn off portability warnings) in the project. Note that defining _TTY_NOWARN_ also defines _TTY_NOWARN_PORT_.<p>
198<dl compact><dt><b>Note:</b></dt><dd>On Windows NT/2000/XP this class uses Win32 serial port functions by default. The user may select POSIX behavior under NT, 2000, or XP ONLY by defining _TTY_POSIX_ in the project. I can make no guarantees as to the quality of POSIX support under NT/2000 however. </dd></dl>
199
200<p>
201<hr><h2>Constructor &amp; Destructor Documentation</h2>
202<a class="anchor" name="3f96ad148dd04e48d2251d85866f2bb7"></a><!-- doxytag: member="Win_QextSerialPort::Win_QextSerialPort" ref="3f96ad148dd04e48d2251d85866f2bb7" args="()" -->
203<div class="memitem">
204<div class="memproto">
205      <table class="memname">
206        <tr>
207          <td class="memname">Win_QextSerialPort::Win_QextSerialPort           </td>
208          <td>(</td>
209          <td class="paramname">          </td>
210          <td>&nbsp;)&nbsp;</td>
211          <td width="100%"></td>
212        </tr>
213      </table>
214</div>
215<div class="memdoc">
216
217<p>
218Default constructor. Note that the name of the device used by a <a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> constructed with this constructor will be determined by defined constants, or lack thereof - the default behavior is the same as _TTY_LINUX_. Possible naming conventions and their associated constants are:<p>
219<div class="fragment"><pre class="fragment">Constant         Used By         Naming Convention
220----------       -------------   ------------------------
221_TTY_WIN_        Windows         COM1, COM2
222_TTY_IRIX_       SGI/IRIX        /dev/ttyf1, /dev/ttyf2
223_TTY_HPUX_       HP-UX           /dev/tty1p0, /dev/tty2p0
224_TTY_SUN_        SunOS/Solaris   /dev/ttya, /dev/ttyb
225_TTY_DIGITAL_    Digital UNIX    /dev/tty01, /dev/tty02
226_TTY_FREEBSD_    FreeBSD         /dev/ttyd0, /dev/ttyd1
227_TTY_LINUX_      Linux           /dev/ttyS0, /dev/ttyS1
228&lt;none&gt;           Linux           /dev/ttyS0, /dev/ttyS1
229</pre></div><p>
230This constructor associates the object with the first port on the system, e.g. COM1 for Windows platforms. See the other constructor if you need a port other than the first. <div class="fragment"><pre class="fragment"><a name="l00047"></a>00047                                       :<a class="code" href="classQextSerialBase.html#ba0fc6d8b5c675c91ebff90fc6415748">QextSerialBase</a>() {
231<a name="l00048"></a>00048     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=INVALID_HANDLE_VALUE;
232<a name="l00049"></a>00049 }
233</pre></div>
234<p>
235
236</div>
237</div><p>
238<a class="anchor" name="a2968038a33b91c0f21e43f2a267a35c"></a><!-- doxytag: member="Win_QextSerialPort::Win_QextSerialPort" ref="a2968038a33b91c0f21e43f2a267a35c" args="(Win_QextSerialPort const &amp;s)" -->
239<div class="memitem">
240<div class="memproto">
241      <table class="memname">
242        <tr>
243          <td class="memname">Win_QextSerialPort::Win_QextSerialPort           </td>
244          <td>(</td>
245          <td class="paramtype"><a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> const &amp;&nbsp;</td>
246          <td class="paramname"> <em>s</em>          </td>
247          <td>&nbsp;)&nbsp;</td>
248          <td width="100%"></td>
249        </tr>
250      </table>
251</div>
252<div class="memdoc">
253
254<p>
255<a class="el" href="classWin__QextSerialPort.html#a2968038a33b91c0f21e43f2a267a35c">Win_QextSerialPort::Win_QextSerialPort(const Win_QextSerialPort&amp;)</a> Copy constructor. <div class="fragment"><pre class="fragment"><a name="l00054"></a>00054                                                                  :<a class="code" href="classQextSerialBase.html#ba0fc6d8b5c675c91ebff90fc6415748">QextSerialBase</a>(s.port) {
256<a name="l00055"></a>00055     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=INVALID_HANDLE_VALUE;
257<a name="l00056"></a>00056     <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#setOpenMode">setOpenMode</a>(s.openMode());
258<a name="l00057"></a>00057     <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=s.lastErr;
259<a name="l00058"></a>00058     <a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a> = s.port;
260<a name="l00059"></a>00059     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>=s.Settings.FlowControl;
261<a name="l00060"></a>00060     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>=s.Settings.Parity;
262<a name="l00061"></a>00061     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>=s.Settings.DataBits;
263<a name="l00062"></a>00062     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>=s.Settings.StopBits;
264<a name="l00063"></a>00063     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=s.Settings.BaudRate;
265<a name="l00064"></a>00064     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=s.Win_Handle;
266<a name="l00065"></a>00065     memcpy(&amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, &amp;s.Win_CommConfig, <span class="keyword">sizeof</span>(COMMCONFIG));
267<a name="l00066"></a>00066     memcpy(&amp;<a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>, &amp;s.Win_CommTimeouts, <span class="keyword">sizeof</span>(COMMTIMEOUTS));
268<a name="l00067"></a>00067 }
269</pre></div>
270<p>
271
272</div>
273</div><p>
274<a class="anchor" name="b88b54d3b5d528b75b7a5fbfe83ca673"></a><!-- doxytag: member="Win_QextSerialPort::Win_QextSerialPort" ref="b88b54d3b5d528b75b7a5fbfe83ca673" args="(const QString &amp;name)" -->
275<div class="memitem">
276<div class="memproto">
277      <table class="memname">
278        <tr>
279          <td class="memname">Win_QextSerialPort::Win_QextSerialPort           </td>
280          <td>(</td>
281          <td class="paramtype">const QString &amp;&nbsp;</td>
282          <td class="paramname"> <em>name</em>          </td>
283          <td>&nbsp;)&nbsp;</td>
284          <td width="100%"></td>
285        </tr>
286      </table>
287</div>
288<div class="memdoc">
289
290<p>
291Constructs a serial port attached to the port specified by devName. devName is the name of the device, which is windowsystem-specific, e.g."COM2" or "/dev/ttyS0". <div class="fragment"><pre class="fragment"><a name="l00075"></a>00075                                                           :<a class="code" href="classQextSerialBase.html#ba0fc6d8b5c675c91ebff90fc6415748">QextSerialBase</a>(name) {
292<a name="l00076"></a>00076     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=INVALID_HANDLE_VALUE;
293<a name="l00077"></a>00077 }
294</pre></div>
295<p>
296
297</div>
298</div><p>
299<a class="anchor" name="8eebc2f042fe2b9b782fcac8cee7689c"></a><!-- doxytag: member="Win_QextSerialPort::Win_QextSerialPort" ref="8eebc2f042fe2b9b782fcac8cee7689c" args="(const PortSettings &amp;settings)" -->
300<div class="memitem">
301<div class="memproto">
302      <table class="memname">
303        <tr>
304          <td class="memname">Win_QextSerialPort::Win_QextSerialPort           </td>
305          <td>(</td>
306          <td class="paramtype">const <a class="el" href="structPortSettings.html">PortSettings</a> &amp;&nbsp;</td>
307          <td class="paramname"> <em>settings</em>          </td>
308          <td>&nbsp;)&nbsp;</td>
309          <td width="100%"></td>
310        </tr>
311      </table>
312</div>
313<div class="memdoc">
314
315<p>
316Constructs a port with default name and specified settings. <div class="fragment"><pre class="fragment"><a name="l00083"></a>00083                                                                    {
317<a name="l00084"></a>00084     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=INVALID_HANDLE_VALUE;
318<a name="l00085"></a>00085     <a class="code" href="classWin__QextSerialPort.html#a5578e4862e3743da2a923f082f821d6">setBaudRate</a>(settings.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>);
319<a name="l00086"></a>00086     <a class="code" href="classWin__QextSerialPort.html#33168191b03365b429b8413f6286f4c8">setDataBits</a>(settings.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>);
320<a name="l00087"></a>00087     <a class="code" href="classWin__QextSerialPort.html#67fc083cb06b6b1872fc4360cd599821">setStopBits</a>(settings.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>);
321<a name="l00088"></a>00088     <a class="code" href="classWin__QextSerialPort.html#bae5c88ee4e09908766febede36a682a">setParity</a>(settings.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>);
322<a name="l00089"></a>00089     <a class="code" href="classWin__QextSerialPort.html#7660b3b66f45ce087ea14572e753f44d">setFlowControl</a>(settings.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>);
323<a name="l00090"></a>00090     <a class="code" href="classWin__QextSerialPort.html#40f1d5f9474e35c227e2d7ac681bb9a7">setTimeout</a>(settings.<a class="code" href="structPortSettings.html#159ca543549b3b872917fc4ef0757b60">Timeout_Sec</a>, settings.<a class="code" href="structPortSettings.html#c1b008038ad143262a2ee18247fe2c39">Timeout_Millisec</a>);
324<a name="l00091"></a>00091 }
325</pre></div>
326<p>
327
328</div>
329</div><p>
330<a class="anchor" name="5701350b1c29e6187e4f50946b88a855"></a><!-- doxytag: member="Win_QextSerialPort::Win_QextSerialPort" ref="5701350b1c29e6187e4f50946b88a855" args="(const QString &amp;name, const PortSettings &amp;settings)" -->
331<div class="memitem">
332<div class="memproto">
333      <table class="memname">
334        <tr>
335          <td class="memname">Win_QextSerialPort::Win_QextSerialPort           </td>
336          <td>(</td>
337          <td class="paramtype">const QString &amp;&nbsp;</td>
338          <td class="paramname"> <em>name</em>, </td>
339        </tr>
340        <tr>
341          <td class="paramkey"></td>
342          <td></td>
343          <td class="paramtype">const <a class="el" href="structPortSettings.html">PortSettings</a> &amp;&nbsp;</td>
344          <td class="paramname"> <em>settings</em></td><td>&nbsp;</td>
345        </tr>
346        <tr>
347          <td></td>
348          <td>)</td>
349          <td></td><td></td><td width="100%"></td>
350        </tr>
351      </table>
352</div>
353<div class="memdoc">
354
355<p>
356Constructs a port with specified name and settings. <div class="fragment"><pre class="fragment"><a name="l00097"></a>00097                                                                                          {
357<a name="l00098"></a>00098     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=INVALID_HANDLE_VALUE;
358<a name="l00099"></a>00099     <a class="code" href="classQextSerialBase.html#1c9f83f00f0ea53ee06b757e197cdf64">setPortName</a>(name);
359<a name="l00100"></a>00100     <a class="code" href="classWin__QextSerialPort.html#a5578e4862e3743da2a923f082f821d6">setBaudRate</a>(settings.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>);
360<a name="l00101"></a>00101     <a class="code" href="classWin__QextSerialPort.html#33168191b03365b429b8413f6286f4c8">setDataBits</a>(settings.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>);
361<a name="l00102"></a>00102     <a class="code" href="classWin__QextSerialPort.html#67fc083cb06b6b1872fc4360cd599821">setStopBits</a>(settings.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>);
362<a name="l00103"></a>00103     <a class="code" href="classWin__QextSerialPort.html#bae5c88ee4e09908766febede36a682a">setParity</a>(settings.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>);
363<a name="l00104"></a>00104     <a class="code" href="classWin__QextSerialPort.html#7660b3b66f45ce087ea14572e753f44d">setFlowControl</a>(settings.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>);
364<a name="l00105"></a>00105     <a class="code" href="classWin__QextSerialPort.html#40f1d5f9474e35c227e2d7ac681bb9a7">setTimeout</a>(settings.<a class="code" href="structPortSettings.html#159ca543549b3b872917fc4ef0757b60">Timeout_Sec</a>, settings.<a class="code" href="structPortSettings.html#c1b008038ad143262a2ee18247fe2c39">Timeout_Millisec</a>);
365<a name="l00106"></a>00106 }
366</pre></div>
367<p>
368
369</div>
370</div><p>
371<a class="anchor" name="6700be65cee973991ccf77a6afdf131a"></a><!-- doxytag: member="Win_QextSerialPort::~Win_QextSerialPort" ref="6700be65cee973991ccf77a6afdf131a" args="()" -->
372<div class="memitem">
373<div class="memproto">
374      <table class="memname">
375        <tr>
376          <td class="memname">Win_QextSerialPort::~Win_QextSerialPort           </td>
377          <td>(</td>
378          <td class="paramname">          </td>
379          <td>&nbsp;)&nbsp;</td>
380          <td width="100%"><code> [virtual]</code></td>
381        </tr>
382      </table>
383</div>
384<div class="memdoc">
385
386<p>
387Standard destructor. <div class="fragment"><pre class="fragment"><a name="l00112"></a>00112                                         {
388<a name="l00113"></a>00113     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
389<a name="l00114"></a>00114         <a class="code" href="classWin__QextSerialPort.html#fd2a4f6a94c877e5ae2dbf742af61b1d">close</a>();
390<a name="l00115"></a>00115     }
391<a name="l00116"></a>00116 }
392</pre></div>
393<p>
394
395</div>
396</div><p>
397<hr><h2>Member Function Documentation</h2>
398<a class="anchor" name="573bd8fdf0ea5e4fb6caddc13a0ed5eb"></a><!-- doxytag: member="Win_QextSerialPort::atEnd" ref="573bd8fdf0ea5e4fb6caddc13a0ed5eb" args="() const " -->
399<div class="memitem">
400<div class="memproto">
401      <table class="memname">
402        <tr>
403          <td class="memname">bool QextSerialBase::atEnd           </td>
404          <td>(</td>
405          <td class="paramname">          </td>
406          <td>&nbsp;)&nbsp;</td>
407          <td width="100%"> const<code> [virtual, inherited]</code></td>
408        </tr>
409      </table>
410</div>
411<div class="memdoc">
412
413<p>
414This function will return true if the input buffer is empty (or on error), and false otherwise. Call <a class="el" href="classQextSerialBase.html#e4029cb49127422b7e76586930366b05">QextSerialBase::lastError()</a> for error information. <div class="fragment"><pre class="fragment"><a name="l00187"></a>00187 {
415<a name="l00188"></a>00188     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#86fc9d6239b7d136a9d80b93a727e093">size</a>()) {
416<a name="l00189"></a>00189         <span class="keywordflow">return</span> <span class="keyword">true</span>;
417<a name="l00190"></a>00190     }
418<a name="l00191"></a>00191     <span class="keywordflow">return</span> <span class="keyword">false</span>;
419<a name="l00192"></a>00192 }
420</pre></div>
421<p>
422
423</div>
424</div><p>
425<a class="anchor" name="6d6eeab48cad2fa2adbebb23920c661a"></a><!-- doxytag: member="Win_QextSerialPort::baudRate" ref="6d6eeab48cad2fa2adbebb23920c661a" args="() const " -->
426<div class="memitem">
427<div class="memproto">
428      <table class="memname">
429        <tr>
430          <td class="memname"><a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a> QextSerialBase::baudRate           </td>
431          <td>(</td>
432          <td class="paramtype">void&nbsp;</td>
433          <td class="paramname">          </td>
434          <td>&nbsp;)&nbsp;</td>
435          <td width="100%"> const<code> [virtual, inherited]</code></td>
436        </tr>
437      </table>
438</div>
439<div class="memdoc">
440
441<p>
442Returns the baud rate of the serial port. For a list of possible return values see the definition of the enum BaudRateType. <div class="fragment"><pre class="fragment"><a name="l00126"></a>00126 {
443<a name="l00127"></a>00127     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>;
444<a name="l00128"></a>00128 }
445</pre></div>
446<p>
447
448</div>
449</div><p>
450<a class="anchor" name="8c76fa901fd01f97f57addad088c3e2c"></a><!-- doxytag: member="Win_QextSerialPort::bytesAvailable" ref="8c76fa901fd01f97f57addad088c3e2c" args="()" -->
451<div class="memitem">
452<div class="memproto">
453      <table class="memname">
454        <tr>
455          <td class="memname">qint64 Win_QextSerialPort::bytesAvailable           </td>
456          <td>(</td>
457          <td class="paramname">          </td>
458          <td>&nbsp;)&nbsp;</td>
459          <td width="100%"><code> [virtual]</code></td>
460        </tr>
461      </table>
462</div>
463<div class="memdoc">
464
465<p>
466Returns the number of bytes waiting in the port's receive queue. This function will return 0 if the port is not currently open, or -1 on error. Error information can be retrieved by calling Win_QextSerialPort::getLastError().
467<p>
468Implements <a class="el" href="classQextSerialBase.html#7e130a0ba5a0a9ba95ce5f75a5e2c526">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00229"></a>00229                                           {
469<a name="l00230"></a>00230     LOCK_MUTEX();
470<a name="l00231"></a>00231     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
471<a name="l00232"></a>00232         DWORD Errors;
472<a name="l00233"></a>00233         COMSTAT Status;
473<a name="l00234"></a>00234         <span class="keywordtype">bool</span> success=ClearCommError(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;Errors, &amp;Status);
474<a name="l00235"></a>00235         <a class="code" href="classWin__QextSerialPort.html#bf215448e265ab0bc8d06cb05e0f7778">translateError</a>(Errors);
475<a name="l00236"></a>00236         <span class="keywordflow">if</span> (success) {
476<a name="l00237"></a>00237             <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_NO_ERROR;
477<a name="l00238"></a>00238             UNLOCK_MUTEX();
478<a name="l00239"></a>00239             <span class="keywordflow">return</span> Status.cbInQue + <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#bytesAvailable">QIODevice::bytesAvailable</a>();
479<a name="l00240"></a>00240         }
480<a name="l00241"></a>00241         UNLOCK_MUTEX();
481<a name="l00242"></a>00242         <span class="keywordflow">return</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)-1;
482<a name="l00243"></a>00243     }
483<a name="l00244"></a>00244     UNLOCK_MUTEX();
484<a name="l00245"></a>00245     <span class="keywordflow">return</span> 0;
485<a name="l00246"></a>00246 }
486</pre></div>
487<p>
488
489</div>
490</div><p>
491<a class="anchor" name="fd2a4f6a94c877e5ae2dbf742af61b1d"></a><!-- doxytag: member="Win_QextSerialPort::close" ref="fd2a4f6a94c877e5ae2dbf742af61b1d" args="()" -->
492<div class="memitem">
493<div class="memproto">
494      <table class="memname">
495        <tr>
496          <td class="memname">void Win_QextSerialPort::close           </td>
497          <td>(</td>
498          <td class="paramname">          </td>
499          <td>&nbsp;)&nbsp;</td>
500          <td width="100%"><code> [virtual]</code></td>
501        </tr>
502      </table>
503</div>
504<div class="memdoc">
505
506<p>
507Closes a serial port. This function has no effect if the serial port associated with the class is not currently open.
508<p>
509Implements <a class="el" href="classQextSerialBase.html#2a4aea428bc05a88f86849bb7478c082">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00187"></a>00187                                {
510<a name="l00188"></a>00188     LOCK_MUTEX();
511<a name="l00189"></a>00189     CloseHandle(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>);
512<a name="l00190"></a>00190     <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#close">QIODevice::close</a>();
513<a name="l00191"></a>00191     UNLOCK_MUTEX();
514<a name="l00192"></a>00192 }
515</pre></div>
516<p>
517
518</div>
519</div><p>
520<a class="anchor" name="7495b472b5e269d04c0c2e856901207f"></a><!-- doxytag: member="Win_QextSerialPort::construct" ref="7495b472b5e269d04c0c2e856901207f" args="()" -->
521<div class="memitem">
522<div class="memproto">
523      <table class="memname">
524        <tr>
525          <td class="memname">void QextSerialBase::construct           </td>
526          <td>(</td>
527          <td class="paramname">          </td>
528          <td>&nbsp;)&nbsp;</td>
529          <td width="100%"><code> [virtual, inherited]</code></td>
530        </tr>
531      </table>
532</div>
533<div class="memdoc">
534
535<p>
536Common constructor function for setting up default port settings. (115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 500 ms timeout). <div class="fragment"><pre class="fragment"><a name="l00083"></a>00083 {
537<a name="l00084"></a>00084     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=<a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01054a5ab3e880bc1722d455e420c0351e6">BAUD115200</a>;
538<a name="l00085"></a>00085     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>=<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa719dc653cb3f7c9fbf6c8b8c36d78a9f">DATA_8</a>;
539<a name="l00086"></a>00086     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>=<a class="code" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957acee0df16cbf90ff8b05d96d37094b3980a">PAR_NONE</a>;
540<a name="l00087"></a>00087     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>=<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f5a97cec5fc7aa14a4caae4b53d97fcfc">STOP_1</a>;
541<a name="l00088"></a>00088     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>=<a class="code" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db479037eb6a580629a080ce39792149cf4976">FLOW_HARDWARE</a>;
542<a name="l00089"></a>00089     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#159ca543549b3b872917fc4ef0757b60">Timeout_Sec</a>=0;
543<a name="l00090"></a>00090     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#c1b008038ad143262a2ee18247fe2c39">Timeout_Millisec</a>=500;
544<a name="l00091"></a>00091
545<a name="l00092"></a>00092 <span class="preprocessor">#ifdef QT_THREAD_SUPPORT</span>
546<a name="l00093"></a>00093 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (!<a class="code" href="classQextSerialBase.html#f3d14f4614db4415c5f89746633cf197">mutex</a>) {
547<a name="l00094"></a>00094         <a class="code" href="classQextSerialBase.html#f3d14f4614db4415c5f89746633cf197">mutex</a>=<span class="keyword">new</span> QMutex( QMutex::Recursive );
548<a name="l00095"></a>00095     }
549<a name="l00096"></a>00096     <a class="code" href="classQextSerialBase.html#e5df0cdbbf84781c17f02b8dbc99c93a">refCount</a>++;
550<a name="l00097"></a>00097 <span class="preprocessor">#endif</span>
551<a name="l00098"></a>00098 <span class="preprocessor"></span>
552<a name="l00099"></a>00099     <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#setOpenMode">setOpenMode</a>(QIODevice::NotOpen);
553<a name="l00100"></a>00100 }
554</pre></div>
555<p>
556
557</div>
558</div><p>
559<a class="anchor" name="6836465ea5deaa1280e0e777e9c8651e"></a><!-- doxytag: member="Win_QextSerialPort::dataBits" ref="6836465ea5deaa1280e0e777e9c8651e" args="() const " -->
560<div class="memitem">
561<div class="memproto">
562      <table class="memname">
563        <tr>
564          <td class="memname"><a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a> QextSerialBase::dataBits           </td>
565          <td>(</td>
566          <td class="paramname">          </td>
567          <td>&nbsp;)&nbsp;</td>
568          <td width="100%"> const<code> [virtual, inherited]</code></td>
569        </tr>
570      </table>
571</div>
572<div class="memdoc">
573
574<p>
575Returns the number of data bits used by the port. For a list of possible values returned by this function, see the definition of the enum DataBitsType. <div class="fragment"><pre class="fragment"><a name="l00136"></a>00136 {
576<a name="l00137"></a>00137     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>;
577<a name="l00138"></a>00138 }
578</pre></div>
579<p>
580
581</div>
582</div><p>
583<a class="anchor" name="ad41090da77578cfae4b24510fe8c9b7"></a><!-- doxytag: member="Win_QextSerialPort::flowControl" ref="ad41090da77578cfae4b24510fe8c9b7" args="() const " -->
584<div class="memitem">
585<div class="memproto">
586      <table class="memname">
587        <tr>
588          <td class="memname"><a class="el" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790">FlowType</a> QextSerialBase::flowControl           </td>
589          <td>(</td>
590          <td class="paramname">          </td>
591          <td>&nbsp;)&nbsp;</td>
592          <td width="100%"> const<code> [virtual, inherited]</code></td>
593        </tr>
594      </table>
595</div>
596<div class="memdoc">
597
598<p>
599Returns the type of flow control used by the port. For a list of possible values returned by this function, see the definition of the enum FlowType. <div class="fragment"><pre class="fragment"><a name="l00166"></a>00166 {
600<a name="l00167"></a>00167     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>;
601<a name="l00168"></a>00168 }
602</pre></div>
603<p>
604
605</div>
606</div><p>
607<a class="anchor" name="c72e737e24bda9c14a9388eac8ef2622"></a><!-- doxytag: member="Win_QextSerialPort::flush" ref="c72e737e24bda9c14a9388eac8ef2622" args="()" -->
608<div class="memitem">
609<div class="memproto">
610      <table class="memname">
611        <tr>
612          <td class="memname">void Win_QextSerialPort::flush           </td>
613          <td>(</td>
614          <td class="paramname">          </td>
615          <td>&nbsp;)&nbsp;</td>
616          <td width="100%"><code> [virtual]</code></td>
617        </tr>
618      </table>
619</div>
620<div class="memdoc">
621
622<p>
623Flushes 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.
624<p>
625Implements <a class="el" href="classQextSerialBase.html#58df9d786aa70dfe9f547d4118103f39">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00199"></a>00199                                {
626<a name="l00200"></a>00200     LOCK_MUTEX();
627<a name="l00201"></a>00201     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
628<a name="l00202"></a>00202         FlushFileBuffers(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>);
629<a name="l00203"></a>00203     }
630<a name="l00204"></a>00204     UNLOCK_MUTEX();
631<a name="l00205"></a>00205 }
632</pre></div>
633<p>
634
635</div>
636</div><p>
637<a class="anchor" name="099fb47548a3566ed32d4d878fa57f4c"></a><!-- doxytag: member="Win_QextSerialPort::isSequential" ref="099fb47548a3566ed32d4d878fa57f4c" args="() const " -->
638<div class="memitem">
639<div class="memproto">
640      <table class="memname">
641        <tr>
642          <td class="memname">bool QextSerialBase::isSequential           </td>
643          <td>(</td>
644          <td class="paramname">          </td>
645          <td>&nbsp;)&nbsp;</td>
646          <td width="100%"> const<code> [virtual, inherited]</code></td>
647        </tr>
648      </table>
649</div>
650<div class="memdoc">
651
652<p>
653Returns true if device is sequential, otherwise returns false. Serial port is sequential device so this function always returns true. Check <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isSequential">QIODevice::isSequential()</a> documentation for more information. <div class="fragment"><pre class="fragment"><a name="l00177"></a>00177 {
654<a name="l00178"></a>00178     <span class="keywordflow">return</span> <span class="keyword">true</span>;
655<a name="l00179"></a>00179 }
656</pre></div>
657<p>
658
659</div>
660</div><p>
661<a class="anchor" name="e4029cb49127422b7e76586930366b05"></a><!-- doxytag: member="Win_QextSerialPort::lastError" ref="e4029cb49127422b7e76586930366b05" args="() const " -->
662<div class="memitem">
663<div class="memproto">
664      <table class="memname">
665        <tr>
666          <td class="memname">ulong QextSerialBase::lastError           </td>
667          <td>(</td>
668          <td class="paramname">          </td>
669          <td>&nbsp;)&nbsp;</td>
670          <td width="100%"> const<code> [virtual, inherited]</code></td>
671        </tr>
672      </table>
673</div>
674<div class="memdoc">
675
676<p>
677Returns the code for the last error encountered by the port, or E_NO_ERROR if the last port operation was successful. Possible error codes are:<p>
678<div class="fragment"><pre class="fragment">Error                           Explanation
679---------------------------     -------------------------------------------------------------
680E_NO_ERROR                      No Error has occured
681E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
682E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
683E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
684E_PORT_TIMEOUT                  Operation timed out (POSIX)
685E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
686E_BREAK_CONDITION               The port detected a break condition
687E_FRAMING_ERROR                 The port detected a framing error
688                                (usually caused by incorrect baud rate settings)
689E_IO_ERROR                      There was an I/O error while communicating with the port
690E_BUFFER_OVERRUN                Character buffer overrun
691E_RECEIVE_OVERFLOW              Receive buffer overflow
692E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
693E_TRANSMIT_OVERFLOW             Transmit buffer overflow
694E_READ_FAILED                   General read operation failure
695E_WRITE_FAILED                  General write operation failure
696</pre></div> <div class="fragment"><pre class="fragment"><a name="l00248"></a>00248 {
697<a name="l00249"></a>00249     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>;
698<a name="l00250"></a>00250 }
699</pre></div>
700<p>
701
702</div>
703</div><p>
704<a class="anchor" name="5aecf6de25391bb59ad4d18f3562eef3"></a><!-- doxytag: member="Win_QextSerialPort::lineStatus" ref="5aecf6de25391bb59ad4d18f3562eef3" args="(void)" -->
705<div class="memitem">
706<div class="memproto">
707      <table class="memname">
708        <tr>
709          <td class="memname">ulong Win_QextSerialPort::lineStatus           </td>
710          <td>(</td>
711          <td class="paramtype">void&nbsp;</td>
712          <td class="paramname">          </td>
713          <td>&nbsp;)&nbsp;</td>
714          <td width="100%"><code> [virtual]</code></td>
715        </tr>
716      </table>
717</div>
718<div class="memdoc">
719
720<p>
721returns 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>
722<div class="fragment"><pre class="fragment">Mask        Line
723------      ----
724LS_CTS      CTS
725LS_DSR      DSR
726LS_DCD      DCD
727LS_RI       RI
728</pre></div><p>
729This function will return 0 if the port associated with the class is not currently open.
730<p>
731Implements <a class="el" href="classQextSerialBase.html#28b87dd41160a61e2953dca38aa332d6">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00838"></a>00838                                          {
732<a name="l00839"></a>00839     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> Status=0, Temp=0;
733<a name="l00840"></a>00840     LOCK_MUTEX();
734<a name="l00841"></a>00841     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
735<a name="l00842"></a>00842         GetCommModemStatus(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;Temp);
736<a name="l00843"></a>00843         <span class="keywordflow">if</span> (Temp&amp;MS_CTS_ON) {
737<a name="l00844"></a>00844             Status|=LS_CTS;
738<a name="l00845"></a>00845         }
739<a name="l00846"></a>00846         <span class="keywordflow">if</span> (Temp&amp;MS_DSR_ON) {
740<a name="l00847"></a>00847             Status|=LS_DSR;
741<a name="l00848"></a>00848         }
742<a name="l00849"></a>00849         <span class="keywordflow">if</span> (Temp&amp;MS_RING_ON) {
743<a name="l00850"></a>00850             Status|=LS_RI;
744<a name="l00851"></a>00851         }
745<a name="l00852"></a>00852         <span class="keywordflow">if</span> (Temp&amp;MS_RLSD_ON) {
746<a name="l00853"></a>00853             Status|=LS_DCD;
747<a name="l00854"></a>00854         }
748<a name="l00855"></a>00855     }
749<a name="l00856"></a>00856     UNLOCK_MUTEX();
750<a name="l00857"></a>00857     <span class="keywordflow">return</span> Status;
751<a name="l00858"></a>00858 }
752</pre></div>
753<p>
754
755</div>
756</div><p>
757<a class="anchor" name="48e6b76953155180647f0b1a1ace8c2a"></a><!-- doxytag: member="Win_QextSerialPort::open" ref="48e6b76953155180647f0b1a1ace8c2a" args="(OpenMode mode=0)" -->
758<div class="memitem">
759<div class="memproto">
760      <table class="memname">
761        <tr>
762          <td class="memname">bool Win_QextSerialPort::open           </td>
763          <td>(</td>
764          <td class="paramtype">OpenMode&nbsp;</td>
765          <td class="paramname"> <em>mode</em> = <code>0</code>          </td>
766          <td>&nbsp;)&nbsp;</td>
767          <td width="100%"><code> [virtual]</code></td>
768        </tr>
769      </table>
770</div>
771<div class="memdoc">
772
773<p>
774Opens a serial port. Note that this function does not specify which device to open. If you need to open a device by name, see Win_QextSerialPort::open(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.
775<p>
776Implements <a class="el" href="classQextSerialBase.html#e7fadc74c97f903f6b499e6155236b3e">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00144"></a>00144                                            {
777<a name="l00145"></a>00145     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> confSize = <span class="keyword">sizeof</span>(COMMCONFIG);
778<a name="l00146"></a>00146     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dwSize = confSize;
779<a name="l00147"></a>00147
780<a name="l00148"></a>00148     LOCK_MUTEX();
781<a name="l00149"></a>00149     <span class="keywordflow">if</span> (mode == QIODevice::NotOpen)
782<a name="l00150"></a>00150         <span class="keywordflow">return</span> <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>();
783<a name="l00151"></a>00151     <span class="keywordflow">if</span> (!<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
784<a name="l00152"></a>00152         <span class="comment">/*open the port*/</span>
785<a name="l00153"></a>00153         <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=CreateFileA(<a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a>.toAscii(), GENERIC_READ|GENERIC_WRITE,
786<a name="l00154"></a>00154                               FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
787<a name="l00155"></a>00155         <span class="keywordflow">if</span> (<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>!=INVALID_HANDLE_VALUE) {
788<a name="l00156"></a>00156             <span class="comment">/*set open mode*/</span>
789<a name="l00157"></a>00157             <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#open">QIODevice::open</a>(mode);
790<a name="l00158"></a>00158
791<a name="l00159"></a>00159             <span class="comment">/*configure port settings*/</span>
792<a name="l00160"></a>00160             GetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, &amp;confSize);
793<a name="l00161"></a>00161             GetCommState(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;(<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb));
794<a name="l00162"></a>00162
795<a name="l00163"></a>00163             <span class="comment">/*set up parameters*/</span>
796<a name="l00164"></a>00164             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fBinary=TRUE;
797<a name="l00165"></a>00165             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fInX=FALSE;
798<a name="l00166"></a>00166             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutX=FALSE;
799<a name="l00167"></a>00167             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fAbortOnError=FALSE;
800<a name="l00168"></a>00168             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fNull=FALSE;
801<a name="l00169"></a>00169             <a class="code" href="classWin__QextSerialPort.html#a5578e4862e3743da2a923f082f821d6">setBaudRate</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>);
802<a name="l00170"></a>00170             <a class="code" href="classWin__QextSerialPort.html#33168191b03365b429b8413f6286f4c8">setDataBits</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>);
803<a name="l00171"></a>00171             <a class="code" href="classWin__QextSerialPort.html#67fc083cb06b6b1872fc4360cd599821">setStopBits</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>);
804<a name="l00172"></a>00172             <a class="code" href="classWin__QextSerialPort.html#bae5c88ee4e09908766febede36a682a">setParity</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>);
805<a name="l00173"></a>00173             <a class="code" href="classWin__QextSerialPort.html#7660b3b66f45ce087ea14572e753f44d">setFlowControl</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>);
806<a name="l00174"></a>00174             <a class="code" href="classWin__QextSerialPort.html#40f1d5f9474e35c227e2d7ac681bb9a7">setTimeout</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#159ca543549b3b872917fc4ef0757b60">Timeout_Sec</a>, <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#c1b008038ad143262a2ee18247fe2c39">Timeout_Millisec</a>);
807<a name="l00175"></a>00175             SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
808<a name="l00176"></a>00176         }
809<a name="l00177"></a>00177     }
810<a name="l00178"></a>00178     UNLOCK_MUTEX();
811<a name="l00179"></a>00179     <span class="keywordflow">return</span> <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>();
812<a name="l00180"></a>00180 }
813</pre></div>
814<p>
815
816</div>
817</div><p>
818<a class="anchor" name="94d64c3eae955a98eea5fc583f850d87"></a><!-- doxytag: member="Win_QextSerialPort::operator=" ref="94d64c3eae955a98eea5fc583f850d87" args="(const Win_QextSerialPort &amp;s)" -->
819<div class="memitem">
820<div class="memproto">
821      <table class="memname">
822        <tr>
823          <td class="memname"><a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> &amp; Win_QextSerialPort::operator=           </td>
824          <td>(</td>
825          <td class="paramtype">const <a class="el" href="classWin__QextSerialPort.html">Win_QextSerialPort</a> &amp;&nbsp;</td>
826          <td class="paramname"> <em>s</em>          </td>
827          <td>&nbsp;)&nbsp;</td>
828          <td width="100%"></td>
829        </tr>
830      </table>
831</div>
832<div class="memdoc">
833
834<p>
835overrides the = operator <div class="fragment"><pre class="fragment"><a name="l00122"></a>00122                                                                              {
836<a name="l00123"></a>00123     <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#setOpenMode">setOpenMode</a>(s.<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#openMode">openMode</a>());
837<a name="l00124"></a>00124     <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=s.<a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>;
838<a name="l00125"></a>00125     <a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a> = s.<a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a>;
839<a name="l00126"></a>00126     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>=s.<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>;
840<a name="l00127"></a>00127     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>=s.<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>;
841<a name="l00128"></a>00128     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>=s.<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>;
842<a name="l00129"></a>00129     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>=s.<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>;
843<a name="l00130"></a>00130     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=s.<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>;
844<a name="l00131"></a>00131     <a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>=s.<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>;
845<a name="l00132"></a>00132     memcpy(&amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, &amp;s.<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
846<a name="l00133"></a>00133     memcpy(&amp;<a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>, &amp;s.<a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>, <span class="keyword">sizeof</span>(COMMTIMEOUTS));
847<a name="l00134"></a>00134     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
848<a name="l00135"></a>00135 }
849</pre></div>
850<p>
851
852</div>
853</div><p>
854<a class="anchor" name="d1ea7aa9d42563f6473b5c6dc9643e31"></a><!-- doxytag: member="Win_QextSerialPort::parity" ref="d1ea7aa9d42563f6473b5c6dc9643e31" args="() const " -->
855<div class="memitem">
856<div class="memproto">
857      <table class="memname">
858        <tr>
859          <td class="memname"><a class="el" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace">ParityType</a> QextSerialBase::parity           </td>
860          <td>(</td>
861          <td class="paramname">          </td>
862          <td>&nbsp;)&nbsp;</td>
863          <td width="100%"> const<code> [virtual, inherited]</code></td>
864        </tr>
865      </table>
866</div>
867<div class="memdoc">
868
869<p>
870Returns the type of parity used by the port. For a list of possible values returned by this function, see the definition of the enum ParityType. <div class="fragment"><pre class="fragment"><a name="l00146"></a>00146 {
871<a name="l00147"></a>00147     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>;
872<a name="l00148"></a>00148 }
873</pre></div>
874<p>
875
876</div>
877</div><p>
878<a class="anchor" name="b890631914790729980569e38f3f8b6e"></a><!-- doxytag: member="Win_QextSerialPort::portName" ref="b890631914790729980569e38f3f8b6e" args="() const " -->
879<div class="memitem">
880<div class="memproto">
881      <table class="memname">
882        <tr>
883          <td class="memname">QString QextSerialBase::portName           </td>
884          <td>(</td>
885          <td class="paramname">          </td>
886          <td>&nbsp;)&nbsp;</td>
887          <td width="100%"> const<code> [virtual, inherited]</code></td>
888        </tr>
889      </table>
890</div>
891<div class="memdoc">
892
893<p>
894Returns the name set by <a class="el" href="classQextSerialBase.html#1c9f83f00f0ea53ee06b757e197cdf64">setPortName()</a>. <div class="fragment"><pre class="fragment"><a name="l00116"></a>00116 {
895<a name="l00117"></a>00117     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a>;
896<a name="l00118"></a>00118 }
897</pre></div>
898<p>
899
900</div>
901</div><p>
902<a class="anchor" name="39d6d73caac12dc1ca58d88b6e08dcb9"></a><!-- doxytag: member="Win_QextSerialPort::readData" ref="39d6d73caac12dc1ca58d88b6e08dcb9" args="(char *data, qint64 maxSize)" -->
903<div class="memitem">
904<div class="memproto">
905      <table class="memname">
906        <tr>
907          <td class="memname">qint64 Win_QextSerialPort::readData           </td>
908          <td>(</td>
909          <td class="paramtype">char *&nbsp;</td>
910          <td class="paramname"> <em>data</em>, </td>
911        </tr>
912        <tr>
913          <td class="paramkey"></td>
914          <td></td>
915          <td class="paramtype">qint64&nbsp;</td>
916          <td class="paramname"> <em>maxSize</em></td><td>&nbsp;</td>
917        </tr>
918        <tr>
919          <td></td>
920          <td>)</td>
921          <td></td><td></td><td width="100%"><code> [protected, virtual]</code></td>
922        </tr>
923      </table>
924</div>
925<div class="memdoc">
926
927<p>
928Reads a block of data from the serial port. This function will read at most maxlen bytes from the serial port and place them in the buffer pointed to by data. Return value is the number of bytes actually read, or -1 on error.<p>
929<dl compact><dt><b>Warning:</b></dt><dd>before calling this function ensure that serial port associated with this class is currently open (use <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen()</a> function to check if port is open). </dd></dl>
930
931<p>
932Implements <a class="el" href="classQextSerialBase.html#d36903893a43ad4468e25243117dea73">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00289"></a>00289 {
933<a name="l00290"></a>00290     LOCK_MUTEX();
934<a name="l00291"></a>00291     <span class="keywordtype">int</span> retVal=0;
935<a name="l00292"></a>00292     COMSTAT Win_ComStat;
936<a name="l00293"></a>00293     DWORD Win_BytesRead=0;
937<a name="l00294"></a>00294     DWORD Win_ErrorMask=0;
938<a name="l00295"></a>00295     ClearCommError(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;Win_ErrorMask, &amp;Win_ComStat);
939<a name="l00296"></a>00296     <span class="keywordflow">if</span> (Win_ComStat.cbInQue &amp;&amp;
940<a name="l00297"></a>00297         (!ReadFile(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, (<span class="keywordtype">void</span>*)data, (DWORD)maxSize, &amp;Win_BytesRead, NULL)
941<a name="l00298"></a>00298         || Win_BytesRead==0)) {
942<a name="l00299"></a>00299         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_READ_FAILED;
943<a name="l00300"></a>00300         retVal=-1;
944<a name="l00301"></a>00301     }
945<a name="l00302"></a>00302     <span class="keywordflow">else</span> {
946<a name="l00303"></a>00303         retVal=((int)Win_BytesRead);
947<a name="l00304"></a>00304     }
948<a name="l00305"></a>00305     UNLOCK_MUTEX();
949<a name="l00306"></a>00306
950<a name="l00307"></a>00307     <span class="keywordflow">return</span> retVal;
951<a name="l00308"></a>00308 }
952</pre></div>
953<p>
954
955</div>
956</div><p>
957<a class="anchor" name="ee681a896845c9594c84dcd47d7eb566"></a><!-- doxytag: member="Win_QextSerialPort::readLine" ref="ee681a896845c9594c84dcd47d7eb566" args="(char *data, qint64 maxSize)" -->
958<div class="memitem">
959<div class="memproto">
960      <table class="memname">
961        <tr>
962          <td class="memname">qint64 QextSerialBase::readLine           </td>
963          <td>(</td>
964          <td class="paramtype">char *&nbsp;</td>
965          <td class="paramname"> <em>data</em>, </td>
966        </tr>
967        <tr>
968          <td class="paramkey"></td>
969          <td></td>
970          <td class="paramtype">qint64&nbsp;</td>
971          <td class="paramname"> <em>maxSize</em></td><td>&nbsp;</td>
972        </tr>
973        <tr>
974          <td></td>
975          <td>)</td>
976          <td></td><td></td><td width="100%"><code> [virtual, inherited]</code></td>
977        </tr>
978      </table>
979</div>
980<div class="memdoc">
981
982<p>
983This function will read a line of buffered input from the port, stopping when either maxSize bytes have been read, the port has no more data available, or a newline is encountered. The value returned is the length of the string that was read.
984<p>
985Reimplemented from <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#readLine">QIODevice</a>.<div class="fragment"><pre class="fragment"><a name="l00201"></a>00201 {
986<a name="l00202"></a>00202     qint64 numBytes = <a class="code" href="classQextSerialBase.html#7e130a0ba5a0a9ba95ce5f75a5e2c526">bytesAvailable</a>();
987<a name="l00203"></a>00203     <span class="keywordtype">char</span>* pData = data;
988<a name="l00204"></a>00204
989<a name="l00205"></a>00205     <span class="keywordflow">if</span> (maxSize &lt; 2)    <span class="comment">//maxSize must be larger than 1</span>
990<a name="l00206"></a>00206         <span class="keywordflow">return</span> -1;
991<a name="l00207"></a>00207
992<a name="l00208"></a>00208     <span class="comment">/*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/</span>
993<a name="l00209"></a>00209     <span class="keywordflow">while</span> (pData&lt;(data+numBytes) &amp;&amp; --maxSize) {
994<a name="l00210"></a>00210         <a class="code" href="classQextSerialBase.html#d36903893a43ad4468e25243117dea73">readData</a>(pData, 1);
995<a name="l00211"></a>00211         <span class="keywordflow">if</span> (*pData++ == <span class="charliteral">'\n'</span>) {
996<a name="l00212"></a>00212             <span class="keywordflow">break</span>;
997<a name="l00213"></a>00213         }
998<a name="l00214"></a>00214     }
999<a name="l00215"></a>00215     *pData=<span class="charliteral">'\0'</span>;
1000<a name="l00216"></a>00216
1001<a name="l00217"></a>00217     <span class="comment">/*return size of data read*/</span>
1002<a name="l00218"></a>00218     <span class="keywordflow">return</span> (pData-data);
1003<a name="l00219"></a>00219 }
1004</pre></div>
1005<p>
1006
1007</div>
1008</div><p>
1009<a class="anchor" name="a5578e4862e3743da2a923f082f821d6"></a><!-- doxytag: member="Win_QextSerialPort::setBaudRate" ref="a5578e4862e3743da2a923f082f821d6" args="(BaudRateType)" -->
1010<div class="memitem">
1011<div class="memproto">
1012      <table class="memname">
1013        <tr>
1014          <td class="memname">void Win_QextSerialPort::setBaudRate           </td>
1015          <td>(</td>
1016          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a>&nbsp;</td>
1017          <td class="paramname"> <em>baudRate</em>          </td>
1018          <td>&nbsp;)&nbsp;</td>
1019          <td width="100%"><code> [virtual]</code></td>
1020        </tr>
1021      </table>
1022</div>
1023<div class="memdoc">
1024
1025<p>
1026Sets 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 class="fragment">  RATE          Windows Speed   POSIX Speed
1027  -----------   -------------   -----------
1028   BAUD50                 110          50
1029   BAUD75                 110          75
1030  *BAUD110                110         110
1031   BAUD134                110         134.5
1032   BAUD150                110         150
1033   BAUD200                110         200
1034  *BAUD300                300         300
1035  *BAUD600                600         600
1036  *BAUD1200              1200        1200
1037   BAUD1800              1200        1800
1038  *BAUD2400              2400        2400
1039  *BAUD4800              4800        4800
1040  *BAUD9600              9600        9600
1041   BAUD14400            14400        9600
1042  *BAUD19200            19200       19200
1043  *BAUD38400            38400       38400
1044   BAUD56000            56000       38400
1045  *BAUD57600            57600       57600
1046   BAUD76800            57600       76800
1047  *BAUD115200          115200      115200
1048   BAUD128000          128000      115200
1049   BAUD256000          256000      115200
1050</pre></div> 
1051<p>
1052Implements <a class="el" href="classQextSerialBase.html#05b59a48366ae452bf8e033f83402543">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00629"></a>00629                                                           {
1053<a name="l00630"></a>00630     LOCK_MUTEX();
1054<a name="l00631"></a>00631     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>!=<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1055<a name="l00632"></a>00632         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1056<a name="l00633"></a>00633             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100721b0e666074772b33c2ff05f03f6e2">BAUD50</a>:
1057<a name="l00634"></a>00634             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101cd023b44dceb4b59798e5203534b65b">BAUD75</a>:
1058<a name="l00635"></a>00635             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010192cb47e215d8642f3e26cd877eb904e">BAUD134</a>:
1059<a name="l00636"></a>00636             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010e7b4b2d0b7e6e309e57c64364328aff8">BAUD150</a>:
1060<a name="l00637"></a>00637             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101eff76dffd9e137cbfd3b0563e17348b">BAUD200</a>:
1061<a name="l00638"></a>00638                 <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=<a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01010174371591f621ab26540af3ac992a4">BAUD110</a>;
1062<a name="l00639"></a>00639                 <span class="keywordflow">break</span>;
1063<a name="l00640"></a>00640
1064<a name="l00641"></a>00641             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101815c0670961c2e5c20cfbd81954d3f1">BAUD1800</a>:
1065<a name="l00642"></a>00642                 <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=<a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01086057a69b2752b06b4302ae83c36e7a2">BAUD1200</a>;
1066<a name="l00643"></a>00643                 <span class="keywordflow">break</span>;
1067<a name="l00644"></a>00644
1068<a name="l00645"></a>00645             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0109a7f6b7993e77c3603399cb0a58987be">BAUD76800</a>:
1069<a name="l00646"></a>00646                 <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=<a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e6f70f222bc4d91276a4a934ef66c48">BAUD57600</a>;
1070<a name="l00647"></a>00647                 <span class="keywordflow">break</span>;
1071<a name="l00648"></a>00648
1072<a name="l00649"></a>00649             <span class="keywordflow">default</span>:
1073<a name="l00650"></a>00650                 <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=baudRate;
1074<a name="l00651"></a>00651                 <span class="keywordflow">break</span>;
1075<a name="l00652"></a>00652         }
1076<a name="l00653"></a>00653     }
1077<a name="l00654"></a>00654     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1078<a name="l00655"></a>00655         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1079<a name="l00656"></a>00656
1080<a name="l00657"></a>00657             <span class="comment">/*50 baud*/</span>
1081<a name="l00658"></a>00658             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100721b0e666074772b33c2ff05f03f6e2">BAUD50</a>:
1082<a name="l00659"></a>00659                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 50 baud operation.  Switching to 110 baud."</span>);
1083<a name="l00660"></a>00660                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1084<a name="l00661"></a>00661                 <span class="keywordflow">break</span>;
1085<a name="l00662"></a>00662
1086<a name="l00663"></a>00663             <span class="comment">/*75 baud*/</span>
1087<a name="l00664"></a>00664             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101cd023b44dceb4b59798e5203534b65b">BAUD75</a>:
1088<a name="l00665"></a>00665                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 75 baud operation.  Switching to 110 baud."</span>);
1089<a name="l00666"></a>00666                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1090<a name="l00667"></a>00667                 <span class="keywordflow">break</span>;
1091<a name="l00668"></a>00668
1092<a name="l00669"></a>00669             <span class="comment">/*110 baud*/</span>
1093<a name="l00670"></a>00670             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01010174371591f621ab26540af3ac992a4">BAUD110</a>:
1094<a name="l00671"></a>00671                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1095<a name="l00672"></a>00672                 <span class="keywordflow">break</span>;
1096<a name="l00673"></a>00673
1097<a name="l00674"></a>00674             <span class="comment">/*134.5 baud*/</span>
1098<a name="l00675"></a>00675             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010192cb47e215d8642f3e26cd877eb904e">BAUD134</a>:
1099<a name="l00676"></a>00676                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 134.5 baud operation.  Switching to 110 baud."</span>);
1100<a name="l00677"></a>00677                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1101<a name="l00678"></a>00678                 <span class="keywordflow">break</span>;
1102<a name="l00679"></a>00679
1103<a name="l00680"></a>00680             <span class="comment">/*150 baud*/</span>
1104<a name="l00681"></a>00681             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010e7b4b2d0b7e6e309e57c64364328aff8">BAUD150</a>:
1105<a name="l00682"></a>00682                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 150 baud operation.  Switching to 110 baud."</span>);
1106<a name="l00683"></a>00683                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1107<a name="l00684"></a>00684                 <span class="keywordflow">break</span>;
1108<a name="l00685"></a>00685
1109<a name="l00686"></a>00686             <span class="comment">/*200 baud*/</span>
1110<a name="l00687"></a>00687             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101eff76dffd9e137cbfd3b0563e17348b">BAUD200</a>:
1111<a name="l00688"></a>00688                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 200 baud operation.  Switching to 110 baud."</span>);
1112<a name="l00689"></a>00689                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1113<a name="l00690"></a>00690                 <span class="keywordflow">break</span>;
1114<a name="l00691"></a>00691
1115<a name="l00692"></a>00692             <span class="comment">/*300 baud*/</span>
1116<a name="l00693"></a>00693             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01041f8610ff3d721295c8692d6331bbc86">BAUD300</a>:
1117<a name="l00694"></a>00694                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_300;
1118<a name="l00695"></a>00695                 <span class="keywordflow">break</span>;
1119<a name="l00696"></a>00696
1120<a name="l00697"></a>00697             <span class="comment">/*600 baud*/</span>
1121<a name="l00698"></a>00698             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102a05e5b7c7d350afe149a629af7f07a4">BAUD600</a>:
1122<a name="l00699"></a>00699                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_600;
1123<a name="l00700"></a>00700                 <span class="keywordflow">break</span>;
1124<a name="l00701"></a>00701
1125<a name="l00702"></a>00702             <span class="comment">/*1200 baud*/</span>
1126<a name="l00703"></a>00703             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01086057a69b2752b06b4302ae83c36e7a2">BAUD1200</a>:
1127<a name="l00704"></a>00704                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_1200;
1128<a name="l00705"></a>00705                 <span class="keywordflow">break</span>;
1129<a name="l00706"></a>00706
1130<a name="l00707"></a>00707             <span class="comment">/*1800 baud*/</span>
1131<a name="l00708"></a>00708             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101815c0670961c2e5c20cfbd81954d3f1">BAUD1800</a>:
1132<a name="l00709"></a>00709                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 1800 baud operation.  Switching to 1200 baud."</span>);
1133<a name="l00710"></a>00710                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_1200;
1134<a name="l00711"></a>00711                 <span class="keywordflow">break</span>;
1135<a name="l00712"></a>00712
1136<a name="l00713"></a>00713             <span class="comment">/*2400 baud*/</span>
1137<a name="l00714"></a>00714             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e653cf3163c75f11560ad0616049076">BAUD2400</a>:
1138<a name="l00715"></a>00715                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_2400;
1139<a name="l00716"></a>00716                 <span class="keywordflow">break</span>;
1140<a name="l00717"></a>00717
1141<a name="l00718"></a>00718             <span class="comment">/*4800 baud*/</span>
1142<a name="l00719"></a>00719             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101de6d151ff739cebfa6f3aab0d76ec9e">BAUD4800</a>:
1143<a name="l00720"></a>00720                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_4800;
1144<a name="l00721"></a>00721                 <span class="keywordflow">break</span>;
1145<a name="l00722"></a>00722
1146<a name="l00723"></a>00723             <span class="comment">/*9600 baud*/</span>
1147<a name="l00724"></a>00724             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010782c55daa9030c53e266213401c3707a">BAUD9600</a>:
1148<a name="l00725"></a>00725                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_9600;
1149<a name="l00726"></a>00726                 <span class="keywordflow">break</span>;
1150<a name="l00727"></a>00727
1151<a name="l00728"></a>00728             <span class="comment">/*14400 baud*/</span>
1152<a name="l00729"></a>00729             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010d208c844993c394ce55ed88a7da71d31">BAUD14400</a>:
1153<a name="l00730"></a>00730                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 14400 baud operation."</span>);
1154<a name="l00731"></a>00731                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_14400;
1155<a name="l00732"></a>00732                 <span class="keywordflow">break</span>;
1156<a name="l00733"></a>00733
1157<a name="l00734"></a>00734             <span class="comment">/*19200 baud*/</span>
1158<a name="l00735"></a>00735             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01016d650adf414e7a4fceb3f72661a0420">BAUD19200</a>:
1159<a name="l00736"></a>00736                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_19200;
1160<a name="l00737"></a>00737                 <span class="keywordflow">break</span>;
1161<a name="l00738"></a>00738
1162<a name="l00739"></a>00739             <span class="comment">/*38400 baud*/</span>
1163<a name="l00740"></a>00740             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01056bb974293e65da8c97422abd0c514b7">BAUD38400</a>:
1164<a name="l00741"></a>00741                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_38400;
1165<a name="l00742"></a>00742                 <span class="keywordflow">break</span>;
1166<a name="l00743"></a>00743
1167<a name="l00744"></a>00744             <span class="comment">/*56000 baud*/</span>
1168<a name="l00745"></a>00745             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0106b00b8cf6939c8b517deada3110de1ce">BAUD56000</a>:
1169<a name="l00746"></a>00746                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 56000 baud operation."</span>);
1170<a name="l00747"></a>00747                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_56000;
1171<a name="l00748"></a>00748                 <span class="keywordflow">break</span>;
1172<a name="l00749"></a>00749
1173<a name="l00750"></a>00750             <span class="comment">/*57600 baud*/</span>
1174<a name="l00751"></a>00751             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e6f70f222bc4d91276a4a934ef66c48">BAUD57600</a>:
1175<a name="l00752"></a>00752                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_57600;
1176<a name="l00753"></a>00753                 <span class="keywordflow">break</span>;
1177<a name="l00754"></a>00754
1178<a name="l00755"></a>00755             <span class="comment">/*76800 baud*/</span>
1179<a name="l00756"></a>00756             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0109a7f6b7993e77c3603399cb0a58987be">BAUD76800</a>:
1180<a name="l00757"></a>00757                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 76800 baud operation.  Switching to 57600 baud."</span>);
1181<a name="l00758"></a>00758                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_57600;
1182<a name="l00759"></a>00759                 <span class="keywordflow">break</span>;
1183<a name="l00760"></a>00760
1184<a name="l00761"></a>00761             <span class="comment">/*115200 baud*/</span>
1185<a name="l00762"></a>00762             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01054a5ab3e880bc1722d455e420c0351e6">BAUD115200</a>:
1186<a name="l00763"></a>00763                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_115200;
1187<a name="l00764"></a>00764                 <span class="keywordflow">break</span>;
1188<a name="l00765"></a>00765
1189<a name="l00766"></a>00766             <span class="comment">/*128000 baud*/</span>
1190<a name="l00767"></a>00767             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01035d815a00139f06782b178b82f355f04">BAUD128000</a>:
1191<a name="l00768"></a>00768                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 128000 baud operation."</span>);
1192<a name="l00769"></a>00769                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_128000;
1193<a name="l00770"></a>00770                 <span class="keywordflow">break</span>;
1194<a name="l00771"></a>00771
1195<a name="l00772"></a>00772             <span class="comment">/*256000 baud*/</span>
1196<a name="l00773"></a>00773             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102149280b354c383e6af48949ce3b807f">BAUD256000</a>:
1197<a name="l00774"></a>00774                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 256000 baud operation."</span>);
1198<a name="l00775"></a>00775                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_256000;
1199<a name="l00776"></a>00776                 <span class="keywordflow">break</span>;
1200<a name="l00777"></a>00777         }
1201<a name="l00778"></a>00778         SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1202<a name="l00779"></a>00779     }
1203<a name="l00780"></a>00780     UNLOCK_MUTEX();
1204<a name="l00781"></a>00781 }
1205</pre></div>
1206<p>
1207
1208</div>
1209</div><p>
1210<a class="anchor" name="33168191b03365b429b8413f6286f4c8"></a><!-- doxytag: member="Win_QextSerialPort::setDataBits" ref="33168191b03365b429b8413f6286f4c8" args="(DataBitsType)" -->
1211<div class="memitem">
1212<div class="memproto">
1213      <table class="memname">
1214        <tr>
1215          <td class="memname">void Win_QextSerialPort::setDataBits           </td>
1216          <td>(</td>
1217          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a>&nbsp;</td>
1218          <td class="paramname"> <em>dataBits</em>          </td>
1219          <td>&nbsp;)&nbsp;</td>
1220          <td width="100%"><code> [virtual]</code></td>
1221        </tr>
1222      </table>
1223</div>
1224<div class="memdoc">
1225
1226<p>
1227Sets the number of data bits used by the serial port. Possible values of dataBits are: <div class="fragment"><pre class="fragment">    DATA_5      5 data bits
1228    DATA_6      6 data bits
1229    DATA_7      7 data bits
1230    DATA_8      8 data bits
1231</pre></div><p>
1232<dl compact><dt><b>Note:</b></dt><dd>This function is subject to the following restrictions: </dd></dl>
1233<dl compact><dt><b></b></dt><dd>5 data bits cannot be used with 2 stop bits. </dd></dl>
1234<dl compact><dt><b></b></dt><dd>1.5 stop bits can only be used with 5 data bits. </dd></dl>
1235<dl compact><dt><b></b></dt><dd>8 data bits cannot be used with space parity on POSIX systems. </dd></dl>
1236
1237<p>
1238Implements <a class="el" href="classQextSerialBase.html#651f67ec7818b55c0053b47546c56ab5">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00470"></a>00470                                                           {
1239<a name="l00471"></a>00471     LOCK_MUTEX();
1240<a name="l00472"></a>00472     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>!=<a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>) {
1241<a name="l00473"></a>00473         <span class="keywordflow">if</span> ((<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f9d9d66053c21f5142750606c4af19b61">STOP_2</a> &amp;&amp; <a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>==<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>) ||
1242<a name="l00474"></a>00474             (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7fd5199e453f150adf605f4aa44254d31b">STOP_1_5</a> &amp;&amp; <a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>!=<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>)) {
1243<a name="l00475"></a>00475         }
1244<a name="l00476"></a>00476         <span class="keywordflow">else</span> {
1245<a name="l00477"></a>00477             <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>=<a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>;
1246<a name="l00478"></a>00478         }
1247<a name="l00479"></a>00479     }
1248<a name="l00480"></a>00480     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1249<a name="l00481"></a>00481         <span class="keywordflow">switch</span>(<a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>) {
1250<a name="l00482"></a>00482
1251<a name="l00483"></a>00483             <span class="comment">/*5 data bits*/</span>
1252<a name="l00484"></a>00484             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>:
1253<a name="l00485"></a>00485                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f9d9d66053c21f5142750606c4af19b61">STOP_2</a>) {
1254<a name="l00486"></a>00486                     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: 5 Data bits cannot be used with 2 stop bits."</span>);
1255<a name="l00487"></a>00487                 }
1256<a name="l00488"></a>00488                 <span class="keywordflow">else</span> {
1257<a name="l00489"></a>00489                     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.ByteSize=5;
1258<a name="l00490"></a>00490                     SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1259<a name="l00491"></a>00491                 }
1260<a name="l00492"></a>00492                 <span class="keywordflow">break</span>;
1261<a name="l00493"></a>00493
1262<a name="l00494"></a>00494             <span class="comment">/*6 data bits*/</span>
1263<a name="l00495"></a>00495             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa26d01dd98519521e747c3716b95b039f">DATA_6</a>:
1264<a name="l00496"></a>00496                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7fd5199e453f150adf605f4aa44254d31b">STOP_1_5</a>) {
1265<a name="l00497"></a>00497                     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits."</span>);
1266<a name="l00498"></a>00498                 }
1267<a name="l00499"></a>00499                 <span class="keywordflow">else</span> {
1268<a name="l00500"></a>00500                     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.ByteSize=6;
1269<a name="l00501"></a>00501                     SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1270<a name="l00502"></a>00502                 }
1271<a name="l00503"></a>00503                 <span class="keywordflow">break</span>;
1272<a name="l00504"></a>00504
1273<a name="l00505"></a>00505             <span class="comment">/*7 data bits*/</span>
1274<a name="l00506"></a>00506             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fac0ea91406eb909c082025299d879eed5">DATA_7</a>:
1275<a name="l00507"></a>00507                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7fd5199e453f150adf605f4aa44254d31b">STOP_1_5</a>) {
1276<a name="l00508"></a>00508                     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits."</span>);
1277<a name="l00509"></a>00509                 }
1278<a name="l00510"></a>00510                 <span class="keywordflow">else</span> {
1279<a name="l00511"></a>00511                     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.ByteSize=7;
1280<a name="l00512"></a>00512                     SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1281<a name="l00513"></a>00513                 }
1282<a name="l00514"></a>00514                 <span class="keywordflow">break</span>;
1283<a name="l00515"></a>00515
1284<a name="l00516"></a>00516             <span class="comment">/*8 data bits*/</span>
1285<a name="l00517"></a>00517             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa719dc653cb3f7c9fbf6c8b8c36d78a9f">DATA_8</a>:
1286<a name="l00518"></a>00518                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7fd5199e453f150adf605f4aa44254d31b">STOP_1_5</a>) {
1287<a name="l00519"></a>00519                     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits."</span>);
1288<a name="l00520"></a>00520                 }
1289<a name="l00521"></a>00521                 <span class="keywordflow">else</span> {
1290<a name="l00522"></a>00522                     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.ByteSize=8;
1291<a name="l00523"></a>00523                     SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1292<a name="l00524"></a>00524                 }
1293<a name="l00525"></a>00525                 <span class="keywordflow">break</span>;
1294<a name="l00526"></a>00526         }
1295<a name="l00527"></a>00527     }
1296<a name="l00528"></a>00528     UNLOCK_MUTEX();
1297<a name="l00529"></a>00529 }
1298</pre></div>
1299<p>
1300
1301</div>
1302</div><p>
1303<a class="anchor" name="a8b9bd3cb0ad482d90cb85e386aaeb77"></a><!-- doxytag: member="Win_QextSerialPort::setDtr" ref="a8b9bd3cb0ad482d90cb85e386aaeb77" args="(bool set=true)" -->
1304<div class="memitem">
1305<div class="memproto">
1306      <table class="memname">
1307        <tr>
1308          <td class="memname">void Win_QextSerialPort::setDtr           </td>
1309          <td>(</td>
1310          <td class="paramtype">bool&nbsp;</td>
1311          <td class="paramname"> <em>set</em> = <code>true</code>          </td>
1312          <td>&nbsp;)&nbsp;</td>
1313          <td width="100%"><code> [virtual]</code></td>
1314        </tr>
1315      </table>
1316</div>
1317<div class="memdoc">
1318
1319<p>
1320Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open.
1321<p>
1322Implements <a class="el" href="classQextSerialBase.html#14c7fc36f9e7b7e5a9e798c2c1b35505">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00788"></a>00788                                         {
1323<a name="l00789"></a>00789     LOCK_MUTEX();
1324<a name="l00790"></a>00790     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1325<a name="l00791"></a>00791         <span class="keywordflow">if</span> (set) {
1326<a name="l00792"></a>00792             EscapeCommFunction(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, SETDTR);
1327<a name="l00793"></a>00793         }
1328<a name="l00794"></a>00794         <span class="keywordflow">else</span> {
1329<a name="l00795"></a>00795             EscapeCommFunction(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, CLRDTR);
1330<a name="l00796"></a>00796         }
1331<a name="l00797"></a>00797     }
1332<a name="l00798"></a>00798     UNLOCK_MUTEX();
1333<a name="l00799"></a>00799 }
1334</pre></div>
1335<p>
1336
1337</div>
1338</div><p>
1339<a class="anchor" name="7660b3b66f45ce087ea14572e753f44d"></a><!-- doxytag: member="Win_QextSerialPort::setFlowControl" ref="7660b3b66f45ce087ea14572e753f44d" args="(FlowType)" -->
1340<div class="memitem">
1341<div class="memproto">
1342      <table class="memname">
1343        <tr>
1344          <td class="memname">void Win_QextSerialPort::setFlowControl           </td>
1345          <td>(</td>
1346          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790">FlowType</a>&nbsp;</td>
1347          <td class="paramname"> <em>flow</em>          </td>
1348          <td>&nbsp;)&nbsp;</td>
1349          <td width="100%"><code> [virtual]</code></td>
1350        </tr>
1351      </table>
1352</div>
1353<div class="memdoc">
1354
1355<p>
1356Sets the flow control used by the port. Possible values of flow are: <div class="fragment"><pre class="fragment">    FLOW_OFF            No flow control
1357    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
1358    FLOW_XONXOFF        Software (XON/XOFF) flow control
1359</pre></div> 
1360<p>
1361Implements <a class="el" href="classQextSerialBase.html#976c031b3a51bc71abe7804953e0d366">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00358"></a>00358                                                      {
1362<a name="l00359"></a>00359     LOCK_MUTEX();
1363<a name="l00360"></a>00360     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>!=flow) {
1364<a name="l00361"></a>00361         <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>=flow;
1365<a name="l00362"></a>00362     }
1366<a name="l00363"></a>00363     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1367<a name="l00364"></a>00364         <span class="keywordflow">switch</span>(flow) {
1368<a name="l00365"></a>00365
1369<a name="l00366"></a>00366             <span class="comment">/*no flow control*/</span>
1370<a name="l00367"></a>00367             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790d4c112d4c8487384e429edeb50b01f6e">FLOW_OFF</a>:
1371<a name="l00368"></a>00368                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutxCtsFlow=FALSE;
1372<a name="l00369"></a>00369                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fRtsControl=RTS_CONTROL_DISABLE;
1373<a name="l00370"></a>00370                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fInX=FALSE;
1374<a name="l00371"></a>00371                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutX=FALSE;
1375<a name="l00372"></a>00372                 SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1376<a name="l00373"></a>00373                 <span class="keywordflow">break</span>;
1377<a name="l00374"></a>00374
1378<a name="l00375"></a>00375             <span class="comment">/*software (XON/XOFF) flow control*/</span>
1379<a name="l00376"></a>00376             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db47900d28447e3d97e184d5582f874d3dd92f">FLOW_XONXOFF</a>:
1380<a name="l00377"></a>00377                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutxCtsFlow=FALSE;
1381<a name="l00378"></a>00378                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fRtsControl=RTS_CONTROL_DISABLE;
1382<a name="l00379"></a>00379                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fInX=TRUE;
1383<a name="l00380"></a>00380                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutX=TRUE;
1384<a name="l00381"></a>00381                 SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1385<a name="l00382"></a>00382                 <span class="keywordflow">break</span>;
1386<a name="l00383"></a>00383
1387<a name="l00384"></a>00384             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db479037eb6a580629a080ce39792149cf4976">FLOW_HARDWARE</a>:
1388<a name="l00385"></a>00385                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutxCtsFlow=TRUE;
1389<a name="l00386"></a>00386                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fRtsControl=RTS_CONTROL_HANDSHAKE;
1390<a name="l00387"></a>00387                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fInX=FALSE;
1391<a name="l00388"></a>00388                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutX=FALSE;
1392<a name="l00389"></a>00389                 SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1393<a name="l00390"></a>00390                 <span class="keywordflow">break</span>;
1394<a name="l00391"></a>00391         }
1395<a name="l00392"></a>00392     }
1396<a name="l00393"></a>00393     UNLOCK_MUTEX();
1397<a name="l00394"></a>00394 }
1398</pre></div>
1399<p>
1400
1401</div>
1402</div><p>
1403<a class="anchor" name="bae5c88ee4e09908766febede36a682a"></a><!-- doxytag: member="Win_QextSerialPort::setParity" ref="bae5c88ee4e09908766febede36a682a" args="(ParityType)" -->
1404<div class="memitem">
1405<div class="memproto">
1406      <table class="memname">
1407        <tr>
1408          <td class="memname">void Win_QextSerialPort::setParity           </td>
1409          <td>(</td>
1410          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace">ParityType</a>&nbsp;</td>
1411          <td class="paramname"> <em>parity</em>          </td>
1412          <td>&nbsp;)&nbsp;</td>
1413          <td width="100%"><code> [virtual]</code></td>
1414        </tr>
1415      </table>
1416</div>
1417<div class="memdoc">
1418
1419<p>
1420Sets the parity associated with the serial port. The possible values of parity are: <div class="fragment"><pre class="fragment">    PAR_SPACE       Space Parity
1421    PAR_MARK        Mark Parity
1422    PAR_NONE        No Parity
1423    PAR_EVEN        Even Parity
1424    PAR_ODD         Odd Parity
1425</pre></div> 
1426<p>
1427Implements <a class="el" href="classQextSerialBase.html#d57f8cb19a8a48012c1f607155eddedf">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00407"></a>00407                                                     {
1428<a name="l00408"></a>00408     LOCK_MUTEX();
1429<a name="l00409"></a>00409     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>!=<a class="code" href="classQextSerialBase.html#d1ea7aa9d42563f6473b5c6dc9643e31">parity</a>) {
1430<a name="l00410"></a>00410         <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>=<a class="code" href="classQextSerialBase.html#d1ea7aa9d42563f6473b5c6dc9643e31">parity</a>;
1431<a name="l00411"></a>00411     }
1432<a name="l00412"></a>00412     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1433<a name="l00413"></a>00413         <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.Parity=(<span class="keywordtype">unsigned</span> char)<a class="code" href="classQextSerialBase.html#d1ea7aa9d42563f6473b5c6dc9643e31">parity</a>;
1434<a name="l00414"></a>00414         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#d1ea7aa9d42563f6473b5c6dc9643e31">parity</a>) {
1435<a name="l00415"></a>00415
1436<a name="l00416"></a>00416             <span class="comment">/*space parity*/</span>
1437<a name="l00417"></a>00417             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace1dd539202244b7b46ea83c168d3a447d">PAR_SPACE</a>:
1438<a name="l00418"></a>00418                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>==<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa719dc653cb3f7c9fbf6c8b8c36d78a9f">DATA_8</a>) {
1439<a name="l00419"></a>00419                     TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: Space parity with 8 data bits is not supported by POSIX systems."</span>);
1440<a name="l00420"></a>00420                 }
1441<a name="l00421"></a>00421                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fParity=TRUE;
1442<a name="l00422"></a>00422                 <span class="keywordflow">break</span>;
1443<a name="l00423"></a>00423
1444<a name="l00424"></a>00424             <span class="comment">/*mark parity - WINDOWS ONLY*/</span>
1445<a name="l00425"></a>00425             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace8e6eade7ff411bc2d325be080ce4ad10">PAR_MARK</a>:
1446<a name="l00426"></a>00426                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning:  Mark parity is not supported by POSIX systems"</span>);
1447<a name="l00427"></a>00427                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fParity=TRUE;
1448<a name="l00428"></a>00428                 <span class="keywordflow">break</span>;
1449<a name="l00429"></a>00429
1450<a name="l00430"></a>00430             <span class="comment">/*no parity*/</span>
1451<a name="l00431"></a>00431             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957acee0df16cbf90ff8b05d96d37094b3980a">PAR_NONE</a>:
1452<a name="l00432"></a>00432                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fParity=FALSE;
1453<a name="l00433"></a>00433                 <span class="keywordflow">break</span>;
1454<a name="l00434"></a>00434
1455<a name="l00435"></a>00435             <span class="comment">/*even parity*/</span>
1456<a name="l00436"></a>00436             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957acedcf0e7e3469256fa6eadd03f93e9a5aa">PAR_EVEN</a>:
1457<a name="l00437"></a>00437                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fParity=TRUE;
1458<a name="l00438"></a>00438                 <span class="keywordflow">break</span>;
1459<a name="l00439"></a>00439
1460<a name="l00440"></a>00440             <span class="comment">/*odd parity*/</span>
1461<a name="l00441"></a>00441             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace53059ce3f8053f409937ff89a90afee9">PAR_ODD</a>:
1462<a name="l00442"></a>00442                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fParity=TRUE;
1463<a name="l00443"></a>00443                 <span class="keywordflow">break</span>;
1464<a name="l00444"></a>00444         }
1465<a name="l00445"></a>00445         SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1466<a name="l00446"></a>00446     }
1467<a name="l00447"></a>00447     UNLOCK_MUTEX();
1468<a name="l00448"></a>00448 }
1469</pre></div>
1470<p>
1471
1472</div>
1473</div><p>
1474<a class="anchor" name="1c9f83f00f0ea53ee06b757e197cdf64"></a><!-- doxytag: member="Win_QextSerialPort::setPortName" ref="1c9f83f00f0ea53ee06b757e197cdf64" args="(const QString &amp;name)" -->
1475<div class="memitem">
1476<div class="memproto">
1477      <table class="memname">
1478        <tr>
1479          <td class="memname">void QextSerialBase::setPortName           </td>
1480          <td>(</td>
1481          <td class="paramtype">const QString &amp;&nbsp;</td>
1482          <td class="paramname"> <em>name</em>          </td>
1483          <td>&nbsp;)&nbsp;</td>
1484          <td width="100%"><code> [virtual, inherited]</code></td>
1485        </tr>
1486      </table>
1487</div>
1488<div class="memdoc">
1489
1490<p>
1491Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0". <div class="fragment"><pre class="fragment"><a name="l00107"></a>00107 {
1492<a name="l00108"></a>00108     <a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a> = name;
1493<a name="l00109"></a>00109 }
1494</pre></div>
1495<p>
1496
1497</div>
1498</div><p>
1499<a class="anchor" name="1186404a1c53db1c473cfb63b682e52c"></a><!-- doxytag: member="Win_QextSerialPort::setRts" ref="1186404a1c53db1c473cfb63b682e52c" args="(bool set=true)" -->
1500<div class="memitem">
1501<div class="memproto">
1502      <table class="memname">
1503        <tr>
1504          <td class="memname">void Win_QextSerialPort::setRts           </td>
1505          <td>(</td>
1506          <td class="paramtype">bool&nbsp;</td>
1507          <td class="paramname"> <em>set</em> = <code>true</code>          </td>
1508          <td>&nbsp;)&nbsp;</td>
1509          <td width="100%"><code> [virtual]</code></td>
1510        </tr>
1511      </table>
1512</div>
1513<div class="memdoc">
1514
1515<p>
1516Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open.
1517<p>
1518Implements <a class="el" href="classQextSerialBase.html#aa23d343095f16e7d7b37e7b61022b3a">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00806"></a>00806                                         {
1519<a name="l00807"></a>00807     LOCK_MUTEX();
1520<a name="l00808"></a>00808     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1521<a name="l00809"></a>00809         <span class="keywordflow">if</span> (set) {
1522<a name="l00810"></a>00810             EscapeCommFunction(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, SETRTS);
1523<a name="l00811"></a>00811         }
1524<a name="l00812"></a>00812         <span class="keywordflow">else</span> {
1525<a name="l00813"></a>00813             EscapeCommFunction(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, CLRRTS);
1526<a name="l00814"></a>00814         }
1527<a name="l00815"></a>00815     }
1528<a name="l00816"></a>00816     UNLOCK_MUTEX();
1529<a name="l00817"></a>00817 }
1530</pre></div>
1531<p>
1532
1533</div>
1534</div><p>
1535<a class="anchor" name="67fc083cb06b6b1872fc4360cd599821"></a><!-- doxytag: member="Win_QextSerialPort::setStopBits" ref="67fc083cb06b6b1872fc4360cd599821" args="(StopBitsType)" -->
1536<div class="memitem">
1537<div class="memproto">
1538      <table class="memname">
1539        <tr>
1540          <td class="memname">void Win_QextSerialPort::setStopBits           </td>
1541          <td>(</td>
1542          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f">StopBitsType</a>&nbsp;</td>
1543          <td class="paramname"> <em>stopBits</em>          </td>
1544          <td>&nbsp;)&nbsp;</td>
1545          <td width="100%"><code> [virtual]</code></td>
1546        </tr>
1547      </table>
1548</div>
1549<div class="memdoc">
1550
1551<p>
1552Sets the number of stop bits used by the serial port. Possible values of stopBits are: <div class="fragment"><pre class="fragment">    STOP_1      1 stop bit
1553    STOP_1_5    1.5 stop bits
1554    STOP_2      2 stop bits
1555</pre></div><p>
1556<dl compact><dt><b>Note:</b></dt><dd>This function is subject to the following restrictions: </dd></dl>
1557<dl compact><dt><b></b></dt><dd>2 stop bits cannot be used with 5 data bits. </dd></dl>
1558<dl compact><dt><b></b></dt><dd>1.5 stop bits cannot be used with 6 or more data bits. </dd></dl>
1559<dl compact><dt><b></b></dt><dd>POSIX does not support 1.5 stop bits. </dd></dl>
1560
1561<p>
1562Implements <a class="el" href="classQextSerialBase.html#fafca39575da5ab668671bff89fdd4bc">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00549"></a>00549                                                           {
1563<a name="l00550"></a>00550     LOCK_MUTEX();
1564<a name="l00551"></a>00551     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>!=<a class="code" href="classQextSerialBase.html#253c4b9419d2f541ba93fe3e6f73e495">stopBits</a>) {
1565<a name="l00552"></a>00552         <span class="keywordflow">if</span> ((<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>==<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a> &amp;&amp; <a class="code" href="classQextSerialBase.html#253c4b9419d2f541ba93fe3e6f73e495">stopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f9d9d66053c21f5142750606c4af19b61">STOP_2</a>) ||
1566<a name="l00553"></a>00553             (<a class="code" href="classQextSerialBase.html#253c4b9419d2f541ba93fe3e6f73e495">stopBits</a>==<a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7fd5199e453f150adf605f4aa44254d31b">STOP_1_5</a> &amp;&amp; <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>!=<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>)) {
1567<a name="l00554"></a>00554         }
1568<a name="l00555"></a>00555         <span class="keywordflow">else</span> {
1569<a name="l00556"></a>00556             <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>=<a class="code" href="classQextSerialBase.html#253c4b9419d2f541ba93fe3e6f73e495">stopBits</a>;
1570<a name="l00557"></a>00557         }
1571<a name="l00558"></a>00558     }
1572<a name="l00559"></a>00559     <span class="keywordflow">if</span> (<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1573<a name="l00560"></a>00560         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#253c4b9419d2f541ba93fe3e6f73e495">stopBits</a>) {
1574<a name="l00561"></a>00561
1575<a name="l00562"></a>00562             <span class="comment">/*one stop bit*/</span>
1576<a name="l00563"></a>00563             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f5a97cec5fc7aa14a4caae4b53d97fcfc">STOP_1</a>:
1577<a name="l00564"></a>00564                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.StopBits=ONESTOPBIT;
1578<a name="l00565"></a>00565                 SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1579<a name="l00566"></a>00566                 <span class="keywordflow">break</span>;
1580<a name="l00567"></a>00567
1581<a name="l00568"></a>00568             <span class="comment">/*1.5 stop bits*/</span>
1582<a name="l00569"></a>00569             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7fd5199e453f150adf605f4aa44254d31b">STOP_1_5</a>:
1583<a name="l00570"></a>00570                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: 1.5 stop bit operation is not supported by POSIX."</span>);
1584<a name="l00571"></a>00571                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>!=<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>) {
1585<a name="l00572"></a>00572                     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: 1.5 stop bits can only be used with 5 data bits"</span>);
1586<a name="l00573"></a>00573                 }
1587<a name="l00574"></a>00574                 <span class="keywordflow">else</span> {
1588<a name="l00575"></a>00575                     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.StopBits=ONE5STOPBITS;
1589<a name="l00576"></a>00576                     SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1590<a name="l00577"></a>00577                 }
1591<a name="l00578"></a>00578                 <span class="keywordflow">break</span>;
1592<a name="l00579"></a>00579
1593<a name="l00580"></a>00580             <span class="comment">/*two stop bits*/</span>
1594<a name="l00581"></a>00581             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f9d9d66053c21f5142750606c4af19b61">STOP_2</a>:
1595<a name="l00582"></a>00582                 <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>==<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>) {
1596<a name="l00583"></a>00583                     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: 2 stop bits cannot be used with 5 data bits"</span>);
1597<a name="l00584"></a>00584                 }
1598<a name="l00585"></a>00585                 <span class="keywordflow">else</span> {
1599<a name="l00586"></a>00586                     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.StopBits=TWOSTOPBITS;
1600<a name="l00587"></a>00587                     SetCommConfig(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>, <span class="keyword">sizeof</span>(COMMCONFIG));
1601<a name="l00588"></a>00588                 }
1602<a name="l00589"></a>00589                 <span class="keywordflow">break</span>;
1603<a name="l00590"></a>00590         }
1604<a name="l00591"></a>00591     }
1605<a name="l00592"></a>00592     UNLOCK_MUTEX();
1606<a name="l00593"></a>00593 }
1607</pre></div>
1608<p>
1609
1610</div>
1611</div><p>
1612<a class="anchor" name="40f1d5f9474e35c227e2d7ac681bb9a7"></a><!-- doxytag: member="Win_QextSerialPort::setTimeout" ref="40f1d5f9474e35c227e2d7ac681bb9a7" args="(ulong, ulong)" -->
1613<div class="memitem">
1614<div class="memproto">
1615      <table class="memname">
1616        <tr>
1617          <td class="memname">void Win_QextSerialPort::setTimeout           </td>
1618          <td>(</td>
1619          <td class="paramtype">ulong&nbsp;</td>
1620          <td class="paramname"> <em>sec</em>, </td>
1621        </tr>
1622        <tr>
1623          <td class="paramkey"></td>
1624          <td></td>
1625          <td class="paramtype">ulong&nbsp;</td>
1626          <td class="paramname"> <em>millisec</em></td><td>&nbsp;</td>
1627        </tr>
1628        <tr>
1629          <td></td>
1630          <td>)</td>
1631          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
1632        </tr>
1633      </table>
1634</div>
1635<div class="memdoc">
1636
1637<p>
1638Sets the read and write timeouts for the port to sec seconds and millisec milliseconds.
1639<p>
1640Implements <a class="el" href="classQextSerialBase.html#02812d40f1b114983ca9c25ea83d159d">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00864"></a>00864                                                              {
1641<a name="l00865"></a>00865     LOCK_MUTEX();
1642<a name="l00866"></a>00866     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#159ca543549b3b872917fc4ef0757b60">Timeout_Sec</a>=sec;
1643<a name="l00867"></a>00867     <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#c1b008038ad143262a2ee18247fe2c39">Timeout_Millisec</a>=millisec;
1644<a name="l00868"></a>00868     <span class="keywordflow">if</span>(<a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen</a>()) {
1645<a name="l00869"></a>00869         <a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>.ReadIntervalTimeout = sec*1000+millisec;
1646<a name="l00870"></a>00870         <a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>.ReadTotalTimeoutMultiplier = sec*1000+millisec;
1647<a name="l00871"></a>00871         <a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>.ReadTotalTimeoutConstant = 0;
1648<a name="l00872"></a>00872         <a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>.WriteTotalTimeoutMultiplier = sec*1000+millisec;
1649<a name="l00873"></a>00873         <a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>.WriteTotalTimeoutConstant = 0;
1650<a name="l00874"></a>00874         SetCommTimeouts(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;<a class="code" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_CommTimeouts</a>);
1651<a name="l00875"></a>00875     }
1652<a name="l00876"></a>00876     UNLOCK_MUTEX();
1653<a name="l00877"></a>00877 }
1654</pre></div>
1655<p>
1656
1657</div>
1658</div><p>
1659<a class="anchor" name="e6bace09ede746112be8e485fceda26c"></a><!-- doxytag: member="Win_QextSerialPort::size" ref="e6bace09ede746112be8e485fceda26c" args="() const " -->
1660<div class="memitem">
1661<div class="memproto">
1662      <table class="memname">
1663        <tr>
1664          <td class="memname">qint64 Win_QextSerialPort::size           </td>
1665          <td>(</td>
1666          <td class="paramname">          </td>
1667          <td>&nbsp;)&nbsp;</td>
1668          <td width="100%"> const<code> [virtual]</code></td>
1669        </tr>
1670      </table>
1671</div>
1672<div class="memdoc">
1673
1674<p>
1675This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html">QIODevice</a> interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use <a class="el" href="classWin__QextSerialPort.html#8c76fa901fd01f97f57addad088c3e2c">Win_QextSerialPort::bytesAvailable()</a> instead.
1676<p>
1677Implements <a class="el" href="classQextSerialBase.html#86fc9d6239b7d136a9d80b93a727e093">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00214"></a>00214                                       {
1678<a name="l00215"></a>00215     <span class="keywordtype">int</span> availBytes;
1679<a name="l00216"></a>00216     COMSTAT Win_ComStat;
1680<a name="l00217"></a>00217     DWORD Win_ErrorMask=0;
1681<a name="l00218"></a>00218     ClearCommError(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;Win_ErrorMask, &amp;Win_ComStat);
1682<a name="l00219"></a>00219     availBytes = Win_ComStat.cbInQue;
1683<a name="l00220"></a>00220     <span class="keywordflow">return</span> (qint64)availBytes;
1684<a name="l00221"></a>00221 }
1685</pre></div>
1686<p>
1687
1688</div>
1689</div><p>
1690<a class="anchor" name="253c4b9419d2f541ba93fe3e6f73e495"></a><!-- doxytag: member="Win_QextSerialPort::stopBits" ref="253c4b9419d2f541ba93fe3e6f73e495" args="() const " -->
1691<div class="memitem">
1692<div class="memproto">
1693      <table class="memname">
1694        <tr>
1695          <td class="memname"><a class="el" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f">StopBitsType</a> QextSerialBase::stopBits           </td>
1696          <td>(</td>
1697          <td class="paramname">          </td>
1698          <td>&nbsp;)&nbsp;</td>
1699          <td width="100%"> const<code> [virtual, inherited]</code></td>
1700        </tr>
1701      </table>
1702</div>
1703<div class="memdoc">
1704
1705<p>
1706Returns the number of stop bits used by the port. For a list of possible return values, see the definition of the enum StopBitsType. <div class="fragment"><pre class="fragment"><a name="l00156"></a>00156 {
1707<a name="l00157"></a>00157     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>;
1708<a name="l00158"></a>00158 }
1709</pre></div>
1710<p>
1711
1712</div>
1713</div><p>
1714<a class="anchor" name="bf215448e265ab0bc8d06cb05e0f7778"></a><!-- doxytag: member="Win_QextSerialPort::translateError" ref="bf215448e265ab0bc8d06cb05e0f7778" args="(ulong)" -->
1715<div class="memitem">
1716<div class="memproto">
1717      <table class="memname">
1718        <tr>
1719          <td class="memname">void Win_QextSerialPort::translateError           </td>
1720          <td>(</td>
1721          <td class="paramtype">ulong&nbsp;</td>
1722          <td class="paramname"> <em>error</em>          </td>
1723          <td>&nbsp;)&nbsp;</td>
1724          <td width="100%"><code> [virtual]</code></td>
1725        </tr>
1726      </table>
1727</div>
1728<div class="memdoc">
1729
1730<p>
1731Translates a system-specific error code to a <a class="el" href="classQextSerialPort.html">QextSerialPort</a> error code. Used internally.
1732<p>
1733Implements <a class="el" href="classQextSerialBase.html#a9c2e9272cff3bd576560335308a8033">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00252"></a>00252                                                    {
1734<a name="l00253"></a>00253     <span class="keywordflow">if</span> (error&amp;CE_BREAK) {
1735<a name="l00254"></a>00254         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_BREAK_CONDITION;
1736<a name="l00255"></a>00255     }
1737<a name="l00256"></a>00256     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_FRAME) {
1738<a name="l00257"></a>00257         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_FRAMING_ERROR;
1739<a name="l00258"></a>00258     }
1740<a name="l00259"></a>00259     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_IOE) {
1741<a name="l00260"></a>00260         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_IO_ERROR;
1742<a name="l00261"></a>00261     }
1743<a name="l00262"></a>00262     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_MODE) {
1744<a name="l00263"></a>00263         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_INVALID_FD;
1745<a name="l00264"></a>00264     }
1746<a name="l00265"></a>00265     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_OVERRUN) {
1747<a name="l00266"></a>00266         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_BUFFER_OVERRUN;
1748<a name="l00267"></a>00267     }
1749<a name="l00268"></a>00268     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_RXPARITY) {
1750<a name="l00269"></a>00269         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_RECEIVE_PARITY_ERROR;
1751<a name="l00270"></a>00270     }
1752<a name="l00271"></a>00271     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_RXOVER) {
1753<a name="l00272"></a>00272         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_RECEIVE_OVERFLOW;
1754<a name="l00273"></a>00273     }
1755<a name="l00274"></a>00274     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error&amp;CE_TXFULL) {
1756<a name="l00275"></a>00275         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_TRANSMIT_OVERFLOW;
1757<a name="l00276"></a>00276     }
1758<a name="l00277"></a>00277 }
1759</pre></div>
1760<p>
1761
1762</div>
1763</div><p>
1764<a class="anchor" name="02ce5d55c51cca1862f2154f680d6e3c"></a><!-- doxytag: member="Win_QextSerialPort::ungetChar" ref="02ce5d55c51cca1862f2154f680d6e3c" args="(char c)" -->
1765<div class="memitem">
1766<div class="memproto">
1767      <table class="memname">
1768        <tr>
1769          <td class="memname">void Win_QextSerialPort::ungetChar           </td>
1770          <td>(</td>
1771          <td class="paramtype">char&nbsp;</td>
1772          <td class="paramname"> <em>c</em>          </td>
1773          <td>&nbsp;)&nbsp;</td>
1774          <td width="100%"><code> [virtual]</code></td>
1775        </tr>
1776      </table>
1777</div>
1778<div class="memdoc">
1779
1780<p>
1781This function is included to implement the full <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html">QIODevice</a> interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect.
1782<p>
1783Implements <a class="el" href="classQextSerialBase.html#d4564cb1b1fdfb317e6a12cb5b351adf">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00343"></a>00343                                          {
1784<a name="l00344"></a>00344
1785<a name="l00345"></a>00345     <span class="comment">/*meaningless on unbuffered sequential device - return error and print a warning*/</span>
1786<a name="l00346"></a>00346     TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless"</span>);
1787<a name="l00347"></a>00347 }
1788</pre></div>
1789<p>
1790
1791</div>
1792</div><p>
1793<a class="anchor" name="be7e2c0f77000edfcf814fccae66fcd9"></a><!-- doxytag: member="Win_QextSerialPort::writeData" ref="be7e2c0f77000edfcf814fccae66fcd9" args="(const char *data, qint64 maxSize)" -->
1794<div class="memitem">
1795<div class="memproto">
1796      <table class="memname">
1797        <tr>
1798          <td class="memname">qint64 Win_QextSerialPort::writeData           </td>
1799          <td>(</td>
1800          <td class="paramtype">const char *&nbsp;</td>
1801          <td class="paramname"> <em>data</em>, </td>
1802        </tr>
1803        <tr>
1804          <td class="paramkey"></td>
1805          <td></td>
1806          <td class="paramtype">qint64&nbsp;</td>
1807          <td class="paramname"> <em>maxSize</em></td><td>&nbsp;</td>
1808        </tr>
1809        <tr>
1810          <td></td>
1811          <td>)</td>
1812          <td></td><td></td><td width="100%"><code> [protected, virtual]</code></td>
1813        </tr>
1814      </table>
1815</div>
1816<div class="memdoc">
1817
1818<p>
1819Writes a block of data to the serial port. This function will write len bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.<p>
1820<dl compact><dt><b>Warning:</b></dt><dd>before calling this function ensure that serial port associated with this class is currently open (use <a class="elRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#isOpen">isOpen()</a> function to check if port is open). </dd></dl>
1821
1822<p>
1823Implements <a class="el" href="classQextSerialBase.html#39a3aaff93640b767fd44dd7ce705e01">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00320"></a>00320 {
1824<a name="l00321"></a>00321     LOCK_MUTEX();
1825<a name="l00322"></a>00322     <span class="keywordtype">int</span> retVal=0;
1826<a name="l00323"></a>00323     DWORD Win_BytesWritten;
1827<a name="l00324"></a>00324     <span class="keywordflow">if</span> (!WriteFile(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, (<span class="keywordtype">void</span>*)data, (DWORD)maxSize, &amp;Win_BytesWritten, NULL)) {
1828<a name="l00325"></a>00325         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_WRITE_FAILED;
1829<a name="l00326"></a>00326         retVal=-1;
1830<a name="l00327"></a>00327     }
1831<a name="l00328"></a>00328     <span class="keywordflow">else</span> {
1832<a name="l00329"></a>00329         retVal=((int)Win_BytesWritten);
1833<a name="l00330"></a>00330     }
1834<a name="l00331"></a>00331     UNLOCK_MUTEX();
1835<a name="l00332"></a>00332
1836<a name="l00333"></a>00333     <a class="code" href="classWin__QextSerialPort.html#c72e737e24bda9c14a9388eac8ef2622">flush</a>();
1837<a name="l00334"></a>00334     <span class="keywordflow">return</span> retVal;
1838<a name="l00335"></a>00335 }
1839</pre></div>
1840<p>
1841
1842</div>
1843</div><p>
1844<hr><h2>Member Data Documentation</h2>
1845<a class="anchor" name="31816951ba89902fa1dfdb6f18b80f41"></a><!-- doxytag: member="Win_QextSerialPort::lastErr" ref="31816951ba89902fa1dfdb6f18b80f41" args="" -->
1846<div class="memitem">
1847<div class="memproto">
1848      <table class="memname">
1849        <tr>
1850          <td class="memname">ulong <a class="el" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">QextSerialBase::lastErr</a><code> [protected, inherited]</code>          </td>
1851        </tr>
1852      </table>
1853</div>
1854<div class="memdoc">
1855
1856<p>
1857
1858</div>
1859</div><p>
1860<a class="anchor" name="f3d14f4614db4415c5f89746633cf197"></a><!-- doxytag: member="Win_QextSerialPort::mutex" ref="f3d14f4614db4415c5f89746633cf197" args="" -->
1861<div class="memitem">
1862<div class="memproto">
1863      <table class="memname">
1864        <tr>
1865          <td class="memname">QMutex * <a class="el" href="classQextSerialBase.html#f3d14f4614db4415c5f89746633cf197">QextSerialBase::mutex</a> = NULL<code> [static, protected, inherited]</code>          </td>
1866        </tr>
1867      </table>
1868</div>
1869<div class="memdoc">
1870
1871<p>
1872
1873</div>
1874</div><p>
1875<a class="anchor" name="7459f3818391091877c88595a48a950a"></a><!-- doxytag: member="Win_QextSerialPort::port" ref="7459f3818391091877c88595a48a950a" args="" -->
1876<div class="memitem">
1877<div class="memproto">
1878      <table class="memname">
1879        <tr>
1880          <td class="memname">QString <a class="el" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">QextSerialBase::port</a><code> [protected, inherited]</code>          </td>
1881        </tr>
1882      </table>
1883</div>
1884<div class="memdoc">
1885
1886<p>
1887
1888</div>
1889</div><p>
1890<a class="anchor" name="e5df0cdbbf84781c17f02b8dbc99c93a"></a><!-- doxytag: member="Win_QextSerialPort::refCount" ref="e5df0cdbbf84781c17f02b8dbc99c93a" args="" -->
1891<div class="memitem">
1892<div class="memproto">
1893      <table class="memname">
1894        <tr>
1895          <td class="memname">unsigned long <a class="el" href="classQextSerialBase.html#e5df0cdbbf84781c17f02b8dbc99c93a">QextSerialBase::refCount</a> = 0<code> [static, protected, inherited]</code>          </td>
1896        </tr>
1897      </table>
1898</div>
1899<div class="memdoc">
1900
1901<p>
1902
1903</div>
1904</div><p>
1905<a class="anchor" name="2d796e3080f78ff63e821f528439db57"></a><!-- doxytag: member="Win_QextSerialPort::Settings" ref="2d796e3080f78ff63e821f528439db57" args="" -->
1906<div class="memitem">
1907<div class="memproto">
1908      <table class="memname">
1909        <tr>
1910          <td class="memname"><a class="el" href="structPortSettings.html">PortSettings</a> <a class="el" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">QextSerialBase::Settings</a><code> [protected, inherited]</code>          </td>
1911        </tr>
1912      </table>
1913</div>
1914<div class="memdoc">
1915
1916<p>
1917
1918</div>
1919</div><p>
1920<a class="anchor" name="a51a3047aa92b01531219215bb415dbb"></a><!-- doxytag: member="Win_QextSerialPort::Win_CommConfig" ref="a51a3047aa92b01531219215bb415dbb" args="" -->
1921<div class="memitem">
1922<div class="memproto">
1923      <table class="memname">
1924        <tr>
1925          <td class="memname">COMMCONFIG <a class="el" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_QextSerialPort::Win_CommConfig</a><code> [protected]</code>          </td>
1926        </tr>
1927      </table>
1928</div>
1929<div class="memdoc">
1930
1931<p>
1932
1933</div>
1934</div><p>
1935<a class="anchor" name="a3909dbcf96493e43d79e075e626d68b"></a><!-- doxytag: member="Win_QextSerialPort::Win_CommTimeouts" ref="a3909dbcf96493e43d79e075e626d68b" args="" -->
1936<div class="memitem">
1937<div class="memproto">
1938      <table class="memname">
1939        <tr>
1940          <td class="memname">COMMTIMEOUTS <a class="el" href="classWin__QextSerialPort.html#a3909dbcf96493e43d79e075e626d68b">Win_QextSerialPort::Win_CommTimeouts</a><code> [protected]</code>          </td>
1941        </tr>
1942      </table>
1943</div>
1944<div class="memdoc">
1945
1946<p>
1947
1948</div>
1949</div><p>
1950<a class="anchor" name="f6dae6bb1c6b51e766e551bc11f1721d"></a><!-- doxytag: member="Win_QextSerialPort::Win_Handle" ref="f6dae6bb1c6b51e766e551bc11f1721d" args="" -->
1951<div class="memitem">
1952<div class="memproto">
1953      <table class="memname">
1954        <tr>
1955          <td class="memname">HANDLE <a class="el" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_QextSerialPort::Win_Handle</a><code> [protected]</code>          </td>
1956        </tr>
1957      </table>
1958</div>
1959<div class="memdoc">
1960
1961<p>
1962
1963</div>
1964</div><p>
1965<hr>The documentation for this class was generated from the following files:<ul>
1966<li><a class="el" href="win__qextserialport_8h.html">win_qextserialport.h</a><li><a class="el" href="win__qextserialport_8cpp.html">win_qextserialport.cpp</a></ul>
1967<hr size="1"><address style="align: right;"><small>Generated on Sun Mar 25 04:21:54 2007 for QextSerialPort by&nbsp;
1968<a href="http://www.doxygen.org/index.html">
1969<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
1970</body>
1971</html>
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License