source: projects/punch-card/punch-card-editor/src/libs/qextserialport/html/classQextSerialPort.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: 281.5 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: 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>QextSerialPort Class Reference</h1><!-- doxytag: class="QextSerialPort" --><!-- doxytag: inherits="QextBaseType" --><code>#include &lt;qextserialport.h&gt;</code>
22<p>
23<p>Inheritance diagram for QextSerialPort:
24<p><center><img src="classQextSerialPort.png" usemap="#QextSerialPort_map" border="0" alt=""></center>
25<map name="QextSerialPort_map">
26<area href="classQextBaseType.html" alt="QextBaseType" shape="rect" coords="70,168,201,192">
27<area href="classWin__QextSerialPort.html" alt="Win_QextSerialPort" shape="rect" coords="0,112,131,136">
28<area href="classPosix__QextSerialPort.html" alt="Posix_QextSerialPort" shape="rect" coords="141,112,272,136">
29<area href="classQextSerialBase.html" alt="QextSerialBase" shape="rect" coords="0,56,131,80">
30<area href="classQextSerialBase.html" alt="QextSerialBase" shape="rect" coords="141,56,272,80">
31<area doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html" alt="QIODevice" shape="rect" coords="0,0,131,24">
32<area doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html" alt="QIODevice" shape="rect" coords="141,0,272,24">
33</map>
34<a href="classQextSerialPort-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
35<tr><td></td></tr>
36<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
37<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>
38
39<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>
40
41<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>
42
43<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>
44
45<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>
46
47<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>
48
49<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#6d593fe4f4623e93537a531d2c6157b7">bytesAvailable</a> ()</td></tr>
50
51<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>
52
53<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>
54
55<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>
56
57<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>
58
59<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>
60
61<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>
62
63<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>
64
65<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#3a7ddf86a867770c88777c3e78545cb0">close</a> ()</td></tr>
66
67<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>
68
69<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>
70
71<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>
72
73<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>
74
75<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>
76
77<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>
78
79<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#5f12a1a6c1c6a163fe146272e9a7d275">flush</a> ()</td></tr>
80
81<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>
82
83<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>
84
85<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>
86
87<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>
88
89<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>
90
91<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>
92
93<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>
94
95<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>
96
97<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>
98
99<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>
100
101<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>
102
103<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>
104
105<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>
106
107<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>
108
109<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>
110
111<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ulong&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#b419544e866cab58b8a3ce6341f6a7e9">lineStatus</a> ()</td></tr>
112
113<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>
114
115<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#5585e9e5a60f2d134e2c03e7a8cadeb9">open</a> (OpenMode mode=0)</td></tr>
116
117<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>
118
119<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>
120
121<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>
122
123<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classQextSerialPort.html">QextSerialPort</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#00aa39b59db50b6fe07bc222b4227f84">operator=</a> (const <a class="el" href="classQextSerialPort.html">QextSerialPort</a> &amp;)</td></tr>
124
125<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>
126
127<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>
128
129<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>
130
131<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>
132
133<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>
134
135<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>
136
137<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>
138
139<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>
140
141<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>
142
143<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>
144
145<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#207af0672a6a954e6621933e93b9923e">QextSerialPort</a> (const <a class="el" href="classQextSerialPort.html">QextSerialPort</a> &amp;s)</td></tr>
146
147<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#4b30a03285f32254076bf2ee6e579709">QextSerialPort</a> (const QString &amp;name, <a class="el" href="structPortSettings.html">PortSettings</a> const &amp;s)</td></tr>
148
149<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#3227cce266f97fc6066239a301fdc251">QextSerialPort</a> (<a class="el" href="structPortSettings.html">PortSettings</a> const &amp;s)</td></tr>
150
151<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#d134e1a6ec2d0ebc4c48660d057999e5">QextSerialPort</a> (const QString &amp;name)</td></tr>
152
153<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#6aba59fc97222d64653f94c491747ffd">QextSerialPort</a> ()</td></tr>
154
155<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>
156
157<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>
158
159<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>
160
161<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>
162
163<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>
164
165<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>
166
167<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>
168
169<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>
170
171<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>
172
173<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>
174
175<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>
176
177<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>
178
179<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>
180
181<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>
182
183<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>
184
185<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>
186
187<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>
188
189<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#007fcdd90f1137b010b6c43aa5b6dc6e">setBaudRate</a> (<a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a>)</td></tr>
190
191<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>
192
193<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#8f428dad3c4ec2fa8128397628c7e5d1">setDataBits</a> (<a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a>)</td></tr>
194
195<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>
196
197<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#089c560fd901eabe7190e80a36c7dcb8">setDtr</a> (bool set=true)</td></tr>
198
199<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>
200
201<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>
202
203<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>
204
205<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#8bdd56422fbb95da7216f182a1ef6cfb">setFlowControl</a> (<a class="el" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790">FlowType</a>)</td></tr>
206
207<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>
208
209<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>
210
211<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>
212
213<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#22dedc4f44c33b13f64bff33f844f795">setParity</a> (<a class="el" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace">ParityType</a>)</td></tr>
214
215<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>
216
217<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>
218
219<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#a099a4b3f406cf017e1dfe55da3a2c6a">setRts</a> (bool set=true)</td></tr>
220
221<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>
222
223<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#34b54ac1bef6090010bf00a45dc173fe">setStopBits</a> (<a class="el" href="qextserialbase_8h.html#dc8078895cd941d755d46633b54d3e7f">StopBitsType</a>)</td></tr>
224
225<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>
226
227<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>
228
229<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>
230
231<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#aa242514dface394bc00906e043b0243">setTimeout</a> (ulong, ulong)</td></tr>
232
233<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>
234
235<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>
236
237<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#6d5f7c00853102e7073120ddb4701f82">size</a> () const </td></tr>
238
239<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>
240
241<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>
242
243<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>
244
245<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#a099923f1360a08c6b7072254fd056e6">translateError</a> (ulong error)</td></tr>
246
247<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>
248
249<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#3a425e78db628945a666c52aa8638d0f">ungetChar</a> (char c)</td></tr>
250
251<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>
252
253<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>
254
255<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>
256
257<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>
258
259<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>
260
261<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>
262
263<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>
264
265<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>
266
267<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>
268
269<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQextSerialPort.html#0712978a092762f69f308df7372e3f7a">~QextSerialPort</a> ()</td></tr>
270
271<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
272<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#73b99fe7198e7e94b13c13416a6b9fae">readData</a> (char *data, qint64 maxSize)</td></tr>
273
274<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>
275
276<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual qint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#e8aabe89e479259b0b991dbd6b424f78">writeData</a> (const char *data, qint64 maxSize)</td></tr>
277
278<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>
279
280<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
281<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>
282
283<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>
284
285<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>
286
287<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>
288
289<tr><td class="memItemLeft" nowrap align="right" valign="top">termios&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a></td></tr>
290
291<tr><td class="memItemLeft" nowrap align="right" valign="top">timeval&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#e5813ea1fd76c8c5a8948c4085d3e84e">Posix_Copy_Timeout</a></td></tr>
292
293<tr><td class="memItemLeft" nowrap align="right" valign="top">QFile *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a></td></tr>
294
295<tr><td class="memItemLeft" nowrap align="right" valign="top">timeval&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPosix__QextSerialPort.html#0a876397917fbf082b56ae43ab2b4b7b">Posix_Timeout</a></td></tr>
296
297<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>
298
299<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>
300
301<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>
302
303<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>
304
305<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>
306
307<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
308<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>
309
310<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>
311
312<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>
313
314<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>
315
316</table>
317<hr><a name="_details"></a><h2>Detailed Description</h2>
318<dl compact><dt><b>Version:</b></dt><dd>1.0.0 </dd></dl>
319<dl compact><dt><b>Author:</b></dt><dd>Stefan Sander</dd></dl>
320A cross-platform serial port class. This class encapsulates a serial port on both POSIX and Windows systems. 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.<p>
321<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>
322
323<p>
324<hr><h2>Constructor &amp; Destructor Documentation</h2>
325<a class="anchor" name="6aba59fc97222d64653f94c491747ffd"></a><!-- doxytag: member="QextSerialPort::QextSerialPort" ref="6aba59fc97222d64653f94c491747ffd" args="()" -->
326<div class="memitem">
327<div class="memproto">
328      <table class="memname">
329        <tr>
330          <td class="memname">QextSerialPort::QextSerialPort           </td>
331          <td>(</td>
332          <td class="paramname">          </td>
333          <td>&nbsp;)&nbsp;</td>
334          <td width="100%"></td>
335        </tr>
336      </table>
337</div>
338<div class="memdoc">
339
340<p>
341Default constructor. Note that the naming convention used by a <a class="el" href="classQextSerialPort.html">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>
342<div class="fragment"><pre class="fragment">Constant         Used By         Naming Convention
343----------       -------------   ------------------------
344_TTY_WIN_        Windows         COM1, COM2
345_TTY_IRIX_       SGI/IRIX        /dev/ttyf1, /dev/ttyf2
346_TTY_HPUX_       HP-UX           /dev/tty1p0, /dev/tty2p0
347_TTY_SUN_        SunOS/Solaris   /dev/ttya, /dev/ttyb
348_TTY_DIGITAL_    Digital UNIX    /dev/tty01, /dev/tty02
349_TTY_FREEBSD_    FreeBSD         /dev/ttyd0, /dev/ttyd1
350_TTY_LINUX_      Linux           /dev/ttyS0, /dev/ttyS1
351&lt;none&gt;           Linux           /dev/ttyS0, /dev/ttyS1
352</pre></div><p>
353The object will be associated with the first port in the system, e.g. COM1 on Windows systems. See the other constructors if you need to use a port other than the first. <div class="fragment"><pre class="fragment"><a name="l00047"></a>00047  : <a class="code" href="classQextBaseType.html">QextBaseType</a>()
354<a name="l00048"></a>00048 {}
355</pre></div>
356<p>
357
358</div>
359</div><p>
360<a class="anchor" name="d134e1a6ec2d0ebc4c48660d057999e5"></a><!-- doxytag: member="QextSerialPort::QextSerialPort" ref="d134e1a6ec2d0ebc4c48660d057999e5" args="(const QString &amp;name)" -->
361<div class="memitem">
362<div class="memproto">
363      <table class="memname">
364        <tr>
365          <td class="memname">QextSerialPort::QextSerialPort           </td>
366          <td>(</td>
367          <td class="paramtype">const QString &amp;&nbsp;</td>
368          <td class="paramname"> <em>name</em>          </td>
369          <td>&nbsp;)&nbsp;</td>
370          <td width="100%"></td>
371        </tr>
372      </table>
373</div>
374<div class="memdoc">
375
376<p>
377Constructs a serial port attached to the port specified by name. name is the name of the device, which is windowsystem-specific, e.g."COM1" or "/dev/ttyS0". <div class="fragment"><pre class="fragment"><a name="l00057"></a>00057  : <a class="code" href="classQextBaseType.html">QextBaseType</a>(name)
378<a name="l00058"></a>00058 {}
379</pre></div>
380<p>
381
382</div>
383</div><p>
384<a class="anchor" name="3227cce266f97fc6066239a301fdc251"></a><!-- doxytag: member="QextSerialPort::QextSerialPort" ref="3227cce266f97fc6066239a301fdc251" args="(PortSettings const &amp;s)" -->
385<div class="memitem">
386<div class="memproto">
387      <table class="memname">
388        <tr>
389          <td class="memname">QextSerialPort::QextSerialPort           </td>
390          <td>(</td>
391          <td class="paramtype"><a class="el" href="structPortSettings.html">PortSettings</a> const &amp;&nbsp;</td>
392          <td class="paramname"> <em>settings</em>          </td>
393          <td>&nbsp;)&nbsp;</td>
394          <td width="100%"></td>
395        </tr>
396      </table>
397</div>
398<div class="memdoc">
399
400<p>
401Constructs a port with default name and settings specified by the settings parameter. <div class="fragment"><pre class="fragment"><a name="l00065"></a>00065  : <a class="code" href="classQextBaseType.html">QextBaseType</a>(settings)
402<a name="l00066"></a>00066 {}
403</pre></div>
404<p>
405
406</div>
407</div><p>
408<a class="anchor" name="4b30a03285f32254076bf2ee6e579709"></a><!-- doxytag: member="QextSerialPort::QextSerialPort" ref="4b30a03285f32254076bf2ee6e579709" args="(const QString &amp;name, PortSettings const &amp;s)" -->
409<div class="memitem">
410<div class="memproto">
411      <table class="memname">
412        <tr>
413          <td class="memname">QextSerialPort::QextSerialPort           </td>
414          <td>(</td>
415          <td class="paramtype">const QString &amp;&nbsp;</td>
416          <td class="paramname"> <em>name</em>, </td>
417        </tr>
418        <tr>
419          <td class="paramkey"></td>
420          <td></td>
421          <td class="paramtype"><a class="el" href="structPortSettings.html">PortSettings</a> const &amp;&nbsp;</td>
422          <td class="paramname"> <em>settings</em></td><td>&nbsp;</td>
423        </tr>
424        <tr>
425          <td></td>
426          <td>)</td>
427          <td></td><td></td><td width="100%"></td>
428        </tr>
429      </table>
430</div>
431<div class="memdoc">
432
433<p>
434Constructs a port with the name and settings specified. <div class="fragment"><pre class="fragment"><a name="l00073"></a>00073  : <a class="code" href="classQextBaseType.html">QextBaseType</a>(name, settings)
435<a name="l00074"></a>00074 {}
436</pre></div>
437<p>
438
439</div>
440</div><p>
441<a class="anchor" name="207af0672a6a954e6621933e93b9923e"></a><!-- doxytag: member="QextSerialPort::QextSerialPort" ref="207af0672a6a954e6621933e93b9923e" args="(const QextSerialPort &amp;s)" -->
442<div class="memitem">
443<div class="memproto">
444      <table class="memname">
445        <tr>
446          <td class="memname">QextSerialPort::QextSerialPort           </td>
447          <td>(</td>
448          <td class="paramtype">const <a class="el" href="classQextSerialPort.html">QextSerialPort</a> &amp;&nbsp;</td>
449          <td class="paramname"> <em>s</em>          </td>
450          <td>&nbsp;)&nbsp;</td>
451          <td width="100%"></td>
452        </tr>
453      </table>
454</div>
455<div class="memdoc">
456
457<p>
458Copy constructor. <div class="fragment"><pre class="fragment"><a name="l00081"></a>00081  : <a class="code" href="classQextBaseType.html">QextBaseType</a>(s)
459<a name="l00082"></a>00082 {}
460</pre></div>
461<p>
462
463</div>
464</div><p>
465<a class="anchor" name="0712978a092762f69f308df7372e3f7a"></a><!-- doxytag: member="QextSerialPort::~QextSerialPort" ref="0712978a092762f69f308df7372e3f7a" args="()" -->
466<div class="memitem">
467<div class="memproto">
468      <table class="memname">
469        <tr>
470          <td class="memname">QextSerialPort::~QextSerialPort           </td>
471          <td>(</td>
472          <td class="paramname">          </td>
473          <td>&nbsp;)&nbsp;</td>
474          <td width="100%"><code> [virtual]</code></td>
475        </tr>
476      </table>
477</div>
478<div class="memdoc">
479
480<p>
481Standard destructor. <div class="fragment"><pre class="fragment"><a name="l00098"></a>00098 {}
482</pre></div>
483<p>
484
485</div>
486</div><p>
487<hr><h2>Member Function Documentation</h2>
488<a class="anchor" name="573bd8fdf0ea5e4fb6caddc13a0ed5eb"></a><!-- doxytag: member="QextSerialPort::atEnd" ref="573bd8fdf0ea5e4fb6caddc13a0ed5eb" args="() const " -->
489<div class="memitem">
490<div class="memproto">
491      <table class="memname">
492        <tr>
493          <td class="memname">bool QextSerialBase::atEnd           </td>
494          <td>(</td>
495          <td class="paramname">          </td>
496          <td>&nbsp;)&nbsp;</td>
497          <td width="100%"> const<code> [virtual, inherited]</code></td>
498        </tr>
499      </table>
500</div>
501<div class="memdoc">
502
503<p>
504This 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 {
505<a name="l00188"></a>00188     <span class="keywordflow">if</span> (<a class="code" href="classQextSerialBase.html#86fc9d6239b7d136a9d80b93a727e093">size</a>()) {
506<a name="l00189"></a>00189         <span class="keywordflow">return</span> <span class="keyword">true</span>;
507<a name="l00190"></a>00190     }
508<a name="l00191"></a>00191     <span class="keywordflow">return</span> <span class="keyword">false</span>;
509<a name="l00192"></a>00192 }
510</pre></div>
511<p>
512
513</div>
514</div><p>
515<a class="anchor" name="6d6eeab48cad2fa2adbebb23920c661a"></a><!-- doxytag: member="QextSerialPort::baudRate" ref="6d6eeab48cad2fa2adbebb23920c661a" args="() const " -->
516<div class="memitem">
517<div class="memproto">
518      <table class="memname">
519        <tr>
520          <td class="memname"><a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a> QextSerialBase::baudRate           </td>
521          <td>(</td>
522          <td class="paramtype">void&nbsp;</td>
523          <td class="paramname">          </td>
524          <td>&nbsp;)&nbsp;</td>
525          <td width="100%"> const<code> [virtual, inherited]</code></td>
526        </tr>
527      </table>
528</div>
529<div class="memdoc">
530
531<p>
532Returns 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 {
533<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>;
534<a name="l00128"></a>00128 }
535</pre></div>
536<p>
537
538</div>
539</div><p>
540<a class="anchor" name="6d593fe4f4623e93537a531d2c6157b7"></a><!-- doxytag: member="QextSerialPort::bytesAvailable" ref="6d593fe4f4623e93537a531d2c6157b7" args="()" -->
541<div class="memitem">
542<div class="memproto">
543      <table class="memname">
544        <tr>
545          <td class="memname">qint64 Posix_QextSerialPort::bytesAvailable           </td>
546          <td>(</td>
547          <td class="paramname">          </td>
548          <td>&nbsp;)&nbsp;</td>
549          <td width="100%"><code> [virtual, inherited]</code></td>
550        </tr>
551      </table>
552</div>
553<div class="memdoc">
554
555<p>
556Returns 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 Posix_QextSerialPort::getLastError().
557<p>
558Implements <a class="el" href="classQextSerialBase.html#7e130a0ba5a0a9ba95ce5f75a5e2c526">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00909"></a>00909 {
559<a name="l00910"></a>00910     LOCK_MUTEX();
560<a name="l00911"></a>00911     <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>()) {
561<a name="l00912"></a>00912         <span class="keywordtype">int</span> bytesQueued;
562<a name="l00913"></a>00913         fd_set fileSet;
563<a name="l00914"></a>00914         FD_ZERO(&amp;fileSet);
564<a name="l00915"></a>00915         FD_SET(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), &amp;fileSet);
565<a name="l00916"></a>00916
566<a name="l00917"></a>00917         <span class="comment">/*on Linux systems the Posix_Timeout structure will be altered by the select() call.</span>
567<a name="l00918"></a>00918 <span class="comment">          Make sure we use the right timeout values*/</span>
568<a name="l00919"></a>00919         <span class="comment">//memcpy(&amp;Posix_Timeout, &amp;Posix_Copy_Timeout, sizeof(struct timeval));</span>
569<a name="l00920"></a>00920         <a class="code" href="classPosix__QextSerialPort.html#0a876397917fbf082b56ae43ab2b4b7b">Posix_Timeout</a> = <a class="code" href="classPosix__QextSerialPort.html#e5813ea1fd76c8c5a8948c4085d3e84e">Posix_Copy_Timeout</a>;
570<a name="l00921"></a>00921         <span class="keywordtype">int</span> n=select(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle()+1, &amp;fileSet, NULL, &amp;fileSet, &amp;Posix_Timeout);
571<a name="l00922"></a>00922         <span class="keywordflow">if</span> (!n) {
572<a name="l00923"></a>00923             <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_PORT_TIMEOUT;
573<a name="l00924"></a>00924             UNLOCK_MUTEX();
574<a name="l00925"></a>00925             <span class="keywordflow">return</span> -1;
575<a name="l00926"></a>00926         }
576<a name="l00927"></a>00927         <span class="keywordflow">if</span> (n==-1 || ioctl(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), FIONREAD, &amp;bytesQueued)==-1) {
577<a name="l00928"></a>00928             <a class="code" href="classPosix__QextSerialPort.html#a099923f1360a08c6b7072254fd056e6">translateError</a>(errno);
578<a name="l00929"></a>00929             UNLOCK_MUTEX();
579<a name="l00930"></a>00930             <span class="keywordflow">return</span> -1;
580<a name="l00931"></a>00931         }
581<a name="l00932"></a>00932         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_NO_ERROR;
582<a name="l00933"></a>00933         UNLOCK_MUTEX();
583<a name="l00934"></a>00934         <span class="keywordflow">return</span> bytesQueued + <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#bytesAvailable">QIODevice::bytesAvailable</a>();
584<a name="l00935"></a>00935     }
585<a name="l00936"></a>00936     UNLOCK_MUTEX();
586<a name="l00937"></a>00937     <span class="keywordflow">return</span> 0;
587<a name="l00938"></a>00938 }
588</pre></div>
589<p>
590
591</div>
592</div><p>
593<a class="anchor" name="8c76fa901fd01f97f57addad088c3e2c"></a><!-- doxytag: member="QextSerialPort::bytesAvailable" ref="8c76fa901fd01f97f57addad088c3e2c" args="()" -->
594<div class="memitem">
595<div class="memproto">
596      <table class="memname">
597        <tr>
598          <td class="memname">qint64 Win_QextSerialPort::bytesAvailable           </td>
599          <td>(</td>
600          <td class="paramname">          </td>
601          <td>&nbsp;)&nbsp;</td>
602          <td width="100%"><code> [virtual, inherited]</code></td>
603        </tr>
604      </table>
605</div>
606<div class="memdoc">
607
608<p>
609Returns 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().
610<p>
611Implements <a class="el" href="classQextSerialBase.html#7e130a0ba5a0a9ba95ce5f75a5e2c526">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00229"></a>00229                                           {
612<a name="l00230"></a>00230     LOCK_MUTEX();
613<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>()) {
614<a name="l00232"></a>00232         DWORD Errors;
615<a name="l00233"></a>00233         COMSTAT Status;
616<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);
617<a name="l00235"></a>00235         <a class="code" href="classWin__QextSerialPort.html#bf215448e265ab0bc8d06cb05e0f7778">translateError</a>(Errors);
618<a name="l00236"></a>00236         <span class="keywordflow">if</span> (success) {
619<a name="l00237"></a>00237             <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_NO_ERROR;
620<a name="l00238"></a>00238             UNLOCK_MUTEX();
621<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>();
622<a name="l00240"></a>00240         }
623<a name="l00241"></a>00241         UNLOCK_MUTEX();
624<a name="l00242"></a>00242         <span class="keywordflow">return</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)-1;
625<a name="l00243"></a>00243     }
626<a name="l00244"></a>00244     UNLOCK_MUTEX();
627<a name="l00245"></a>00245     <span class="keywordflow">return</span> 0;
628<a name="l00246"></a>00246 }
629</pre></div>
630<p>
631
632</div>
633</div><p>
634<a class="anchor" name="3a7ddf86a867770c88777c3e78545cb0"></a><!-- doxytag: member="QextSerialPort::close" ref="3a7ddf86a867770c88777c3e78545cb0" args="()" -->
635<div class="memitem">
636<div class="memproto">
637      <table class="memname">
638        <tr>
639          <td class="memname">void Posix_QextSerialPort::close           </td>
640          <td>(</td>
641          <td class="paramname">          </td>
642          <td>&nbsp;)&nbsp;</td>
643          <td width="100%"><code> [virtual, inherited]</code></td>
644        </tr>
645      </table>
646</div>
647<div class="memdoc">
648
649<p>
650Closes a serial port. This function has no effect if the serial port associated with the class is not currently open.
651<p>
652Implements <a class="el" href="classQextSerialBase.html#2a4aea428bc05a88f86849bb7478c082">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00865"></a>00865 {
653<a name="l00866"></a>00866     LOCK_MUTEX();
654<a name="l00867"></a>00867     <a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;close();
655<a name="l00868"></a>00868     <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#close">QIODevice::close</a>();
656<a name="l00869"></a>00869     UNLOCK_MUTEX();
657<a name="l00870"></a>00870 }
658</pre></div>
659<p>
660
661</div>
662</div><p>
663<a class="anchor" name="fd2a4f6a94c877e5ae2dbf742af61b1d"></a><!-- doxytag: member="QextSerialPort::close" ref="fd2a4f6a94c877e5ae2dbf742af61b1d" args="()" -->
664<div class="memitem">
665<div class="memproto">
666      <table class="memname">
667        <tr>
668          <td class="memname">void Win_QextSerialPort::close           </td>
669          <td>(</td>
670          <td class="paramname">          </td>
671          <td>&nbsp;)&nbsp;</td>
672          <td width="100%"><code> [virtual, inherited]</code></td>
673        </tr>
674      </table>
675</div>
676<div class="memdoc">
677
678<p>
679Closes a serial port. This function has no effect if the serial port associated with the class is not currently open.
680<p>
681Implements <a class="el" href="classQextSerialBase.html#2a4aea428bc05a88f86849bb7478c082">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00187"></a>00187                                {
682<a name="l00188"></a>00188     LOCK_MUTEX();
683<a name="l00189"></a>00189     CloseHandle(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>);
684<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>();
685<a name="l00191"></a>00191     UNLOCK_MUTEX();
686<a name="l00192"></a>00192 }
687</pre></div>
688<p>
689
690</div>
691</div><p>
692<a class="anchor" name="7495b472b5e269d04c0c2e856901207f"></a><!-- doxytag: member="QextSerialPort::construct" ref="7495b472b5e269d04c0c2e856901207f" args="()" -->
693<div class="memitem">
694<div class="memproto">
695      <table class="memname">
696        <tr>
697          <td class="memname">void QextSerialBase::construct           </td>
698          <td>(</td>
699          <td class="paramname">          </td>
700          <td>&nbsp;)&nbsp;</td>
701          <td width="100%"><code> [virtual, inherited]</code></td>
702        </tr>
703      </table>
704</div>
705<div class="memdoc">
706
707<p>
708Common 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 {
709<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>;
710<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>;
711<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>;
712<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>;
713<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>;
714<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;
715<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;
716<a name="l00091"></a>00091
717<a name="l00092"></a>00092 <span class="preprocessor">#ifdef QT_THREAD_SUPPORT</span>
718<a name="l00093"></a>00093 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (!<a class="code" href="classQextSerialBase.html#f3d14f4614db4415c5f89746633cf197">mutex</a>) {
719<a name="l00094"></a>00094         <a class="code" href="classQextSerialBase.html#f3d14f4614db4415c5f89746633cf197">mutex</a>=<span class="keyword">new</span> QMutex( QMutex::Recursive );
720<a name="l00095"></a>00095     }
721<a name="l00096"></a>00096     <a class="code" href="classQextSerialBase.html#e5df0cdbbf84781c17f02b8dbc99c93a">refCount</a>++;
722<a name="l00097"></a>00097 <span class="preprocessor">#endif</span>
723<a name="l00098"></a>00098 <span class="preprocessor"></span>
724<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);
725<a name="l00100"></a>00100 }
726</pre></div>
727<p>
728
729</div>
730</div><p>
731<a class="anchor" name="6836465ea5deaa1280e0e777e9c8651e"></a><!-- doxytag: member="QextSerialPort::dataBits" ref="6836465ea5deaa1280e0e777e9c8651e" args="() const " -->
732<div class="memitem">
733<div class="memproto">
734      <table class="memname">
735        <tr>
736          <td class="memname"><a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a> QextSerialBase::dataBits           </td>
737          <td>(</td>
738          <td class="paramname">          </td>
739          <td>&nbsp;)&nbsp;</td>
740          <td width="100%"> const<code> [virtual, inherited]</code></td>
741        </tr>
742      </table>
743</div>
744<div class="memdoc">
745
746<p>
747Returns 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 {
748<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>;
749<a name="l00138"></a>00138 }
750</pre></div>
751<p>
752
753</div>
754</div><p>
755<a class="anchor" name="ad41090da77578cfae4b24510fe8c9b7"></a><!-- doxytag: member="QextSerialPort::flowControl" ref="ad41090da77578cfae4b24510fe8c9b7" args="() const " -->
756<div class="memitem">
757<div class="memproto">
758      <table class="memname">
759        <tr>
760          <td class="memname"><a class="el" href="qextserialbase_8h.html#02ad1c7cf791a069dd54e409f8db4790">FlowType</a> QextSerialBase::flowControl           </td>
761          <td>(</td>
762          <td class="paramname">          </td>
763          <td>&nbsp;)&nbsp;</td>
764          <td width="100%"> const<code> [virtual, inherited]</code></td>
765        </tr>
766      </table>
767</div>
768<div class="memdoc">
769
770<p>
771Returns 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 {
772<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>;
773<a name="l00168"></a>00168 }
774</pre></div>
775<p>
776
777</div>
778</div><p>
779<a class="anchor" name="5f12a1a6c1c6a163fe146272e9a7d275"></a><!-- doxytag: member="QextSerialPort::flush" ref="5f12a1a6c1c6a163fe146272e9a7d275" args="()" -->
780<div class="memitem">
781<div class="memproto">
782      <table class="memname">
783        <tr>
784          <td class="memname">void Posix_QextSerialPort::flush           </td>
785          <td>(</td>
786          <td class="paramname">          </td>
787          <td>&nbsp;)&nbsp;</td>
788          <td width="100%"><code> [virtual, inherited]</code></td>
789        </tr>
790      </table>
791</div>
792<div class="memdoc">
793
794<p>
795Flushes 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.
796<p>
797Implements <a class="el" href="classQextSerialBase.html#58df9d786aa70dfe9f547d4118103f39">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00878"></a>00878 {
798<a name="l00879"></a>00879     LOCK_MUTEX();
799<a name="l00880"></a>00880     <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>()) {
800<a name="l00881"></a>00881         <a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;flush();
801<a name="l00882"></a>00882     }
802<a name="l00883"></a>00883     UNLOCK_MUTEX();
803<a name="l00884"></a>00884 }
804</pre></div>
805<p>
806
807</div>
808</div><p>
809<a class="anchor" name="c72e737e24bda9c14a9388eac8ef2622"></a><!-- doxytag: member="QextSerialPort::flush" ref="c72e737e24bda9c14a9388eac8ef2622" args="()" -->
810<div class="memitem">
811<div class="memproto">
812      <table class="memname">
813        <tr>
814          <td class="memname">void Win_QextSerialPort::flush           </td>
815          <td>(</td>
816          <td class="paramname">          </td>
817          <td>&nbsp;)&nbsp;</td>
818          <td width="100%"><code> [virtual, inherited]</code></td>
819        </tr>
820      </table>
821</div>
822<div class="memdoc">
823
824<p>
825Flushes 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.
826<p>
827Implements <a class="el" href="classQextSerialBase.html#58df9d786aa70dfe9f547d4118103f39">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00199"></a>00199                                {
828<a name="l00200"></a>00200     LOCK_MUTEX();
829<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>()) {
830<a name="l00202"></a>00202         FlushFileBuffers(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>);
831<a name="l00203"></a>00203     }
832<a name="l00204"></a>00204     UNLOCK_MUTEX();
833<a name="l00205"></a>00205 }
834</pre></div>
835<p>
836
837</div>
838</div><p>
839<a class="anchor" name="099fb47548a3566ed32d4d878fa57f4c"></a><!-- doxytag: member="QextSerialPort::isSequential" ref="099fb47548a3566ed32d4d878fa57f4c" args="() const " -->
840<div class="memitem">
841<div class="memproto">
842      <table class="memname">
843        <tr>
844          <td class="memname">bool QextSerialBase::isSequential           </td>
845          <td>(</td>
846          <td class="paramname">          </td>
847          <td>&nbsp;)&nbsp;</td>
848          <td width="100%"> const<code> [virtual, inherited]</code></td>
849        </tr>
850      </table>
851</div>
852<div class="memdoc">
853
854<p>
855Returns 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 {
856<a name="l00178"></a>00178     <span class="keywordflow">return</span> <span class="keyword">true</span>;
857<a name="l00179"></a>00179 }
858</pre></div>
859<p>
860
861</div>
862</div><p>
863<a class="anchor" name="e4029cb49127422b7e76586930366b05"></a><!-- doxytag: member="QextSerialPort::lastError" ref="e4029cb49127422b7e76586930366b05" args="() const " -->
864<div class="memitem">
865<div class="memproto">
866      <table class="memname">
867        <tr>
868          <td class="memname">ulong QextSerialBase::lastError           </td>
869          <td>(</td>
870          <td class="paramname">          </td>
871          <td>&nbsp;)&nbsp;</td>
872          <td width="100%"> const<code> [virtual, inherited]</code></td>
873        </tr>
874      </table>
875</div>
876<div class="memdoc">
877
878<p>
879Returns 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>
880<div class="fragment"><pre class="fragment">Error                           Explanation
881---------------------------     -------------------------------------------------------------
882E_NO_ERROR                      No Error has occured
883E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
884E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
885E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
886E_PORT_TIMEOUT                  Operation timed out (POSIX)
887E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
888E_BREAK_CONDITION               The port detected a break condition
889E_FRAMING_ERROR                 The port detected a framing error
890                                (usually caused by incorrect baud rate settings)
891E_IO_ERROR                      There was an I/O error while communicating with the port
892E_BUFFER_OVERRUN                Character buffer overrun
893E_RECEIVE_OVERFLOW              Receive buffer overflow
894E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
895E_TRANSMIT_OVERFLOW             Transmit buffer overflow
896E_READ_FAILED                   General read operation failure
897E_WRITE_FAILED                  General write operation failure
898</pre></div> <div class="fragment"><pre class="fragment"><a name="l00248"></a>00248 {
899<a name="l00249"></a>00249     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>;
900<a name="l00250"></a>00250 }
901</pre></div>
902<p>
903
904</div>
905</div><p>
906<a class="anchor" name="b419544e866cab58b8a3ce6341f6a7e9"></a><!-- doxytag: member="QextSerialPort::lineStatus" ref="b419544e866cab58b8a3ce6341f6a7e9" args="()" -->
907<div class="memitem">
908<div class="memproto">
909      <table class="memname">
910        <tr>
911          <td class="memname">unsigned long Posix_QextSerialPort::lineStatus           </td>
912          <td>(</td>
913          <td class="paramtype">void&nbsp;</td>
914          <td class="paramname">          </td>
915          <td>&nbsp;)&nbsp;</td>
916          <td width="100%"><code> [virtual, inherited]</code></td>
917        </tr>
918      </table>
919</div>
920<div class="memdoc">
921
922<p>
923returns 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>
924<div class="fragment"><pre class="fragment">Mask        Line
925------      ----
926LS_CTS      CTS
927LS_DSR      DSR
928LS_DCD      DCD
929LS_RI       RI
930LS_RTS      RTS (POSIX only)
931LS_DTR      DTR (POSIX only)
932LS_ST       Secondary TXD (POSIX only)
933LS_SR       Secondary RXD (POSIX only)
934</pre></div><p>
935This function will return 0 if the port associated with the class is not currently open.
936<p>
937Implements <a class="el" href="classQextSerialBase.html#28b87dd41160a61e2953dca38aa332d6">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l01042"></a>01042 {
938<a name="l01043"></a>01043     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> Status=0, Temp=0;
939<a name="l01044"></a>01044     LOCK_MUTEX();
940<a name="l01045"></a>01045     <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>()) {
941<a name="l01046"></a>01046         ioctl(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TIOCMGET, &amp;Temp);
942<a name="l01047"></a>01047         <span class="keywordflow">if</span> (Temp&amp;TIOCM_CTS) {
943<a name="l01048"></a>01048             Status|=LS_CTS;
944<a name="l01049"></a>01049         }
945<a name="l01050"></a>01050         <span class="keywordflow">if</span> (Temp&amp;TIOCM_DSR) {
946<a name="l01051"></a>01051             Status|=LS_DSR;
947<a name="l01052"></a>01052         }
948<a name="l01053"></a>01053         <span class="keywordflow">if</span> (Temp&amp;TIOCM_RI) {
949<a name="l01054"></a>01054             Status|=LS_RI;
950<a name="l01055"></a>01055         }
951<a name="l01056"></a>01056         <span class="keywordflow">if</span> (Temp&amp;TIOCM_CD) {
952<a name="l01057"></a>01057             Status|=LS_DCD;
953<a name="l01058"></a>01058         }
954<a name="l01059"></a>01059         <span class="keywordflow">if</span> (Temp&amp;TIOCM_DTR) {
955<a name="l01060"></a>01060             Status|=LS_DTR;
956<a name="l01061"></a>01061         }
957<a name="l01062"></a>01062         <span class="keywordflow">if</span> (Temp&amp;TIOCM_RTS) {
958<a name="l01063"></a>01063             Status|=LS_RTS;
959<a name="l01064"></a>01064         }
960<a name="l01065"></a>01065         <span class="keywordflow">if</span> (Temp&amp;TIOCM_ST) {
961<a name="l01066"></a>01066             Status|=LS_ST;
962<a name="l01067"></a>01067         }
963<a name="l01068"></a>01068         <span class="keywordflow">if</span> (Temp&amp;TIOCM_SR) {
964<a name="l01069"></a>01069             Status|=LS_SR;
965<a name="l01070"></a>01070         }
966<a name="l01071"></a>01071     }
967<a name="l01072"></a>01072     UNLOCK_MUTEX();
968<a name="l01073"></a>01073     <span class="keywordflow">return</span> Status;
969<a name="l01074"></a>01074 }
970</pre></div>
971<p>
972
973</div>
974</div><p>
975<a class="anchor" name="5aecf6de25391bb59ad4d18f3562eef3"></a><!-- doxytag: member="QextSerialPort::lineStatus" ref="5aecf6de25391bb59ad4d18f3562eef3" args="(void)" -->
976<div class="memitem">
977<div class="memproto">
978      <table class="memname">
979        <tr>
980          <td class="memname">ulong Win_QextSerialPort::lineStatus           </td>
981          <td>(</td>
982          <td class="paramtype">void&nbsp;</td>
983          <td class="paramname">          </td>
984          <td>&nbsp;)&nbsp;</td>
985          <td width="100%"><code> [virtual, inherited]</code></td>
986        </tr>
987      </table>
988</div>
989<div class="memdoc">
990
991<p>
992returns 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>
993<div class="fragment"><pre class="fragment">Mask        Line
994------      ----
995LS_CTS      CTS
996LS_DSR      DSR
997LS_DCD      DCD
998LS_RI       RI
999</pre></div><p>
1000This function will return 0 if the port associated with the class is not currently open.
1001<p>
1002Implements <a class="el" href="classQextSerialBase.html#28b87dd41160a61e2953dca38aa332d6">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00838"></a>00838                                          {
1003<a name="l00839"></a>00839     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> Status=0, Temp=0;
1004<a name="l00840"></a>00840     LOCK_MUTEX();
1005<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>()) {
1006<a name="l00842"></a>00842         GetCommModemStatus(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;Temp);
1007<a name="l00843"></a>00843         <span class="keywordflow">if</span> (Temp&amp;MS_CTS_ON) {
1008<a name="l00844"></a>00844             Status|=LS_CTS;
1009<a name="l00845"></a>00845         }
1010<a name="l00846"></a>00846         <span class="keywordflow">if</span> (Temp&amp;MS_DSR_ON) {
1011<a name="l00847"></a>00847             Status|=LS_DSR;
1012<a name="l00848"></a>00848         }
1013<a name="l00849"></a>00849         <span class="keywordflow">if</span> (Temp&amp;MS_RING_ON) {
1014<a name="l00850"></a>00850             Status|=LS_RI;
1015<a name="l00851"></a>00851         }
1016<a name="l00852"></a>00852         <span class="keywordflow">if</span> (Temp&amp;MS_RLSD_ON) {
1017<a name="l00853"></a>00853             Status|=LS_DCD;
1018<a name="l00854"></a>00854         }
1019<a name="l00855"></a>00855     }
1020<a name="l00856"></a>00856     UNLOCK_MUTEX();
1021<a name="l00857"></a>00857     <span class="keywordflow">return</span> Status;
1022<a name="l00858"></a>00858 }
1023</pre></div>
1024<p>
1025
1026</div>
1027</div><p>
1028<a class="anchor" name="5585e9e5a60f2d134e2c03e7a8cadeb9"></a><!-- doxytag: member="QextSerialPort::open" ref="5585e9e5a60f2d134e2c03e7a8cadeb9" args="(OpenMode mode=0)" -->
1029<div class="memitem">
1030<div class="memproto">
1031      <table class="memname">
1032        <tr>
1033          <td class="memname">bool Posix_QextSerialPort::open           </td>
1034          <td>(</td>
1035          <td class="paramtype">OpenMode&nbsp;</td>
1036          <td class="paramname"> <em>mode</em> = <code>0</code>          </td>
1037          <td>&nbsp;)&nbsp;</td>
1038          <td width="100%"><code> [virtual, inherited]</code></td>
1039        </tr>
1040      </table>
1041</div>
1042<div class="memdoc">
1043
1044<p>
1045Opens the serial port associated to this class. 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.
1046<p>
1047Implements <a class="el" href="classQextSerialBase.html#e7fadc74c97f903f6b499e6155236b3e">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00817"></a>00817 {
1048<a name="l00818"></a>00818     LOCK_MUTEX();
1049<a name="l00819"></a>00819     <span class="keywordflow">if</span> (mode == QIODevice::NotOpen)
1050<a name="l00820"></a>00820         <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>();
1051<a name="l00821"></a>00821     <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>()) {
1052<a name="l00822"></a>00822         <span class="comment">/*open the port*/</span>
1053<a name="l00823"></a>00823         <a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;setFileName(<a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a>);
1054<a name="l00824"></a>00824         qDebug(<span class="stringliteral">"Trying to open File"</span>);
1055<a name="l00825"></a>00825         <span class="keywordflow">if</span> (<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
1056<a name="l00826"></a>00826             qDebug(<span class="stringliteral">"Opened File succesfully"</span>);
1057<a name="l00827"></a>00827             <span class="comment">/*set open mode*/</span>
1058<a name="l00828"></a>00828             <a class="codeRef" doxygen="qiodevice.tag:http://doc.trolltech.com/" href="http://doc.trolltech.com/qiodevice.html#open">QIODevice::open</a>(mode);
1059<a name="l00829"></a>00829
1060<a name="l00830"></a>00830             <span class="comment">/*configure port settings*/</span>
1061<a name="l00831"></a>00831             tcgetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
1062<a name="l00832"></a>00832
1063<a name="l00833"></a>00833             <span class="comment">/*set up other port settings*/</span>
1064<a name="l00834"></a>00834             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=CREAD|CLOCAL;
1065<a name="l00835"></a>00835             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_lflag&amp;=(~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG));
1066<a name="l00836"></a>00836             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_iflag&amp;=(~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY));
1067<a name="l00837"></a>00837             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_oflag&amp;=(~OPOST);
1068<a name="l00838"></a>00838             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cc[VMIN]=0;
1069<a name="l00839"></a>00839             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cc[VINTR] = _POSIX_VDISABLE;
1070<a name="l00840"></a>00840             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cc[VQUIT] = _POSIX_VDISABLE;
1071<a name="l00841"></a>00841             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cc[VSTART] = _POSIX_VDISABLE;
1072<a name="l00842"></a>00842             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cc[VSTOP] = _POSIX_VDISABLE;
1073<a name="l00843"></a>00843             <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cc[VSUSP] = _POSIX_VDISABLE;
1074<a name="l00844"></a>00844             <a class="code" href="classPosix__QextSerialPort.html#007fcdd90f1137b010b6c43aa5b6dc6e">setBaudRate</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>);
1075<a name="l00845"></a>00845             <a class="code" href="classPosix__QextSerialPort.html#8f428dad3c4ec2fa8128397628c7e5d1">setDataBits</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#9ec9d5a304b2ac8d3a100d07bce7c0b6">DataBits</a>);
1076<a name="l00846"></a>00846             <a class="code" href="classPosix__QextSerialPort.html#22dedc4f44c33b13f64bff33f844f795">setParity</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#8d0bfbdcb40e9e3919e3f9829ae72582">Parity</a>);
1077<a name="l00847"></a>00847             <a class="code" href="classPosix__QextSerialPort.html#34b54ac1bef6090010bf00a45dc173fe">setStopBits</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#0752c70eb7e12f02ddf59739a056b04c">StopBits</a>);
1078<a name="l00848"></a>00848             <a class="code" href="classPosix__QextSerialPort.html#8bdd56422fbb95da7216f182a1ef6cfb">setFlowControl</a>(<a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#10720f6217b8d8b90c326ea030c43e30">FlowControl</a>);
1079<a name="l00849"></a>00849             <a class="code" href="classPosix__QextSerialPort.html#aa242514dface394bc00906e043b0243">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>);
1080<a name="l00850"></a>00850             tcsetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TCSAFLUSH, &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
1081<a name="l00851"></a>00851         } <span class="keywordflow">else</span> {
1082<a name="l00852"></a>00852             qDebug(<span class="stringliteral">"Could not open File! Error code : %d"</span>, <a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;error());
1083<a name="l00853"></a>00853         }
1084<a name="l00854"></a>00854     }
1085<a name="l00855"></a>00855     UNLOCK_MUTEX();
1086<a name="l00856"></a>00856     <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>();
1087<a name="l00857"></a>00857 }
1088</pre></div>
1089<p>
1090
1091</div>
1092</div><p>
1093<a class="anchor" name="48e6b76953155180647f0b1a1ace8c2a"></a><!-- doxytag: member="QextSerialPort::open" ref="48e6b76953155180647f0b1a1ace8c2a" args="(OpenMode mode=0)" -->
1094<div class="memitem">
1095<div class="memproto">
1096      <table class="memname">
1097        <tr>
1098          <td class="memname">bool Win_QextSerialPort::open           </td>
1099          <td>(</td>
1100          <td class="paramtype">OpenMode&nbsp;</td>
1101          <td class="paramname"> <em>mode</em> = <code>0</code>          </td>
1102          <td>&nbsp;)&nbsp;</td>
1103          <td width="100%"><code> [virtual, inherited]</code></td>
1104        </tr>
1105      </table>
1106</div>
1107<div class="memdoc">
1108
1109<p>
1110Opens 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.
1111<p>
1112Implements <a class="el" href="classQextSerialBase.html#e7fadc74c97f903f6b499e6155236b3e">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00144"></a>00144                                            {
1113<a name="l00145"></a>00145     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> confSize = <span class="keyword">sizeof</span>(COMMCONFIG);
1114<a name="l00146"></a>00146     <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dwSize = confSize;
1115<a name="l00147"></a>00147
1116<a name="l00148"></a>00148     LOCK_MUTEX();
1117<a name="l00149"></a>00149     <span class="keywordflow">if</span> (mode == QIODevice::NotOpen)
1118<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>();
1119<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>()) {
1120<a name="l00152"></a>00152         <span class="comment">/*open the port*/</span>
1121<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,
1122<a name="l00154"></a>00154                               FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
1123<a name="l00155"></a>00155         <span class="keywordflow">if</span> (<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>!=INVALID_HANDLE_VALUE) {
1124<a name="l00156"></a>00156             <span class="comment">/*set open mode*/</span>
1125<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);
1126<a name="l00158"></a>00158
1127<a name="l00159"></a>00159             <span class="comment">/*configure port settings*/</span>
1128<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);
1129<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));
1130<a name="l00162"></a>00162
1131<a name="l00163"></a>00163             <span class="comment">/*set up parameters*/</span>
1132<a name="l00164"></a>00164             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fBinary=TRUE;
1133<a name="l00165"></a>00165             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fInX=FALSE;
1134<a name="l00166"></a>00166             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fOutX=FALSE;
1135<a name="l00167"></a>00167             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fAbortOnError=FALSE;
1136<a name="l00168"></a>00168             <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.fNull=FALSE;
1137<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>);
1138<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>);
1139<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>);
1140<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>);
1141<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>);
1142<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>);
1143<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));
1144<a name="l00176"></a>00176         }
1145<a name="l00177"></a>00177     }
1146<a name="l00178"></a>00178     UNLOCK_MUTEX();
1147<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>();
1148<a name="l00180"></a>00180 }
1149</pre></div>
1150<p>
1151
1152</div>
1153</div><p>
1154<a class="anchor" name="00aa39b59db50b6fe07bc222b4227f84"></a><!-- doxytag: member="QextSerialPort::operator=" ref="00aa39b59db50b6fe07bc222b4227f84" args="(const QextSerialPort &amp;)" -->
1155<div class="memitem">
1156<div class="memproto">
1157      <table class="memname">
1158        <tr>
1159          <td class="memname"><a class="el" href="classQextSerialPort.html">QextSerialPort</a> &amp; QextSerialPort::operator=           </td>
1160          <td>(</td>
1161          <td class="paramtype">const <a class="el" href="classQextSerialPort.html">QextSerialPort</a> &amp;&nbsp;</td>
1162          <td class="paramname"> <em>s</em>          </td>
1163          <td>&nbsp;)&nbsp;</td>
1164          <td width="100%"></td>
1165        </tr>
1166      </table>
1167</div>
1168<div class="memdoc">
1169
1170<p>
1171Overrides the = operator. <div class="fragment"><pre class="fragment"><a name="l00089"></a>00089 {
1172<a name="l00090"></a>00090     <span class="keywordflow">return</span> (<a class="code" href="classQextSerialPort.html">QextSerialPort</a>&amp;)<a class="code" href="classPosix__QextSerialPort.html#e02031d657490ab37d5badf42482847a">QextBaseType::operator=</a>(s);
1173<a name="l00091"></a>00091 }
1174</pre></div>
1175<p>
1176
1177</div>
1178</div><p>
1179<a class="anchor" name="d1ea7aa9d42563f6473b5c6dc9643e31"></a><!-- doxytag: member="QextSerialPort::parity" ref="d1ea7aa9d42563f6473b5c6dc9643e31" args="() const " -->
1180<div class="memitem">
1181<div class="memproto">
1182      <table class="memname">
1183        <tr>
1184          <td class="memname"><a class="el" href="qextserialbase_8h.html#ee22d32d87c815090354bf9b8e957ace">ParityType</a> QextSerialBase::parity           </td>
1185          <td>(</td>
1186          <td class="paramname">          </td>
1187          <td>&nbsp;)&nbsp;</td>
1188          <td width="100%"> const<code> [virtual, inherited]</code></td>
1189        </tr>
1190      </table>
1191</div>
1192<div class="memdoc">
1193
1194<p>
1195Returns 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 {
1196<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>;
1197<a name="l00148"></a>00148 }
1198</pre></div>
1199<p>
1200
1201</div>
1202</div><p>
1203<a class="anchor" name="b890631914790729980569e38f3f8b6e"></a><!-- doxytag: member="QextSerialPort::portName" ref="b890631914790729980569e38f3f8b6e" args="() const " -->
1204<div class="memitem">
1205<div class="memproto">
1206      <table class="memname">
1207        <tr>
1208          <td class="memname">QString QextSerialBase::portName           </td>
1209          <td>(</td>
1210          <td class="paramname">          </td>
1211          <td>&nbsp;)&nbsp;</td>
1212          <td width="100%"> const<code> [virtual, inherited]</code></td>
1213        </tr>
1214      </table>
1215</div>
1216<div class="memdoc">
1217
1218<p>
1219Returns the name set by <a class="el" href="classQextSerialBase.html#1c9f83f00f0ea53ee06b757e197cdf64">setPortName()</a>. <div class="fragment"><pre class="fragment"><a name="l00116"></a>00116 {
1220<a name="l00117"></a>00117     <span class="keywordflow">return</span> <a class="code" href="classQextSerialBase.html#7459f3818391091877c88595a48a950a">port</a>;
1221<a name="l00118"></a>00118 }
1222</pre></div>
1223<p>
1224
1225</div>
1226</div><p>
1227<a class="anchor" name="73b99fe7198e7e94b13c13416a6b9fae"></a><!-- doxytag: member="QextSerialPort::readData" ref="73b99fe7198e7e94b13c13416a6b9fae" args="(char *data, qint64 maxSize)" -->
1228<div class="memitem">
1229<div class="memproto">
1230      <table class="memname">
1231        <tr>
1232          <td class="memname">qint64 Posix_QextSerialPort::readData           </td>
1233          <td>(</td>
1234          <td class="paramtype">char *&nbsp;</td>
1235          <td class="paramname"> <em>data</em>, </td>
1236        </tr>
1237        <tr>
1238          <td class="paramkey"></td>
1239          <td></td>
1240          <td class="paramtype">qint64&nbsp;</td>
1241          <td class="paramname"> <em>maxSize</em></td><td>&nbsp;</td>
1242        </tr>
1243        <tr>
1244          <td></td>
1245          <td>)</td>
1246          <td></td><td></td><td width="100%"><code> [protected, virtual, inherited]</code></td>
1247        </tr>
1248      </table>
1249</div>
1250<div class="memdoc">
1251
1252<p>
1253Reads a block of data from the serial port. This function will read at most maxSize 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>
1254<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>
1255
1256<p>
1257Implements <a class="el" href="classQextSerialBase.html#d36903893a43ad4468e25243117dea73">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l01086"></a>01086 {
1258<a name="l01087"></a>01087     LOCK_MUTEX();
1259<a name="l01088"></a>01088     <span class="keywordtype">int</span> retVal=0;
1260<a name="l01089"></a>01089     retVal=<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;read(data, maxSize);
1261<a name="l01090"></a>01090     <span class="keywordflow">if</span> (retVal==-1)
1262<a name="l01091"></a>01091         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_READ_FAILED;
1263<a name="l01092"></a>01092     UNLOCK_MUTEX();
1264<a name="l01093"></a>01093
1265<a name="l01094"></a>01094     <span class="keywordflow">return</span> retVal;
1266<a name="l01095"></a>01095 }
1267</pre></div>
1268<p>
1269
1270</div>
1271</div><p>
1272<a class="anchor" name="39d6d73caac12dc1ca58d88b6e08dcb9"></a><!-- doxytag: member="QextSerialPort::readData" ref="39d6d73caac12dc1ca58d88b6e08dcb9" args="(char *data, qint64 maxSize)" -->
1273<div class="memitem">
1274<div class="memproto">
1275      <table class="memname">
1276        <tr>
1277          <td class="memname">qint64 Win_QextSerialPort::readData           </td>
1278          <td>(</td>
1279          <td class="paramtype">char *&nbsp;</td>
1280          <td class="paramname"> <em>data</em>, </td>
1281        </tr>
1282        <tr>
1283          <td class="paramkey"></td>
1284          <td></td>
1285          <td class="paramtype">qint64&nbsp;</td>
1286          <td class="paramname"> <em>maxSize</em></td><td>&nbsp;</td>
1287        </tr>
1288        <tr>
1289          <td></td>
1290          <td>)</td>
1291          <td></td><td></td><td width="100%"><code> [protected, virtual, inherited]</code></td>
1292        </tr>
1293      </table>
1294</div>
1295<div class="memdoc">
1296
1297<p>
1298Reads 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>
1299<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>
1300
1301<p>
1302Implements <a class="el" href="classQextSerialBase.html#d36903893a43ad4468e25243117dea73">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00289"></a>00289 {
1303<a name="l00290"></a>00290     LOCK_MUTEX();
1304<a name="l00291"></a>00291     <span class="keywordtype">int</span> retVal=0;
1305<a name="l00292"></a>00292     COMSTAT Win_ComStat;
1306<a name="l00293"></a>00293     DWORD Win_BytesRead=0;
1307<a name="l00294"></a>00294     DWORD Win_ErrorMask=0;
1308<a name="l00295"></a>00295     ClearCommError(<a class="code" href="classWin__QextSerialPort.html#f6dae6bb1c6b51e766e551bc11f1721d">Win_Handle</a>, &amp;Win_ErrorMask, &amp;Win_ComStat);
1309<a name="l00296"></a>00296     <span class="keywordflow">if</span> (Win_ComStat.cbInQue &amp;&amp;
1310<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)
1311<a name="l00298"></a>00298         || Win_BytesRead==0)) {
1312<a name="l00299"></a>00299         <a class="code" href="classQextSerialBase.html#31816951ba89902fa1dfdb6f18b80f41">lastErr</a>=E_READ_FAILED;
1313<a name="l00300"></a>00300         retVal=-1;
1314<a name="l00301"></a>00301     }
1315<a name="l00302"></a>00302     <span class="keywordflow">else</span> {
1316<a name="l00303"></a>00303         retVal=((int)Win_BytesRead);
1317<a name="l00304"></a>00304     }
1318<a name="l00305"></a>00305     UNLOCK_MUTEX();
1319<a name="l00306"></a>00306
1320<a name="l00307"></a>00307     <span class="keywordflow">return</span> retVal;
1321<a name="l00308"></a>00308 }
1322</pre></div>
1323<p>
1324
1325</div>
1326</div><p>
1327<a class="anchor" name="ee681a896845c9594c84dcd47d7eb566"></a><!-- doxytag: member="QextSerialPort::readLine" ref="ee681a896845c9594c84dcd47d7eb566" args="(char *data, qint64 maxSize)" -->
1328<div class="memitem">
1329<div class="memproto">
1330      <table class="memname">
1331        <tr>
1332          <td class="memname">qint64 QextSerialBase::readLine           </td>
1333          <td>(</td>
1334          <td class="paramtype">char *&nbsp;</td>
1335          <td class="paramname"> <em>data</em>, </td>
1336        </tr>
1337        <tr>
1338          <td class="paramkey"></td>
1339          <td></td>
1340          <td class="paramtype">qint64&nbsp;</td>
1341          <td class="paramname"> <em>maxSize</em></td><td>&nbsp;</td>
1342        </tr>
1343        <tr>
1344          <td></td>
1345          <td>)</td>
1346          <td></td><td></td><td width="100%"><code> [virtual, inherited]</code></td>
1347        </tr>
1348      </table>
1349</div>
1350<div class="memdoc">
1351
1352<p>
1353This 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.
1354<p>
1355Reimplemented 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 {
1356<a name="l00202"></a>00202     qint64 numBytes = <a class="code" href="classQextSerialBase.html#7e130a0ba5a0a9ba95ce5f75a5e2c526">bytesAvailable</a>();
1357<a name="l00203"></a>00203     <span class="keywordtype">char</span>* pData = data;
1358<a name="l00204"></a>00204
1359<a name="l00205"></a>00205     <span class="keywordflow">if</span> (maxSize &lt; 2)    <span class="comment">//maxSize must be larger than 1</span>
1360<a name="l00206"></a>00206         <span class="keywordflow">return</span> -1;
1361<a name="l00207"></a>00207
1362<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>
1363<a name="l00209"></a>00209     <span class="keywordflow">while</span> (pData&lt;(data+numBytes) &amp;&amp; --maxSize) {
1364<a name="l00210"></a>00210         <a class="code" href="classQextSerialBase.html#d36903893a43ad4468e25243117dea73">readData</a>(pData, 1);
1365<a name="l00211"></a>00211         <span class="keywordflow">if</span> (*pData++ == <span class="charliteral">'\n'</span>) {
1366<a name="l00212"></a>00212             <span class="keywordflow">break</span>;
1367<a name="l00213"></a>00213         }
1368<a name="l00214"></a>00214     }
1369<a name="l00215"></a>00215     *pData=<span class="charliteral">'\0'</span>;
1370<a name="l00216"></a>00216
1371<a name="l00217"></a>00217     <span class="comment">/*return size of data read*/</span>
1372<a name="l00218"></a>00218     <span class="keywordflow">return</span> (pData-data);
1373<a name="l00219"></a>00219 }
1374</pre></div>
1375<p>
1376
1377</div>
1378</div><p>
1379<a class="anchor" name="007fcdd90f1137b010b6c43aa5b6dc6e"></a><!-- doxytag: member="QextSerialPort::setBaudRate" ref="007fcdd90f1137b010b6c43aa5b6dc6e" args="(BaudRateType)" -->
1380<div class="memitem">
1381<div class="memproto">
1382      <table class="memname">
1383        <tr>
1384          <td class="memname">void Posix_QextSerialPort::setBaudRate           </td>
1385          <td>(</td>
1386          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a>&nbsp;</td>
1387          <td class="paramname"> <em>baudRate</em>          </td>
1388          <td>&nbsp;)&nbsp;</td>
1389          <td width="100%"><code> [virtual, inherited]</code></td>
1390        </tr>
1391      </table>
1392</div>
1393<div class="memdoc">
1394
1395<p>
1396Sets 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.<p>
1397<dl compact><dt><b>Note:</b></dt><dd>BAUD76800 may not be supported on all POSIX systems. SGI/IRIX systems do not support BAUD1800.</dd></dl>
1398<div class="fragment"><pre class="fragment">  RATE          Windows Speed   POSIX Speed
1399  -----------   -------------   -----------
1400   BAUD50                 110          50
1401   BAUD75                 110          75
1402  *BAUD110                110         110
1403   BAUD134                110         134.5
1404   BAUD150                110         150
1405   BAUD200                110         200
1406  *BAUD300                300         300
1407  *BAUD600                600         600
1408  *BAUD1200              1200        1200
1409   BAUD1800              1200        1800
1410  *BAUD2400              2400        2400
1411  *BAUD4800              4800        4800
1412  *BAUD9600              9600        9600
1413   BAUD14400            14400        9600
1414  *BAUD19200            19200       19200
1415  *BAUD38400            38400       38400
1416   BAUD56000            56000       38400
1417  *BAUD57600            57600       57600
1418   BAUD76800            57600       76800
1419  *BAUD115200          115200      115200
1420   BAUD128000          128000      115200
1421   BAUD256000          256000      115200
1422</pre></div> 
1423<p>
1424Implements <a class="el" href="classQextSerialBase.html#05b59a48366ae452bf8e033f83402543">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00190"></a>00190 {
1425<a name="l00191"></a>00191     LOCK_MUTEX();
1426<a name="l00192"></a>00192     <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>) {
1427<a name="l00193"></a>00193         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1428<a name="l00194"></a>00194             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010d208c844993c394ce55ed88a7da71d31">BAUD14400</a>:
1429<a name="l00195"></a>00195                 <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#6f031169a6a9b150b5af707bb23cf010782c55daa9030c53e266213401c3707a">BAUD9600</a>;
1430<a name="l00196"></a>00196                 <span class="keywordflow">break</span>;
1431<a name="l00197"></a>00197
1432<a name="l00198"></a>00198             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0106b00b8cf6939c8b517deada3110de1ce">BAUD56000</a>:
1433<a name="l00199"></a>00199                 <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#6f031169a6a9b150b5af707bb23cf01056bb974293e65da8c97422abd0c514b7">BAUD38400</a>;
1434<a name="l00200"></a>00200                 <span class="keywordflow">break</span>;
1435<a name="l00201"></a>00201
1436<a name="l00202"></a>00202             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0109a7f6b7993e77c3603399cb0a58987be">BAUD76800</a>:
1437<a name="l00203"></a>00203
1438<a name="l00204"></a>00204 <span class="preprocessor">#ifndef B76800</span>
1439<a name="l00205"></a>00205 <span class="preprocessor"></span>                <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>;
1440<a name="l00206"></a>00206 <span class="preprocessor">#else</span>
1441<a name="l00207"></a>00207 <span class="preprocessor"></span>                <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=baudRate;
1442<a name="l00208"></a>00208 <span class="preprocessor">#endif</span>
1443<a name="l00209"></a>00209 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1444<a name="l00210"></a>00210
1445<a name="l00211"></a>00211             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01035d815a00139f06782b178b82f355f04">BAUD128000</a>:
1446<a name="l00212"></a>00212             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102149280b354c383e6af48949ce3b807f">BAUD256000</a>:
1447<a name="l00213"></a>00213                 <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>;
1448<a name="l00214"></a>00214                 <span class="keywordflow">break</span>;
1449<a name="l00215"></a>00215
1450<a name="l00216"></a>00216             <span class="keywordflow">default</span>:
1451<a name="l00217"></a>00217                 <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=baudRate;
1452<a name="l00218"></a>00218                 <span class="keywordflow">break</span>;
1453<a name="l00219"></a>00219         }
1454<a name="l00220"></a>00220     }
1455<a name="l00221"></a>00221     <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>()) {
1456<a name="l00222"></a>00222         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1457<a name="l00223"></a>00223
1458<a name="l00224"></a>00224             <span class="comment">/*50 baud*/</span>
1459<a name="l00225"></a>00225             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100721b0e666074772b33c2ff05f03f6e2">BAUD50</a>:
1460<a name="l00226"></a>00226                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows does not support 50 baud operation."</span>);
1461<a name="l00227"></a>00227 <span class="preprocessor">#ifdef CBAUD</span>
1462<a name="l00228"></a>00228 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1463<a name="l00229"></a>00229                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B50;
1464<a name="l00230"></a>00230 <span class="preprocessor">#else</span>
1465<a name="l00231"></a>00231 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B50);
1466<a name="l00232"></a>00232                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B50);
1467<a name="l00233"></a>00233 <span class="preprocessor">#endif</span>
1468<a name="l00234"></a>00234 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1469<a name="l00235"></a>00235
1470<a name="l00236"></a>00236             <span class="comment">/*75 baud*/</span>
1471<a name="l00237"></a>00237             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101cd023b44dceb4b59798e5203534b65b">BAUD75</a>:
1472<a name="l00238"></a>00238                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows does not support 75 baud operation."</span>);
1473<a name="l00239"></a>00239 <span class="preprocessor">#ifdef CBAUD</span>
1474<a name="l00240"></a>00240 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1475<a name="l00241"></a>00241                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B75;
1476<a name="l00242"></a>00242 <span class="preprocessor">#else</span>
1477<a name="l00243"></a>00243 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B75);
1478<a name="l00244"></a>00244                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B75);
1479<a name="l00245"></a>00245 <span class="preprocessor">#endif</span>
1480<a name="l00246"></a>00246 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1481<a name="l00247"></a>00247
1482<a name="l00248"></a>00248             <span class="comment">/*110 baud*/</span>
1483<a name="l00249"></a>00249             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01010174371591f621ab26540af3ac992a4">BAUD110</a>:
1484<a name="l00250"></a>00250 <span class="preprocessor">#ifdef CBAUD</span>
1485<a name="l00251"></a>00251 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1486<a name="l00252"></a>00252                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B110;
1487<a name="l00253"></a>00253 <span class="preprocessor">#else</span>
1488<a name="l00254"></a>00254 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B110);
1489<a name="l00255"></a>00255                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B110);
1490<a name="l00256"></a>00256 <span class="preprocessor">#endif</span>
1491<a name="l00257"></a>00257 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1492<a name="l00258"></a>00258
1493<a name="l00259"></a>00259             <span class="comment">/*134.5 baud*/</span>
1494<a name="l00260"></a>00260             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010192cb47e215d8642f3e26cd877eb904e">BAUD134</a>:
1495<a name="l00261"></a>00261                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows does not support 134.5 baud operation."</span>);
1496<a name="l00262"></a>00262 <span class="preprocessor">#ifdef CBAUD</span>
1497<a name="l00263"></a>00263 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1498<a name="l00264"></a>00264                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B134;
1499<a name="l00265"></a>00265 <span class="preprocessor">#else</span>
1500<a name="l00266"></a>00266 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B134);
1501<a name="l00267"></a>00267                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B134);
1502<a name="l00268"></a>00268 <span class="preprocessor">#endif</span>
1503<a name="l00269"></a>00269 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1504<a name="l00270"></a>00270
1505<a name="l00271"></a>00271             <span class="comment">/*150 baud*/</span>
1506<a name="l00272"></a>00272             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010e7b4b2d0b7e6e309e57c64364328aff8">BAUD150</a>:
1507<a name="l00273"></a>00273                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows does not support 150 baud operation."</span>);
1508<a name="l00274"></a>00274 <span class="preprocessor">#ifdef CBAUD</span>
1509<a name="l00275"></a>00275 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1510<a name="l00276"></a>00276                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B150;
1511<a name="l00277"></a>00277 <span class="preprocessor">#else</span>
1512<a name="l00278"></a>00278 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B150);
1513<a name="l00279"></a>00279                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B150);
1514<a name="l00280"></a>00280 <span class="preprocessor">#endif</span>
1515<a name="l00281"></a>00281 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1516<a name="l00282"></a>00282
1517<a name="l00283"></a>00283             <span class="comment">/*200 baud*/</span>
1518<a name="l00284"></a>00284             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101eff76dffd9e137cbfd3b0563e17348b">BAUD200</a>:
1519<a name="l00285"></a>00285                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows does not support 200 baud operation."</span>);
1520<a name="l00286"></a>00286 <span class="preprocessor">#ifdef CBAUD</span>
1521<a name="l00287"></a>00287 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1522<a name="l00288"></a>00288                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B200;
1523<a name="l00289"></a>00289 <span class="preprocessor">#else</span>
1524<a name="l00290"></a>00290 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B200);
1525<a name="l00291"></a>00291                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B200);
1526<a name="l00292"></a>00292 <span class="preprocessor">#endif</span>
1527<a name="l00293"></a>00293 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1528<a name="l00294"></a>00294
1529<a name="l00295"></a>00295             <span class="comment">/*300 baud*/</span>
1530<a name="l00296"></a>00296             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01041f8610ff3d721295c8692d6331bbc86">BAUD300</a>:
1531<a name="l00297"></a>00297 <span class="preprocessor">#ifdef CBAUD</span>
1532<a name="l00298"></a>00298 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1533<a name="l00299"></a>00299                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B300;
1534<a name="l00300"></a>00300 <span class="preprocessor">#else</span>
1535<a name="l00301"></a>00301 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B300);
1536<a name="l00302"></a>00302                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B300);
1537<a name="l00303"></a>00303 <span class="preprocessor">#endif</span>
1538<a name="l00304"></a>00304 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1539<a name="l00305"></a>00305
1540<a name="l00306"></a>00306             <span class="comment">/*600 baud*/</span>
1541<a name="l00307"></a>00307             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102a05e5b7c7d350afe149a629af7f07a4">BAUD600</a>:
1542<a name="l00308"></a>00308 <span class="preprocessor">#ifdef CBAUD</span>
1543<a name="l00309"></a>00309 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1544<a name="l00310"></a>00310                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B600;
1545<a name="l00311"></a>00311 <span class="preprocessor">#else</span>
1546<a name="l00312"></a>00312 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B600);
1547<a name="l00313"></a>00313                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B600);
1548<a name="l00314"></a>00314 <span class="preprocessor">#endif</span>
1549<a name="l00315"></a>00315 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1550<a name="l00316"></a>00316
1551<a name="l00317"></a>00317             <span class="comment">/*1200 baud*/</span>
1552<a name="l00318"></a>00318             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01086057a69b2752b06b4302ae83c36e7a2">BAUD1200</a>:
1553<a name="l00319"></a>00319 <span class="preprocessor">#ifdef CBAUD</span>
1554<a name="l00320"></a>00320 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1555<a name="l00321"></a>00321                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B1200;
1556<a name="l00322"></a>00322 <span class="preprocessor">#else</span>
1557<a name="l00323"></a>00323 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B1200);
1558<a name="l00324"></a>00324                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B1200);
1559<a name="l00325"></a>00325 <span class="preprocessor">#endif</span>
1560<a name="l00326"></a>00326 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1561<a name="l00327"></a>00327
1562<a name="l00328"></a>00328             <span class="comment">/*1800 baud*/</span>
1563<a name="l00329"></a>00329             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101815c0670961c2e5c20cfbd81954d3f1">BAUD1800</a>:
1564<a name="l00330"></a>00330                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows and IRIX do not support 1800 baud operation."</span>);
1565<a name="l00331"></a>00331 <span class="preprocessor">#ifdef CBAUD</span>
1566<a name="l00332"></a>00332 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1567<a name="l00333"></a>00333                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B1800;
1568<a name="l00334"></a>00334 <span class="preprocessor">#else</span>
1569<a name="l00335"></a>00335 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B1800);
1570<a name="l00336"></a>00336                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B1800);
1571<a name="l00337"></a>00337 <span class="preprocessor">#endif</span>
1572<a name="l00338"></a>00338 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1573<a name="l00339"></a>00339
1574<a name="l00340"></a>00340             <span class="comment">/*2400 baud*/</span>
1575<a name="l00341"></a>00341             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e653cf3163c75f11560ad0616049076">BAUD2400</a>:
1576<a name="l00342"></a>00342 <span class="preprocessor">#ifdef CBAUD</span>
1577<a name="l00343"></a>00343 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1578<a name="l00344"></a>00344                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B2400;
1579<a name="l00345"></a>00345 <span class="preprocessor">#else</span>
1580<a name="l00346"></a>00346 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B2400);
1581<a name="l00347"></a>00347                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B2400);
1582<a name="l00348"></a>00348 <span class="preprocessor">#endif</span>
1583<a name="l00349"></a>00349 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1584<a name="l00350"></a>00350
1585<a name="l00351"></a>00351             <span class="comment">/*4800 baud*/</span>
1586<a name="l00352"></a>00352             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101de6d151ff739cebfa6f3aab0d76ec9e">BAUD4800</a>:
1587<a name="l00353"></a>00353 <span class="preprocessor">#ifdef CBAUD</span>
1588<a name="l00354"></a>00354 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1589<a name="l00355"></a>00355                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B4800;
1590<a name="l00356"></a>00356 <span class="preprocessor">#else</span>
1591<a name="l00357"></a>00357 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B4800);
1592<a name="l00358"></a>00358                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B4800);
1593<a name="l00359"></a>00359 <span class="preprocessor">#endif</span>
1594<a name="l00360"></a>00360 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1595<a name="l00361"></a>00361
1596<a name="l00362"></a>00362             <span class="comment">/*9600 baud*/</span>
1597<a name="l00363"></a>00363             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010782c55daa9030c53e266213401c3707a">BAUD9600</a>:
1598<a name="l00364"></a>00364 <span class="preprocessor">#ifdef CBAUD</span>
1599<a name="l00365"></a>00365 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1600<a name="l00366"></a>00366                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B9600;
1601<a name="l00367"></a>00367 <span class="preprocessor">#else</span>
1602<a name="l00368"></a>00368 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B9600);
1603<a name="l00369"></a>00369                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B9600);
1604<a name="l00370"></a>00370 <span class="preprocessor">#endif</span>
1605<a name="l00371"></a>00371 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1606<a name="l00372"></a>00372
1607<a name="l00373"></a>00373             <span class="comment">/*14400 baud*/</span>
1608<a name="l00374"></a>00374             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010d208c844993c394ce55ed88a7da71d31">BAUD14400</a>:
1609<a name="l00375"></a>00375                 TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: POSIX does not support 14400 baud operation.  Switching to 9600 baud."</span>);
1610<a name="l00376"></a>00376 <span class="preprocessor">#ifdef CBAUD</span>
1611<a name="l00377"></a>00377 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1612<a name="l00378"></a>00378                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B9600;
1613<a name="l00379"></a>00379 <span class="preprocessor">#else</span>
1614<a name="l00380"></a>00380 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B9600);
1615<a name="l00381"></a>00381                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B9600);
1616<a name="l00382"></a>00382 <span class="preprocessor">#endif</span>
1617<a name="l00383"></a>00383 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1618<a name="l00384"></a>00384
1619<a name="l00385"></a>00385             <span class="comment">/*19200 baud*/</span>
1620<a name="l00386"></a>00386             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01016d650adf414e7a4fceb3f72661a0420">BAUD19200</a>:
1621<a name="l00387"></a>00387 <span class="preprocessor">#ifdef CBAUD</span>
1622<a name="l00388"></a>00388 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1623<a name="l00389"></a>00389                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B19200;
1624<a name="l00390"></a>00390 <span class="preprocessor">#else</span>
1625<a name="l00391"></a>00391 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B19200);
1626<a name="l00392"></a>00392                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B19200);
1627<a name="l00393"></a>00393 <span class="preprocessor">#endif</span>
1628<a name="l00394"></a>00394 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1629<a name="l00395"></a>00395
1630<a name="l00396"></a>00396             <span class="comment">/*38400 baud*/</span>
1631<a name="l00397"></a>00397             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01056bb974293e65da8c97422abd0c514b7">BAUD38400</a>:
1632<a name="l00398"></a>00398 <span class="preprocessor">#ifdef CBAUD</span>
1633<a name="l00399"></a>00399 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1634<a name="l00400"></a>00400                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B38400;
1635<a name="l00401"></a>00401 <span class="preprocessor">#else</span>
1636<a name="l00402"></a>00402 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B38400);
1637<a name="l00403"></a>00403                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B38400);
1638<a name="l00404"></a>00404 <span class="preprocessor">#endif</span>
1639<a name="l00405"></a>00405 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1640<a name="l00406"></a>00406
1641<a name="l00407"></a>00407             <span class="comment">/*56000 baud*/</span>
1642<a name="l00408"></a>00408             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0106b00b8cf6939c8b517deada3110de1ce">BAUD56000</a>:
1643<a name="l00409"></a>00409                 TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: POSIX does not support 56000 baud operation.  Switching to 38400 baud."</span>);
1644<a name="l00410"></a>00410 <span class="preprocessor">#ifdef CBAUD</span>
1645<a name="l00411"></a>00411 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1646<a name="l00412"></a>00412                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B38400;
1647<a name="l00413"></a>00413 <span class="preprocessor">#else</span>
1648<a name="l00414"></a>00414 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B38400);
1649<a name="l00415"></a>00415                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B38400);
1650<a name="l00416"></a>00416 <span class="preprocessor">#endif</span>
1651<a name="l00417"></a>00417 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1652<a name="l00418"></a>00418
1653<a name="l00419"></a>00419             <span class="comment">/*57600 baud*/</span>
1654<a name="l00420"></a>00420             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e6f70f222bc4d91276a4a934ef66c48">BAUD57600</a>:
1655<a name="l00421"></a>00421 <span class="preprocessor">#ifdef CBAUD</span>
1656<a name="l00422"></a>00422 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1657<a name="l00423"></a>00423                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B57600;
1658<a name="l00424"></a>00424 <span class="preprocessor">#else</span>
1659<a name="l00425"></a>00425 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B57600);
1660<a name="l00426"></a>00426                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B57600);
1661<a name="l00427"></a>00427 <span class="preprocessor">#endif</span>
1662<a name="l00428"></a>00428 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1663<a name="l00429"></a>00429
1664<a name="l00430"></a>00430             <span class="comment">/*76800 baud*/</span>
1665<a name="l00431"></a>00431             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0109a7f6b7993e77c3603399cb0a58987be">BAUD76800</a>:
1666<a name="l00432"></a>00432                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Posix_QextSerialPort Portability Warning: Windows and some POSIX systems do not support 76800 baud operation."</span>);
1667<a name="l00433"></a>00433 <span class="preprocessor">#ifdef CBAUD</span>
1668<a name="l00434"></a>00434 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1669<a name="l00435"></a>00435
1670<a name="l00436"></a>00436 <span class="preprocessor">#ifdef B76800</span>
1671<a name="l00437"></a>00437 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B76800;
1672<a name="l00438"></a>00438 <span class="preprocessor">#else</span>
1673<a name="l00439"></a>00439 <span class="preprocessor"></span>                TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud."</span>);
1674<a name="l00440"></a>00440                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B57600;
1675<a name="l00441"></a>00441 <span class="preprocessor">#endif //B76800</span>
1676<a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#else  //CBAUD</span>
1677<a name="l00443"></a>00443 <span class="preprocessor"></span><span class="preprocessor">#ifdef B76800</span>
1678<a name="l00444"></a>00444 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B76800);
1679<a name="l00445"></a>00445                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B76800);
1680<a name="l00446"></a>00446 <span class="preprocessor">#else</span>
1681<a name="l00447"></a>00447 <span class="preprocessor"></span>                TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud."</span>);
1682<a name="l00448"></a>00448                 cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B57600);
1683<a name="l00449"></a>00449                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B57600);
1684<a name="l00450"></a>00450 <span class="preprocessor">#endif //B76800</span>
1685<a name="l00451"></a>00451 <span class="preprocessor"></span><span class="preprocessor">#endif //CBAUD</span>
1686<a name="l00452"></a>00452 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1687<a name="l00453"></a>00453
1688<a name="l00454"></a>00454             <span class="comment">/*115200 baud*/</span>
1689<a name="l00455"></a>00455             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01054a5ab3e880bc1722d455e420c0351e6">BAUD115200</a>:
1690<a name="l00456"></a>00456 <span class="preprocessor">#ifdef CBAUD</span>
1691<a name="l00457"></a>00457 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1692<a name="l00458"></a>00458                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B115200;
1693<a name="l00459"></a>00459 <span class="preprocessor">#else</span>
1694<a name="l00460"></a>00460 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B115200);
1695<a name="l00461"></a>00461                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B115200);
1696<a name="l00462"></a>00462 <span class="preprocessor">#endif</span>
1697<a name="l00463"></a>00463 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1698<a name="l00464"></a>00464
1699<a name="l00465"></a>00465             <span class="comment">/*128000 baud*/</span>
1700<a name="l00466"></a>00466             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01035d815a00139f06782b178b82f355f04">BAUD128000</a>:
1701<a name="l00467"></a>00467                 TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: POSIX does not support 128000 baud operation.  Switching to 115200 baud."</span>);
1702<a name="l00468"></a>00468 <span class="preprocessor">#ifdef CBAUD</span>
1703<a name="l00469"></a>00469 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1704<a name="l00470"></a>00470                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B115200;
1705<a name="l00471"></a>00471 <span class="preprocessor">#else</span>
1706<a name="l00472"></a>00472 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B115200);
1707<a name="l00473"></a>00473                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B115200);
1708<a name="l00474"></a>00474 <span class="preprocessor">#endif</span>
1709<a name="l00475"></a>00475 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1710<a name="l00476"></a>00476
1711<a name="l00477"></a>00477             <span class="comment">/*256000 baud*/</span>
1712<a name="l00478"></a>00478             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102149280b354c383e6af48949ce3b807f">BAUD256000</a>:
1713<a name="l00479"></a>00479                 TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: POSIX does not support 256000 baud operation.  Switching to 115200 baud."</span>);
1714<a name="l00480"></a>00480 <span class="preprocessor">#ifdef CBAUD</span>
1715<a name="l00481"></a>00481 <span class="preprocessor"></span>                <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CBAUD);
1716<a name="l00482"></a>00482                 <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=B115200;
1717<a name="l00483"></a>00483 <span class="preprocessor">#else</span>
1718<a name="l00484"></a>00484 <span class="preprocessor"></span>                cfsetispeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B115200);
1719<a name="l00485"></a>00485                 cfsetospeed(&amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>, B115200);
1720<a name="l00486"></a>00486 <span class="preprocessor">#endif</span>
1721<a name="l00487"></a>00487 <span class="preprocessor"></span>                <span class="keywordflow">break</span>;
1722<a name="l00488"></a>00488         }
1723<a name="l00489"></a>00489         tcsetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TCSAFLUSH, &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
1724<a name="l00490"></a>00490     }
1725<a name="l00491"></a>00491     UNLOCK_MUTEX();
1726<a name="l00492"></a>00492 }
1727</pre></div>
1728<p>
1729
1730</div>
1731</div><p>
1732<a class="anchor" name="a5578e4862e3743da2a923f082f821d6"></a><!-- doxytag: member="QextSerialPort::setBaudRate" ref="a5578e4862e3743da2a923f082f821d6" args="(BaudRateType)" -->
1733<div class="memitem">
1734<div class="memproto">
1735      <table class="memname">
1736        <tr>
1737          <td class="memname">void Win_QextSerialPort::setBaudRate           </td>
1738          <td>(</td>
1739          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010">BaudRateType</a>&nbsp;</td>
1740          <td class="paramname"> <em>baudRate</em>          </td>
1741          <td>&nbsp;)&nbsp;</td>
1742          <td width="100%"><code> [virtual, inherited]</code></td>
1743        </tr>
1744      </table>
1745</div>
1746<div class="memdoc">
1747
1748<p>
1749Sets 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
1750  -----------   -------------   -----------
1751   BAUD50                 110          50
1752   BAUD75                 110          75
1753  *BAUD110                110         110
1754   BAUD134                110         134.5
1755   BAUD150                110         150
1756   BAUD200                110         200
1757  *BAUD300                300         300
1758  *BAUD600                600         600
1759  *BAUD1200              1200        1200
1760   BAUD1800              1200        1800
1761  *BAUD2400              2400        2400
1762  *BAUD4800              4800        4800
1763  *BAUD9600              9600        9600
1764   BAUD14400            14400        9600
1765  *BAUD19200            19200       19200
1766  *BAUD38400            38400       38400
1767   BAUD56000            56000       38400
1768  *BAUD57600            57600       57600
1769   BAUD76800            57600       76800
1770  *BAUD115200          115200      115200
1771   BAUD128000          128000      115200
1772   BAUD256000          256000      115200
1773</pre></div> 
1774<p>
1775Implements <a class="el" href="classQextSerialBase.html#05b59a48366ae452bf8e033f83402543">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00629"></a>00629                                                           {
1776<a name="l00630"></a>00630     LOCK_MUTEX();
1777<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>) {
1778<a name="l00632"></a>00632         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1779<a name="l00633"></a>00633             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100721b0e666074772b33c2ff05f03f6e2">BAUD50</a>:
1780<a name="l00634"></a>00634             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101cd023b44dceb4b59798e5203534b65b">BAUD75</a>:
1781<a name="l00635"></a>00635             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010192cb47e215d8642f3e26cd877eb904e">BAUD134</a>:
1782<a name="l00636"></a>00636             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010e7b4b2d0b7e6e309e57c64364328aff8">BAUD150</a>:
1783<a name="l00637"></a>00637             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101eff76dffd9e137cbfd3b0563e17348b">BAUD200</a>:
1784<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>;
1785<a name="l00639"></a>00639                 <span class="keywordflow">break</span>;
1786<a name="l00640"></a>00640
1787<a name="l00641"></a>00641             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101815c0670961c2e5c20cfbd81954d3f1">BAUD1800</a>:
1788<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>;
1789<a name="l00643"></a>00643                 <span class="keywordflow">break</span>;
1790<a name="l00644"></a>00644
1791<a name="l00645"></a>00645             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0109a7f6b7993e77c3603399cb0a58987be">BAUD76800</a>:
1792<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>;
1793<a name="l00647"></a>00647                 <span class="keywordflow">break</span>;
1794<a name="l00648"></a>00648
1795<a name="l00649"></a>00649             <span class="keywordflow">default</span>:
1796<a name="l00650"></a>00650                 <a class="code" href="classQextSerialBase.html#2d796e3080f78ff63e821f528439db57">Settings</a>.<a class="code" href="structPortSettings.html#be617f3545d6be4587e1a0700a0b0e5b">BaudRate</a>=baudRate;
1797<a name="l00651"></a>00651                 <span class="keywordflow">break</span>;
1798<a name="l00652"></a>00652         }
1799<a name="l00653"></a>00653     }
1800<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>()) {
1801<a name="l00655"></a>00655         <span class="keywordflow">switch</span> (<a class="code" href="classQextSerialBase.html#6d6eeab48cad2fa2adbebb23920c661a">baudRate</a>) {
1802<a name="l00656"></a>00656
1803<a name="l00657"></a>00657             <span class="comment">/*50 baud*/</span>
1804<a name="l00658"></a>00658             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100721b0e666074772b33c2ff05f03f6e2">BAUD50</a>:
1805<a name="l00659"></a>00659                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 50 baud operation.  Switching to 110 baud."</span>);
1806<a name="l00660"></a>00660                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1807<a name="l00661"></a>00661                 <span class="keywordflow">break</span>;
1808<a name="l00662"></a>00662
1809<a name="l00663"></a>00663             <span class="comment">/*75 baud*/</span>
1810<a name="l00664"></a>00664             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101cd023b44dceb4b59798e5203534b65b">BAUD75</a>:
1811<a name="l00665"></a>00665                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 75 baud operation.  Switching to 110 baud."</span>);
1812<a name="l00666"></a>00666                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1813<a name="l00667"></a>00667                 <span class="keywordflow">break</span>;
1814<a name="l00668"></a>00668
1815<a name="l00669"></a>00669             <span class="comment">/*110 baud*/</span>
1816<a name="l00670"></a>00670             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01010174371591f621ab26540af3ac992a4">BAUD110</a>:
1817<a name="l00671"></a>00671                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1818<a name="l00672"></a>00672                 <span class="keywordflow">break</span>;
1819<a name="l00673"></a>00673
1820<a name="l00674"></a>00674             <span class="comment">/*134.5 baud*/</span>
1821<a name="l00675"></a>00675             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010192cb47e215d8642f3e26cd877eb904e">BAUD134</a>:
1822<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>);
1823<a name="l00677"></a>00677                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1824<a name="l00678"></a>00678                 <span class="keywordflow">break</span>;
1825<a name="l00679"></a>00679
1826<a name="l00680"></a>00680             <span class="comment">/*150 baud*/</span>
1827<a name="l00681"></a>00681             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010e7b4b2d0b7e6e309e57c64364328aff8">BAUD150</a>:
1828<a name="l00682"></a>00682                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 150 baud operation.  Switching to 110 baud."</span>);
1829<a name="l00683"></a>00683                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1830<a name="l00684"></a>00684                 <span class="keywordflow">break</span>;
1831<a name="l00685"></a>00685
1832<a name="l00686"></a>00686             <span class="comment">/*200 baud*/</span>
1833<a name="l00687"></a>00687             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101eff76dffd9e137cbfd3b0563e17348b">BAUD200</a>:
1834<a name="l00688"></a>00688                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 200 baud operation.  Switching to 110 baud."</span>);
1835<a name="l00689"></a>00689                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_110;
1836<a name="l00690"></a>00690                 <span class="keywordflow">break</span>;
1837<a name="l00691"></a>00691
1838<a name="l00692"></a>00692             <span class="comment">/*300 baud*/</span>
1839<a name="l00693"></a>00693             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01041f8610ff3d721295c8692d6331bbc86">BAUD300</a>:
1840<a name="l00694"></a>00694                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_300;
1841<a name="l00695"></a>00695                 <span class="keywordflow">break</span>;
1842<a name="l00696"></a>00696
1843<a name="l00697"></a>00697             <span class="comment">/*600 baud*/</span>
1844<a name="l00698"></a>00698             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102a05e5b7c7d350afe149a629af7f07a4">BAUD600</a>:
1845<a name="l00699"></a>00699                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_600;
1846<a name="l00700"></a>00700                 <span class="keywordflow">break</span>;
1847<a name="l00701"></a>00701
1848<a name="l00702"></a>00702             <span class="comment">/*1200 baud*/</span>
1849<a name="l00703"></a>00703             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01086057a69b2752b06b4302ae83c36e7a2">BAUD1200</a>:
1850<a name="l00704"></a>00704                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_1200;
1851<a name="l00705"></a>00705                 <span class="keywordflow">break</span>;
1852<a name="l00706"></a>00706
1853<a name="l00707"></a>00707             <span class="comment">/*1800 baud*/</span>
1854<a name="l00708"></a>00708             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101815c0670961c2e5c20cfbd81954d3f1">BAUD1800</a>:
1855<a name="l00709"></a>00709                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 1800 baud operation.  Switching to 1200 baud."</span>);
1856<a name="l00710"></a>00710                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_1200;
1857<a name="l00711"></a>00711                 <span class="keywordflow">break</span>;
1858<a name="l00712"></a>00712
1859<a name="l00713"></a>00713             <span class="comment">/*2400 baud*/</span>
1860<a name="l00714"></a>00714             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e653cf3163c75f11560ad0616049076">BAUD2400</a>:
1861<a name="l00715"></a>00715                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_2400;
1862<a name="l00716"></a>00716                 <span class="keywordflow">break</span>;
1863<a name="l00717"></a>00717
1864<a name="l00718"></a>00718             <span class="comment">/*4800 baud*/</span>
1865<a name="l00719"></a>00719             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0101de6d151ff739cebfa6f3aab0d76ec9e">BAUD4800</a>:
1866<a name="l00720"></a>00720                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_4800;
1867<a name="l00721"></a>00721                 <span class="keywordflow">break</span>;
1868<a name="l00722"></a>00722
1869<a name="l00723"></a>00723             <span class="comment">/*9600 baud*/</span>
1870<a name="l00724"></a>00724             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010782c55daa9030c53e266213401c3707a">BAUD9600</a>:
1871<a name="l00725"></a>00725                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_9600;
1872<a name="l00726"></a>00726                 <span class="keywordflow">break</span>;
1873<a name="l00727"></a>00727
1874<a name="l00728"></a>00728             <span class="comment">/*14400 baud*/</span>
1875<a name="l00729"></a>00729             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf010d208c844993c394ce55ed88a7da71d31">BAUD14400</a>:
1876<a name="l00730"></a>00730                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 14400 baud operation."</span>);
1877<a name="l00731"></a>00731                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_14400;
1878<a name="l00732"></a>00732                 <span class="keywordflow">break</span>;
1879<a name="l00733"></a>00733
1880<a name="l00734"></a>00734             <span class="comment">/*19200 baud*/</span>
1881<a name="l00735"></a>00735             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01016d650adf414e7a4fceb3f72661a0420">BAUD19200</a>:
1882<a name="l00736"></a>00736                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_19200;
1883<a name="l00737"></a>00737                 <span class="keywordflow">break</span>;
1884<a name="l00738"></a>00738
1885<a name="l00739"></a>00739             <span class="comment">/*38400 baud*/</span>
1886<a name="l00740"></a>00740             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01056bb974293e65da8c97422abd0c514b7">BAUD38400</a>:
1887<a name="l00741"></a>00741                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_38400;
1888<a name="l00742"></a>00742                 <span class="keywordflow">break</span>;
1889<a name="l00743"></a>00743
1890<a name="l00744"></a>00744             <span class="comment">/*56000 baud*/</span>
1891<a name="l00745"></a>00745             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0106b00b8cf6939c8b517deada3110de1ce">BAUD56000</a>:
1892<a name="l00746"></a>00746                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 56000 baud operation."</span>);
1893<a name="l00747"></a>00747                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_56000;
1894<a name="l00748"></a>00748                 <span class="keywordflow">break</span>;
1895<a name="l00749"></a>00749
1896<a name="l00750"></a>00750             <span class="comment">/*57600 baud*/</span>
1897<a name="l00751"></a>00751             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0100e6f70f222bc4d91276a4a934ef66c48">BAUD57600</a>:
1898<a name="l00752"></a>00752                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_57600;
1899<a name="l00753"></a>00753                 <span class="keywordflow">break</span>;
1900<a name="l00754"></a>00754
1901<a name="l00755"></a>00755             <span class="comment">/*76800 baud*/</span>
1902<a name="l00756"></a>00756             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0109a7f6b7993e77c3603399cb0a58987be">BAUD76800</a>:
1903<a name="l00757"></a>00757                 TTY_WARNING(<span class="stringliteral">"Win_QextSerialPort: Windows does not support 76800 baud operation.  Switching to 57600 baud."</span>);
1904<a name="l00758"></a>00758                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_57600;
1905<a name="l00759"></a>00759                 <span class="keywordflow">break</span>;
1906<a name="l00760"></a>00760
1907<a name="l00761"></a>00761             <span class="comment">/*115200 baud*/</span>
1908<a name="l00762"></a>00762             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01054a5ab3e880bc1722d455e420c0351e6">BAUD115200</a>:
1909<a name="l00763"></a>00763                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_115200;
1910<a name="l00764"></a>00764                 <span class="keywordflow">break</span>;
1911<a name="l00765"></a>00765
1912<a name="l00766"></a>00766             <span class="comment">/*128000 baud*/</span>
1913<a name="l00767"></a>00767             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf01035d815a00139f06782b178b82f355f04">BAUD128000</a>:
1914<a name="l00768"></a>00768                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 128000 baud operation."</span>);
1915<a name="l00769"></a>00769                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_128000;
1916<a name="l00770"></a>00770                 <span class="keywordflow">break</span>;
1917<a name="l00771"></a>00771
1918<a name="l00772"></a>00772             <span class="comment">/*256000 baud*/</span>
1919<a name="l00773"></a>00773             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#6f031169a6a9b150b5af707bb23cf0102149280b354c383e6af48949ce3b807f">BAUD256000</a>:
1920<a name="l00774"></a>00774                 TTY_PORTABILITY_WARNING(<span class="stringliteral">"Win_QextSerialPort Portability Warning: POSIX does not support 256000 baud operation."</span>);
1921<a name="l00775"></a>00775                 <a class="code" href="classWin__QextSerialPort.html#a51a3047aa92b01531219215bb415dbb">Win_CommConfig</a>.dcb.BaudRate=CBR_256000;
1922<a name="l00776"></a>00776                 <span class="keywordflow">break</span>;
1923<a name="l00777"></a>00777         }
1924<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));
1925<a name="l00779"></a>00779     }
1926<a name="l00780"></a>00780     UNLOCK_MUTEX();
1927<a name="l00781"></a>00781 }
1928</pre></div>
1929<p>
1930
1931</div>
1932</div><p>
1933<a class="anchor" name="8f428dad3c4ec2fa8128397628c7e5d1"></a><!-- doxytag: member="QextSerialPort::setDataBits" ref="8f428dad3c4ec2fa8128397628c7e5d1" args="(DataBitsType)" -->
1934<div class="memitem">
1935<div class="memproto">
1936      <table class="memname">
1937        <tr>
1938          <td class="memname">void Posix_QextSerialPort::setDataBits           </td>
1939          <td>(</td>
1940          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a>&nbsp;</td>
1941          <td class="paramname"> <em>dataBits</em>          </td>
1942          <td>&nbsp;)&nbsp;</td>
1943          <td width="100%"><code> [virtual, inherited]</code></td>
1944        </tr>
1945      </table>
1946</div>
1947<div class="memdoc">
1948
1949<p>
1950Sets 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
1951    DATA_6      6 data bits
1952    DATA_7      7 data bits
1953    DATA_8      8 data bits
1954</pre></div><p>
1955<dl compact><dt><b>Note:</b></dt><dd>This function is subject to the following restrictions: </dd></dl>
1956<dl compact><dt><b></b></dt><dd>5 data bits cannot be used with 2 stop bits. </dd></dl>
1957<dl compact><dt><b></b></dt><dd>8 data bits cannot be used with space parity on POSIX systems. </dd></dl>
1958
1959<p>
1960Implements <a class="el" href="classQextSerialBase.html#651f67ec7818b55c0053b47546c56ab5">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00513"></a>00513 {
1961<a name="l00514"></a>00514     LOCK_MUTEX();
1962<a name="l00515"></a>00515     <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>) {
1963<a name="l00516"></a>00516         <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>) ||
1964<a name="l00517"></a>00517             (<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>) ||
1965<a name="l00518"></a>00518             (<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#ee22d32d87c815090354bf9b8e957ace1dd539202244b7b46ea83c168d3a447d">PAR_SPACE</a> &amp;&amp; <a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>==<a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa719dc653cb3f7c9fbf6c8b8c36d78a9f">DATA_8</a>)) {
1966<a name="l00519"></a>00519         }
1967<a name="l00520"></a>00520         <span class="keywordflow">else</span> {
1968<a name="l00521"></a>00521             <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>;
1969<a name="l00522"></a>00522         }
1970<a name="l00523"></a>00523     }
1971<a name="l00524"></a>00524     <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>()) {
1972<a name="l00525"></a>00525         <span class="keywordflow">switch</span>(<a class="code" href="classQextSerialBase.html#6836465ea5deaa1280e0e777e9c8651e">dataBits</a>) {
1973<a name="l00526"></a>00526
1974<a name="l00527"></a>00527             <span class="comment">/*5 data bits*/</span>
1975<a name="l00528"></a>00528             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fabdcd3759eeee2ffb002bbd8816afc5cc">DATA_5</a>:
1976<a name="l00529"></a>00529                 <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>) {
1977<a name="l00530"></a>00530                     TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: 5 Data bits cannot be used with 2 stop bits."</span>);
1978<a name="l00531"></a>00531                 }
1979<a name="l00532"></a>00532                 <span class="keywordflow">else</span> {
1980<a name="l00533"></a>00533                     <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>;
1981<a name="l00534"></a>00534                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CSIZE);
1982<a name="l00535"></a>00535                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=CS5;
1983<a name="l00536"></a>00536                     tcsetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TCSAFLUSH, &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
1984<a name="l00537"></a>00537                 }
1985<a name="l00538"></a>00538                 <span class="keywordflow">break</span>;
1986<a name="l00539"></a>00539
1987<a name="l00540"></a>00540             <span class="comment">/*6 data bits*/</span>
1988<a name="l00541"></a>00541             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa26d01dd98519521e747c3716b95b039f">DATA_6</a>:
1989<a name="l00542"></a>00542                 <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>) {
1990<a name="l00543"></a>00543                     TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits."</span>);
1991<a name="l00544"></a>00544                 }
1992<a name="l00545"></a>00545                 <span class="keywordflow">else</span> {
1993<a name="l00546"></a>00546                     <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>;
1994<a name="l00547"></a>00547                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CSIZE);
1995<a name="l00548"></a>00548                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=CS6;
1996<a name="l00549"></a>00549                     tcsetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TCSAFLUSH, &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
1997<a name="l00550"></a>00550                 }
1998<a name="l00551"></a>00551                 <span class="keywordflow">break</span>;
1999<a name="l00552"></a>00552
2000<a name="l00553"></a>00553             <span class="comment">/*7 data bits*/</span>
2001<a name="l00554"></a>00554             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fac0ea91406eb909c082025299d879eed5">DATA_7</a>:
2002<a name="l00555"></a>00555                 <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>) {
2003<a name="l00556"></a>00556                     TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits."</span>);
2004<a name="l00557"></a>00557                 }
2005<a name="l00558"></a>00558                 <span class="keywordflow">else</span> {
2006<a name="l00559"></a>00559                     <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>;
2007<a name="l00560"></a>00560                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CSIZE);
2008<a name="l00561"></a>00561                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=CS7;
2009<a name="l00562"></a>00562                     tcsetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TCSAFLUSH, &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
2010<a name="l00563"></a>00563                 }
2011<a name="l00564"></a>00564                 <span class="keywordflow">break</span>;
2012<a name="l00565"></a>00565
2013<a name="l00566"></a>00566             <span class="comment">/*8 data bits*/</span>
2014<a name="l00567"></a>00567             <span class="keywordflow">case</span> <a class="code" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa719dc653cb3f7c9fbf6c8b8c36d78a9f">DATA_8</a>:
2015<a name="l00568"></a>00568                 <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>) {
2016<a name="l00569"></a>00569                     TTY_WARNING(<span class="stringliteral">"Posix_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits."</span>);
2017<a name="l00570"></a>00570                 }
2018<a name="l00571"></a>00571                 <span class="keywordflow">else</span> {
2019<a name="l00572"></a>00572                     <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>;
2020<a name="l00573"></a>00573                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag&amp;=(~CSIZE);
2021<a name="l00574"></a>00574                     <a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>.c_cflag|=CS8;
2022<a name="l00575"></a>00575                     tcsetattr(<a class="code" href="classPosix__QextSerialPort.html#c4fcc5ae9850c3bc9952a13e4ef82273">Posix_File</a>-&gt;handle(), TCSAFLUSH, &amp;<a class="code" href="classPosix__QextSerialPort.html#4946a554d3cfcd190b4df72f6f44f6eb">Posix_CommConfig</a>);
2023<a name="l00576"></a>00576                 }
2024<a name="l00577"></a>00577                 <span class="keywordflow">break</span>;
2025<a name="l00578"></a>00578         }
2026<a name="l00579"></a>00579     }
2027<a name="l00580"></a>00580     UNLOCK_MUTEX();
2028<a name="l00581"></a>00581 }
2029</pre></div>
2030<p>
2031
2032</div>
2033</div><p>
2034<a class="anchor" name="33168191b03365b429b8413f6286f4c8"></a><!-- doxytag: member="QextSerialPort::setDataBits" ref="33168191b03365b429b8413f6286f4c8" args="(DataBitsType)" -->
2035<div class="memitem">
2036<div class="memproto">
2037      <table class="memname">
2038        <tr>
2039          <td class="memname">void Win_QextSerialPort::setDataBits           </td>
2040          <td>(</td>
2041          <td class="paramtype"><a class="el" href="qextserialbase_8h.html#189ef78c2c1b7537ab114d576f6214fa">DataBitsType</a>&nbsp;</td>
2042          <td class="paramname"> <em>dataBits</em>          </td>
2043          <td>&nbsp;)&nbsp;</td>
2044          <td width="100%"><code> [virtual, inherited]</code></td>
2045        </tr>
2046      </table>
2047</div>
2048<div class="memdoc">
2049
2050<p>
2051Sets 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
2052    DATA_6      6 data bits
2053    DATA_7      7 data bits
2054    DATA_8      8 data bits
2055</pre></div><p>
2056<dl compact><dt><b>Note:</b></dt><dd>This function is subject to the following restrictions: </dd></dl>
2057<dl compact><dt><b></b></dt><dd>5 data bits cannot be used with 2 stop bits. </dd></dl>
2058<dl compact><dt><b></b></dt><dd>1.5 stop bits can only be used with 5 data bits. </dd></dl>
2059<dl compact><dt><b></b></dt><dd>8 data bits cannot be used with space parity on POSIX systems. </dd></dl>
2060
2061<p>
2062Implements <a class="el" href="classQextSerialBase.html#651f67ec7818b55c0053b47546c56ab5">QextSerialBase</a>.<div class="fragment"><pre class="fragment"><a name="l00470"></a>00470                                                           {
2063<a name="l00471"></a>00471     LOCK_MUTEX();
2064<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>) {
2065<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#6836465ea