From ea08ee4997efed4f7a0b8b1af3c50b098c9439e7 Mon Sep 17 00:00:00 2001 From: jef Date: Mon, 11 Jan 2010 21:16:25 +0000 Subject: [PATCH] remove unused files from qextserialport git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12737 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/core/gps/qextserialport/ChangeLog | 245 - src/core/gps/qextserialport/Doxyfile | 1514 ------- src/core/gps/qextserialport/doc/mainpage.dox | 12 - .../gps/qextserialport/doc/qextbasetype.dox | 10 - src/core/gps/qextserialport/doc/qiodevice.tag | 216 - .../examples/enumerator/enumerator.pro | 26 - .../examples/enumerator/main.cpp | 21 - .../examples/event/PortListener.cpp | 99 - .../examples/event/PortListener.h | 58 - .../qextserialport/examples/event/event.pro | 29 - .../qextserialport/examples/event/main.cpp | 81 - .../examples/qespta/MainWindow.cpp | 95 - .../examples/qespta/MainWindow.h | 64 - .../qextserialport/examples/qespta/Makefile | 237 - .../examples/qespta/Makefile.Debug | 170 - .../examples/qespta/Makefile.Release | 170 - .../examples/qespta/MessageWindow.cpp | 136 - .../examples/qespta/MessageWindow.h | 83 - .../qextserialport/examples/qespta/QESPTA.pro | 32 - .../examples/qespta/QespTest.cpp | 129 - .../qextserialport/examples/qespta/QespTest.h | 36 - .../gps/qextserialport/examples/qespta/README | 4 - .../gps/qextserialport/examples/qespta/defs.h | 16 - .../qextserialport/examples/qespta/main.cpp | 29 - .../gps/qextserialport/html/annotated.html | 37 - .../classPosix__QextSerialPort-members.html | 118 - .../html/classPosix__QextSerialPort.html | 2370 ---------- .../html/classPosix__QextSerialPort.png | Bin 852 -> 0 bytes .../html/classQextBaseType-members.html | 201 - .../html/classQextBaseType.html | 3755 ---------------- .../qextserialport/html/classQextBaseType.png | Bin 1305 -> 0 bytes .../html/classQextSerialBase-members.html | 106 - .../html/classQextSerialBase.html | 1279 ------ .../html/classQextSerialBase.png | Bin 1423 -> 0 bytes .../html/classQextSerialPort-members.html | 207 - .../html/classQextSerialPort.html | 3944 ----------------- .../html/classQextSerialPort.png | Bin 1358 -> 0 bytes .../classWin__QextSerialPort-members.html | 128 - .../html/classWin__QextSerialPort.html | 2528 ----------- .../html/classWin__QextSerialPort.png | Bin 863 -> 0 bytes src/core/gps/qextserialport/html/classes.html | 32 - src/core/gps/qextserialport/html/doxygen.css | 358 -- src/core/gps/qextserialport/html/doxygen.png | Bin 1281 -> 0 bytes src/core/gps/qextserialport/html/files.html | 36 - .../gps/qextserialport/html/ftv2blank.png | Bin 174 -> 0 bytes src/core/gps/qextserialport/html/ftv2doc.png | Bin 255 -> 0 bytes .../qextserialport/html/ftv2folderclosed.png | Bin 259 -> 0 bytes .../qextserialport/html/ftv2folderopen.png | Bin 261 -> 0 bytes .../gps/qextserialport/html/ftv2lastnode.png | Bin 233 -> 0 bytes src/core/gps/qextserialport/html/ftv2link.png | Bin 358 -> 0 bytes .../gps/qextserialport/html/ftv2mlastnode.png | Bin 160 -> 0 bytes .../gps/qextserialport/html/ftv2mnode.png | Bin 194 -> 0 bytes src/core/gps/qextserialport/html/ftv2node.png | Bin 235 -> 0 bytes .../gps/qextserialport/html/ftv2plastnode.png | Bin 165 -> 0 bytes .../gps/qextserialport/html/ftv2pnode.png | Bin 200 -> 0 bytes .../gps/qextserialport/html/ftv2vertline.png | Bin 229 -> 0 bytes .../gps/qextserialport/html/functions.html | 193 - .../qextserialport/html/functions_func.html | 153 - .../qextserialport/html/functions_vars.html | 116 - src/core/gps/qextserialport/html/globals.html | 121 - .../gps/qextserialport/html/globals_enum.html | 42 - .../gps/qextserialport/html/globals_eval.html | 111 - .../gps/qextserialport/html/hierarchy.html | 49 - src/core/gps/qextserialport/html/index.html | 8 - src/core/gps/qextserialport/html/installdox | 117 - src/core/gps/qextserialport/html/main.html | 24 - .../qextserialport/html/mainpage_8dox.html | 27 - .../html/posix__qextserialport_8cpp.html | 27 - .../html/posix__qextserialport_8h.html | 30 - .../html/qextbasetype_8dox.html | 30 - .../html/qextserialbase_8cpp.html | 27 - .../html/qextserialbase_8h.html | 373 -- .../html/qextserialport_8cpp.html | 27 - .../html/qextserialport_8h.html | 30 - .../html/structPortSettings-members.html | 34 - .../html/structPortSettings.html | 157 - src/core/gps/qextserialport/html/tab_b.gif | Bin 35 -> 0 bytes src/core/gps/qextserialport/html/tab_l.gif | Bin 706 -> 0 bytes src/core/gps/qextserialport/html/tab_r.gif | Bin 2585 -> 0 bytes src/core/gps/qextserialport/html/tabs.css | 102 - src/core/gps/qextserialport/html/tree.html | 126 - .../html/win__qextserialport_8cpp.html | 27 - .../html/win__qextserialport_8h.html | 32 - .../gps/qextserialport/qextserialport.pro | 39 - 84 files changed, 20633 deletions(-) delete mode 100644 src/core/gps/qextserialport/ChangeLog delete mode 100644 src/core/gps/qextserialport/Doxyfile delete mode 100644 src/core/gps/qextserialport/doc/mainpage.dox delete mode 100644 src/core/gps/qextserialport/doc/qextbasetype.dox delete mode 100644 src/core/gps/qextserialport/doc/qiodevice.tag delete mode 100644 src/core/gps/qextserialport/examples/enumerator/enumerator.pro delete mode 100644 src/core/gps/qextserialport/examples/enumerator/main.cpp delete mode 100644 src/core/gps/qextserialport/examples/event/PortListener.cpp delete mode 100644 src/core/gps/qextserialport/examples/event/PortListener.h delete mode 100644 src/core/gps/qextserialport/examples/event/event.pro delete mode 100644 src/core/gps/qextserialport/examples/event/main.cpp delete mode 100644 src/core/gps/qextserialport/examples/qespta/MainWindow.cpp delete mode 100644 src/core/gps/qextserialport/examples/qespta/MainWindow.h delete mode 100644 src/core/gps/qextserialport/examples/qespta/Makefile delete mode 100644 src/core/gps/qextserialport/examples/qespta/Makefile.Debug delete mode 100644 src/core/gps/qextserialport/examples/qespta/Makefile.Release delete mode 100644 src/core/gps/qextserialport/examples/qespta/MessageWindow.cpp delete mode 100644 src/core/gps/qextserialport/examples/qespta/MessageWindow.h delete mode 100644 src/core/gps/qextserialport/examples/qespta/QESPTA.pro delete mode 100644 src/core/gps/qextserialport/examples/qespta/QespTest.cpp delete mode 100644 src/core/gps/qextserialport/examples/qespta/QespTest.h delete mode 100644 src/core/gps/qextserialport/examples/qespta/README delete mode 100644 src/core/gps/qextserialport/examples/qespta/defs.h delete mode 100644 src/core/gps/qextserialport/examples/qespta/main.cpp delete mode 100644 src/core/gps/qextserialport/html/annotated.html delete mode 100644 src/core/gps/qextserialport/html/classPosix__QextSerialPort-members.html delete mode 100644 src/core/gps/qextserialport/html/classPosix__QextSerialPort.html delete mode 100644 src/core/gps/qextserialport/html/classPosix__QextSerialPort.png delete mode 100644 src/core/gps/qextserialport/html/classQextBaseType-members.html delete mode 100644 src/core/gps/qextserialport/html/classQextBaseType.html delete mode 100644 src/core/gps/qextserialport/html/classQextBaseType.png delete mode 100644 src/core/gps/qextserialport/html/classQextSerialBase-members.html delete mode 100644 src/core/gps/qextserialport/html/classQextSerialBase.html delete mode 100644 src/core/gps/qextserialport/html/classQextSerialBase.png delete mode 100644 src/core/gps/qextserialport/html/classQextSerialPort-members.html delete mode 100644 src/core/gps/qextserialport/html/classQextSerialPort.html delete mode 100644 src/core/gps/qextserialport/html/classQextSerialPort.png delete mode 100644 src/core/gps/qextserialport/html/classWin__QextSerialPort-members.html delete mode 100644 src/core/gps/qextserialport/html/classWin__QextSerialPort.html delete mode 100644 src/core/gps/qextserialport/html/classWin__QextSerialPort.png delete mode 100644 src/core/gps/qextserialport/html/classes.html delete mode 100644 src/core/gps/qextserialport/html/doxygen.css delete mode 100644 src/core/gps/qextserialport/html/doxygen.png delete mode 100644 src/core/gps/qextserialport/html/files.html delete mode 100644 src/core/gps/qextserialport/html/ftv2blank.png delete mode 100644 src/core/gps/qextserialport/html/ftv2doc.png delete mode 100644 src/core/gps/qextserialport/html/ftv2folderclosed.png delete mode 100644 src/core/gps/qextserialport/html/ftv2folderopen.png delete mode 100644 src/core/gps/qextserialport/html/ftv2lastnode.png delete mode 100644 src/core/gps/qextserialport/html/ftv2link.png delete mode 100644 src/core/gps/qextserialport/html/ftv2mlastnode.png delete mode 100644 src/core/gps/qextserialport/html/ftv2mnode.png delete mode 100644 src/core/gps/qextserialport/html/ftv2node.png delete mode 100644 src/core/gps/qextserialport/html/ftv2plastnode.png delete mode 100644 src/core/gps/qextserialport/html/ftv2pnode.png delete mode 100644 src/core/gps/qextserialport/html/ftv2vertline.png delete mode 100644 src/core/gps/qextserialport/html/functions.html delete mode 100644 src/core/gps/qextserialport/html/functions_func.html delete mode 100644 src/core/gps/qextserialport/html/functions_vars.html delete mode 100644 src/core/gps/qextserialport/html/globals.html delete mode 100644 src/core/gps/qextserialport/html/globals_enum.html delete mode 100644 src/core/gps/qextserialport/html/globals_eval.html delete mode 100644 src/core/gps/qextserialport/html/hierarchy.html delete mode 100644 src/core/gps/qextserialport/html/index.html delete mode 100644 src/core/gps/qextserialport/html/installdox delete mode 100644 src/core/gps/qextserialport/html/main.html delete mode 100644 src/core/gps/qextserialport/html/mainpage_8dox.html delete mode 100644 src/core/gps/qextserialport/html/posix__qextserialport_8cpp.html delete mode 100644 src/core/gps/qextserialport/html/posix__qextserialport_8h.html delete mode 100644 src/core/gps/qextserialport/html/qextbasetype_8dox.html delete mode 100644 src/core/gps/qextserialport/html/qextserialbase_8cpp.html delete mode 100644 src/core/gps/qextserialport/html/qextserialbase_8h.html delete mode 100644 src/core/gps/qextserialport/html/qextserialport_8cpp.html delete mode 100644 src/core/gps/qextserialport/html/qextserialport_8h.html delete mode 100644 src/core/gps/qextserialport/html/structPortSettings-members.html delete mode 100644 src/core/gps/qextserialport/html/structPortSettings.html delete mode 100644 src/core/gps/qextserialport/html/tab_b.gif delete mode 100644 src/core/gps/qextserialport/html/tab_l.gif delete mode 100644 src/core/gps/qextserialport/html/tab_r.gif delete mode 100644 src/core/gps/qextserialport/html/tabs.css delete mode 100644 src/core/gps/qextserialport/html/tree.html delete mode 100644 src/core/gps/qextserialport/html/win__qextserialport_8cpp.html delete mode 100644 src/core/gps/qextserialport/html/win__qextserialport_8h.html delete mode 100644 src/core/gps/qextserialport/qextserialport.pro diff --git a/src/core/gps/qextserialport/ChangeLog b/src/core/gps/qextserialport/ChangeLog deleted file mode 100644 index b5b04bb8e72b..000000000000 --- a/src/core/gps/qextserialport/ChangeLog +++ /dev/null @@ -1,245 +0,0 @@ -Change history for QextSerialPort (formerly QwSerialPort): -(Lines beginning with + represent new functionality, * represent changed or -fixed functionality, - represent removed or deprecated functionality) - - -Current CVS (Michal Policht) - + Added QextSerialEnumerator pre-alpha. Works under W2k and later versions of Windows. - + Event driven mechanism (alternative to polling) is now available on Windows. - - Removed default (=0) parameter from open() functions. - * Fixed bug #1714917 in Win_QextSerialPort::close() method (by Kurt). - * Fixed problem with lack of proper blocking in readData() on win32 (by Brandon Fosdick). - * Removed QT_THREAD_SUPPORT option. Now QextSerialPort must be always compiled with threads support. - * Mutexes are not static. - * setTimeout() now accepts only one parameter. - * bytesAvailable() on POSIX now shows 0 bytes instead of -1 when no bytes are available. - * bytesAvailable() is const. - * native POSIX file descriptors instead of QFile->handle() calls - + POSIX: Save and restore original termios when opening and closing the device - * POSIX: Only disable special characters on systems that support it - * POSIX: Use cfmakeraw(3) to get a non-canonical termios - + POSIX: Call close(2) in close() to actually close the device - -Version 1.1 (official release) - -Version 1.0.1 - * Minor changes (mostly in test application) - -Version 1.0.0e (by Micha³ Policht) - * Fixed bytesAvailable(). Includes buffered bytes to the result. - + Added isSequential() method. - + Provided test application - -Version 1.0.0d ( changes by Micha³ Policht ) - - Removed isOpen() overriden declaration/implementation from qextserialport's classes. isOpen() relies on QIODevice now. - - Removed bool portOpen variable. Replaced by internal QIODevice.openMode. - - Removed getChar(), putChar() overriden declaration/implementation. QIODevice can handle this. - * Calling open() with specified OpenMode invokes QIODevice::open() which result in proper openMode setting. - * readData(), writeData() are protected as in QIODevice declaration. - * QIODevice:: read() and write() function are working now (use them instead of readData() writeData()). - * readData(), writeData() don't check if port is open any more (read() and write() assures that). The same behaviour can be found in QFile for example. - * Fixed readLine(). - - * Fixed randomly crash on deletion bug on Windows ( by Stuart Nixon ) - http://lists.trolltech.com/qt-interest/2007-02/thread00340-0.html#msg00351 - -Version 0.9 (March 3, 2005) Stefan Sander : - + Added a new precompiler constant, _TTY_FREEBSD_ - to support FreeBSD port names. - + Added _TTY_WIN_ constant in qextserialport.pro win32:DEFINES - to have Windows port names as default when compiling on it. - - Removed construct() call from QextSerialBase constructors, - it is called indirectly through Win_QextSerialPort::construct() - and Posix_QextSerialPort::construct(). - + Added construct() call to Win_QextSerialPort constructors. - + Added setTimeout(0, 500) call to Win_QextSerialPort::construct(). - - Removed setTimeout(0, 500) call from Win_QextSerialPort(const char* name). - * Fixed Posix_QextSerialPort::open(int) control flow, now the port settings - are only applied if the associated file could be opened. - * Fixed masking CR to NL, in Posix_CommConfig.c_iflag - -Version 0.8 (, 2003) (Alpha release): - * Added code to set the port timeouts in Win_QextSerialPort's default - constructor. - * Fixed Posix_QextSerialPort::construct() to set up the port correctly. - * Fixed syntax errors in 2 ioctl() calls in posix_QextSerialPort. - * lastError is now initialized to E_NO_ERROR in the QextSerialBase - constructor. - * The select() call in posix_QextSerialPort::bytesWaiting() is now - properly coded. Previously it would always time out. - * Fixed runtime errors in the ioctl() calls for - Posix_QextSerialPort::setDtr() and Posix_QextSerialPort::setRts(). - Thanks to Marc Pignat. - -Version 0.7 (June 15, 2002) : - (0.61 - unofficial release) - * Fixed a small bug in the initializations of the static members when - QT_THREAD_SUPPORT was defined. - * Fixed a bug that caused Borland's compiler to choke on Windows platforms - (which perversely actually stemmed from a shortcoming of Visual C++ that - Borland doesn't have). - - (0.62 - unofficial release) - * Fixed a bug that gave Q_LONG the wrong typedef for QT versions prior to - 3.0. - - (0.63 - unofficial release) - * Fixed 2 incorrect references to Posix_Comm_Config. - * Fixed scoping of Posix_QextSerialPort::operator=(). - * Posix_QextSerialPort::construct should now be coded correctly. - * Fixed return type for Posix_QextSerialPort::size(). - - (0.64 - unofficial release) - * Fixed all the port settings functions to work properly when opening the - port for the first time - previously none of the settings were being - applied when the port was opened. - * Fixed an oversight in Win_QextSerialPort::open() that caused the setting - of port parameters to fail on NT and 2000 systems. - - (0.7 - official release) - * Fixed some calls to QextSerialBase constructors that no longer exist on - the POSIX side. - * Fixed the bad memcpy()'s in the POSIX copy constructor. - * Fixed the Offset scoping problem under gcc 2.95. - * The CBAUD flag has been deprecated on some POSIX systems. Fixed - Posix_QextSerialPort::setBaudRate() to reflect this. - * Added construct() calls to all of the Posix_QextSerialPort constructors. - * Fixed double (and conflicting) typedefs of Offset when using QT versions - prior to 3.0 - * Changed the call to CreateFile() to CreateFileA() in - Win_QextSerialPort.cpp. This should get rid of problems for those using - Unicode or other multibyte character sets for their string literals. - * A few tweaks to the documentation. - - - Removed the protected Posix_Handle variable from Posix_QextSerialPort. - -Version 0.6 (March 11, 2002) : - + Added a new precompiler constant, QTVER_PRE_30. QT3 changed the return - types of some QIODevice functions. Therefore, if compiling on versions - of QT prior to 3.0, you should always define QTVER_PRE_30 in your project. - Also had to add some preprocessor blocks to support both 3.0 and earlier - versions of QT. - + Added implementations of 2 of the new constructors added in 0.5 to both - Win_QextSerialPort and Posix_QextSerialPort. - - * The scoping of the enums used in the PortSettings struct has been fixed. - * QObject inheritance has been removed. This should not affect the - functionality of the classes. - * Replaced a few stray references to mutex->unlock() with UNLOCK_MUTEX() in - the Windows code. - * Fixed several runtime errors caused by calling nonexistent members of - QextSerialBase. - * Fixed a whole bunch of little things that were causing MSVC to choke when - compiling for Windows. - -Version 0.5 (February 15, 2002): - + There are 4 new macros (LOCK_MUTEX, UNLOCK_MUTEX, TTY_WARNING, and - TTY_PORTABILITY_WARNING) that replace most of those ugly #ifdef blocks in - the code. - + In place of the old namingConvention stuff, there is a new function, - setName(). It is used to set the name of the device to be associated with - the object. The new name() function can be used to retrieve the device - name, which is stored in the new member variable portName. - + There is a new version of open() that takes a const char* as a parameter. - It can be used to specify the name of the device when it is opened rather - than at construction time. - - * 3 constructors have been removed and 3 more added. There is now a copy - constructor (and operator=()) as well as a constructor that takes a - PortSettings structure as a parameter, and another that takes both a - device name and a PortSettings structure. As a result of these changes - the PortSettings structure declaration is no longer local to the - QextSerialBase class. All of the removed constructors had to do with - the setNamingConvention() system. - * The static mutex member should now be reference-counted and only deleted - when it is no longer referenced. - * Most of the object construction duties have been pushed back into - QextSerialBase - * Fixed a couple resource leaks, mostly to do with unlocking the mutex - properly - - - Removed the setNamingConvention() nonsense. - - Removed all QStrings and calls to sprintf() for thread compatibility. - - Removed setNumber() functions as well as the portNumber member variable, - as they were only necessary under the setNamingConvention() system. - - I am grateful to Jorg Preiss (Preisz? Sorry, American keyboards don't have - an ess-tset character ;)) for his invaluable input on most of the changes - that went into this version. - -Version 0.4 (March 20, 2001): - + All of the classes now derive from QObject as well as QIODevice. This - is pretty much useless at the moment - signals and slots may be used - to implement asynchronous communications in a future version - + Added configurable timeouts via the setTimeout() function. The default - timeout for read and write operations is now 500 milliseconds - + There is now a functional .pro file for the library (thanks to - Gunnstein Lye) - + The prefixes for all of the classes have changed from Qw to Qext, in - compliance with the qt-addons project standard - - * Fixed a bug that caused port settings to be restored incorrectly when - switching ports with setNumber() - * Minor changes to QextSerialBase::setNumber(). Functionality should now - reflect the documentation, which has also been updated to reflect the - changes that went in on version 0.3. - * Some fixes to the documentation. The Posix_QextSerialPort and - Win_QextSerialPort classes should no longer have any unnecessary - references to inapplicable platforms, and the documentation for open() has - been updated. - * Should now compile without QT_THREAD_SUPPORT defined (ie, in single- - threaded environments), although it will require slight changes to the - makefile (tmake "CONFIG-=thread" should work) - * Fixed a few compilation issues, especially on the POSIX side (should - compile under Linux now :)) - * POSIX code is a little cleaner and more efficient - * Various small fixes to the documentation - * Constants now follow a consistent naming convention, with underscores at - the beginning and end of each. For example TTY_POSIX has become - _TTY_POSIX_ - -Version 0.3 (Feb. 14, 2001): - + Added a warning that appears when QwSerialPort is compiled on a POSIX - platform that does not implement 76800 baud operation. In this situation - QwSerialPort will also switch to 57600 baud. - + Major code reorganization - there are now 4 classes instead of 1. This - should remove a lot of the #ifdef...#else...#endif constructs and - hopefully make the code easier to read. Including the class in your - project is still done by including QwSerialPort.h and instantiating a - QwSerialPort object. - - * The serial port associated with a QwSerialPort object is no longer - opened on construction, or upon calling the setNumber() function. You - must now explicitly call open() to open the port. - -Version 0.2 (Jan. 3, 2001): - + Added lastError() function with rudimentary error codes - + Better documentation - + Added ability to examine the empty/not empty state of a port's input - buffer with atEnd() - + Added ability to retrieve the number of bytes in a port's input buffer - with size() (thanks to Olivier Tubach) - + Added ability to turn off portability warnings by defining - TTY_NOWARN_PORT in your project - + Added ability to turn off all warning messages by defining TTY_NOWARN - in your project - + Added ability to select POSIX serial functions in Windows NT/2000 by - defining TTY_POSIX in your project (untested) - + Added control over RTS and DTR lines with setRts() and setDtr() - respectively - + Added ability to query line status using lineStatus(). - + Added readLine() functionality (thanks to Olivier Tubach) - + Added bytesWaiting(), a non-const/thread-safe version of size() - + The class should now be thread-safe through the use of a recursive - QMutex (untested) - - * Fixed a bug that could cause hardware flow control not to work on some - POSIX systems - * Put in a few missing fileno() calls in the POSIX code - * Fixed a few syntax errors that caused compilation to fail on POSIX systems - - - BAUD0 is no longer a valid baud rate setting - to drop the DTR line, - call setDtr(FALSE) - -Version 0.1 (Dec. 11, 2000): - Initial public release. diff --git a/src/core/gps/qextserialport/Doxyfile b/src/core/gps/qextserialport/Doxyfile deleted file mode 100644 index 477356af4477..000000000000 --- a/src/core/gps/qextserialport/Doxyfile +++ /dev/null @@ -1,1514 +0,0 @@ -# Doxyfile 1.6.0 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = QextSerialPort - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = "1.2 beta" - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = YES - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set -# FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = YES - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = doc \ - . - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.h \ - *.cpp \ - *.dox - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = YES - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# When the SEARCHENGINE tag is enable doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) -# there is already a search function so this one should typically -# be disabled. - -SEARCHENGINE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = YES - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = "protected = private" - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = doc/qiodevice.tag - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = NO - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/src/core/gps/qextserialport/doc/mainpage.dox b/src/core/gps/qextserialport/doc/mainpage.dox deleted file mode 100644 index 96422aaa950f..000000000000 --- a/src/core/gps/qextserialport/doc/mainpage.dox +++ /dev/null @@ -1,12 +0,0 @@ -/*! - -\mainpage QextSerialPort - -A cross-platform serial port library. -
-QextSerialPort encapsulates a serial port on both POSIX and Windows systems.
-QextSerialEnumerator enumerates ports currently available in the system. -
-Check \ref porting_page "Porting Page" for sensitive changes since last release. - -*/ diff --git a/src/core/gps/qextserialport/doc/qextbasetype.dox b/src/core/gps/qextserialport/doc/qextbasetype.dox deleted file mode 100644 index 45817171d176..000000000000 --- a/src/core/gps/qextserialport/doc/qextbasetype.dox +++ /dev/null @@ -1,10 +0,0 @@ -/*! -\class QextBaseType - -This is not a class at all. It is a macro witch switches itself to Win_QextSerialPort or Posix_QextSerialPort -depending on compilation settings. -*/ -//this is fake class to trick Doxygen -class QextBaseType : public Win_QextSerialPort, public Posix_QextSerialPort -{}; - diff --git a/src/core/gps/qextserialport/doc/qiodevice.tag b/src/core/gps/qextserialport/doc/qiodevice.tag deleted file mode 100644 index 616407dc70c5..000000000000 --- a/src/core/gps/qextserialport/doc/qiodevice.tag +++ /dev/null @@ -1,216 +0,0 @@ - - - QIODevice - qiodevice.html - - QIODevice - QIODevice - () - - - QIODevice - QIODevice-2 - ( QObject * parent ) - - - aboutToClose - aboutToClose - () - - - atEnd - atEnd - () - - - bytesAvailable - bytesAvailable - () - - - bytesToWrite - bytesToWrite - () - - - bytesWritten - bytesWritten - ( qint64 bytes ) - - - canReadLine - canReadLine - () - - - close - close - () - - - errorString - errorString - () - - - getChar - getChar - ( char * c ) - - - isOpen - isOpen - () - - - isReadable - isReadable - () - - - isSequential - isSequential - () - - - isTextModeEnabled - isTextModeEnabled - () - - - isWritable - isWritable - () - - - open - open - ( OpenMode mode ) - - - openMode - openMode - () - - - peek - peek - ( char * data, qint64 maxSize ) - - - peek - peek-2 - ( qint64 maxSize ) - - - pos - pos - () - - - putChar - putChar - ( char c ) - - - read - read - ( char * data, qint64 maxSize ) - - - read - read-2 - ( qint64 maxSize ) - - - readAll - readAll - () - - - readData - readData - ( char * data, qint64 maxSize ) - - - readLine - readLine - ( char * data, qint64 maxSize ) - - - readLine - readLine-2 - ( qint64 maxSize = 0 ) - - - readLineData - readLineData - ( char * data, qint64 maxSize ) - - - readyRead - readyRead - () - - - reset - reset - () - - - seek - seek - ( qint64 pos ) - - - setErrorString - setErrorString - ( const QString & str ) - - - setOpenMode - setOpenMode - ( OpenMode openMode ) - - - setTextModeEnabled - setTextModeEnabled - ( bool enabled ) - - - size - size - () - - - ungetChar - ungetChar - ( char c ) - - - waitForBytesWritten - waitForBytesWritten - ( int msecs ) - - - waitForReadyRead - waitForReadyRead - ( int msecs ) - - - write - write - ( const char * data, qint64 maxSize ) - - - write - write-2 - ( const QByteArray & byteArray ) - - - writeData - writeData - ( const char * data, qint64 maxSize ) - - - diff --git a/src/core/gps/qextserialport/examples/enumerator/enumerator.pro b/src/core/gps/qextserialport/examples/enumerator/enumerator.pro deleted file mode 100644 index aaf914914548..000000000000 --- a/src/core/gps/qextserialport/examples/enumerator/enumerator.pro +++ /dev/null @@ -1,26 +0,0 @@ -###################################################################### -# Enumerator -###################################################################### - - -PROJECT = enumerator -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += ../.. -QMAKE_LIBDIR += ../../build - - -OBJECTS_DIR = obj -MOC_DIR = moc -UI_DIR = uic -CONFIG += qt warn_on console - - -SOURCES += main.cpp - - -CONFIG(debug, debug|release):LIBS += -lqextserialportd -else:LIBS += -lqextserialport - -unix:DEFINES = _TTY_POSIX_ -win32:DEFINES = _TTY_WIN_ diff --git a/src/core/gps/qextserialport/examples/enumerator/main.cpp b/src/core/gps/qextserialport/examples/enumerator/main.cpp deleted file mode 100644 index d9d24cd9f224..000000000000 --- a/src/core/gps/qextserialport/examples/enumerator/main.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @file main.cpp - * @brief Main file. - * @author MichaÅ‚ Policht - */ - -#include - -int main(int argc, char *argv[]) -{ - QList ports = QextSerialEnumerator::getPorts(); - printf("List of ports:\n"); - for (int i = 0; i < ports.size(); i++) { - printf("port name: %s\n", ports.at(i).portName.toLocal8Bit().constData()); - printf("friendly name: %s\n", ports.at(i).friendName.toLocal8Bit().constData()); - printf("physical name: %s\n", ports.at(i).physName.toLocal8Bit().constData()); - printf("enumerator name: %s\n", ports.at(i).enumName.toLocal8Bit().constData()); - printf("===================================\n\n"); - } - return EXIT_SUCCESS; -} diff --git a/src/core/gps/qextserialport/examples/event/PortListener.cpp b/src/core/gps/qextserialport/examples/event/PortListener.cpp deleted file mode 100644 index 076627ff4dfd..000000000000 --- a/src/core/gps/qextserialport/examples/event/PortListener.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file PortListener.cpp - * @brief PortListener Implementation. - * @see PortListener.h - */ - - -/* -============== - -============== -*/ - -#include -#include -#include "PortListener.h" - - -/* -============== - -============== -*/ - -PortListener::PortListener(QextSerialPort * port, QObject * parent): - QObject(parent) -{ - this->port = port; -} - - -/* -============== - -============== -*/ - - -/* -============== - -============== -*/ - - -/* -============== - -============== -*/ - -void PortListener::receive() -{ - char data[1024]; - QTextStream out(stdout); - - out << "data received: "; - int bytesRead = port->read(data, 1024); - data[bytesRead] = '\0'; - out << data << " (" << bytesRead << " bytes)" << endl; -} - -void PortListener::reportWritten(qint64 bytes) -{ - QTextStream out(stdout); - - out << bytes << " bytes written" << endl; -} - -void PortListener::reportClose() -{ - QTextStream out(stdout); - - out << "closing port" << endl; -} - -void PortListener::reportDsr(bool status) -{ - QTextStream out(stdout); - - if (status) - out << "device was turned on" << endl; - else - out << "device was turned off" << endl; -} - -/* -============== - -============== -*/ - - -/* -============== - -============== -*/ - diff --git a/src/core/gps/qextserialport/examples/event/PortListener.h b/src/core/gps/qextserialport/examples/event/PortListener.h deleted file mode 100644 index 1058eb6cbbd1..000000000000 --- a/src/core/gps/qextserialport/examples/event/PortListener.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @file PortListener.h - * @brief Port Listener. - * @see PortListener - */ - -#ifndef PORTLISTENER_H_ -#define PORTLISTENER_H_ - -#include - -class QextSerialPort; - - -/** - * Port Listener. - */ -class PortListener : public QObject -{ - Q_OBJECT - - QextSerialPort * port; - - - public: - /** - * Constructor. - * @param parent parent object. - */ - PortListener(QextSerialPort * port, QObject * parent = 0); - - public slots: - /** - * Receive data from serial port. - */ - void receive(); - - /** - * Report written bytes. - * @param bytes number of written bytes. - */ - void reportWritten(qint64 bytes); - - /** - * Report port closing. - */ - void reportClose(); - - /** - * Report DSR line. - * @param status line status. - */ - void reportDsr(bool status); - -}; - - -#endif /*PORTLISTENER_H_*/ diff --git a/src/core/gps/qextserialport/examples/event/event.pro b/src/core/gps/qextserialport/examples/event/event.pro deleted file mode 100644 index 19e541f3b5d2..000000000000 --- a/src/core/gps/qextserialport/examples/event/event.pro +++ /dev/null @@ -1,29 +0,0 @@ -###################################################################### -# Enumerator -###################################################################### - - -PROJECT = event -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += ../.. -QMAKE_LIBDIR += ../../build - - -OBJECTS_DIR = .obj #avoid using obj here, on some systems 'make' will try to switch into obj from the current directory and you will get "Cannot find file" error -MOC_DIR = .moc -UI_DIR = .uic -CONFIG += qt thread warn_on console - - -SOURCES += main.cpp \ - PortListener.cpp - -HEADERS += PortListener.h - - -CONFIG(debug, debug|release):LIBS += -lqextserialportd -else:LIBS += -lqextserialport - -unix:DEFINES = _TTY_POSIX_ -win32:DEFINES = _TTY_WIN_ diff --git a/src/core/gps/qextserialport/examples/event/main.cpp b/src/core/gps/qextserialport/examples/event/main.cpp deleted file mode 100644 index 34bf5ed9048d..000000000000 --- a/src/core/gps/qextserialport/examples/event/main.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file main.cpp - * @brief Main file. - * @author Michal Policht - */ - -#include -#include -#include -#include -#include -#include "PortListener.h" - -class SerialThread: public QThread -{ - QextSerialPort * port; - - protected: - virtual void run() - { - QString inStr; - QTextStream in(stdin); - QTextStream out(stdout); - - out << "Special commands: open close bye" << endl << endl; - while(inStr.compare("bye") != 0) { - in >> inStr; - if (inStr.compare("close") == 0) { - out << "requesting close... " << endl; - port->close(); - } - else if (inStr.compare("open") == 0) { - out << "opening port... "; - out << port->open(QIODevice::ReadWrite); - out << endl; - } else if (inStr.compare("bye") != 0) - port->write(inStr.toAscii().constData(), inStr.length()); - } - port->close(); - } - - public: - SerialThread(QextSerialPort * port, QObject * parent = 0): - QThread(parent) - { - this->port = port; - } -}; - -int main(int argc, char *argv[]) -{ - QTextStream out(stdout); - QCoreApplication app(argc, argv); - - QextSerialPort * port = new QextSerialPort("COM1", QextSerialPort::EventDriven); - port->setBaudRate(BAUD56000); - port->setFlowControl(FLOW_OFF); - port->setParity(PAR_NONE); - port->setDataBits(DATA_8); - port->setStopBits(STOP_2); - port->open(QIODevice::ReadWrite); - if (!(port->lineStatus() & LS_DSR)) { - out << "warning: device is not turned on" << endl; - } - - PortListener * listener = new PortListener(port); - //Because port and listener are working in different threads - //Qt will choose queued connection. This may produce clusters of - //signals waiting in the queue. - listener->connect(port, SIGNAL(readyRead()), listener, SLOT(receive())); - listener->connect(port, SIGNAL(bytesWritten(qint64)), listener, SLOT(reportWritten(qint64))); - listener->connect(port, SIGNAL(aboutToClose()), listener, SLOT(reportClose())); - listener->connect(port, SIGNAL(dsrChanged(bool)), listener, SLOT(reportDsr(bool))); - - SerialThread * thread = new SerialThread(port); - app.connect(thread, SIGNAL(finished()), & app, SLOT(quit())); - thread->start(); - - //event loop is required to utilize signals and slots mechanism - return app.exec(); -} diff --git a/src/core/gps/qextserialport/examples/qespta/MainWindow.cpp b/src/core/gps/qextserialport/examples/qespta/MainWindow.cpp deleted file mode 100644 index 5e21b81a448f..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/MainWindow.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @file MainWindow.cpp - * @brief MainWindow Implementation. - * @see MainWindow.h - * @author Micha³ Policht - */ - - -/* -============== - -============== -*/ - -#include -#include -#include "defs.h" -#include "MainWindow.h" -#include "MessageWindow.h" -#include "QespTest.h" - -/* -============== - -============== -*/ - -MainWindow::MainWindow(const QString &title) -{ - setWindowTitle(title); - //central widget - QespTest* qespTest = new QespTest(); - setCentralWidget(qespTest); - //bottom dock widget - MessageWindow* msgWindow = new MessageWindow(); - addDockWidget(Qt::BottomDockWidgetArea, msgWindow); - - createActions(); - createMenus(); -} - - -/* -============== - -============== -*/ - - -/* -============== - -============== -*/ - -void MainWindow::about() -{ - QMessageBox::about(this, tr("About "APP_TITLE), - tr(""APP_TITLE"
" - "author: Michal Policht
" - "xpolik@users.sourceforge.net")); -} - - -/* -============== - -============== -*/ - -void MainWindow::createActions() -{ - //File actions - exitAct = new QAction(tr("E&xit"), this); - exitAct->setShortcut(tr("CTRL+D")); - exitAct->setStatusTip(tr("Exit the application")); - connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); - - //Help actions - aboutAct = new QAction(tr("&About"), this); - aboutAct->setShortcut(tr("CTRL+A")); - aboutAct->setStatusTip(tr("About application")); - connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); - -} - -void MainWindow::createMenus() -{ - fileMenu = menuBar()->addMenu(tr("&File")); - fileMenu->addAction(exitAct); - - helpMenu = menuBar()->addMenu(tr("&Help")); - helpMenu->addAction(aboutAct); -} - diff --git a/src/core/gps/qextserialport/examples/qespta/MainWindow.h b/src/core/gps/qextserialport/examples/qespta/MainWindow.h deleted file mode 100644 index 146d4921239b..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/MainWindow.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file MainWindow.h - * @brief Application's Main Window. - * @see MainWindow - * @author Micha³ Policht - */ - - -#ifndef MAINWINDOW_H_ -#define MAINWINDOW_H_ - - -#include - -class QMenu; -class QAction; - - -/** - * Application's Main Window. - */ -class MainWindow : public QMainWindow -{ - Q_OBJECT - - /** - * @name Menu Bar - */ -//@{ - QMenu *fileMenu; - QAction *exitAct; - QMenu *helpMenu; - QAction *aboutAct; -//@} - - - private: - /** - * Create menus. - */ - void createMenus(); - - /** - * Create actions. - */ - void createActions(); - - private slots: - /** - * About application popup. - */ - void about(); - - public: - /** - * MainWindow default constructor. - * @param title window title. - */ - MainWindow(const QString &title); - -}; - -#endif /*MAINWINDOW_H_*/ - diff --git a/src/core/gps/qextserialport/examples/qespta/Makefile b/src/core/gps/qextserialport/examples/qespta/Makefile deleted file mode 100644 index 72524e3c3cbe..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/Makefile +++ /dev/null @@ -1,237 +0,0 @@ -############################################################################# -# Makefile for building: QESPTA -# Generated by qmake (2.01a) (Qt 4.3.1) on: Fri Dec 7 18:04:12 2007 -# Project: QESPTA.pro -# Template: app -# Command: /usr/local/Trolltech/Qt-4.3.1/bin/qmake -unix -o Makefile QESPTA.pro -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -D_TTY_POSIX_ -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES) -CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES) -INCPATH = -I/usr/local/Trolltech/Qt-4.3.1/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.1/include/QtCore -I/usr/local/Trolltech/Qt-4.3.1/include/QtCore -I/usr/local/Trolltech/Qt-4.3.1/include/QtGui -I/usr/local/Trolltech/Qt-4.3.1/include/QtGui -I/usr/local/Trolltech/Qt-4.3.1/include -I../.. -Imoc -Iuic -LINK = g++ -LFLAGS = -Wl,-rpath,/usr/local/Trolltech/Qt-4.3.1/lib -LIBS = $(SUBLIBS) -L../../build -L/usr/local/Trolltech/Qt-4.3.1/lib -lqextserialportd -lQtGui -L/usr/local/Trolltech/Qt-4.3.1/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread -ldl -AR = ar cqs -RANLIB = -QMAKE = /usr/local/Trolltech/Qt-4.3.1/bin/qmake -TAR = tar -cf -COMPRESS = gzip -9f -COPY = cp -f -SED = sed -COPY_FILE = $(COPY) -COPY_DIR = $(COPY) -r -INSTALL_FILE = install -m 644 -p -INSTALL_DIR = $(COPY_DIR) -INSTALL_PROGRAM = install -m 755 -p -DEL_FILE = rm -f -SYMLINK = ln -sf -DEL_DIR = rmdir -MOVE = mv -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p - -####### Output directory - -OBJECTS_DIR = obj/ - -####### Files - -SOURCES = main.cpp \ - MainWindow.cpp \ - MessageWindow.cpp \ - QespTest.cpp moc/moc_MainWindow.cpp \ - moc/moc_MessageWindow.cpp \ - moc/moc_QespTest.cpp -OBJECTS = obj/main.o \ - obj/MainWindow.o \ - obj/MessageWindow.o \ - obj/QespTest.o \ - obj/moc_MainWindow.o \ - obj/moc_MessageWindow.o \ - obj/moc_QespTest.o -DIST = /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/debug.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf \ - QESPTA.pro -QMAKE_TARGET = QESPTA -DESTDIR = -TARGET = QESPTA - -first: all -####### Implicit rules - -.SUFFIXES: .o .c .cpp .cc .cxx .C - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" - -####### Build rules - -all: Makefile $(TARGET) - -$(TARGET): $(OBJECTS) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) - -Makefile: QESPTA.pro /usr/local/Trolltech/Qt-4.3.1/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/debug.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf \ - /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf \ - /usr/local/Trolltech/Qt-4.3.1/lib/libQtGui.prl \ - /usr/local/Trolltech/Qt-4.3.1/lib/libQtCore.prl - $(QMAKE) -unix -o Makefile QESPTA.pro -/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/debug.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf: -/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf: -/usr/local/Trolltech/Qt-4.3.1/lib/libQtGui.prl: -/usr/local/Trolltech/Qt-4.3.1/lib/libQtCore.prl: -qmake: FORCE - @$(QMAKE) -unix -o Makefile QESPTA.pro - -dist: - @$(CHK_DIR_EXISTS) obj/QESPTA1.0.0 || $(MKDIR) obj/QESPTA1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/QESPTA1.0.0/ && $(COPY_FILE) --parents MainWindow.h MessageWindow.h QespTest.h obj/QESPTA1.0.0/ && $(COPY_FILE) --parents main.cpp MainWindow.cpp MessageWindow.cpp QespTest.cpp obj/QESPTA1.0.0/ && (cd `dirname obj/QESPTA1.0.0` && $(TAR) QESPTA1.0.0.tar QESPTA1.0.0 && $(COMPRESS) QESPTA1.0.0.tar) && $(MOVE) `dirname obj/QESPTA1.0.0`/QESPTA1.0.0.tar.gz . && $(DEL_FILE) -r obj/QESPTA1.0.0 - - -clean:compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) *~ core *.core - - -####### Sub-libraries - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) Makefile - - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: moc/moc_MainWindow.cpp moc/moc_MessageWindow.cpp moc/moc_QespTest.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc/moc_MainWindow.cpp moc/moc_MessageWindow.cpp moc/moc_QespTest.cpp -moc/moc_MainWindow.cpp: MainWindow.h - /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) MainWindow.h -o moc/moc_MainWindow.cpp - -moc/moc_MessageWindow.cpp: MessageWindow.h - /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) MessageWindow.h -o moc/moc_MessageWindow.cpp - -moc/moc_QespTest.cpp: QespTest.h - /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) QespTest.h -o moc/moc_QespTest.cpp - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: -compiler_uic_clean: -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean - -####### Compile - -obj/main.o: main.cpp defs.h \ - MainWindow.h \ - MessageWindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/main.o main.cpp - -obj/MainWindow.o: MainWindow.cpp defs.h \ - MainWindow.h \ - MessageWindow.h \ - QespTest.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/MainWindow.o MainWindow.cpp - -obj/MessageWindow.o: MessageWindow.cpp MessageWindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/MessageWindow.o MessageWindow.cpp - -obj/QespTest.o: QespTest.cpp QespTest.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/QespTest.o QespTest.cpp - -obj/moc_MainWindow.o: moc/moc_MainWindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_MainWindow.o moc/moc_MainWindow.cpp - -obj/moc_MessageWindow.o: moc/moc_MessageWindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_MessageWindow.o moc/moc_MessageWindow.cpp - -obj/moc_QespTest.o: moc/moc_QespTest.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_QespTest.o moc/moc_QespTest.cpp - -####### Install - -install: FORCE - -uninstall: FORCE - -FORCE: - diff --git a/src/core/gps/qextserialport/examples/qespta/Makefile.Debug b/src/core/gps/qextserialport/examples/qespta/Makefile.Debug deleted file mode 100644 index 404387941485..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/Makefile.Debug +++ /dev/null @@ -1,170 +0,0 @@ -############################################################################# -# Makefile for building: qespta -# Generated by qmake (2.01a) (Qt 4.3.0) on: Pt 14. wrz 16:10:49 2007 -# Project: qespta.pro -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -D_TTY_WIN_ -DQT_THREAD_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -CFLAGS = -g -Wall $(DEFINES) -CXXFLAGS = -g -Wall -frtti -fexceptions -mthreads $(DEFINES) -INCPATH = -I"e:\Winprogs\Qt\include\QtCore" -I"e:\Winprogs\Qt\include\QtCore" -I"e:\Winprogs\Qt\include\QtGui" -I"e:\Winprogs\Qt\include\QtGui" -I"e:\Winprogs\Qt\include" -I"..\.." -I"e:\Winprogs\Qt\include\ActiveQt" -I"moc" -I"uic" -I"e:\Winprogs\Qt\mkspecs\win32-g++" -LINK = g++ -LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -LIBS = -L"..\..\build" -L"e:\Winprogs\Qt\lib" -lmingw32 -lqtmaind -lqextserialportd -lQtGuid4 -lQtCored4 -QMAKE = e:\Winprogs\Qt\bin\qmake.exe -IDC = e:\Winprogs\Qt\bin\idc.exe -IDL = midl -ZIP = zip -r -9 -DEF_FILE = -RES_FILE = -COPY = copy /y -COPY_FILE = $(COPY) -COPY_DIR = xcopy /s /q /y /i -DEL_FILE = del -DEL_DIR = rmdir -MOVE = move -CHK_DIR_EXISTS= if not exist -MKDIR = mkdir -INSTALL_FILE = $(COPY_FILE) -INSTALL_PROGRAM = $(COPY_FILE) -INSTALL_DIR = $(COPY_DIR) - -####### Output directory - -OBJECTS_DIR = obj - -####### Files - -SOURCES = main.cpp \ - MainWindow.cpp \ - MessageWindow.cpp \ - QespTest.cpp moc\moc_MainWindow.cpp \ - moc\moc_MessageWindow.cpp \ - moc\moc_QespTest.cpp -OBJECTS = obj\main.o \ - obj\MainWindow.o \ - obj\MessageWindow.o \ - obj\QespTest.o \ - obj\moc_MainWindow.o \ - obj\moc_MessageWindow.o \ - obj\moc_QespTest.o -DIST = -QMAKE_TARGET = qespta -DESTDIR = debug\ #avoid trailing-slash linebreak -TARGET = qespta.exe -DESTDIR_TARGET = debug\qespta.exe - -####### Implicit rules - -.SUFFIXES: .cpp .cc .cxx .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - -first: all -all: Makefile.Debug $(DESTDIR_TARGET) - -$(DESTDIR_TARGET): $(OBJECTS) - $(LINK) $(LFLAGS) -o "$(DESTDIR_TARGET)" $(OBJECTS) $(LIBS) - - -qmake: FORCE - @$(QMAKE) -win32 -o Makefile.Debug qespta.pro - -dist: - $(ZIP) qespta.zip $(SOURCES) $(DIST) qespta.pro e:\Winprogs\Qt\mkspecs\qconfig.pri e:\Winprogs\Qt\mkspecs\features\qt_functions.prf e:\Winprogs\Qt\mkspecs\features\qt_config.prf e:\Winprogs\Qt\mkspecs\features\exclusive_builds.prf e:\Winprogs\Qt\mkspecs\features\default_pre.prf e:\Winprogs\Qt\mkspecs\features\win32\default_pre.prf e:\Winprogs\Qt\mkspecs\features\debug.prf e:\Winprogs\Qt\mkspecs\features\debug_and_release.prf e:\Winprogs\Qt\mkspecs\features\default_post.prf e:\Winprogs\Qt\mkspecs\features\build_pass.prf e:\Winprogs\Qt\mkspecs\features\warn_on.prf e:\Winprogs\Qt\mkspecs\features\win32\thread.prf e:\Winprogs\Qt\mkspecs\features\qt.prf e:\Winprogs\Qt\mkspecs\features\moc.prf e:\Winprogs\Qt\mkspecs\features\win32\rtti.prf e:\Winprogs\Qt\mkspecs\features\win32\exceptions.prf e:\Winprogs\Qt\mkspecs\features\win32\stl.prf e:\Winprogs\Qt\mkspecs\features\shared.prf e:\Winprogs\Qt\mkspecs\features\win32\windows.prf e:\Winprogs\Qt\mkspecs\features\resources.prf e:\Winprogs\Qt\mkspecs\features\uic.prf e:\Winprogs\Qt\mkspecs\features\yacc.prf e:\Winprogs\Qt\mkspecs\features\lex.prf e:\Winprogs\Qt\lib\qtmaind.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES - -clean: compiler_clean - -$(DEL_FILE) obj\main.o obj\MainWindow.o obj\MessageWindow.o obj\QespTest.o obj\moc_MainWindow.o obj\moc_MessageWindow.o obj\moc_QespTest.o - -distclean: clean - -$(DEL_FILE) $(DESTDIR_TARGET) - -$(DEL_FILE) Makefile.Debug - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: moc\moc_MainWindow.cpp moc\moc_MessageWindow.cpp moc\moc_QespTest.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc\moc_MainWindow.cpp moc\moc_MessageWindow.cpp moc\moc_QespTest.cpp -moc\moc_MainWindow.cpp: MainWindow.h - E:/Winprogs/Qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 MainWindow.h -o moc\moc_MainWindow.cpp - -moc\moc_MessageWindow.cpp: MessageWindow.h - E:/Winprogs/Qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 MessageWindow.h -o moc\moc_MessageWindow.cpp - -moc\moc_QespTest.cpp: QespTest.h - E:/Winprogs/Qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 QespTest.h -o moc\moc_QespTest.cpp - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: -compiler_uic_clean: -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean - - - -####### Compile - -obj\main.o: main.cpp defs.h \ - MainWindow.h \ - MessageWindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\main.o main.cpp - -obj\MainWindow.o: MainWindow.cpp defs.h \ - MainWindow.h \ - MessageWindow.h \ - QespTest.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\MainWindow.o MainWindow.cpp - -obj\MessageWindow.o: MessageWindow.cpp MessageWindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\MessageWindow.o MessageWindow.cpp - -obj\QespTest.o: QespTest.cpp QespTest.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\QespTest.o QespTest.cpp - -obj\moc_MainWindow.o: moc\moc_MainWindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\moc_MainWindow.o moc\moc_MainWindow.cpp - -obj\moc_MessageWindow.o: moc\moc_MessageWindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\moc_MessageWindow.o moc\moc_MessageWindow.cpp - -obj\moc_QespTest.o: moc\moc_QespTest.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\moc_QespTest.o moc\moc_QespTest.cpp - -####### Install - -install: FORCE - -uninstall: FORCE - -FORCE: - diff --git a/src/core/gps/qextserialport/examples/qespta/Makefile.Release b/src/core/gps/qextserialport/examples/qespta/Makefile.Release deleted file mode 100644 index b749fe5b1ac3..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/Makefile.Release +++ /dev/null @@ -1,170 +0,0 @@ -############################################################################# -# Makefile for building: qespta -# Generated by qmake (2.01a) (Qt 4.3.0) on: Pt 14. wrz 16:10:49 2007 -# Project: qespta.pro -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -D_TTY_WIN_ -DQT_THREAD_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -CFLAGS = -O2 -Wall $(DEFINES) -CXXFLAGS = -O2 -Wall -frtti -fexceptions -mthreads $(DEFINES) -INCPATH = -I"e:\Winprogs\Qt\include\QtCore" -I"e:\Winprogs\Qt\include\QtCore" -I"e:\Winprogs\Qt\include\QtGui" -I"e:\Winprogs\Qt\include\QtGui" -I"e:\Winprogs\Qt\include" -I"..\.." -I"e:\Winprogs\Qt\include\ActiveQt" -I"moc" -I"uic" -I"e:\Winprogs\Qt\mkspecs\win32-g++" -LINK = g++ -LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -LIBS = -L"..\..\build" -L"e:\Winprogs\Qt\lib" -lmingw32 -lqtmain -lqextserialport -lQtGui4 -lQtCore4 -QMAKE = e:\Winprogs\Qt\bin\qmake.exe -IDC = e:\Winprogs\Qt\bin\idc.exe -IDL = midl -ZIP = zip -r -9 -DEF_FILE = -RES_FILE = -COPY = copy /y -COPY_FILE = $(COPY) -COPY_DIR = xcopy /s /q /y /i -DEL_FILE = del -DEL_DIR = rmdir -MOVE = move -CHK_DIR_EXISTS= if not exist -MKDIR = mkdir -INSTALL_FILE = $(COPY_FILE) -INSTALL_PROGRAM = $(COPY_FILE) -INSTALL_DIR = $(COPY_DIR) - -####### Output directory - -OBJECTS_DIR = obj - -####### Files - -SOURCES = main.cpp \ - MainWindow.cpp \ - MessageWindow.cpp \ - QespTest.cpp moc\moc_MainWindow.cpp \ - moc\moc_MessageWindow.cpp \ - moc\moc_QespTest.cpp -OBJECTS = obj\main.o \ - obj\MainWindow.o \ - obj\MessageWindow.o \ - obj\QespTest.o \ - obj\moc_MainWindow.o \ - obj\moc_MessageWindow.o \ - obj\moc_QespTest.o -DIST = -QMAKE_TARGET = qespta -DESTDIR = release\ #avoid trailing-slash linebreak -TARGET = qespta.exe -DESTDIR_TARGET = release\qespta.exe - -####### Implicit rules - -.SUFFIXES: .cpp .cc .cxx .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - -first: all -all: Makefile.Release $(DESTDIR_TARGET) - -$(DESTDIR_TARGET): $(OBJECTS) - $(LINK) $(LFLAGS) -o "$(DESTDIR_TARGET)" $(OBJECTS) $(LIBS) - - -qmake: FORCE - @$(QMAKE) -win32 -o Makefile.Release qespta.pro - -dist: - $(ZIP) qespta.zip $(SOURCES) $(DIST) qespta.pro e:\Winprogs\Qt\mkspecs\qconfig.pri e:\Winprogs\Qt\mkspecs\features\qt_functions.prf e:\Winprogs\Qt\mkspecs\features\qt_config.prf e:\Winprogs\Qt\mkspecs\features\exclusive_builds.prf e:\Winprogs\Qt\mkspecs\features\default_pre.prf e:\Winprogs\Qt\mkspecs\features\win32\default_pre.prf e:\Winprogs\Qt\mkspecs\features\release.prf e:\Winprogs\Qt\mkspecs\features\debug_and_release.prf e:\Winprogs\Qt\mkspecs\features\default_post.prf e:\Winprogs\Qt\mkspecs\features\build_pass.prf e:\Winprogs\Qt\mkspecs\features\warn_on.prf e:\Winprogs\Qt\mkspecs\features\win32\thread.prf e:\Winprogs\Qt\mkspecs\features\qt.prf e:\Winprogs\Qt\mkspecs\features\moc.prf e:\Winprogs\Qt\mkspecs\features\win32\rtti.prf e:\Winprogs\Qt\mkspecs\features\win32\exceptions.prf e:\Winprogs\Qt\mkspecs\features\win32\stl.prf e:\Winprogs\Qt\mkspecs\features\shared.prf e:\Winprogs\Qt\mkspecs\features\win32\windows.prf e:\Winprogs\Qt\mkspecs\features\resources.prf e:\Winprogs\Qt\mkspecs\features\uic.prf e:\Winprogs\Qt\mkspecs\features\yacc.prf e:\Winprogs\Qt\mkspecs\features\lex.prf e:\Winprogs\Qt\lib\qtmain.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES - -clean: compiler_clean - -$(DEL_FILE) obj\main.o obj\MainWindow.o obj\MessageWindow.o obj\QespTest.o obj\moc_MainWindow.o obj\moc_MessageWindow.o obj\moc_QespTest.o - -distclean: clean - -$(DEL_FILE) $(DESTDIR_TARGET) - -$(DEL_FILE) Makefile.Release - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: moc\moc_MainWindow.cpp moc\moc_MessageWindow.cpp moc\moc_QespTest.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc\moc_MainWindow.cpp moc\moc_MessageWindow.cpp moc\moc_QespTest.cpp -moc\moc_MainWindow.cpp: MainWindow.h - E:/Winprogs/Qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 MainWindow.h -o moc\moc_MainWindow.cpp - -moc\moc_MessageWindow.cpp: MessageWindow.h - E:/Winprogs/Qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 MessageWindow.h -o moc\moc_MessageWindow.cpp - -moc\moc_QespTest.cpp: QespTest.h - E:/Winprogs/Qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 QespTest.h -o moc\moc_QespTest.cpp - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: -compiler_uic_clean: -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean - - - -####### Compile - -obj\main.o: main.cpp defs.h \ - MainWindow.h \ - MessageWindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\main.o main.cpp - -obj\MainWindow.o: MainWindow.cpp defs.h \ - MainWindow.h \ - MessageWindow.h \ - QespTest.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\MainWindow.o MainWindow.cpp - -obj\MessageWindow.o: MessageWindow.cpp MessageWindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\MessageWindow.o MessageWindow.cpp - -obj\QespTest.o: QespTest.cpp QespTest.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\QespTest.o QespTest.cpp - -obj\moc_MainWindow.o: moc\moc_MainWindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\moc_MainWindow.o moc\moc_MainWindow.cpp - -obj\moc_MessageWindow.o: moc\moc_MessageWindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\moc_MessageWindow.o moc\moc_MessageWindow.cpp - -obj\moc_QespTest.o: moc\moc_QespTest.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj\moc_QespTest.o moc\moc_QespTest.cpp - -####### Install - -install: FORCE - -uninstall: FORCE - -FORCE: - diff --git a/src/core/gps/qextserialport/examples/qespta/MessageWindow.cpp b/src/core/gps/qextserialport/examples/qespta/MessageWindow.cpp deleted file mode 100644 index 29436eeb68cd..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/MessageWindow.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/** - * @file MessageWindow.cpp - * @brief MessageWindow Implementation. - * @see MessageWindow.h - * @author Micha³ Policht - */ - - -/* -============== - -============== -*/ - -#include "MessageWindow.h" -#include -#include -#include - -const char* MessageWindow::WINDOW_TITLE = "Message Window"; -MessageWindow* MessageWindow::MsgHandler = NULL; - - -/* -============== - -============== -*/ - -MessageWindow::MessageWindow(QWidget* parent, Qt::WFlags flags) - : QDockWidget(parent, flags), - msgTextEdit(this) -{ - setWindowTitle(tr(WINDOW_TITLE)); - msgTextEdit.setReadOnly(true); - setWidget(&msgTextEdit); - - MessageWindow::MsgHandler = this; -} - - -/* -============== - -============== -*/ - - -/* -============== - -============== -*/ - - -/* -============== - -============== -*/ - -//static -QString MessageWindow::QtMsgToQString(QtMsgType type, const char *msg) -{ - switch (type) { - case QtDebugMsg: - return QString("Debug: ")+QString(msg); - case QtWarningMsg: - return QString("Warning: ")+QString(msg); - case QtCriticalMsg: - return QString("Critical: ")+QString(msg); - case QtFatalMsg: - return QString("Fatal: ")+QString(msg); - default: - return QString("Unrecognized message type: ")+QString(msg); - } -} - -//static -void MessageWindow::AppendMsgWrapper(QtMsgType type, const char* msg) -{ - static QMutex mutex; - QMutexLocker locker(&mutex); - - if (MessageWindow::MsgHandler != NULL) - return MessageWindow::MsgHandler->postMsgEvent(type, msg); - else - fprintf(stderr, MessageWindow::QtMsgToQString(type, msg).toAscii()); -} - -void MessageWindow::customEvent(QEvent* event) -{ - if (static_cast(event->type()) == MessageWindow::MessageEvent) - msgTextEdit.append(dynamic_cast(event)->msg); -} - -void MessageWindow::postMsgEvent(QtMsgType type, const char* msg) -{ - QString qmsg = MessageWindow::QtMsgToQString(type, msg); - switch (type) { - case QtDebugMsg: - break; - case QtWarningMsg: - qmsg.prepend(""); - qmsg.append(""); - break; - case QtCriticalMsg: - if (QMessageBox::critical(this, "Critical Error", qmsg, - QMessageBox::Ignore, - QMessageBox::Abort, - QMessageBox::NoButton) == QMessageBox::Abort) - abort(); // core dump - qmsg.prepend(""); - qmsg.append(""); - break; - case QtFatalMsg: - QMessageBox::critical(this, "Fatal Error", qmsg, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); - abort(); // deliberately core dump - } - //it's impossible to change GUI directly from thread other than the main thread - //so post message encapsulated by MessageEvent to the main thread's event queue - QCoreApplication::postEvent(this, new MessageEvent::MessageEvent(qmsg)); -} - - -/* -============== - -============== -*/ - -MessageEvent::MessageEvent(QString & msg): - QEvent(static_cast(MessageWindow::MessageEvent)) -{ - this->msg = msg; -} diff --git a/src/core/gps/qextserialport/examples/qespta/MessageWindow.h b/src/core/gps/qextserialport/examples/qespta/MessageWindow.h deleted file mode 100644 index a01bcf8b328e..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/MessageWindow.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file MessageWindow.h - * @brief Message Window. - * @see MessageWindow - * @author Micha³ Policht - */ - -#ifndef MESSAGEWINDOW_H_ -#define MESSAGEWINDOW_H_ - - -#include -#include -#include - -/** - * Message Window. Handling errors and other messages. - */ -class MessageWindow: public QDockWidget -{ - Q_OBJECT - - QTextEdit msgTextEdit; ///< Main widget. - static MessageWindow* MsgHandler; ///< Set in constructor. - static const char* WINDOW_TITLE; ///< Window title. - - private: - static QString QtMsgToQString(QtMsgType type, const char *msg); - - protected: - /** - * Handle custom events. MessageWindow hadles custom events listed in - * EventType enum. - */ - virtual void customEvent(QEvent* event); - - public: - enum EventType {MessageEvent = QEvent::User}; ///< Custom event types. - - /** - * Default constructor. - * @param parent parent widget. - * @param flags widget flags. - */ - MessageWindow(QWidget* parent = 0, Qt::WFlags flags = 0); - - /** - * Append message wrapper. Since ISO forbids casting member functions - * to C functions, wrapper is needed to use this class as QtMsgHandler. - * This method is thread-safe but not reentrant. - * @param type message type. - * @param msg message string. - */ - static void AppendMsgWrapper(QtMsgType type, const char *msg); - - /** - * Post message event to the main event loop. This function encapsulates - * message into MessageEvent object and passes it to the main event loop. - * @param type message type. - * @param msg message string. - */ - void postMsgEvent(QtMsgType type, const char *msg); - -}; - - -/** - * Message Event. Custom event used by @ref MessageWindow to provide multi-threaded - * access. Encapsulates message inside @a msg variable. - */ -class MessageEvent: public QEvent -{ - public: - QString msg; ///< Message string. - - /** - * Contructor. - * @param msg message to post. - */ - MessageEvent(QString & msg); -}; - -#endif /*MESSAGEWINDOW_H_*/ diff --git a/src/core/gps/qextserialport/examples/qespta/QESPTA.pro b/src/core/gps/qextserialport/examples/qespta/QESPTA.pro deleted file mode 100644 index 4f03bd88d0b5..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/QESPTA.pro +++ /dev/null @@ -1,32 +0,0 @@ -###################################################################### -# QextSerialPort Test Application (QESPTA) -###################################################################### - - -PROJECT = QESPTA -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += ../.. -QMAKE_LIBDIR += ../../build - - -OBJECTS_DIR = .obj -MOC_DIR = .moc -UI_DIR = .uic -CONFIG += qt thread warn_on debug - - -HEADERS += MainWindow.h \ - MessageWindow.h \ - QespTest.h - -SOURCES += main.cpp \ - MainWindow.cpp \ - MessageWindow.cpp \ - QespTest.cpp - -CONFIG(debug, debug|release):LIBS += -lqextserialportd -else:LIBS += -lqextserialport - -unix:DEFINES = _TTY_POSIX_ -win32:DEFINES = _TTY_WIN_ diff --git a/src/core/gps/qextserialport/examples/qespta/QespTest.cpp b/src/core/gps/qextserialport/examples/qespta/QespTest.cpp deleted file mode 100644 index 6f34042dea55..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/QespTest.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* QespTest.cpp -**************************************/ -#include "QespTest.h" -#include -#include -#include -#include -#include -#include - - -QespTest::QespTest(QWidget* parent) - : QWidget(parent) - -{ - //modify the port settings on your own - #ifdef _TTY_POSIX_ - port = new QextSerialPort("/dev/ttyS0", QextSerialPort::Polling); - #else - port = new QextSerialPort("COM1", QextSerialPort::Polling); - #endif /*_TTY_POSIX*/ - port->setBaudRate(BAUD19200); - port->setFlowControl(FLOW_OFF); - port->setParity(PAR_NONE); - port->setDataBits(DATA_8); - port->setStopBits(STOP_2); - //set timeouts to 500 ms - port->setTimeout(500); - - message = new QLineEdit(this); - - // transmit receive - QPushButton *transmitButton = new QPushButton("Transmit"); - connect(transmitButton, SIGNAL(clicked()), SLOT(transmitMsg())); - QPushButton *receiveButton = new QPushButton("Receive"); - connect(receiveButton, SIGNAL(clicked()), SLOT(receiveMsg())); - QHBoxLayout* trLayout = new QHBoxLayout; - trLayout->addWidget(transmitButton); - trLayout->addWidget(receiveButton); - - //CR LF - QPushButton *CRButton = new QPushButton("CR"); - connect(CRButton, SIGNAL(clicked()), SLOT(appendCR())); - QPushButton *LFButton = new QPushButton("LF"); - connect(LFButton, SIGNAL(clicked()), SLOT(appendLF())); - QHBoxLayout *crlfLayout = new QHBoxLayout; - crlfLayout->addWidget(CRButton); - crlfLayout->addWidget(LFButton); - - //open close - QPushButton *openButton = new QPushButton("Open"); - connect(openButton, SIGNAL(clicked()), SLOT(openPort())); - QPushButton *closeButton = new QPushButton("Close"); - connect(closeButton, SIGNAL(clicked()), SLOT(closePort())); - QHBoxLayout *ocLayout = new QHBoxLayout; - ocLayout->addWidget(openButton); - ocLayout->addWidget(closeButton); - - received_msg = new QTextEdit(); - - QVBoxLayout *myVBox = new QVBoxLayout; - myVBox->addWidget(message); - myVBox->addLayout(crlfLayout); - myVBox->addLayout(trLayout); - myVBox->addLayout(ocLayout); - myVBox->addWidget(received_msg); - setLayout(myVBox); - - qDebug("isOpen : %d", port->isOpen()); -} - -QespTest::~QespTest() -{ - delete port; - port = NULL; -} - -void QespTest::transmitMsg() -{ - int i = port->write((message->text()).toAscii(), - (message->text()).length()); - qDebug("trasmitted : %d", i); -} - -void QespTest::receiveMsg() -{ - char buff[1024]; - int numBytes; - - numBytes = port->bytesAvailable(); - if(numBytes > 1024) - numBytes = 1024; - - int i = port->read(buff, numBytes); - if (i != -1) - buff[i] = '\0'; - else - buff[0] = '\0'; - QString msg = buff; - - received_msg->append(msg); - received_msg->ensureCursorVisible(); - qDebug("bytes available: %d", numBytes); - qDebug("received: %d", i); -} - - -void QespTest::appendCR() -{ - message->insert("\x0D"); -} - -void QespTest::appendLF() -{ - message->insert("\x0A"); -} - -void QespTest::closePort() -{ - port->close(); - qDebug("is open: %d", port->isOpen()); -} - -void QespTest::openPort() -{ - port->open(QIODevice::ReadWrite | QIODevice::Unbuffered); - qDebug("is open: %d", port->isOpen()); -} - diff --git a/src/core/gps/qextserialport/examples/qespta/QespTest.h b/src/core/gps/qextserialport/examples/qespta/QespTest.h deleted file mode 100644 index f757a1da60d2..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/QespTest.h +++ /dev/null @@ -1,36 +0,0 @@ -/* qesptest.h -**************************************/ -#ifndef _QESPTEST_H_ -#define _QESPTEST_H_ - -#include - -class QLineEdit; -class QTextEdit; -class QextSerialPort; -class QSpinBox; - -class QespTest : public QWidget -{ - Q_OBJECT -public: - QespTest(QWidget *parent=0); - - virtual ~QespTest(); - -private: - QLineEdit *message; - QSpinBox* delaySpinBox; - QTextEdit *received_msg; - QextSerialPort *port; - -private slots: - void transmitMsg(); - void receiveMsg(); - void appendCR(); - void appendLF(); - void closePort(); - void openPort(); -}; - -#endif diff --git a/src/core/gps/qextserialport/examples/qespta/README b/src/core/gps/qextserialport/examples/qespta/README deleted file mode 100644 index 643f6cd21127..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/README +++ /dev/null @@ -1,4 +0,0 @@ -This is simple application using QextSerialPort library. - -Port settings are in QespTest constructor (QespTest.cpp) - diff --git a/src/core/gps/qextserialport/examples/qespta/defs.h b/src/core/gps/qextserialport/examples/qespta/defs.h deleted file mode 100644 index 5c35eabcd2db..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/defs.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file defs.h - * @brief Global definitions. - */ - -#ifndef DEFS_H_ -#define DEFS_H_ - - -#ifndef QT_NO_DEBUG - #define APP_TITLE "QextSerialPort Test Application Debug" ///< Application title. -#else - #define APP_TITLE "QextSerialPort Test Application" ///< Application title. -#endif /*QT_NO_DEBUG*/ - -#endif /*DEFS_H_*/ diff --git a/src/core/gps/qextserialport/examples/qespta/main.cpp b/src/core/gps/qextserialport/examples/qespta/main.cpp deleted file mode 100644 index 5cdc9dfa5061..000000000000 --- a/src/core/gps/qextserialport/examples/qespta/main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @file main.cpp - * @brief Main file. - * @author Micha³ Policht - */ - -#include -#include - -#include "defs.h" -#include "MainWindow.h" -#include "MessageWindow.h" - - -int main(int argc, char *argv[]) -{ - int exec; - - QApplication app(argc, argv); - //redirect debug messages to the MessageWindow dialog - qInstallMsgHandler(MessageWindow::AppendMsgWrapper); - - MainWindow mainWindow(APP_TITLE); - mainWindow.show(); - exec = app.exec(); - return exec; -} - - diff --git a/src/core/gps/qextserialport/html/annotated.html b/src/core/gps/qextserialport/html/annotated.html deleted file mode 100644 index ad7df21e7429..000000000000 --- a/src/core/gps/qextserialport/html/annotated.html +++ /dev/null @@ -1,37 +0,0 @@ - - -QextSerialPort: Class List - - - - - - -

QextSerialPort Class List

Here are the classes, structs, unions and interfaces with brief descriptions: - - - - - - - - - -
PortSettings
Posix_QextSerialPort
QextBaseType
QextPortInfo
QextSerialBase
QextSerialEnumerator
QextSerialPort
Win_QextSerialPort
Win_QextSerialThread
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classPosix__QextSerialPort-members.html b/src/core/gps/qextserialport/html/classPosix__QextSerialPort-members.html deleted file mode 100644 index 70dee7770778..000000000000 --- a/src/core/gps/qextserialport/html/classPosix__QextSerialPort-members.html +++ /dev/null @@ -1,118 +0,0 @@ - - -QextSerialPort: Member List - - - - - - -

Posix_QextSerialPort Member List

This is the complete list of members for Posix_QextSerialPort, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_queryModeQextSerialBase [protected]
aboutToClose()QIODevice
atEnd() const QextSerialBase [virtual]
QIODevice::atEnd()QIODevice
baudRate() const QextSerialBase [virtual]
bytesAvailable()Posix_QextSerialPort [virtual]
bytesToWrite()QIODevice
bytesWritten(qint64 bytes)QIODevice
canReadLine()QIODevice
close()Posix_QextSerialPort [virtual]
construct()QextSerialBase [virtual]
dataBits() const QextSerialBase [virtual]
dsrChanged(bool status)QextSerialBase [signal]
errorString()QIODevice
EventDriven enum valueQextSerialBase
flowControl() const QextSerialBase [virtual]
flush()Posix_QextSerialPort [virtual]
getChar(char *c)QIODevice
init()Posix_QextSerialPort [private]
isOpen()QIODevice
isReadable()QIODevice
isSequential() const QextSerialBase [virtual]
QIODevice::isSequential()QIODevice
isTextModeEnabled()QIODevice
isWritable()QIODevice
lastErrQextSerialBase [protected]
lastError() const QextSerialBase [virtual]
lineStatus()Posix_QextSerialPort [virtual]
mutexQextSerialBase [protected]
open(OpenMode mode)Posix_QextSerialPort [virtual]
openMode()QIODevice
operator=(const Posix_QextSerialPort &s)Posix_QextSerialPort
parity() const QextSerialBase [virtual]
peek(char *data, qint64 maxSize)QIODevice
peek(qint64 maxSize)QIODevice
Polling enum valueQextSerialBase
portQextSerialBase [protected]
portName() const QextSerialBase [virtual]
pos()QIODevice
Posix_CommConfigPosix_QextSerialPort [protected]
Posix_Copy_TimeoutPosix_QextSerialPort [protected]
Posix_FilePosix_QextSerialPort [protected]
Posix_QextSerialPort()Posix_QextSerialPort
Posix_QextSerialPort(const Posix_QextSerialPort &s)Posix_QextSerialPort
Posix_QextSerialPort(const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_QextSerialPort(const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_QextSerialPort(const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_TimeoutPosix_QextSerialPort [protected]
putChar(char c)QIODevice
QextSerialBase()QextSerialBase
QextSerialBase(const QString &name)QextSerialBase
QIODevice()QIODevice
QIODevice(QObject *parent)QIODevice
queryMode() const QextSerialBase [inline]
QueryMode enum nameQextSerialBase
read(char *data, qint64 maxSize)QIODevice
read(qint64 maxSize)QIODevice
readAll()QIODevice
readData(char *data, qint64 maxSize)Posix_QextSerialPort [protected, virtual]
readLine(char *data, qint64 maxSize)QextSerialBase [virtual]
QIODevice::readLine(qint64 maxSize=0)QIODevice
readLineData(char *data, qint64 maxSize)QIODevice
readyRead()QIODevice
reset()QIODevice
seek(qint64 pos)QIODevice
setBaudRate(BaudRateType)Posix_QextSerialPort [virtual]
setDataBits(DataBitsType)Posix_QextSerialPort [virtual]
setDtr(bool set=true)Posix_QextSerialPort [virtual]
setErrorString(const QString &str)QIODevice
setFlowControl(FlowType)Posix_QextSerialPort [virtual]
setOpenMode(OpenMode openMode)QIODevice
setParity(ParityType)Posix_QextSerialPort [virtual]
setPortName(const QString &name)QextSerialBase [virtual]
setQueryMode(QueryMode mode)QextSerialBase [virtual]
setRts(bool set=true)Posix_QextSerialPort [virtual]
setStopBits(StopBitsType)Posix_QextSerialPort [virtual]
setTextModeEnabled(bool enabled)QIODevice
setTimeout(ulong, ulong)Posix_QextSerialPort [virtual]
SettingsQextSerialBase [protected]
size() const Posix_QextSerialPort [virtual]
QIODevice::size()QIODevice
stopBits() const QextSerialBase [virtual]
translateError(ulong error)Posix_QextSerialPort [virtual]
ungetChar(char c)Posix_QextSerialPort [virtual]
waitForBytesWritten(int msecs)QIODevice
waitForReadyRead(int msecs)QIODevice
write(const char *data, qint64 maxSize)QIODevice
write(const QByteArray &byteArray)QIODevice
writeData(const char *data, qint64 maxSize)Posix_QextSerialPort [protected, virtual]
~Posix_QextSerialPort()Posix_QextSerialPort [virtual]
~QextSerialBase()QextSerialBase [virtual]


Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classPosix__QextSerialPort.html b/src/core/gps/qextserialport/html/classPosix__QextSerialPort.html deleted file mode 100644 index 7a9c0387e205..000000000000 --- a/src/core/gps/qextserialport/html/classPosix__QextSerialPort.html +++ /dev/null @@ -1,2370 +0,0 @@ - - -QextSerialPort: Posix_QextSerialPort Class Reference - - - - - - -

Posix_QextSerialPort Class Reference

#include <posix_qextserialport.h> -

-

Inheritance diagram for Posix_QextSerialPort: -

- -QextSerialBase -QIODevice -QextBaseType -QextSerialPort - -List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Types

 EventDriven
 Polling
enum  QueryMode { Polling, -EventDriven - }

Signals

void dsrChanged (bool status)

Public Member Functions

 aboutToClose ()
 atEnd ()
virtual bool atEnd () const
virtual BaudRateType baudRate () const
virtual qint64 bytesAvailable ()
 bytesToWrite ()
 bytesWritten (qint64 bytes)
 canReadLine ()
virtual void close ()
virtual void construct ()
virtual DataBitsType dataBits () const
 errorString ()
virtual FlowType flowControl () const
virtual void flush ()
 getChar (char *c)
 isOpen ()
 isReadable ()
 isSequential ()
virtual bool isSequential () const
 isTextModeEnabled ()
 isWritable ()
virtual ulong lastError () const
virtual ulong lineStatus ()
virtual bool open (OpenMode mode)
 openMode ()
Posix_QextSerialPortoperator= (const Posix_QextSerialPort &s)
virtual ParityType parity () const
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
virtual QString portName () const
 pos ()
 Posix_QextSerialPort (const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)
 Posix_QextSerialPort (const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)
 Posix_QextSerialPort (const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)
 Posix_QextSerialPort (const Posix_QextSerialPort &s)
 Posix_QextSerialPort ()
 putChar (char c)
QextSerialBase::QueryMode queryMode () const
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 readAll ()
 readLine (qint64 maxSize=0)
virtual qint64 readLine (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readyRead ()
 reset ()
 seek (qint64 pos)
virtual void setBaudRate (BaudRateType)
virtual void setDataBits (DataBitsType)
virtual void setDtr (bool set=true)
 setErrorString (const QString &str)
virtual void setFlowControl (FlowType)
 setOpenMode (OpenMode openMode)
virtual void setParity (ParityType)
virtual void setPortName (const QString &name)
virtual void setQueryMode (QueryMode mode)
virtual void setRts (bool set=true)
virtual void setStopBits (StopBitsType)
 setTextModeEnabled (bool enabled)
virtual void setTimeout (ulong, ulong)
 size ()
virtual qint64 size () const
virtual StopBitsType stopBits () const
virtual void translateError (ulong error)
virtual void ungetChar (char c)
 waitForBytesWritten (int msecs)
 waitForReadyRead (int msecs)
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)
virtual ~Posix_QextSerialPort ()

Protected Member Functions

virtual qint64 readData (char *data, qint64 maxSize)
virtual qint64 writeData (const char *data, qint64 maxSize)

Protected Attributes

QextSerialBase::QueryMode _queryMode
ulong lastErr
QMutex * mutex
QString port
termios Posix_CommConfig
timeval Posix_Copy_Timeout
QFile * Posix_File
timeval Posix_Timeout
PortSettings Settings

Private Member Functions

void init ()
-

Detailed Description

-
Version:
1.0.0
-
Author:
Stefan Sander

-Michal Policht

-A cross-platform serial port class. This class encapsulates the POSIX portion of QextSerialPort. The user will be notified of errors and possible portability conflicts at run-time by default - this behavior can be turned off by defining _TTY_NOWARN_ (to turn off all warnings) or _TTY_NOWARN_PORT_ (to turn off portability warnings) in the project. Note that _TTY_NOWARN_ will also turn off portability warnings. -

-


Member Enumeration Documentation

- -
-
- - - - -
enum QextSerialBase::QueryMode [inherited]
-
-
- -

-

Enumerator:
- - - -
Polling  -
EventDriven  -
-
- -

-Reimplemented in QextSerialPort.

00154                        {
-00155             Polling,
-00156             EventDriven
-00157         };
-
-

- -

-

-


Constructor & Destructor Documentation

- -
-
- - - - - - - - -
Posix_QextSerialPort::Posix_QextSerialPort (  ) 
-
-
- -

-Default constructor. Note that the name of the device used by a QextSerialPort 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:

-

Constant         Used By         Naming Convention
-----------       -------------   ------------------------
-_TTY_WIN_        Windows         COM1, COM2
-_TTY_IRIX_       SGI/IRIX        /dev/ttyf1, /dev/ttyf2
-_TTY_HPUX_       HP-UX           /dev/tty1p0, /dev/tty2p0
-_TTY_SUN_        SunOS/Solaris   /dev/ttya, /dev/ttyb
-_TTY_DIGITAL_    Digital UNIX    /dev/tty01, /dev/tty02
-_TTY_FREEBSD_    FreeBSD         /dev/ttyd0, /dev/ttyd1
-_TTY_LINUX_      Linux           /dev/ttyS0, /dev/ttyS1
-<none>           Linux           /dev/ttyS0, /dev/ttyS1
-

-This constructor assigns the device name to the name of the first port on the specified system. See the other constructors if you need to open a different port.

00042 : QextSerialBase()
-00043 {
-00044     Posix_File=new QFile();
-00045 }
-
-

- -

-

- -

-
- - - - - - - - - -
Posix_QextSerialPort::Posix_QextSerialPort (const Posix_QextSerialPort s  ) 
-
-
- -

-Copy constructor.

00052  : QextSerialBase(s.port)
-00053 {
-00054     setOpenMode(s.openMode());
-00055     port = s.port;
-00056     Settings.BaudRate=s.Settings.BaudRate;
-00057     Settings.DataBits=s.Settings.DataBits;
-00058     Settings.Parity=s.Settings.Parity;
-00059     Settings.StopBits=s.Settings.StopBits;
-00060     Settings.FlowControl=s.Settings.FlowControl;
-00061     lastErr=s.lastErr;
-00062 
-00063     Posix_File=new QFile();
-00064     Posix_File=s.Posix_File;
-00065     memcpy(&Posix_Timeout, &s.Posix_Timeout, sizeof(struct timeval));
-00066     memcpy(&Posix_Copy_Timeout, &s.Posix_Copy_Timeout, sizeof(struct timeval));
-00067     memcpy(&Posix_CommConfig, &s.Posix_CommConfig, sizeof(struct termios));
-00068 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
Posix_QextSerialPort::Posix_QextSerialPort (const QString &  name,
QextSerialBase::QueryMode  mode = QextSerialBase::Polling 
)
-
-
- -

-

00077  : QextSerialBase(name)
-00078 {
-00079     Posix_File=new QFile();
-00080     setQueryMode(mode);
-00081     init();
-00082 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
Posix_QextSerialPort::Posix_QextSerialPort (const PortSettings settings,
QextSerialBase::QueryMode  mode = QextSerialBase::Polling 
)
-
-
- -

-

00089  : QextSerialBase()
-00090 {
-00091     setBaudRate(settings.BaudRate);
-00092     setDataBits(settings.DataBits);
-00093     setParity(settings.Parity);
-00094     setStopBits(settings.StopBits);
-00095     setFlowControl(settings.FlowControl);
-00096 
-00097     Posix_File=new QFile();
-00098     setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
-00099     setQueryMode(mode);
-00100     init();
-00101 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
Posix_QextSerialPort::Posix_QextSerialPort (const QString &  name,
const PortSettings settings,
QextSerialBase::QueryMode  mode = QextSerialBase::Polling 
)
-
-
- -

-

00108  : QextSerialBase(name)
-00109 {
-00110     setBaudRate(settings.BaudRate);
-00111     setDataBits(settings.DataBits);
-00112     setParity(settings.Parity);
-00113     setStopBits(settings.StopBits);
-00114     setFlowControl(settings.FlowControl);
-00115 
-00116     Posix_File=new QFile();
-00117     setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
-00118     setQueryMode(mode);
-00119     init();
-00120 }
-
-

- -

-

- -

-
- - - - - - - - -
Posix_QextSerialPort::~Posix_QextSerialPort (  )  [virtual]
-
-
- -

-Standard destructor.

00155 {
-00156     if (isOpen()) {
-00157         close();
-00158     }
-00159     Posix_File->close();
-00160     delete Posix_File;
-00161 }
-
-

- -

-

-


Member Function Documentation

- -
-
- - - - - - - - -
bool QextSerialBase::atEnd (  )  const [virtual, inherited]
-
-
- -

-This function will return true if the input buffer is empty (or on error), and false otherwise. Call QextSerialBase::lastError() for error information.

00164 {
-00165     if (size()) {
-00166         return true;
-00167     }
-00168     return false;
-00169 }
-
-

- -

-

- -

-
- - - - - - - - - -
BaudRateType QextSerialBase::baudRate (void   )  const [virtual, inherited]
-
-
- -

-Returns the baud rate of the serial port. For a list of possible return values see the definition of the enum BaudRateType.

00103 {
-00104     return Settings.BaudRate;
-00105 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Posix_QextSerialPort::bytesAvailable (  )  [virtual]
-
-
- -

-Returns 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(). -

-Implements QextSerialBase.

00922 {
-00923     LOCK_MUTEX();
-00924     if (isOpen()) {
-00925         int bytesQueued;
-00926         fd_set fileSet;
-00927         FD_ZERO(&fileSet);
-00928         FD_SET(Posix_File->handle(), &fileSet);
-00929 
-00930         /*on Linux systems the Posix_Timeout structure will be altered by the select() call.
-00931           Make sure we use the right timeout values*/
-00932         //memcpy(&Posix_Timeout, &Posix_Copy_Timeout, sizeof(struct timeval));
-00933         Posix_Timeout = Posix_Copy_Timeout;
-00934         int n=select(Posix_File->handle()+1, &fileSet, NULL, &fileSet, &Posix_Timeout);
-00935         if (!n) {
-00936             lastErr=E_PORT_TIMEOUT;
-00937             UNLOCK_MUTEX();
-00938             return -1;
-00939         }
-00940         if (n==-1 || ioctl(Posix_File->handle(), FIONREAD, &bytesQueued)==-1) {
-00941             translateError(errno);
-00942             UNLOCK_MUTEX();
-00943             return -1;
-00944         }
-00945         lastErr=E_NO_ERROR;
-00946         UNLOCK_MUTEX();
-00947         return bytesQueued + QIODevice::bytesAvailable();
-00948     }
-00949     UNLOCK_MUTEX();
-00950     return 0;
-00951 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::close (  )  [virtual]
-
-
- -

-Closes a serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00878 {
-00879     LOCK_MUTEX();
-00880     Posix_File->close();
-00881     QIODevice::close();
-00882     UNLOCK_MUTEX();
-00883 }
-
-

- -

-

- -

-
- - - - - - - - -
void QextSerialBase::construct (  )  [virtual, inherited]
-
-
- -

-Common constructor function for setting up default port settings. (115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 0 ms timeout).

00062 {
-00063     Settings.BaudRate=BAUD115200;
-00064     Settings.DataBits=DATA_8;
-00065     Settings.Parity=PAR_NONE;
-00066     Settings.StopBits=STOP_1;
-00067     Settings.FlowControl=FLOW_HARDWARE;
-00068     Settings.Timeout_Sec=0;
-00069     Settings.Timeout_Millisec=0;
-00070     mutex = new QMutex( QMutex::Recursive );
-00071     setOpenMode(QIODevice::NotOpen);
-00072 }
-
-

- -

-

- -

-
- - - - - - - - -
DataBitsType QextSerialBase::dataBits (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00113 {
-00114     return Settings.DataBits;
-00115 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal, inherited]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - -
FlowType QextSerialBase::flowControl (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00143 {
-00144     return Settings.FlowControl;
-00145 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::flush (  )  [virtual]
-
-
- -

-Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00891 {
-00892     LOCK_MUTEX();
-00893     if (isOpen()) {
-00894         Posix_File->flush();
-00895     }
-00896     UNLOCK_MUTEX();
-00897 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::init (  )  [private]
-
-
- -

-This method is a part of constructor.

00145 {
-00146     if (queryMode() == QextSerialBase::EventDriven)
-00147         qWarning("POSIX doesn't have event driven mechanism implemented yet");
-00148 }
-
-

- -

-

- -

-
- - - - - - - - -
bool QextSerialBase::isSequential (  )  const [virtual, inherited]
-
-
- -

-Returns true if device is sequential, otherwise returns false. Serial port is sequential device so this function always returns true. Check QIODevice::isSequential() documentation for more information.

00154 {
-00155     return true;
-00156 }
-
-

- -

-

- -

-
- - - - - - - - -
ulong QextSerialBase::lastError (  )  const [virtual, inherited]
-
-
- -

-Returns 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:

-

Error                           Explanation
----------------------------     -------------------------------------------------------------
-E_NO_ERROR                      No Error has occured
-E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
-E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
-E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
-E_PORT_TIMEOUT                  Operation timed out (POSIX)
-E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
-E_BREAK_CONDITION               The port detected a break condition
-E_FRAMING_ERROR                 The port detected a framing error
-                                (usually caused by incorrect baud rate settings)
-E_IO_ERROR                      There was an I/O error while communicating with the port
-E_BUFFER_OVERRUN                Character buffer overrun
-E_RECEIVE_OVERFLOW              Receive buffer overflow
-E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
-E_TRANSMIT_OVERFLOW             Transmit buffer overflow
-E_READ_FAILED                   General read operation failure
-E_WRITE_FAILED                  General write operation failure
-
00225 {
-00226     return lastErr;
-00227 }
-
-

- -

-

- -

-
- - - - - - - - - -
unsigned long Posix_QextSerialPort::lineStatus (void   )  [virtual]
-
-
- -

-returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned long with specific bits indicating which lines are high. The following constants should be used to examine the states of individual lines:

-

Mask        Line
-------      ----
-LS_CTS      CTS
-LS_DSR      DSR
-LS_DCD      DCD
-LS_RI       RI
-LS_RTS      RTS (POSIX only)
-LS_DTR      DTR (POSIX only)
-LS_ST       Secondary TXD (POSIX only)
-LS_SR       Secondary RXD (POSIX only)
-

-This function will return 0 if the port associated with the class is not currently open. -

-Implements QextSerialBase.

01055 {
-01056     unsigned long Status=0, Temp=0;
-01057     LOCK_MUTEX();
-01058     if (isOpen()) {
-01059         ioctl(Posix_File->handle(), TIOCMGET, &Temp);
-01060         if (Temp&TIOCM_CTS) {
-01061             Status|=LS_CTS;
-01062         }
-01063         if (Temp&TIOCM_DSR) {
-01064             Status|=LS_DSR;
-01065         }
-01066         if (Temp&TIOCM_RI) {
-01067             Status|=LS_RI;
-01068         }
-01069         if (Temp&TIOCM_CD) {
-01070             Status|=LS_DCD;
-01071         }
-01072         if (Temp&TIOCM_DTR) {
-01073             Status|=LS_DTR;
-01074         }
-01075         if (Temp&TIOCM_RTS) {
-01076             Status|=LS_RTS;
-01077         }
-01078         if (Temp&TIOCM_ST) {
-01079             Status|=LS_ST;
-01080         }
-01081         if (Temp&TIOCM_SR) {
-01082             Status|=LS_SR;
-01083         }
-01084     }
-01085     UNLOCK_MUTEX();
-01086     return Status;
-01087 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Posix_QextSerialPort::open (OpenMode  mode  )  [virtual]
-
-
- -

-Opens 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. -

-Implements QextSerialBase.

00830 {
-00831     LOCK_MUTEX();
-00832     if (mode == QIODevice::NotOpen)
-00833         return isOpen();
-00834     if (!isOpen()) {
-00835         /*open the port*/
-00836         Posix_File->setFileName(port);
-00837         qDebug("Trying to open File");
-00838         if (Posix_File->open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
-00839             qDebug("Opened File successfully");
-00840             /*set open mode*/
-00841             QIODevice::open(mode);
-00842 
-00843             /*configure port settings*/
-00844             tcgetattr(Posix_File->handle(), &Posix_CommConfig);
-00845 
-00846             /*set up other port settings*/
-00847             Posix_CommConfig.c_cflag|=CREAD|CLOCAL;
-00848             Posix_CommConfig.c_lflag&=(~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG));
-00849             Posix_CommConfig.c_iflag&=(~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY));
-00850             Posix_CommConfig.c_oflag&=(~OPOST);
-00851             Posix_CommConfig.c_cc[VMIN]=0;
-00852             Posix_CommConfig.c_cc[VINTR] = _POSIX_VDISABLE;
-00853             Posix_CommConfig.c_cc[VQUIT] = _POSIX_VDISABLE;
-00854             Posix_CommConfig.c_cc[VSTART] = _POSIX_VDISABLE;
-00855             Posix_CommConfig.c_cc[VSTOP] = _POSIX_VDISABLE;
-00856             Posix_CommConfig.c_cc[VSUSP] = _POSIX_VDISABLE;
-00857             setBaudRate(Settings.BaudRate);
-00858             setDataBits(Settings.DataBits);
-00859             setParity(Settings.Parity);
-00860             setStopBits(Settings.StopBits);
-00861             setFlowControl(Settings.FlowControl);
-00862             setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
-00863             tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00864         } else {
-00865             qDebug("Could not open File! Error code : %d", Posix_File->error());
-00866         }
-00867     }
-00868     UNLOCK_MUTEX();
-00869     return isOpen();
-00870 }
-
-

- -

-

- -

-
- - - - - - - - - -
Posix_QextSerialPort & Posix_QextSerialPort::operator= (const Posix_QextSerialPort s  ) 
-
-
- -

-Override the = operator.

00127 {
-00128     setOpenMode(s.openMode());
-00129     port = s.port;
-00130     Settings.BaudRate=s.Settings.BaudRate;
-00131     Settings.DataBits=s.Settings.DataBits;
-00132     Settings.Parity=s.Settings.Parity;
-00133     Settings.StopBits=s.Settings.StopBits;
-00134     Settings.FlowControl=s.Settings.FlowControl;
-00135     lastErr=s.lastErr;
-00136 
-00137     Posix_File=s.Posix_File;
-00138     memcpy(&Posix_Timeout, &(s.Posix_Timeout), sizeof(struct timeval));
-00139     memcpy(&Posix_Copy_Timeout, &(s.Posix_Copy_Timeout), sizeof(struct timeval));
-00140     memcpy(&Posix_CommConfig, &(s.Posix_CommConfig), sizeof(struct termios));
-00141     return *this;
-00142 }
-
-

- -

-

- -

-
- - - - - - - - -
ParityType QextSerialBase::parity (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00123 {
-00124     return Settings.Parity;
-00125 }
-
-

- -

-

- -

-
- - - - - - - - -
QString QextSerialBase::portName (  )  const [virtual, inherited]
-
-
- -

-Returns the name set by setPortName().

00093 {
-00094     return port;
-00095 }
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline, inherited]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Posix_QextSerialPort::readData (char *  data,
qint64  maxSize 
) [protected, virtual]
-
-
- -

-Reads 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.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

01099 {
-01100     LOCK_MUTEX();
-01101     int retVal=0;
-01102     retVal=Posix_File->read(data, maxSize);
-01103     if (retVal==-1)
-01104         lastErr=E_READ_FAILED;
-01105     UNLOCK_MUTEX();
-01106 
-01107     return retVal;
-01108 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 QextSerialBase::readLine (char *  data,
qint64  maxSize 
) [virtual, inherited]
-
-
- -

-This 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. -

-Reimplemented from QIODevice.

00178 {
-00179     qint64 numBytes = bytesAvailable();
-00180     char* pData = data;
-00181 
-00182     if (maxSize < 2)    //maxSize must be larger than 1
-00183         return -1;
-00184 
-00185     /*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
-00186     while (pData<(data+numBytes) && --maxSize) {
-00187         readData(pData, 1);
-00188         if (*pData++ == '\n') {
-00189             break;
-00190         }
-00191     }
-00192     *pData='\0';
-00193 
-00194     /*return size of data read*/
-00195     return (pData-data);
-00196 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setBaudRate (BaudRateType  baudRate  )  [virtual]
-
-
- -

-Sets the baud rate of the serial port. Note that not all rates are applicable on all platforms. The following table shows translations of the various baud rate constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.

-

Note:
BAUD76800 may not be supported on all POSIX systems. SGI/IRIX systems do not support BAUD1800.
-
  RATE          Windows Speed   POSIX Speed
-  -----------   -------------   -----------
-   BAUD50                 110          50
-   BAUD75                 110          75
-  *BAUD110                110         110
-   BAUD134                110         134.5
-   BAUD150                110         150
-   BAUD200                110         200
-  *BAUD300                300         300
-  *BAUD600                600         600
-  *BAUD1200              1200        1200
-   BAUD1800              1200        1800
-  *BAUD2400              2400        2400
-  *BAUD4800              4800        4800
-  *BAUD9600              9600        9600
-   BAUD14400            14400        9600
-  *BAUD19200            19200       19200
-  *BAUD38400            38400       38400
-   BAUD56000            56000       38400
-  *BAUD57600            57600       57600
-   BAUD76800            57600       76800
-  *BAUD115200          115200      115200
-   BAUD128000          128000      115200
-   BAUD256000          256000      115200
-
-

-Implements QextSerialBase.

00203 {
-00204     LOCK_MUTEX();
-00205     if (Settings.BaudRate!=baudRate) {
-00206         switch (baudRate) {
-00207             case BAUD14400:
-00208                 Settings.BaudRate=BAUD9600;
-00209                 break;
-00210 
-00211             case BAUD56000:
-00212                 Settings.BaudRate=BAUD38400;
-00213                 break;
-00214 
-00215             case BAUD76800:
-00216 
-00217 #ifndef B76800
-00218                 Settings.BaudRate=BAUD57600;
-00219 #else
-00220                 Settings.BaudRate=baudRate;
-00221 #endif
-00222                 break;
-00223 
-00224             case BAUD128000:
-00225             case BAUD256000:
-00226                 Settings.BaudRate=BAUD115200;
-00227                 break;
-00228 
-00229             default:
-00230                 Settings.BaudRate=baudRate;
-00231                 break;
-00232         }
-00233     }
-00234     if (isOpen()) {
-00235         switch (baudRate) {
-00236 
-00237             /*50 baud*/
-00238             case BAUD50:
-00239                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 50 baud operation.");
-00240 #ifdef CBAUD
-00241                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00242                 Posix_CommConfig.c_cflag|=B50;
-00243 #else
-00244                 cfsetispeed(&Posix_CommConfig, B50);
-00245                 cfsetospeed(&Posix_CommConfig, B50);
-00246 #endif
-00247                 break;
-00248 
-00249             /*75 baud*/
-00250             case BAUD75:
-00251                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 75 baud operation.");
-00252 #ifdef CBAUD
-00253                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00254                 Posix_CommConfig.c_cflag|=B75;
-00255 #else
-00256                 cfsetispeed(&Posix_CommConfig, B75);
-00257                 cfsetospeed(&Posix_CommConfig, B75);
-00258 #endif
-00259                 break;
-00260 
-00261             /*110 baud*/
-00262             case BAUD110:
-00263 #ifdef CBAUD
-00264                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00265                 Posix_CommConfig.c_cflag|=B110;
-00266 #else
-00267                 cfsetispeed(&Posix_CommConfig, B110);
-00268                 cfsetospeed(&Posix_CommConfig, B110);
-00269 #endif
-00270                 break;
-00271 
-00272             /*134.5 baud*/
-00273             case BAUD134:
-00274                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 134.5 baud operation.");
-00275 #ifdef CBAUD
-00276                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00277                 Posix_CommConfig.c_cflag|=B134;
-00278 #else
-00279                 cfsetispeed(&Posix_CommConfig, B134);
-00280                 cfsetospeed(&Posix_CommConfig, B134);
-00281 #endif
-00282                 break;
-00283 
-00284             /*150 baud*/
-00285             case BAUD150:
-00286                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 150 baud operation.");
-00287 #ifdef CBAUD
-00288                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00289                 Posix_CommConfig.c_cflag|=B150;
-00290 #else
-00291                 cfsetispeed(&Posix_CommConfig, B150);
-00292                 cfsetospeed(&Posix_CommConfig, B150);
-00293 #endif
-00294                 break;
-00295 
-00296             /*200 baud*/
-00297             case BAUD200:
-00298                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 200 baud operation.");
-00299 #ifdef CBAUD
-00300                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00301                 Posix_CommConfig.c_cflag|=B200;
-00302 #else
-00303                 cfsetispeed(&Posix_CommConfig, B200);
-00304                 cfsetospeed(&Posix_CommConfig, B200);
-00305 #endif
-00306                 break;
-00307 
-00308             /*300 baud*/
-00309             case BAUD300:
-00310 #ifdef CBAUD
-00311                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00312                 Posix_CommConfig.c_cflag|=B300;
-00313 #else
-00314                 cfsetispeed(&Posix_CommConfig, B300);
-00315                 cfsetospeed(&Posix_CommConfig, B300);
-00316 #endif
-00317                 break;
-00318 
-00319             /*600 baud*/
-00320             case BAUD600:
-00321 #ifdef CBAUD
-00322                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00323                 Posix_CommConfig.c_cflag|=B600;
-00324 #else
-00325                 cfsetispeed(&Posix_CommConfig, B600);
-00326                 cfsetospeed(&Posix_CommConfig, B600);
-00327 #endif
-00328                 break;
-00329 
-00330             /*1200 baud*/
-00331             case BAUD1200:
-00332 #ifdef CBAUD
-00333                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00334                 Posix_CommConfig.c_cflag|=B1200;
-00335 #else
-00336                 cfsetispeed(&Posix_CommConfig, B1200);
-00337                 cfsetospeed(&Posix_CommConfig, B1200);
-00338 #endif
-00339                 break;
-00340 
-00341             /*1800 baud*/
-00342             case BAUD1800:
-00343                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and IRIX do not support 1800 baud operation.");
-00344 #ifdef CBAUD
-00345                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00346                 Posix_CommConfig.c_cflag|=B1800;
-00347 #else
-00348                 cfsetispeed(&Posix_CommConfig, B1800);
-00349                 cfsetospeed(&Posix_CommConfig, B1800);
-00350 #endif
-00351                 break;
-00352 
-00353             /*2400 baud*/
-00354             case BAUD2400:
-00355 #ifdef CBAUD
-00356                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00357                 Posix_CommConfig.c_cflag|=B2400;
-00358 #else
-00359                 cfsetispeed(&Posix_CommConfig, B2400);
-00360                 cfsetospeed(&Posix_CommConfig, B2400);
-00361 #endif
-00362                 break;
-00363 
-00364             /*4800 baud*/
-00365             case BAUD4800:
-00366 #ifdef CBAUD
-00367                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00368                 Posix_CommConfig.c_cflag|=B4800;
-00369 #else
-00370                 cfsetispeed(&Posix_CommConfig, B4800);
-00371                 cfsetospeed(&Posix_CommConfig, B4800);
-00372 #endif
-00373                 break;
-00374 
-00375             /*9600 baud*/
-00376             case BAUD9600:
-00377 #ifdef CBAUD
-00378                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00379                 Posix_CommConfig.c_cflag|=B9600;
-00380 #else
-00381                 cfsetispeed(&Posix_CommConfig, B9600);
-00382                 cfsetospeed(&Posix_CommConfig, B9600);
-00383 #endif
-00384                 break;
-00385 
-00386             /*14400 baud*/
-00387             case BAUD14400:
-00388                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 14400 baud operation.  Switching to 9600 baud.");
-00389 #ifdef CBAUD
-00390                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00391                 Posix_CommConfig.c_cflag|=B9600;
-00392 #else
-00393                 cfsetispeed(&Posix_CommConfig, B9600);
-00394                 cfsetospeed(&Posix_CommConfig, B9600);
-00395 #endif
-00396                 break;
-00397 
-00398             /*19200 baud*/
-00399             case BAUD19200:
-00400 #ifdef CBAUD
-00401                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00402                 Posix_CommConfig.c_cflag|=B19200;
-00403 #else
-00404                 cfsetispeed(&Posix_CommConfig, B19200);
-00405                 cfsetospeed(&Posix_CommConfig, B19200);
-00406 #endif
-00407                 break;
-00408 
-00409             /*38400 baud*/
-00410             case BAUD38400:
-00411 #ifdef CBAUD
-00412                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00413                 Posix_CommConfig.c_cflag|=B38400;
-00414 #else
-00415                 cfsetispeed(&Posix_CommConfig, B38400);
-00416                 cfsetospeed(&Posix_CommConfig, B38400);
-00417 #endif
-00418                 break;
-00419 
-00420             /*56000 baud*/
-00421             case BAUD56000:
-00422                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 56000 baud operation.  Switching to 38400 baud.");
-00423 #ifdef CBAUD
-00424                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00425                 Posix_CommConfig.c_cflag|=B38400;
-00426 #else
-00427                 cfsetispeed(&Posix_CommConfig, B38400);
-00428                 cfsetospeed(&Posix_CommConfig, B38400);
-00429 #endif
-00430                 break;
-00431 
-00432             /*57600 baud*/
-00433             case BAUD57600:
-00434 #ifdef CBAUD
-00435                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00436                 Posix_CommConfig.c_cflag|=B57600;
-00437 #else
-00438                 cfsetispeed(&Posix_CommConfig, B57600);
-00439                 cfsetospeed(&Posix_CommConfig, B57600);
-00440 #endif
-00441                 break;
-00442 
-00443             /*76800 baud*/
-00444             case BAUD76800:
-00445                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and some POSIX systems do not support 76800 baud operation.");
-00446 #ifdef CBAUD
-00447                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00448 
-00449 #ifdef B76800
-00450                 Posix_CommConfig.c_cflag|=B76800;
-00451 #else
-00452                 TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud.");
-00453                 Posix_CommConfig.c_cflag|=B57600;
-00454 #endif //B76800
-00455 #else  //CBAUD
-00456 #ifdef B76800
-00457                 cfsetispeed(&Posix_CommConfig, B76800);
-00458                 cfsetospeed(&Posix_CommConfig, B76800);
-00459 #else
-00460                 TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud.");
-00461                 cfsetispeed(&Posix_CommConfig, B57600);
-00462                 cfsetospeed(&Posix_CommConfig, B57600);
-00463 #endif //B76800
-00464 #endif //CBAUD
-00465                 break;
-00466 
-00467             /*115200 baud*/
-00468             case BAUD115200:
-00469 #ifdef CBAUD
-00470                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00471                 Posix_CommConfig.c_cflag|=B115200;
-00472 #else
-00473                 cfsetispeed(&Posix_CommConfig, B115200);
-00474                 cfsetospeed(&Posix_CommConfig, B115200);
-00475 #endif
-00476                 break;
-00477 
-00478             /*128000 baud*/
-00479             case BAUD128000:
-00480                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 128000 baud operation.  Switching to 115200 baud.");
-00481 #ifdef CBAUD
-00482                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00483                 Posix_CommConfig.c_cflag|=B115200;
-00484 #else
-00485                 cfsetispeed(&Posix_CommConfig, B115200);
-00486                 cfsetospeed(&Posix_CommConfig, B115200);
-00487 #endif
-00488                 break;
-00489 
-00490             /*256000 baud*/
-00491             case BAUD256000:
-00492                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 256000 baud operation.  Switching to 115200 baud.");
-00493 #ifdef CBAUD
-00494                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00495                 Posix_CommConfig.c_cflag|=B115200;
-00496 #else
-00497                 cfsetispeed(&Posix_CommConfig, B115200);
-00498                 cfsetospeed(&Posix_CommConfig, B115200);
-00499 #endif
-00500                 break;
-00501         }
-00502         tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00503     }
-00504     UNLOCK_MUTEX();
-00505 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setDataBits (DataBitsType  dataBits  )  [virtual]
-
-
- -

-Sets the number of data bits used by the serial port. Possible values of dataBits are:

    DATA_5      5 data bits
-    DATA_6      6 data bits
-    DATA_7      7 data bits
-    DATA_8      8 data bits
-

-

Note:
This function is subject to the following restrictions:
-
5 data bits cannot be used with 2 stop bits.
-
8 data bits cannot be used with space parity on POSIX systems.
- -

-Implements QextSerialBase.

00526 {
-00527     LOCK_MUTEX();
-00528     if (Settings.DataBits!=dataBits) {
-00529         if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
-00530             (Settings.StopBits==STOP_1_5 && dataBits!=DATA_5) ||
-00531             (Settings.Parity==PAR_SPACE && dataBits==DATA_8)) {
-00532         }
-00533         else {
-00534             Settings.DataBits=dataBits;
-00535         }
-00536     }
-00537     if (isOpen()) {
-00538         switch(dataBits) {
-00539 
-00540             /*5 data bits*/
-00541             case DATA_5:
-00542                 if (Settings.StopBits==STOP_2) {
-00543                     TTY_WARNING("Posix_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
-00544                 }
-00545                 else {
-00546                     Settings.DataBits=dataBits;
-00547                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00548                     Posix_CommConfig.c_cflag|=CS5;
-00549                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00550                 }
-00551                 break;
-00552 
-00553             /*6 data bits*/
-00554             case DATA_6:
-00555                 if (Settings.StopBits==STOP_1_5) {
-00556                     TTY_WARNING("Posix_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
-00557                 }
-00558                 else {
-00559                     Settings.DataBits=dataBits;
-00560                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00561                     Posix_CommConfig.c_cflag|=CS6;
-00562                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00563                 }
-00564                 break;
-00565 
-00566             /*7 data bits*/
-00567             case DATA_7:
-00568                 if (Settings.StopBits==STOP_1_5) {
-00569                     TTY_WARNING("Posix_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
-00570                 }
-00571                 else {
-00572                     Settings.DataBits=dataBits;
-00573                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00574                     Posix_CommConfig.c_cflag|=CS7;
-00575                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00576                 }
-00577                 break;
-00578 
-00579             /*8 data bits*/
-00580             case DATA_8:
-00581                 if (Settings.StopBits==STOP_1_5) {
-00582                     TTY_WARNING("Posix_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
-00583                 }
-00584                 else {
-00585                     Settings.DataBits=dataBits;
-00586                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00587                     Posix_CommConfig.c_cflag|=CS8;
-00588                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00589                 }
-00590                 break;
-00591         }
-00592     }
-00593     UNLOCK_MUTEX();
-00594 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setDtr (bool  set = true  )  [virtual]
-
-
- -

-Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00993 {
-00994     LOCK_MUTEX();
-00995     if (isOpen()) {
-00996         int status;
-00997         ioctl(Posix_File->handle(), TIOCMGET, &status);
-00998         if (set) {
-00999             status|=TIOCM_DTR;
-01000         }
-01001         else {
-01002             status&=~TIOCM_DTR;
-01003         }
-01004         ioctl(Posix_File->handle(), TIOCMSET, &status);
-01005     }
-01006     UNLOCK_MUTEX();
-01007 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setFlowControl (FlowType  flow  )  [virtual]
-
-
- -

-Sets the flow control used by the port. Possible values of flow are:

    FLOW_OFF            No flow control
-    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
-    FLOW_XONXOFF        Software (XON/XOFF) flow control
-
Note:
FLOW_HARDWARE may not be supported on all versions of UNIX. In cases where it is unsupported, FLOW_HARDWARE is the same as FLOW_OFF.
- -

-Implements QextSerialBase.

00759 {
-00760     LOCK_MUTEX();
-00761     if (Settings.FlowControl!=flow) {
-00762         Settings.FlowControl=flow;
-00763     }
-00764     if (isOpen()) {
-00765         switch(flow) {
-00766 
-00767             /*no flow control*/
-00768             case FLOW_OFF:
-00769                 Posix_CommConfig.c_cflag&=(~CRTSCTS);
-00770                 Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
-00771                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00772                 break;
-00773 
-00774             /*software (XON/XOFF) flow control*/
-00775             case FLOW_XONXOFF:
-00776                 Posix_CommConfig.c_cflag&=(~CRTSCTS);
-00777                 Posix_CommConfig.c_iflag|=(IXON|IXOFF|IXANY);
-00778                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00779                 break;
-00780 
-00781             case FLOW_HARDWARE:
-00782                 Posix_CommConfig.c_cflag|=CRTSCTS;
-00783                 Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
-00784                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00785                 break;
-00786         }
-00787     }
-00788     UNLOCK_MUTEX();
-00789 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setParity (ParityType  parity  )  [virtual]
-
-
- -

-Sets the parity associated with the serial port. The possible values of parity are:

    PAR_SPACE       Space Parity
-    PAR_MARK        Mark Parity
-    PAR_NONE        No Parity
-    PAR_EVEN        Even Parity
-    PAR_ODD         Odd Parity
-

-

Note:
This function is subject to the following limitations:
-
POSIX systems do not support mark parity.
-
POSIX systems support space parity only if tricked into doing so, and only with fewer than 8 data bits. Use space parity very carefully with POSIX systems.
- -

-Implements QextSerialBase.

00617 {
-00618     LOCK_MUTEX();
-00619     if (Settings.Parity!=parity) {
-00620         if (parity==PAR_MARK || (parity==PAR_SPACE && Settings.DataBits==DATA_8)) {
-00621         }
-00622         else {
-00623             Settings.Parity=parity;
-00624         }
-00625     }
-00626     if (isOpen()) {
-00627         switch (parity) {
-00628 
-00629             /*space parity*/
-00630             case PAR_SPACE:
-00631                 if (Settings.DataBits==DATA_8) {
-00632                     TTY_PORTABILITY_WARNING("Posix_QextSerialPort:  Space parity is only supported in POSIX with 7 or fewer data bits");
-00633                 }
-00634                 else {
-00635 
-00636                     /*space parity not directly supported - add an extra data bit to simulate it*/
-00637                     Posix_CommConfig.c_cflag&=~(PARENB|CSIZE);
-00638                     switch(Settings.DataBits) {
-00639                         case DATA_5:
-00640                             Settings.DataBits=DATA_6;
-00641                             Posix_CommConfig.c_cflag|=CS6;
-00642                             break;
-00643 
-00644                         case DATA_6:
-00645                             Settings.DataBits=DATA_7;
-00646                             Posix_CommConfig.c_cflag|=CS7;
-00647                             break;
-00648 
-00649                         case DATA_7:
-00650                             Settings.DataBits=DATA_8;
-00651                             Posix_CommConfig.c_cflag|=CS8;
-00652                             break;
-00653 
-00654                         case DATA_8:
-00655                             break;
-00656                     }
-00657                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00658                 }
-00659                 break;
-00660 
-00661             /*mark parity - WINDOWS ONLY*/
-00662             case PAR_MARK:
-00663                 TTY_WARNING("Posix_QextSerialPort: Mark parity is not supported by POSIX.");
-00664                 break;
-00665 
-00666             /*no parity*/
-00667             case PAR_NONE:
-00668                 Posix_CommConfig.c_cflag&=(~PARENB);
-00669                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00670                 break;
-00671 
-00672             /*even parity*/
-00673             case PAR_EVEN:
-00674                 Posix_CommConfig.c_cflag&=(~PARODD);
-00675                 Posix_CommConfig.c_cflag|=PARENB;
-00676                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00677                 break;
-00678 
-00679             /*odd parity*/
-00680             case PAR_ODD:
-00681                 Posix_CommConfig.c_cflag|=(PARENB|PARODD);
-00682                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00683                 break;
-00684         }
-00685     }
-00686     UNLOCK_MUTEX();
-00687 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setPortName (const QString &  name  )  [virtual, inherited]
-
-
- -

-Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".

00084 {
-00085     port = name;
-00086 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setQueryMode (QueryMode  mode  )  [virtual, inherited]
-
-
- -

-Set desired serial communication handling style. You may choose from polling or event driven approach. This function does nothing when port is open; to apply changes port must be reopened.

-In event driven approach read() and write() functions are acting asynchronously. They return immediately and the operation is performed in the background, so they doesn't freeze the calling thread. To determine when operation is finished, QextSerialPort runs separate thread and monitors serial port events. Whenever the event occurs, adequate signal is emitted.

-When polling is set, read() and write() are acting synchronously. Signals are not working in this mode and some functions may not be available. The advantage of polling is that it generates less overhead due to lack of signals emissions and it doesn't start separate thread to monitor events.

-Generally event driven approach is more capable and friendly, although some applications may need as low overhead as possible and then polling comes.

-

Parameters:
- - -
mode query mode.
-
-
00075 {
-00076     _queryMode = mechanism;
-00077 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setRts (bool  set = true  )  [virtual]
-
-
- -

-Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

01015 {
-01016     LOCK_MUTEX();
-01017     if (isOpen()) {
-01018         int status;
-01019         ioctl(Posix_File->handle(), TIOCMGET, &status);
-01020         if (set) {
-01021             status|=TIOCM_RTS;
-01022         }
-01023         else {
-01024             status&=~TIOCM_RTS;
-01025         }
-01026         ioctl(Posix_File->handle(), TIOCMSET, &status);
-01027     }
-01028     UNLOCK_MUTEX();
-01029 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setStopBits (StopBitsType  stopBits  )  [virtual]
-
-
- -

-Sets the number of stop bits used by the serial port. Possible values of stopBits are:

    STOP_1      1 stop bit
-    STOP_1_5    1.5 stop bits
-    STOP_2      2 stop bits
-
Note:
This function is subject to the following restrictions:
-
2 stop bits cannot be used with 5 data bits.
-
POSIX does not support 1.5 stop bits.
- -

-Implements QextSerialBase.

00706 {
-00707     LOCK_MUTEX();
-00708     if (Settings.StopBits!=stopBits) {
-00709         if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) || stopBits==STOP_1_5) {}
-00710         else {
-00711             Settings.StopBits=stopBits;
-00712         }
-00713     }
-00714     if (isOpen()) {
-00715         switch (stopBits) {
-00716 
-00717             /*one stop bit*/
-00718             case STOP_1:
-00719                 Settings.StopBits=stopBits;
-00720                 Posix_CommConfig.c_cflag&=(~CSTOPB);
-00721                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00722                 break;
-00723 
-00724             /*1.5 stop bits*/
-00725             case STOP_1_5:
-00726                 TTY_WARNING("Posix_QextSerialPort: 1.5 stop bit operation is not supported by POSIX.");
-00727                 break;
-00728 
-00729             /*two stop bits*/
-00730             case STOP_2:
-00731                 if (Settings.DataBits==DATA_5) {
-00732                     TTY_WARNING("Posix_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
-00733                 }
-00734                 else {
-00735                     Settings.StopBits=stopBits;
-00736                     Posix_CommConfig.c_cflag|=CSTOPB;
-00737                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00738                 }
-00739                 break;
-00740         }
-00741     }
-00742     UNLOCK_MUTEX();
-00743 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
void Posix_QextSerialPort::setTimeout (ulong  sec,
ulong  millisec 
) [virtual]
-
-
- -

-Sets the read and write timeouts for the port to sec seconds and millisec milliseconds. Note that this is a per-character timeout, i.e. the port will wait this long for each individual character, not for the whole read operation. This timeout also applies to the bytesWaiting() function.

-

Note:
POSIX does not support millisecond-level control for I/O timeout values. Any timeout set using this function will be set to the next lowest tenth of a second for the purposes of detecting read or write timeouts. For example a timeout of 550 milliseconds will be seen by the class as a timeout of 500 milliseconds for the purposes of reading and writing the port. However millisecond-level control is allowed by the select() system call, so for example a 550-millisecond timeout will be seen as 550 milliseconds on POSIX systems for the purpose of detecting available bytes in the read buffer.
- -

-Implements QextSerialBase.

00809 {
-00810     LOCK_MUTEX();
-00811     Settings.Timeout_Sec=sec;
-00812     Settings.Timeout_Millisec=millisec;
-00813     Posix_Copy_Timeout.tv_sec=sec;
-00814     Posix_Copy_Timeout.tv_usec=millisec;
-00815     if (isOpen()) {
-00816         tcgetattr(Posix_File->handle(), &Posix_CommConfig);
-00817         Posix_CommConfig.c_cc[VTIME]=sec*10+millisec/100;
-00818         tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00819     }
-00820     UNLOCK_MUTEX();
-00821 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Posix_QextSerialPort::size (  )  const [virtual]
-
-
- -

-This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete QIODevice interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use Posix_QextSerialPort::bytesWaiting() instead. -

-Implements QextSerialBase.

00907 {
-00908     int numBytes;
-00909     if (ioctl(Posix_File->handle(), FIONREAD, &numBytes)<0) {
-00910         numBytes=0;
-00911     }
-00912     return (qint64)numBytes;
-00913 }
-
-

- -

-

- -

-
- - - - - - - - -
StopBitsType QextSerialBase::stopBits (  )  const [virtual, inherited]
-
-
- -

-Returns the number of stop bits used by the port. For a list of possible return values, see the definition of the enum StopBitsType.

00133 {
-00134     return Settings.StopBits;
-00135 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::translateError (ulong  error  )  [virtual]
-
-
- -

-Translates a system-specific error code to a QextSerialPort error code. Used internally. -

-Implements QextSerialBase.

00970 {
-00971     switch (error) {
-00972         case EBADF:
-00973         case ENOTTY:
-00974             lastErr=E_INVALID_FD;
-00975             break;
-00976 
-00977         case EINTR:
-00978             lastErr=E_CAUGHT_NON_BLOCKED_SIGNAL;
-00979             break;
-00980 
-00981         case ENOMEM:
-00982             lastErr=E_NO_MEMORY;
-00983             break;
-00984     }
-00985 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::ungetChar (char  c  )  [virtual]
-
-
- -

-This function is included to implement the full QIODevice interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect. -

-Implements QextSerialBase.

00960 {
-00961     /*meaningless on unbuffered sequential device - return error and print a warning*/
-00962     TTY_WARNING("Posix_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
-00963 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Posix_QextSerialPort::writeData (const char *  data,
qint64  maxSize 
) [protected, virtual]
-
-
- -

-Writes a block of data to the serial port. This function will write maxSize bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

01120 {
-01121     LOCK_MUTEX();
-01122     int retVal=0;
-01123     retVal=Posix_File->write(data, maxSize);
-01124     if (retVal==-1)
-01125        lastErr=E_WRITE_FAILED;
-01126     UNLOCK_MUTEX();
-01127 //    flush();
-01128     return retVal;
-01129 }
-
-

- -

-

-


Member Data Documentation

- -
-
- - - - -
QextSerialBase::QueryMode QextSerialBase::_queryMode [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct termios Posix_QextSerialPort::Posix_CommConfig [protected]
-
-
- -

- -

-

- -

-
- - - - -
struct timeval Posix_QextSerialPort::Posix_Copy_Timeout [protected]
-
-
- -

- -

-

- -

-
- - - - -
QFile* Posix_QextSerialPort::Posix_File [protected]
-
-
- -

- -

-

- -

-
- - - - -
struct timeval Posix_QextSerialPort::Posix_Timeout [protected]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected, inherited]
-
-
- -

- -

-

-


The documentation for this class was generated from the following files: -
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classPosix__QextSerialPort.png b/src/core/gps/qextserialport/html/classPosix__QextSerialPort.png deleted file mode 100644 index d4fc5fe2b10112e5b3d0c705fe1d553ebfcfccc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 852 zcmV-a1FQUrP)PbXFRCt{2n_ZII zAPmRN%RYl{AWqO}XL_DK<^D$~65`7rfa7fHW<}A>YWi-3+mmia z)9a2#!Q`7q3t7(gq?Sy?PNH{f?Vt(P-H11q|g3C+6Z~qs@1g@ ztPRCmk*L1ihzuVfk}ORqNE?}t1uN8eBH*G<6{y1)i_qzx$a75*ABj+%`c8!ER7EI4 z5sFZRA|?^;YO{;I>ZT%A2;*G2mR5#Ln78$`E%qiOmW?mfkO@80EL$d9L|Dm$D>1im zb-LSGvJd?*$!0d&vwIm~Xtnq+Bdm-VF?881c8o1vguU?`)0Y~t&V#^W=5t5s)HR};P@VE(olxbPUj$C0#==#Ut3DznRIyI3LPE&Z7(v<47z?RD z&Imt5R0&m-95q7BK<3QmDzFqcOq1$Dnb#8P=q2BF^N!}dTYdF;crjUOcwr* z6ymV(7uvt=?C8{^!rw4Ht5bIif77dj=okL_8AQMEcLFgg{GCB`3x8QNJ0Ammh - -QextSerialPort: Member List - - - - - - -

QextBaseType Member List

This is the complete list of members for QextBaseType, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_bytesToWriteWin_QextSerialPort [protected]
Win_QextSerialPort::_queryModeQextSerialBase [protected]
Posix_QextSerialPort::_queryModeQextSerialBase [protected]
Win_QextSerialPort::aboutToClose()QIODevice
Posix_QextSerialPort::aboutToClose()QIODevice
atEnd() const QextSerialBase [virtual]
Win_QextSerialPort::QIODevice::atEnd()QIODevice
QIODevice::atEnd()QIODevice
baudRate() const QextSerialBase [virtual]
Win_QextSerialPort::bytesAvailable()Win_QextSerialPort [virtual]
Posix_QextSerialPort::bytesAvailable()Posix_QextSerialPort [virtual]
bytesToWrite() const Win_QextSerialPort [virtual]
Win_QextSerialPort::QextSerialBase::bytesToWrite()QIODevice
Posix_QextSerialPort::bytesToWrite()QIODevice
bytesToWriteLockWin_QextSerialPort [protected]
Win_QextSerialPort::bytesWritten(qint64 bytes)QIODevice
Posix_QextSerialPort::bytesWritten(qint64 bytes)QIODevice
Win_QextSerialPort::canReadLine()QIODevice
Posix_QextSerialPort::canReadLine()QIODevice
Win_QextSerialPort::close()Win_QextSerialPort [virtual]
Posix_QextSerialPort::close()Posix_QextSerialPort [virtual]
construct()QextSerialBase [virtual]
dataBits() const QextSerialBase [virtual]
Win_QextSerialPort::dsrChanged(bool status)QextSerialBase [signal]
Posix_QextSerialPort::dsrChanged(bool status)QextSerialBase [signal]
Win_QextSerialPort::errorString()QIODevice
Posix_QextSerialPort::errorString()QIODevice
Win_QextSerialPort::EventDriven enum valueQextSerialBase
Posix_QextSerialPort::EventDriven enum valueQextSerialBase
flowControl() const QextSerialBase [virtual]
Win_QextSerialPort::flush()Win_QextSerialPort [virtual]
Posix_QextSerialPort::flush()Posix_QextSerialPort [virtual]
Win_QextSerialPort::getChar(char *c)QIODevice
Posix_QextSerialPort::getChar(char *c)QIODevice
Win_QextSerialPort::isOpen()QIODevice
Posix_QextSerialPort::isOpen()QIODevice
Win_QextSerialPort::isReadable()QIODevice
Posix_QextSerialPort::isReadable()QIODevice
isSequential() const QextSerialBase [virtual]
Win_QextSerialPort::QIODevice::isSequential()QIODevice
QIODevice::isSequential()QIODevice
Win_QextSerialPort::isTextModeEnabled()QIODevice
Posix_QextSerialPort::isTextModeEnabled()QIODevice
Win_QextSerialPort::isWritable()QIODevice
Posix_QextSerialPort::isWritable()QIODevice
Win_QextSerialPort::lastErrQextSerialBase [protected]
Posix_QextSerialPort::lastErrQextSerialBase [protected]
lastError() const QextSerialBase [virtual]
Win_QextSerialPort::lineStatus(void)Win_QextSerialPort [virtual]
Posix_QextSerialPort::lineStatus()Posix_QextSerialPort [virtual]
monitorCommEvent()Win_QextSerialPort [protected]
Win_QextSerialPort::mutexQextSerialBase [protected]
Posix_QextSerialPort::mutexQextSerialBase [protected]
Win_QextSerialPort::open(OpenMode mode)Win_QextSerialPort [virtual]
Posix_QextSerialPort::open(OpenMode mode)Posix_QextSerialPort [virtual]
Win_QextSerialPort::openMode()QIODevice
Posix_QextSerialPort::openMode()QIODevice
Win_QextSerialPort::operator=(const Win_QextSerialPort &s)Win_QextSerialPort
Posix_QextSerialPort::operator=(const Posix_QextSerialPort &s)Posix_QextSerialPort
overlapWin_QextSerialPort [protected]
overlapThreadWin_QextSerialPort [protected]
overlapWriteWin_QextSerialPort [protected]
parity() const QextSerialBase [virtual]
Win_QextSerialPort::peek(char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::peek(qint64 maxSize)QIODevice
Posix_QextSerialPort::peek(char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::peek(qint64 maxSize)QIODevice
Win_QextSerialPort::Polling enum valueQextSerialBase
Posix_QextSerialPort::Polling enum valueQextSerialBase
Win_QextSerialPort::portQextSerialBase [protected]
Posix_QextSerialPort::portQextSerialBase [protected]
portName() const QextSerialBase [virtual]
Win_QextSerialPort::pos()QIODevice
Posix_QextSerialPort::pos()QIODevice
Posix_CommConfigPosix_QextSerialPort [protected]
Posix_Copy_TimeoutPosix_QextSerialPort [protected]
Posix_FilePosix_QextSerialPort [protected]
Posix_QextSerialPort()Posix_QextSerialPort
Posix_QextSerialPort(const Posix_QextSerialPort &s)Posix_QextSerialPort
Posix_QextSerialPort(const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_QextSerialPort(const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_QextSerialPort(const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_TimeoutPosix_QextSerialPort [protected]
Win_QextSerialPort::putChar(char c)QIODevice
Posix_QextSerialPort::putChar(char c)QIODevice
Win_QextSerialPort::QextSerialBase()QextSerialBase
Win_QextSerialPort::QextSerialBase(const QString &name)QextSerialBase
Posix_QextSerialPort::QextSerialBase()QextSerialBase
Posix_QextSerialPort::QextSerialBase(const QString &name)QextSerialBase
Win_QextSerialPort::QIODevice()QIODevice
Win_QextSerialPort::QIODevice(QObject *parent)QIODevice
Posix_QextSerialPort::QIODevice()QIODevice
Posix_QextSerialPort::QIODevice(QObject *parent)QIODevice
Win_QextSerialPort::QueryMode enum nameQextSerialBase
Posix_QextSerialPort::QueryMode enum nameQextSerialBase
Win_QextSerialPort::queryMode() const QextSerialBase [inline]
Posix_QextSerialPort::queryMode() const QextSerialBase [inline]
Win_QextSerialPort::read(char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::read(qint64 maxSize)QIODevice
Posix_QextSerialPort::read(char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::read(qint64 maxSize)QIODevice
Win_QextSerialPort::readAll()QIODevice
Posix_QextSerialPort::readAll()QIODevice
Win_QextSerialPort::readData(char *data, qint64 maxSize)Win_QextSerialPort [protected, virtual]
Posix_QextSerialPort::readData(char *data, qint64 maxSize)Posix_QextSerialPort [protected, virtual]
readLine(char *data, qint64 maxSize)QextSerialBase [virtual]
Win_QextSerialPort::QIODevice::readLine(qint64 maxSize=0)QIODevice
QIODevice::readLine(qint64 maxSize=0)QIODevice
Win_QextSerialPort::readLineData(char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::readLineData(char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::readyRead()QIODevice
Posix_QextSerialPort::readyRead()QIODevice
Win_QextSerialPort::reset()QIODevice
Posix_QextSerialPort::reset()QIODevice
Win_QextSerialPort::seek(qint64 pos)QIODevice
Posix_QextSerialPort::seek(qint64 pos)QIODevice
Win_QextSerialPort::setBaudRate(BaudRateType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setBaudRate(BaudRateType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setDataBits(DataBitsType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setDataBits(DataBitsType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setDtr(bool set=true)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setDtr(bool set=true)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setErrorString(const QString &str)QIODevice
Posix_QextSerialPort::setErrorString(const QString &str)QIODevice
Win_QextSerialPort::setFlowControl(FlowType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setFlowControl(FlowType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setOpenMode(OpenMode openMode)QIODevice
Posix_QextSerialPort::setOpenMode(OpenMode openMode)QIODevice
Win_QextSerialPort::setParity(ParityType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setParity(ParityType)Posix_QextSerialPort [virtual]
setPortName(const QString &name)QextSerialBase [virtual]
setQueryMode(QueryMode mode)QextSerialBase [virtual]
Win_QextSerialPort::setRts(bool set=true)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setRts(bool set=true)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setStopBits(StopBitsType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setStopBits(StopBitsType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setTextModeEnabled(bool enabled)QIODevice
Posix_QextSerialPort::setTextModeEnabled(bool enabled)QIODevice
Win_QextSerialPort::setTimeout(ulong, ulong)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setTimeout(ulong, ulong)Posix_QextSerialPort [virtual]
Win_QextSerialPort::SettingsQextSerialBase [protected]
Posix_QextSerialPort::SettingsQextSerialBase [protected]
Win_QextSerialPort::size() const Win_QextSerialPort [virtual]
Win_QextSerialPort::QIODevice::size()QIODevice
Posix_QextSerialPort::size() const Posix_QextSerialPort [virtual]
QIODevice::size()QIODevice
stopBits() const QextSerialBase [virtual]
terminateCommWait()Win_QextSerialPort [protected]
threadStartEventWin_QextSerialPort [protected]
threadTerminateEventWin_QextSerialPort [protected]
Win_QextSerialPort::translateError(ulong)Win_QextSerialPort [virtual]
Posix_QextSerialPort::translateError(ulong error)Posix_QextSerialPort [virtual]
Win_QextSerialPort::ungetChar(char c)Win_QextSerialPort [virtual]
Posix_QextSerialPort::ungetChar(char c)Posix_QextSerialPort [virtual]
Win_QextSerialPort::waitForBytesWritten(int msecs)QIODevice
Posix_QextSerialPort::waitForBytesWritten(int msecs)QIODevice
waitForReadyRead(int msecs)Win_QextSerialPort [virtual]
Win_CommConfigWin_QextSerialPort [protected]
Win_CommTimeoutsWin_QextSerialPort [protected]
Win_HandleWin_QextSerialPort [protected]
Win_QextSerialPort()Win_QextSerialPort
Win_QextSerialPort(Win_QextSerialPort const &s)Win_QextSerialPort
Win_QextSerialPort(const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort(const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort(const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort::write(const char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::write(const QByteArray &byteArray)QIODevice
Posix_QextSerialPort::write(const char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::write(const QByteArray &byteArray)QIODevice
Win_QextSerialPort::writeData(const char *data, qint64 maxSize)Win_QextSerialPort [protected, virtual]
Posix_QextSerialPort::writeData(const char *data, qint64 maxSize)Posix_QextSerialPort [protected, virtual]
~Posix_QextSerialPort()Posix_QextSerialPort [virtual]
~QextSerialBase()QextSerialBase [virtual]
~Win_QextSerialPort()Win_QextSerialPort [virtual]


Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classQextBaseType.html b/src/core/gps/qextserialport/html/classQextBaseType.html deleted file mode 100644 index e87336fcc07f..000000000000 --- a/src/core/gps/qextserialport/html/classQextBaseType.html +++ /dev/null @@ -1,3755 +0,0 @@ - - -QextSerialPort: QextBaseType Class Reference - - - - - - -

QextBaseType Class Reference

Inheritance diagram for QextBaseType: -

- -Win_QextSerialPort -Posix_QextSerialPort -QextSerialBase -QextSerialBase -QIODevice -QIODevice -QextSerialPort - -List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Types

 EventDriven
 EventDriven
 Polling
 Polling
enum  QueryMode { Polling, -EventDriven - }
enum  QueryMode { Polling, -EventDriven - }

Signals

void dsrChanged (bool status)
void dsrChanged (bool status)

Public Member Functions

 aboutToClose ()
 aboutToClose ()
 atEnd ()
 atEnd ()
virtual bool atEnd () const
virtual BaudRateType baudRate () const
virtual qint64 bytesAvailable ()
virtual qint64 bytesAvailable ()
 bytesToWrite ()
 bytesToWrite ()
virtual qint64 bytesToWrite () const
 bytesWritten (qint64 bytes)
 bytesWritten (qint64 bytes)
 canReadLine ()
 canReadLine ()
virtual void close ()
virtual void close ()
virtual void construct ()
virtual DataBitsType dataBits () const
 errorString ()
 errorString ()
virtual FlowType flowControl () const
virtual void flush ()
virtual void flush ()
 getChar (char *c)
 getChar (char *c)
 isOpen ()
 isOpen ()
 isReadable ()
 isReadable ()
 isSequential ()
 isSequential ()
virtual bool isSequential () const
 isTextModeEnabled ()
 isTextModeEnabled ()
 isWritable ()
 isWritable ()
virtual ulong lastError () const
virtual ulong lineStatus ()
virtual ulong lineStatus (void)
virtual bool open (OpenMode mode)
virtual bool open (OpenMode mode)
 openMode ()
 openMode ()
virtual ParityType parity () const
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
virtual QString portName () const
 pos ()
 pos ()
 putChar (char c)
 putChar (char c)
QextSerialBase::QueryMode queryMode () const
QextSerialBase::QueryMode queryMode () const
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 readAll ()
 readAll ()
 readLine (qint64 maxSize=0)
 readLine (qint64 maxSize=0)
virtual qint64 readLine (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readyRead ()
 readyRead ()
 reset ()
 reset ()
 seek (qint64 pos)
 seek (qint64 pos)
virtual void setBaudRate (BaudRateType)
virtual void setBaudRate (BaudRateType)
virtual void setDataBits (DataBitsType)
virtual void setDataBits (DataBitsType)
virtual void setDtr (bool set=true)
virtual void setDtr (bool set=true)
 setErrorString (const QString &str)
 setErrorString (const QString &str)
virtual void setFlowControl (FlowType)
virtual void setFlowControl (FlowType)
 setOpenMode (OpenMode openMode)
 setOpenMode (OpenMode openMode)
virtual void setParity (ParityType)
virtual void setParity (ParityType)
virtual void setPortName (const QString &name)
virtual void setQueryMode (QueryMode mode)
virtual void setRts (bool set=true)
virtual void setRts (bool set=true)
virtual void setStopBits (StopBitsType)
virtual void setStopBits (StopBitsType)
 setTextModeEnabled (bool enabled)
 setTextModeEnabled (bool enabled)
virtual void setTimeout (ulong, ulong)
virtual void setTimeout (ulong, ulong)
 size ()
virtual qint64 size () const
 size ()
virtual qint64 size () const
virtual StopBitsType stopBits () const
virtual void translateError (ulong error)
virtual void translateError (ulong)
virtual void ungetChar (char c)
virtual void ungetChar (char c)
 waitForBytesWritten (int msecs)
 waitForBytesWritten (int msecs)
virtual bool waitForReadyRead (int msecs)
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)

Protected Member Functions

void monitorCommEvent ()
virtual qint64 readData (char *data, qint64 maxSize)
virtual qint64 readData (char *data, qint64 maxSize)
void terminateCommWait ()
virtual qint64 writeData (const char *data, qint64 maxSize)
virtual qint64 writeData (const char *data, qint64 maxSize)

Protected Attributes

qint64 _bytesToWrite
QextSerialBase::QueryMode _queryMode
QextSerialBase::QueryMode _queryMode
QReadWriteLock * bytesToWriteLock
ulong lastErr
ulong lastErr
QMutex * mutex
QMutex * mutex
OVERLAPPED overlap
Win_QextSerialThreadoverlapThread
OVERLAPPED overlapWrite
QString port
QString port
termios Posix_CommConfig
timeval Posix_Copy_Timeout
QFile * Posix_File
timeval Posix_Timeout
PortSettings Settings
PortSettings Settings
HANDLE threadStartEvent
HANDLE threadTerminateEvent
COMMCONFIG Win_CommConfig
COMMTIMEOUTS Win_CommTimeouts
HANDLE Win_Handle
-

Detailed Description

-This is not a class at all. It is a macro witch switches itself to Win_QextSerialPort or Posix_QextSerialPort depending on compilation settings. -

-


Member Enumeration Documentation

- -
-
- - - - -
enum QextSerialBase::QueryMode [inherited]
-
-
- -

-

Enumerator:
- - - -
Polling  -
EventDriven  -
-
- -

-Reimplemented in QextSerialPort.

00154                        {
-00155             Polling,
-00156             EventDriven
-00157         };
-
-

- -

-

- -

-
- - - - -
enum QextSerialBase::QueryMode [inherited]
-
-
- -

-

Enumerator:
- - - -
Polling  -
EventDriven  -
-
- -

-Reimplemented in QextSerialPort.

00154                        {
-00155             Polling,
-00156             EventDriven
-00157         };
-
-

- -

-

-


Member Function Documentation

- -
-
- - - - - - - - -
bool QextSerialBase::atEnd (  )  const [virtual, inherited]
-
-
- -

-This function will return true if the input buffer is empty (or on error), and false otherwise. Call QextSerialBase::lastError() for error information.

00164 {
-00165     if (size()) {
-00166         return true;
-00167     }
-00168     return false;
-00169 }
-
-

- -

-

- -

-
- - - - - - - - - -
BaudRateType QextSerialBase::baudRate (void   )  const [virtual, inherited]
-
-
- -

-Returns the baud rate of the serial port. For a list of possible return values see the definition of the enum BaudRateType.

00103 {
-00104     return Settings.BaudRate;
-00105 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Posix_QextSerialPort::bytesAvailable (  )  [virtual, inherited]
-
-
- -

-Returns 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(). -

-Implements QextSerialBase.

00922 {
-00923     LOCK_MUTEX();
-00924     if (isOpen()) {
-00925         int bytesQueued;
-00926         fd_set fileSet;
-00927         FD_ZERO(&fileSet);
-00928         FD_SET(Posix_File->handle(), &fileSet);
-00929 
-00930         /*on Linux systems the Posix_Timeout structure will be altered by the select() call.
-00931           Make sure we use the right timeout values*/
-00932         //memcpy(&Posix_Timeout, &Posix_Copy_Timeout, sizeof(struct timeval));
-00933         Posix_Timeout = Posix_Copy_Timeout;
-00934         int n=select(Posix_File->handle()+1, &fileSet, NULL, &fileSet, &Posix_Timeout);
-00935         if (!n) {
-00936             lastErr=E_PORT_TIMEOUT;
-00937             UNLOCK_MUTEX();
-00938             return -1;
-00939         }
-00940         if (n==-1 || ioctl(Posix_File->handle(), FIONREAD, &bytesQueued)==-1) {
-00941             translateError(errno);
-00942             UNLOCK_MUTEX();
-00943             return -1;
-00944         }
-00945         lastErr=E_NO_ERROR;
-00946         UNLOCK_MUTEX();
-00947         return bytesQueued + QIODevice::bytesAvailable();
-00948     }
-00949     UNLOCK_MUTEX();
-00950     return 0;
-00951 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::bytesAvailable (  )  [virtual, inherited]
-
-
- -

-Returns 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(). -

-Implements QextSerialBase.

00287                                           {
-00288     LOCK_MUTEX();
-00289     if (isOpen()) {
-00290         DWORD Errors;
-00291         COMSTAT Status;
-00292         bool success=ClearCommError(Win_Handle, &Errors, &Status);
-00293         translateError(Errors);
-00294         if (success) {
-00295             lastErr=E_NO_ERROR;
-00296             UNLOCK_MUTEX();
-00297             return Status.cbInQue + QIODevice::bytesAvailable();
-00298         }
-00299         UNLOCK_MUTEX();
-00300         return (unsigned int)-1;
-00301     }
-00302     UNLOCK_MUTEX();
-00303     return 0;
-00304 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::bytesToWrite (  )  const [virtual, inherited]
-
-
- -

-Return number of bytes waiting in the buffer. Currently this shows number of bytes queued within write() and before the TX_EMPTY event occured. TX_EMPTY event is created whenever last character in the system buffer was sent.

-

Returns:
number of bytes queued within write(), before the first TX_EMPTY event occur.
-
Warning:
this function may not give you expected results since TX_EMPTY may occur while writing data to the buffer. Eventually some TX_EMPTY events may not be catched.
-
Note:
this function always returns 0 in polling mode.
-
See also:
flush().
-
00954 {
-00955     return _bytesToWrite;
-00956 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::close (  )  [virtual, inherited]
-
-
- -

-Closes a serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00878 {
-00879     LOCK_MUTEX();
-00880     Posix_File->close();
-00881     QIODevice::close();
-00882     UNLOCK_MUTEX();
-00883 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::close (  )  [virtual, inherited]
-
-
- -

-Closes a serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00233 {
-00234     LOCK_MUTEX();
-00235 
-00236     if (isOpen()) {
-00237         flush();
-00238         if (overlapThread->isRunning()) {
-00239             overlapThread->stop();
-00240             if (QThread::currentThread() != overlapThread)
-00241                 overlapThread->wait();
-00242         }
-00243         if (CloseHandle(Win_Handle))
-00244             Win_Handle = INVALID_HANDLE_VALUE;
-00245         _bytesToWrite = 0;
-00246         QIODevice::close();
-00247     }
-00248 
-00249     UNLOCK_MUTEX();
-00250 }
-
-

- -

-

- -

-
- - - - - - - - -
void QextSerialBase::construct (  )  [virtual, inherited]
-
-
- -

-Common constructor function for setting up default port settings. (115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 0 ms timeout).

00062 {
-00063     Settings.BaudRate=BAUD115200;
-00064     Settings.DataBits=DATA_8;
-00065     Settings.Parity=PAR_NONE;
-00066     Settings.StopBits=STOP_1;
-00067     Settings.FlowControl=FLOW_HARDWARE;
-00068     Settings.Timeout_Sec=0;
-00069     Settings.Timeout_Millisec=0;
-00070     mutex = new QMutex( QMutex::Recursive );
-00071     setOpenMode(QIODevice::NotOpen);
-00072 }
-
-

- -

-

- -

-
- - - - - - - - -
DataBitsType QextSerialBase::dataBits (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00113 {
-00114     return Settings.DataBits;
-00115 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal, inherited]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal, inherited]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - -
FlowType QextSerialBase::flowControl (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00143 {
-00144     return Settings.FlowControl;
-00145 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::flush (  )  [virtual, inherited]
-
-
- -

-Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00891 {
-00892     LOCK_MUTEX();
-00893     if (isOpen()) {
-00894         Posix_File->flush();
-00895     }
-00896     UNLOCK_MUTEX();
-00897 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::flush (  )  [virtual, inherited]
-
-
- -

-Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00257                                {
-00258     LOCK_MUTEX();
-00259     if (isOpen()) {
-00260         FlushFileBuffers(Win_Handle);
-00261     }
-00262     UNLOCK_MUTEX();
-00263 }
-
-

- -

-

- -

-
- - - - - - - - -
bool QextSerialBase::isSequential (  )  const [virtual, inherited]
-
-
- -

-Returns true if device is sequential, otherwise returns false. Serial port is sequential device so this function always returns true. Check QIODevice::isSequential() documentation for more information.

00154 {
-00155     return true;
-00156 }
-
-

- -

-

- -

-
- - - - - - - - -
ulong QextSerialBase::lastError (  )  const [virtual, inherited]
-
-
- -

-Returns 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:

-

Error                           Explanation
----------------------------     -------------------------------------------------------------
-E_NO_ERROR                      No Error has occured
-E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
-E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
-E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
-E_PORT_TIMEOUT                  Operation timed out (POSIX)
-E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
-E_BREAK_CONDITION               The port detected a break condition
-E_FRAMING_ERROR                 The port detected a framing error
-                                (usually caused by incorrect baud rate settings)
-E_IO_ERROR                      There was an I/O error while communicating with the port
-E_BUFFER_OVERRUN                Character buffer overrun
-E_RECEIVE_OVERFLOW              Receive buffer overflow
-E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
-E_TRANSMIT_OVERFLOW             Transmit buffer overflow
-E_READ_FAILED                   General read operation failure
-E_WRITE_FAILED                  General write operation failure
-
00225 {
-00226     return lastErr;
-00227 }
-
-

- -

-

- -

-
- - - - - - - - - -
unsigned long Posix_QextSerialPort::lineStatus (void   )  [virtual, inherited]
-
-
- -

-returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned long with specific bits indicating which lines are high. The following constants should be used to examine the states of individual lines:

-

Mask        Line
-------      ----
-LS_CTS      CTS
-LS_DSR      DSR
-LS_DCD      DCD
-LS_RI       RI
-LS_RTS      RTS (POSIX only)
-LS_DTR      DTR (POSIX only)
-LS_ST       Secondary TXD (POSIX only)
-LS_SR       Secondary RXD (POSIX only)
-

-This function will return 0 if the port associated with the class is not currently open. -

-Implements QextSerialBase.

01055 {
-01056     unsigned long Status=0, Temp=0;
-01057     LOCK_MUTEX();
-01058     if (isOpen()) {
-01059         ioctl(Posix_File->handle(), TIOCMGET, &Temp);
-01060         if (Temp&TIOCM_CTS) {
-01061             Status|=LS_CTS;
-01062         }
-01063         if (Temp&TIOCM_DSR) {
-01064             Status|=LS_DSR;
-01065         }
-01066         if (Temp&TIOCM_RI) {
-01067             Status|=LS_RI;
-01068         }
-01069         if (Temp&TIOCM_CD) {
-01070             Status|=LS_DCD;
-01071         }
-01072         if (Temp&TIOCM_DTR) {
-01073             Status|=LS_DTR;
-01074         }
-01075         if (Temp&TIOCM_RTS) {
-01076             Status|=LS_RTS;
-01077         }
-01078         if (Temp&TIOCM_ST) {
-01079             Status|=LS_ST;
-01080         }
-01081         if (Temp&TIOCM_SR) {
-01082             Status|=LS_SR;
-01083         }
-01084     }
-01085     UNLOCK_MUTEX();
-01086     return Status;
-01087 }
-
-

- -

-

- -

-
- - - - - - - - - -
ulong Win_QextSerialPort::lineStatus (void   )  [virtual, inherited]
-
-
- -

-returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned long with specific bits indicating which lines are high. The following constants should be used to examine the states of individual lines:

-

Mask        Line
-------      ----
-LS_CTS      CTS
-LS_DSR      DSR
-LS_DCD      DCD
-LS_RI       RI
-

-This function will return 0 if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00925                                          {
-00926     unsigned long Status=0, Temp=0;
-00927     LOCK_MUTEX();
-00928     if (isOpen()) {
-00929         GetCommModemStatus(Win_Handle, &Temp);
-00930         if (Temp&MS_CTS_ON) {
-00931             Status|=LS_CTS;
-00932         }
-00933         if (Temp&MS_DSR_ON) {
-00934             Status|=LS_DSR;
-00935         }
-00936         if (Temp&MS_RING_ON) {
-00937             Status|=LS_RI;
-00938         }
-00939         if (Temp&MS_RLSD_ON) {
-00940             Status|=LS_DCD;
-00941         }
-00942     }
-00943     UNLOCK_MUTEX();
-00944     return Status;
-00945 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::monitorCommEvent (  )  [protected, inherited]
-
-
- -

-

00959 {
-00960     DWORD eventMask = 0;
-00961 
-00962     ResetEvent(overlap.hEvent);
-00963     if (!WaitCommEvent(Win_Handle, & eventMask, & overlap))
-00964         if (GetLastError() != ERROR_IO_PENDING)
-00965             qCritical("WaitCommEvent error %ld\n", GetLastError());
-00966 
-00967     if (WaitForSingleObject(overlap.hEvent, INFINITE) == WAIT_OBJECT_0) {
-00968         //overlap event occured
-00969         DWORD undefined;
-00970         if (!GetOverlappedResult(Win_Handle, & overlap, & undefined, false)) {
-00971             qWarning("Comm event overlapped error %ld", GetLastError());
-00972             return;
-00973         }
-00974         if (eventMask & EV_RXCHAR) {
-00975             if (sender() != this)
-00976                 emit readyRead();
-00977         }
-00978         if (eventMask & EV_TXEMPTY) {
-00979             DWORD numBytes;
-00980             GetOverlappedResult(Win_Handle, & overlapWrite, & numBytes, true);
-00981             bytesToWriteLock->lockForWrite();
-00982             if (sender() != this)
-00983                 emit bytesWritten(bytesToWrite());
-00984             _bytesToWrite = 0;
-00985             bytesToWriteLock->unlock();
-00986         }
-00987         if (eventMask & EV_DSR)
-00988             if (lineStatus() & LS_DSR)
-00989                 emit dsrChanged(true);
-00990             else
-00991                 emit dsrChanged(false);
-00992     }
-00993 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Posix_QextSerialPort::open (OpenMode  mode  )  [virtual, inherited]
-
-
- -

-Opens 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. -

-Implements QextSerialBase.

00830 {
-00831     LOCK_MUTEX();
-00832     if (mode == QIODevice::NotOpen)
-00833         return isOpen();
-00834     if (!isOpen()) {
-00835         /*open the port*/
-00836         Posix_File->setFileName(port);
-00837         qDebug("Trying to open File");
-00838         if (Posix_File->open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
-00839             qDebug("Opened File successfully");
-00840             /*set open mode*/
-00841             QIODevice::open(mode);
-00842 
-00843             /*configure port settings*/
-00844             tcgetattr(Posix_File->handle(), &Posix_CommConfig);
-00845 
-00846             /*set up other port settings*/
-00847             Posix_CommConfig.c_cflag|=CREAD|CLOCAL;
-00848             Posix_CommConfig.c_lflag&=(~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG));
-00849             Posix_CommConfig.c_iflag&=(~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY));
-00850             Posix_CommConfig.c_oflag&=(~OPOST);
-00851             Posix_CommConfig.c_cc[VMIN]=0;
-00852             Posix_CommConfig.c_cc[VINTR] = _POSIX_VDISABLE;
-00853             Posix_CommConfig.c_cc[VQUIT] = _POSIX_VDISABLE;
-00854             Posix_CommConfig.c_cc[VSTART] = _POSIX_VDISABLE;
-00855             Posix_CommConfig.c_cc[VSTOP] = _POSIX_VDISABLE;
-00856             Posix_CommConfig.c_cc[VSUSP] = _POSIX_VDISABLE;
-00857             setBaudRate(Settings.BaudRate);
-00858             setDataBits(Settings.DataBits);
-00859             setParity(Settings.Parity);
-00860             setStopBits(Settings.StopBits);
-00861             setFlowControl(Settings.FlowControl);
-00862             setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
-00863             tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00864         } else {
-00865             qDebug("Could not open File! Error code : %d", Posix_File->error());
-00866         }
-00867     }
-00868     UNLOCK_MUTEX();
-00869     return isOpen();
-00870 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Win_QextSerialPort::open (OpenMode  mode  )  [virtual, inherited]
-
-
- -

-Opens a serial port. Note that this function does not specify which device to open. If you need to open a device by name, see 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. -

-Implements QextSerialBase.

00175                                            {
-00176     unsigned long confSize = sizeof(COMMCONFIG);
-00177     Win_CommConfig.dwSize = confSize;
-00178     DWORD dwFlagsAndAttributes = 0;
-00179     if (queryMode() == QextSerialBase::EventDriven)
-00180         dwFlagsAndAttributes += FILE_FLAG_OVERLAPPED;
-00181 
-00182     LOCK_MUTEX();
-00183     if (mode == QIODevice::NotOpen)
-00184         return isOpen();
-00185     if (!isOpen()) {
-00186         /*open the port*/
-00187         Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
-00188                               FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, dwFlagsAndAttributes, NULL);
-00189         if (Win_Handle!=INVALID_HANDLE_VALUE) {
-00190             /*configure port settings*/
-00191             GetCommConfig(Win_Handle, &Win_CommConfig, &confSize);
-00192             GetCommState(Win_Handle, &(Win_CommConfig.dcb));
-00193 
-00194             /*set up parameters*/
-00195             Win_CommConfig.dcb.fBinary=TRUE;
-00196             Win_CommConfig.dcb.fInX=FALSE;
-00197             Win_CommConfig.dcb.fOutX=FALSE;
-00198             Win_CommConfig.dcb.fAbortOnError=FALSE;
-00199             Win_CommConfig.dcb.fNull=FALSE;
-00200             setBaudRate(Settings.BaudRate);
-00201             setDataBits(Settings.DataBits);
-00202             setStopBits(Settings.StopBits);
-00203             setParity(Settings.Parity);
-00204             setFlowControl(Settings.FlowControl);
-00205             setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
-00206             SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00207             
-00208             //init event driven approach
-00209             if (queryMode() == QextSerialBase::EventDriven) {
-00210                 if (!SetCommMask( Win_Handle, EV_TXEMPTY | EV_RXCHAR | EV_DSR)) {
-00211                     qWarning("Failed to set Comm Mask. Error code: %ld", GetLastError());
-00212                     UNLOCK_MUTEX();
-00213                     return false;
-00214                 }
-00215                 overlapThread->start();
-00216             }
-00217             QIODevice::open(mode);
-00218         }
-00219     } else {
-00220         UNLOCK_MUTEX();
-00221         return false;
-00222     }
-00223     UNLOCK_MUTEX();
-00224     return isOpen();
-00225 }
-
-

- -

-

- -

-
- - - - - - - - -
ParityType QextSerialBase::parity (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00123 {
-00124     return Settings.Parity;
-00125 }
-
-

- -

-

- -

-
- - - - - - - - -
QString QextSerialBase::portName (  )  const [virtual, inherited]
-
-
- -

-Returns the name set by setPortName().

00093 {
-00094     return port;
-00095 }
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline, inherited]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline, inherited]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Posix_QextSerialPort::readData (char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Reads 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.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

01099 {
-01100     LOCK_MUTEX();
-01101     int retVal=0;
-01102     retVal=Posix_File->read(data, maxSize);
-01103     if (retVal==-1)
-01104         lastErr=E_READ_FAILED;
-01105     UNLOCK_MUTEX();
-01106 
-01107     return retVal;
-01108 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Win_QextSerialPort::readData (char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Reads 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.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

00347 {
-00348     DWORD retVal;
-00349     
-00350     LOCK_MUTEX();
-00351     
-00352     retVal = 0;
-00353     if (queryMode() == QextSerialBase::EventDriven) {
-00354         COMSTAT Win_ComStat;
-00355         DWORD Win_ErrorMask = 0;
-00356         OVERLAPPED overlapRead;
-00357         overlapRead.Internal = 0;
-00358         overlapRead.InternalHigh = 0;
-00359         overlapRead.Offset = 0;
-00360         overlapRead.OffsetHigh = 0;
-00361         overlapRead.hEvent = CreateEvent(NULL, true, false, NULL);
-00362         ClearCommError(Win_Handle, & Win_ErrorMask, & Win_ComStat);
-00363         //actually in overlapped mode maxSize acts as minSize...
-00364         maxSize = qMin((qint64)Win_ComStat.cbInQue, maxSize);
-00365         if (!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, & overlapRead)) {
-00366             if (GetLastError() == ERROR_IO_PENDING)
-00367                 GetOverlappedResult(Win_Handle, & overlapRead, & retVal, true);
-00368             else {
-00369                 lastErr = E_READ_FAILED;
-00370                 retVal = (DWORD)-1;
-00371             }
-00372         }
-00373         CloseHandle(overlapRead.hEvent);
-00374     } else if (!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, NULL)) {
-00375         lastErr = E_READ_FAILED;
-00376         retVal = (DWORD)-1;
-00377     }
-00378 
-00379     UNLOCK_MUTEX();
-00380 
-00381     return (qint64)retVal;
-00382 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 QextSerialBase::readLine (char *  data,
qint64  maxSize 
) [virtual, inherited]
-
-
- -

-This 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. -

-Reimplemented from QIODevice.

00178 {
-00179     qint64 numBytes = bytesAvailable();
-00180     char* pData = data;
-00181 
-00182     if (maxSize < 2)    //maxSize must be larger than 1
-00183         return -1;
-00184 
-00185     /*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
-00186     while (pData<(data+numBytes) && --maxSize) {
-00187         readData(pData, 1);
-00188         if (*pData++ == '\n') {
-00189             break;
-00190         }
-00191     }
-00192     *pData='\0';
-00193 
-00194     /*return size of data read*/
-00195     return (pData-data);
-00196 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setBaudRate (BaudRateType  baudRate  )  [virtual, inherited]
-
-
- -

-Sets the baud rate of the serial port. Note that not all rates are applicable on all platforms. The following table shows translations of the various baud rate constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.

-

Note:
BAUD76800 may not be supported on all POSIX systems. SGI/IRIX systems do not support BAUD1800.
-
  RATE          Windows Speed   POSIX Speed
-  -----------   -------------   -----------
-   BAUD50                 110          50
-   BAUD75                 110          75
-  *BAUD110                110         110
-   BAUD134                110         134.5
-   BAUD150                110         150
-   BAUD200                110         200
-  *BAUD300                300         300
-  *BAUD600                600         600
-  *BAUD1200              1200        1200
-   BAUD1800              1200        1800
-  *BAUD2400              2400        2400
-  *BAUD4800              4800        4800
-  *BAUD9600              9600        9600
-   BAUD14400            14400        9600
-  *BAUD19200            19200       19200
-  *BAUD38400            38400       38400
-   BAUD56000            56000       38400
-  *BAUD57600            57600       57600
-   BAUD76800            57600       76800
-  *BAUD115200          115200      115200
-   BAUD128000          128000      115200
-   BAUD256000          256000      115200
-
-

-Implements QextSerialBase.

00203 {
-00204     LOCK_MUTEX();
-00205     if (Settings.BaudRate!=baudRate) {
-00206         switch (baudRate) {
-00207             case BAUD14400:
-00208                 Settings.BaudRate=BAUD9600;
-00209                 break;
-00210 
-00211             case BAUD56000:
-00212                 Settings.BaudRate=BAUD38400;
-00213                 break;
-00214 
-00215             case BAUD76800:
-00216 
-00217 #ifndef B76800
-00218                 Settings.BaudRate=BAUD57600;
-00219 #else
-00220                 Settings.BaudRate=baudRate;
-00221 #endif
-00222                 break;
-00223 
-00224             case BAUD128000:
-00225             case BAUD256000:
-00226                 Settings.BaudRate=BAUD115200;
-00227                 break;
-00228 
-00229             default:
-00230                 Settings.BaudRate=baudRate;
-00231                 break;
-00232         }
-00233     }
-00234     if (isOpen()) {
-00235         switch (baudRate) {
-00236 
-00237             /*50 baud*/
-00238             case BAUD50:
-00239                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 50 baud operation.");
-00240 #ifdef CBAUD
-00241                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00242                 Posix_CommConfig.c_cflag|=B50;
-00243 #else
-00244                 cfsetispeed(&Posix_CommConfig, B50);
-00245                 cfsetospeed(&Posix_CommConfig, B50);
-00246 #endif
-00247                 break;
-00248 
-00249             /*75 baud*/
-00250             case BAUD75:
-00251                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 75 baud operation.");
-00252 #ifdef CBAUD
-00253                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00254                 Posix_CommConfig.c_cflag|=B75;
-00255 #else
-00256                 cfsetispeed(&Posix_CommConfig, B75);
-00257                 cfsetospeed(&Posix_CommConfig, B75);
-00258 #endif
-00259                 break;
-00260 
-00261             /*110 baud*/
-00262             case BAUD110:
-00263 #ifdef CBAUD
-00264                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00265                 Posix_CommConfig.c_cflag|=B110;
-00266 #else
-00267                 cfsetispeed(&Posix_CommConfig, B110);
-00268                 cfsetospeed(&Posix_CommConfig, B110);
-00269 #endif
-00270                 break;
-00271 
-00272             /*134.5 baud*/
-00273             case BAUD134:
-00274                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 134.5 baud operation.");
-00275 #ifdef CBAUD
-00276                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00277                 Posix_CommConfig.c_cflag|=B134;
-00278 #else
-00279                 cfsetispeed(&Posix_CommConfig, B134);
-00280                 cfsetospeed(&Posix_CommConfig, B134);
-00281 #endif
-00282                 break;
-00283 
-00284             /*150 baud*/
-00285             case BAUD150:
-00286                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 150 baud operation.");
-00287 #ifdef CBAUD
-00288                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00289                 Posix_CommConfig.c_cflag|=B150;
-00290 #else
-00291                 cfsetispeed(&Posix_CommConfig, B150);
-00292                 cfsetospeed(&Posix_CommConfig, B150);
-00293 #endif
-00294                 break;
-00295 
-00296             /*200 baud*/
-00297             case BAUD200:
-00298                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 200 baud operation.");
-00299 #ifdef CBAUD
-00300                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00301                 Posix_CommConfig.c_cflag|=B200;
-00302 #else
-00303                 cfsetispeed(&Posix_CommConfig, B200);
-00304                 cfsetospeed(&Posix_CommConfig, B200);
-00305 #endif
-00306                 break;
-00307 
-00308             /*300 baud*/
-00309             case BAUD300:
-00310 #ifdef CBAUD
-00311                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00312                 Posix_CommConfig.c_cflag|=B300;
-00313 #else
-00314                 cfsetispeed(&Posix_CommConfig, B300);
-00315                 cfsetospeed(&Posix_CommConfig, B300);
-00316 #endif
-00317                 break;
-00318 
-00319             /*600 baud*/
-00320             case BAUD600:
-00321 #ifdef CBAUD
-00322                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00323                 Posix_CommConfig.c_cflag|=B600;
-00324 #else
-00325                 cfsetispeed(&Posix_CommConfig, B600);
-00326                 cfsetospeed(&Posix_CommConfig, B600);
-00327 #endif
-00328                 break;
-00329 
-00330             /*1200 baud*/
-00331             case BAUD1200:
-00332 #ifdef CBAUD
-00333                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00334                 Posix_CommConfig.c_cflag|=B1200;
-00335 #else
-00336                 cfsetispeed(&Posix_CommConfig, B1200);
-00337                 cfsetospeed(&Posix_CommConfig, B1200);
-00338 #endif
-00339                 break;
-00340 
-00341             /*1800 baud*/
-00342             case BAUD1800:
-00343                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and IRIX do not support 1800 baud operation.");
-00344 #ifdef CBAUD
-00345                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00346                 Posix_CommConfig.c_cflag|=B1800;
-00347 #else
-00348                 cfsetispeed(&Posix_CommConfig, B1800);
-00349                 cfsetospeed(&Posix_CommConfig, B1800);
-00350 #endif
-00351                 break;
-00352 
-00353             /*2400 baud*/
-00354             case BAUD2400:
-00355 #ifdef CBAUD
-00356                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00357                 Posix_CommConfig.c_cflag|=B2400;
-00358 #else
-00359                 cfsetispeed(&Posix_CommConfig, B2400);
-00360                 cfsetospeed(&Posix_CommConfig, B2400);
-00361 #endif
-00362                 break;
-00363 
-00364             /*4800 baud*/
-00365             case BAUD4800:
-00366 #ifdef CBAUD
-00367                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00368                 Posix_CommConfig.c_cflag|=B4800;
-00369 #else
-00370                 cfsetispeed(&Posix_CommConfig, B4800);
-00371                 cfsetospeed(&Posix_CommConfig, B4800);
-00372 #endif
-00373                 break;
-00374 
-00375             /*9600 baud*/
-00376             case BAUD9600:
-00377 #ifdef CBAUD
-00378                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00379                 Posix_CommConfig.c_cflag|=B9600;
-00380 #else
-00381                 cfsetispeed(&Posix_CommConfig, B9600);
-00382                 cfsetospeed(&Posix_CommConfig, B9600);
-00383 #endif
-00384                 break;
-00385 
-00386             /*14400 baud*/
-00387             case BAUD14400:
-00388                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 14400 baud operation.  Switching to 9600 baud.");
-00389 #ifdef CBAUD
-00390                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00391                 Posix_CommConfig.c_cflag|=B9600;
-00392 #else
-00393                 cfsetispeed(&Posix_CommConfig, B9600);
-00394                 cfsetospeed(&Posix_CommConfig, B9600);
-00395 #endif
-00396                 break;
-00397 
-00398             /*19200 baud*/
-00399             case BAUD19200:
-00400 #ifdef CBAUD
-00401                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00402                 Posix_CommConfig.c_cflag|=B19200;
-00403 #else
-00404                 cfsetispeed(&Posix_CommConfig, B19200);
-00405                 cfsetospeed(&Posix_CommConfig, B19200);
-00406 #endif
-00407                 break;
-00408 
-00409             /*38400 baud*/
-00410             case BAUD38400:
-00411 #ifdef CBAUD
-00412                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00413                 Posix_CommConfig.c_cflag|=B38400;
-00414 #else
-00415                 cfsetispeed(&Posix_CommConfig, B38400);
-00416                 cfsetospeed(&Posix_CommConfig, B38400);
-00417 #endif
-00418                 break;
-00419 
-00420             /*56000 baud*/
-00421             case BAUD56000:
-00422                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 56000 baud operation.  Switching to 38400 baud.");
-00423 #ifdef CBAUD
-00424                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00425                 Posix_CommConfig.c_cflag|=B38400;
-00426 #else
-00427                 cfsetispeed(&Posix_CommConfig, B38400);
-00428                 cfsetospeed(&Posix_CommConfig, B38400);
-00429 #endif
-00430                 break;
-00431 
-00432             /*57600 baud*/
-00433             case BAUD57600:
-00434 #ifdef CBAUD
-00435                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00436                 Posix_CommConfig.c_cflag|=B57600;
-00437 #else
-00438                 cfsetispeed(&Posix_CommConfig, B57600);
-00439                 cfsetospeed(&Posix_CommConfig, B57600);
-00440 #endif
-00441                 break;
-00442 
-00443             /*76800 baud*/
-00444             case BAUD76800:
-00445                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and some POSIX systems do not support 76800 baud operation.");
-00446 #ifdef CBAUD
-00447                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00448 
-00449 #ifdef B76800
-00450                 Posix_CommConfig.c_cflag|=B76800;
-00451 #else
-00452                 TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud.");
-00453                 Posix_CommConfig.c_cflag|=B57600;
-00454 #endif //B76800
-00455 #else  //CBAUD
-00456 #ifdef B76800
-00457                 cfsetispeed(&Posix_CommConfig, B76800);
-00458                 cfsetospeed(&Posix_CommConfig, B76800);
-00459 #else
-00460                 TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud.");
-00461                 cfsetispeed(&Posix_CommConfig, B57600);
-00462                 cfsetospeed(&Posix_CommConfig, B57600);
-00463 #endif //B76800
-00464 #endif //CBAUD
-00465                 break;
-00466 
-00467             /*115200 baud*/
-00468             case BAUD115200:
-00469 #ifdef CBAUD
-00470                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00471                 Posix_CommConfig.c_cflag|=B115200;
-00472 #else
-00473                 cfsetispeed(&Posix_CommConfig, B115200);
-00474                 cfsetospeed(&Posix_CommConfig, B115200);
-00475 #endif
-00476                 break;
-00477 
-00478             /*128000 baud*/
-00479             case BAUD128000:
-00480                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 128000 baud operation.  Switching to 115200 baud.");
-00481 #ifdef CBAUD
-00482                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00483                 Posix_CommConfig.c_cflag|=B115200;
-00484 #else
-00485                 cfsetispeed(&Posix_CommConfig, B115200);
-00486                 cfsetospeed(&Posix_CommConfig, B115200);
-00487 #endif
-00488                 break;
-00489 
-00490             /*256000 baud*/
-00491             case BAUD256000:
-00492                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 256000 baud operation.  Switching to 115200 baud.");
-00493 #ifdef CBAUD
-00494                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00495                 Posix_CommConfig.c_cflag|=B115200;
-00496 #else
-00497                 cfsetispeed(&Posix_CommConfig, B115200);
-00498                 cfsetospeed(&Posix_CommConfig, B115200);
-00499 #endif
-00500                 break;
-00501         }
-00502         tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00503     }
-00504     UNLOCK_MUTEX();
-00505 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setBaudRate (BaudRateType  baudRate  )  [virtual, inherited]
-
-
- -

-Sets the baud rate of the serial port. Note that not all rates are applicable on all platforms. The following table shows translations of the various baud rate constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.

  RATE          Windows Speed   POSIX Speed
-  -----------   -------------   -----------
-   BAUD50                 110          50
-   BAUD75                 110          75
-  *BAUD110                110         110
-   BAUD134                110         134.5
-   BAUD150                110         150
-   BAUD200                110         200
-  *BAUD300                300         300
-  *BAUD600                600         600
-  *BAUD1200              1200        1200
-   BAUD1800              1200        1800
-  *BAUD2400              2400        2400
-  *BAUD4800              4800        4800
-  *BAUD9600              9600        9600
-   BAUD14400            14400        9600
-  *BAUD19200            19200       19200
-  *BAUD38400            38400       38400
-   BAUD56000            56000       38400
-  *BAUD57600            57600       57600
-   BAUD76800            57600       76800
-  *BAUD115200          115200      115200
-   BAUD128000          128000      115200
-   BAUD256000          256000      115200
-
-

-Implements QextSerialBase.

00716                                                           {
-00717     LOCK_MUTEX();
-00718     if (Settings.BaudRate!=baudRate) {
-00719         switch (baudRate) {
-00720             case BAUD50:
-00721             case BAUD75:
-00722             case BAUD134:
-00723             case BAUD150:
-00724             case BAUD200:
-00725                 Settings.BaudRate=BAUD110;
-00726                 break;
-00727 
-00728             case BAUD1800:
-00729                 Settings.BaudRate=BAUD1200;
-00730                 break;
-00731 
-00732             case BAUD76800:
-00733                 Settings.BaudRate=BAUD57600;
-00734                 break;
-00735 
-00736             default:
-00737                 Settings.BaudRate=baudRate;
-00738                 break;
-00739         }
-00740     }
-00741     if (isOpen()) {
-00742         switch (baudRate) {
-00743 
-00744             /*50 baud*/
-00745             case BAUD50:
-00746                 TTY_WARNING("Win_QextSerialPort: Windows does not support 50 baud operation.  Switching to 110 baud.");
-00747                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00748                 break;
-00749 
-00750             /*75 baud*/
-00751             case BAUD75:
-00752                 TTY_WARNING("Win_QextSerialPort: Windows does not support 75 baud operation.  Switching to 110 baud.");
-00753                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00754                 break;
-00755 
-00756             /*110 baud*/
-00757             case BAUD110:
-00758                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00759                 break;
-00760 
-00761             /*134.5 baud*/
-00762             case BAUD134:
-00763                 TTY_WARNING("Win_QextSerialPort: Windows does not support 134.5 baud operation.  Switching to 110 baud.");
-00764                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00765                 break;
-00766 
-00767             /*150 baud*/
-00768             case BAUD150:
-00769                 TTY_WARNING("Win_QextSerialPort: Windows does not support 150 baud operation.  Switching to 110 baud.");
-00770                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00771                 break;
-00772 
-00773             /*200 baud*/
-00774             case BAUD200:
-00775                 TTY_WARNING("Win_QextSerialPort: Windows does not support 200 baud operation.  Switching to 110 baud.");
-00776                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00777                 break;
-00778 
-00779             /*300 baud*/
-00780             case BAUD300:
-00781                 Win_CommConfig.dcb.BaudRate=CBR_300;
-00782                 break;
-00783 
-00784             /*600 baud*/
-00785             case BAUD600:
-00786                 Win_CommConfig.dcb.BaudRate=CBR_600;
-00787                 break;
-00788 
-00789             /*1200 baud*/
-00790             case BAUD1200:
-00791                 Win_CommConfig.dcb.BaudRate=CBR_1200;
-00792                 break;
-00793 
-00794             /*1800 baud*/
-00795             case BAUD1800:
-00796                 TTY_WARNING("Win_QextSerialPort: Windows does not support 1800 baud operation.  Switching to 1200 baud.");
-00797                 Win_CommConfig.dcb.BaudRate=CBR_1200;
-00798                 break;
-00799 
-00800             /*2400 baud*/
-00801             case BAUD2400:
-00802                 Win_CommConfig.dcb.BaudRate=CBR_2400;
-00803                 break;
-00804 
-00805             /*4800 baud*/
-00806             case BAUD4800:
-00807                 Win_CommConfig.dcb.BaudRate=CBR_4800;
-00808                 break;
-00809 
-00810             /*9600 baud*/
-00811             case BAUD9600:
-00812                 Win_CommConfig.dcb.BaudRate=CBR_9600;
-00813                 break;
-00814 
-00815             /*14400 baud*/
-00816             case BAUD14400:
-00817                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 14400 baud operation.");
-00818                 Win_CommConfig.dcb.BaudRate=CBR_14400;
-00819                 break;
-00820 
-00821             /*19200 baud*/
-00822             case BAUD19200:
-00823                 Win_CommConfig.dcb.BaudRate=CBR_19200;
-00824                 break;
-00825 
-00826             /*38400 baud*/
-00827             case BAUD38400:
-00828                 Win_CommConfig.dcb.BaudRate=CBR_38400;
-00829                 break;
-00830 
-00831             /*56000 baud*/
-00832             case BAUD56000:
-00833                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 56000 baud operation.");
-00834                 Win_CommConfig.dcb.BaudRate=CBR_56000;
-00835                 break;
-00836 
-00837             /*57600 baud*/
-00838             case BAUD57600:
-00839                 Win_CommConfig.dcb.BaudRate=CBR_57600;
-00840                 break;
-00841 
-00842             /*76800 baud*/
-00843             case BAUD76800:
-00844                 TTY_WARNING("Win_QextSerialPort: Windows does not support 76800 baud operation.  Switching to 57600 baud.");
-00845                 Win_CommConfig.dcb.BaudRate=CBR_57600;
-00846                 break;
-00847 
-00848             /*115200 baud*/
-00849             case BAUD115200:
-00850                 Win_CommConfig.dcb.BaudRate=CBR_115200;
-00851                 break;
-00852 
-00853             /*128000 baud*/
-00854             case BAUD128000:
-00855                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 128000 baud operation.");
-00856                 Win_CommConfig.dcb.BaudRate=CBR_128000;
-00857                 break;
-00858 
-00859             /*256000 baud*/
-00860             case BAUD256000:
-00861                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
-00862                 Win_CommConfig.dcb.BaudRate=CBR_256000;
-00863                 break;
-00864         }
-00865         SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00866     }
-00867     UNLOCK_MUTEX();
-00868 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setDataBits (DataBitsType  dataBits  )  [virtual, inherited]
-
-
- -

-Sets the number of data bits used by the serial port. Possible values of dataBits are:

    DATA_5      5 data bits
-    DATA_6      6 data bits
-    DATA_7      7 data bits
-    DATA_8      8 data bits
-

-

Note:
This function is subject to the following restrictions:
-
5 data bits cannot be used with 2 stop bits.
-
8 data bits cannot be used with space parity on POSIX systems.
- -

-Implements QextSerialBase.

00526 {
-00527     LOCK_MUTEX();
-00528     if (Settings.DataBits!=dataBits) {
-00529         if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
-00530             (Settings.StopBits==STOP_1_5 && dataBits!=DATA_5) ||
-00531             (Settings.Parity==PAR_SPACE && dataBits==DATA_8)) {
-00532         }
-00533         else {
-00534             Settings.DataBits=dataBits;
-00535         }
-00536     }
-00537     if (isOpen()) {
-00538         switch(dataBits) {
-00539 
-00540             /*5 data bits*/
-00541             case DATA_5:
-00542                 if (Settings.StopBits==STOP_2) {
-00543                     TTY_WARNING("Posix_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
-00544                 }
-00545                 else {
-00546                     Settings.DataBits=dataBits;
-00547                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00548                     Posix_CommConfig.c_cflag|=CS5;
-00549                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00550                 }
-00551                 break;
-00552 
-00553             /*6 data bits*/
-00554             case DATA_6:
-00555                 if (Settings.StopBits==STOP_1_5) {
-00556                     TTY_WARNING("Posix_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
-00557                 }
-00558                 else {
-00559                     Settings.DataBits=dataBits;
-00560                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00561                     Posix_CommConfig.c_cflag|=CS6;
-00562                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00563                 }
-00564                 break;
-00565 
-00566             /*7 data bits*/
-00567             case DATA_7:
-00568                 if (Settings.StopBits==STOP_1_5) {
-00569                     TTY_WARNING("Posix_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
-00570                 }
-00571                 else {
-00572                     Settings.DataBits=dataBits;
-00573                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00574                     Posix_CommConfig.c_cflag|=CS7;
-00575                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00576                 }
-00577                 break;
-00578 
-00579             /*8 data bits*/
-00580             case DATA_8:
-00581                 if (Settings.StopBits==STOP_1_5) {
-00582                     TTY_WARNING("Posix_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
-00583                 }
-00584                 else {
-00585                     Settings.DataBits=dataBits;
-00586                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00587                     Posix_CommConfig.c_cflag|=CS8;
-00588                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00589                 }
-00590                 break;
-00591         }
-00592     }
-00593     UNLOCK_MUTEX();
-00594 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setDataBits (DataBitsType  dataBits  )  [virtual, inherited]
-
-
- -

-Sets the number of data bits used by the serial port. Possible values of dataBits are:

    DATA_5      5 data bits
-    DATA_6      6 data bits
-    DATA_7      7 data bits
-    DATA_8      8 data bits
-

-

Note:
This function is subject to the following restrictions:
-
5 data bits cannot be used with 2 stop bits.
-
1.5 stop bits can only be used with 5 data bits.
-
8 data bits cannot be used with space parity on POSIX systems.
- -

-Implements QextSerialBase.

00557                                                           {
-00558     LOCK_MUTEX();
-00559     if (Settings.DataBits!=dataBits) {
-00560         if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
-00561             (Settings.StopBits==STOP_1_5 && dataBits!=DATA_5)) {
-00562         }
-00563         else {
-00564             Settings.DataBits=dataBits;
-00565         }
-00566     }
-00567     if (isOpen()) {
-00568         switch(dataBits) {
-00569 
-00570             /*5 data bits*/
-00571             case DATA_5:
-00572                 if (Settings.StopBits==STOP_2) {
-00573                     TTY_WARNING("Win_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
-00574                 }
-00575                 else {
-00576                     Win_CommConfig.dcb.ByteSize=5;
-00577                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00578                 }
-00579                 break;
-00580 
-00581             /*6 data bits*/
-00582             case DATA_6:
-00583                 if (Settings.StopBits==STOP_1_5) {
-00584                     TTY_WARNING("Win_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
-00585                 }
-00586                 else {
-00587                     Win_CommConfig.dcb.ByteSize=6;
-00588                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00589                 }
-00590                 break;
-00591 
-00592             /*7 data bits*/
-00593             case DATA_7:
-00594                 if (Settings.StopBits==STOP_1_5) {
-00595                     TTY_WARNING("Win_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
-00596                 }
-00597                 else {
-00598                     Win_CommConfig.dcb.ByteSize=7;
-00599                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00600                 }
-00601                 break;
-00602 
-00603             /*8 data bits*/
-00604             case DATA_8:
-00605                 if (Settings.StopBits==STOP_1_5) {
-00606                     TTY_WARNING("Win_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
-00607                 }
-00608                 else {
-00609                     Win_CommConfig.dcb.ByteSize=8;
-00610                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00611                 }
-00612                 break;
-00613         }
-00614     }
-00615     UNLOCK_MUTEX();
-00616 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setDtr (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00993 {
-00994     LOCK_MUTEX();
-00995     if (isOpen()) {
-00996         int status;
-00997         ioctl(Posix_File->handle(), TIOCMGET, &status);
-00998         if (set) {
-00999             status|=TIOCM_DTR;
-01000         }
-01001         else {
-01002             status&=~TIOCM_DTR;
-01003         }
-01004         ioctl(Posix_File->handle(), TIOCMSET, &status);
-01005     }
-01006     UNLOCK_MUTEX();
-01007 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setDtr (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00875                                         {
-00876     LOCK_MUTEX();
-00877     if (isOpen()) {
-00878         if (set) {
-00879             EscapeCommFunction(Win_Handle, SETDTR);
-00880         }
-00881         else {
-00882             EscapeCommFunction(Win_Handle, CLRDTR);
-00883         }
-00884     }
-00885     UNLOCK_MUTEX();
-00886 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setFlowControl (FlowType  flow  )  [virtual, inherited]
-
-
- -

-Sets the flow control used by the port. Possible values of flow are:

    FLOW_OFF            No flow control
-    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
-    FLOW_XONXOFF        Software (XON/XOFF) flow control
-
Note:
FLOW_HARDWARE may not be supported on all versions of UNIX. In cases where it is unsupported, FLOW_HARDWARE is the same as FLOW_OFF.
- -

-Implements QextSerialBase.

00759 {
-00760     LOCK_MUTEX();
-00761     if (Settings.FlowControl!=flow) {
-00762         Settings.FlowControl=flow;
-00763     }
-00764     if (isOpen()) {
-00765         switch(flow) {
-00766 
-00767             /*no flow control*/
-00768             case FLOW_OFF:
-00769                 Posix_CommConfig.c_cflag&=(~CRTSCTS);
-00770                 Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
-00771                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00772                 break;
-00773 
-00774             /*software (XON/XOFF) flow control*/
-00775             case FLOW_XONXOFF:
-00776                 Posix_CommConfig.c_cflag&=(~CRTSCTS);
-00777                 Posix_CommConfig.c_iflag|=(IXON|IXOFF|IXANY);
-00778                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00779                 break;
-00780 
-00781             case FLOW_HARDWARE:
-00782                 Posix_CommConfig.c_cflag|=CRTSCTS;
-00783                 Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
-00784                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00785                 break;
-00786         }
-00787     }
-00788     UNLOCK_MUTEX();
-00789 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setFlowControl (FlowType  flow  )  [virtual, inherited]
-
-
- -

-Sets the flow control used by the port. Possible values of flow are:

    FLOW_OFF            No flow control
-    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
-    FLOW_XONXOFF        Software (XON/XOFF) flow control
-
-

-Implements QextSerialBase.

00445                                                      {
-00446     LOCK_MUTEX();
-00447     if (Settings.FlowControl!=flow) {
-00448         Settings.FlowControl=flow;
-00449     }
-00450     if (isOpen()) {
-00451         switch(flow) {
-00452 
-00453             /*no flow control*/
-00454             case FLOW_OFF:
-00455                 Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
-00456                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
-00457                 Win_CommConfig.dcb.fInX=FALSE;
-00458                 Win_CommConfig.dcb.fOutX=FALSE;
-00459                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00460                 break;
-00461 
-00462             /*software (XON/XOFF) flow control*/
-00463             case FLOW_XONXOFF:
-00464                 Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
-00465                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
-00466                 Win_CommConfig.dcb.fInX=TRUE;
-00467                 Win_CommConfig.dcb.fOutX=TRUE;
-00468                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00469                 break;
-00470 
-00471             case FLOW_HARDWARE:
-00472                 Win_CommConfig.dcb.fOutxCtsFlow=TRUE;
-00473                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_HANDSHAKE;
-00474                 Win_CommConfig.dcb.fInX=FALSE;
-00475                 Win_CommConfig.dcb.fOutX=FALSE;
-00476                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00477                 break;
-00478         }
-00479     }
-00480     UNLOCK_MUTEX();
-00481 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setParity (ParityType  parity  )  [virtual, inherited]
-
-
- -

-Sets the parity associated with the serial port. The possible values of parity are:

    PAR_SPACE       Space Parity
-    PAR_MARK        Mark Parity
-    PAR_NONE        No Parity
-    PAR_EVEN        Even Parity
-    PAR_ODD         Odd Parity
-

-

Note:
This function is subject to the following limitations:
-
POSIX systems do not support mark parity.
-
POSIX systems support space parity only if tricked into doing so, and only with fewer than 8 data bits. Use space parity very carefully with POSIX systems.
- -

-Implements QextSerialBase.

00617 {
-00618     LOCK_MUTEX();
-00619     if (Settings.Parity!=parity) {
-00620         if (parity==PAR_MARK || (parity==PAR_SPACE && Settings.DataBits==DATA_8)) {
-00621         }
-00622         else {
-00623             Settings.Parity=parity;
-00624         }
-00625     }
-00626     if (isOpen()) {
-00627         switch (parity) {
-00628 
-00629             /*space parity*/
-00630             case PAR_SPACE:
-00631                 if (Settings.DataBits==DATA_8) {
-00632                     TTY_PORTABILITY_WARNING("Posix_QextSerialPort:  Space parity is only supported in POSIX with 7 or fewer data bits");
-00633                 }
-00634                 else {
-00635 
-00636                     /*space parity not directly supported - add an extra data bit to simulate it*/
-00637                     Posix_CommConfig.c_cflag&=~(PARENB|CSIZE);
-00638                     switch(Settings.DataBits) {
-00639                         case DATA_5:
-00640                             Settings.DataBits=DATA_6;
-00641                             Posix_CommConfig.c_cflag|=CS6;
-00642                             break;
-00643 
-00644                         case DATA_6:
-00645                             Settings.DataBits=DATA_7;
-00646                             Posix_CommConfig.c_cflag|=CS7;
-00647                             break;
-00648 
-00649                         case DATA_7:
-00650                             Settings.DataBits=DATA_8;
-00651                             Posix_CommConfig.c_cflag|=CS8;
-00652                             break;
-00653 
-00654                         case DATA_8:
-00655                             break;
-00656                     }
-00657                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00658                 }
-00659                 break;
-00660 
-00661             /*mark parity - WINDOWS ONLY*/
-00662             case PAR_MARK:
-00663                 TTY_WARNING("Posix_QextSerialPort: Mark parity is not supported by POSIX.");
-00664                 break;
-00665 
-00666             /*no parity*/
-00667             case PAR_NONE:
-00668                 Posix_CommConfig.c_cflag&=(~PARENB);
-00669                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00670                 break;
-00671 
-00672             /*even parity*/
-00673             case PAR_EVEN:
-00674                 Posix_CommConfig.c_cflag&=(~PARODD);
-00675                 Posix_CommConfig.c_cflag|=PARENB;
-00676                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00677                 break;
-00678 
-00679             /*odd parity*/
-00680             case PAR_ODD:
-00681                 Posix_CommConfig.c_cflag|=(PARENB|PARODD);
-00682                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00683                 break;
-00684         }
-00685     }
-00686     UNLOCK_MUTEX();
-00687 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setParity (ParityType  parity  )  [virtual, inherited]
-
-
- -

-Sets the parity associated with the serial port. The possible values of parity are:

    PAR_SPACE       Space Parity
-    PAR_MARK        Mark Parity
-    PAR_NONE        No Parity
-    PAR_EVEN        Even Parity
-    PAR_ODD         Odd Parity
-
-

-Implements QextSerialBase.

00494                                                     {
-00495     LOCK_MUTEX();
-00496     if (Settings.Parity!=parity) {
-00497         Settings.Parity=parity;
-00498     }
-00499     if (isOpen()) {
-00500         Win_CommConfig.dcb.Parity=(unsigned char)parity;
-00501         switch (parity) {
-00502 
-00503             /*space parity*/
-00504             case PAR_SPACE:
-00505                 if (Settings.DataBits==DATA_8) {
-00506                     TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: Space parity with 8 data bits is not supported by POSIX systems.");
-00507                 }
-00508                 Win_CommConfig.dcb.fParity=TRUE;
-00509                 break;
-00510 
-00511             /*mark parity - WINDOWS ONLY*/
-00512             case PAR_MARK:
-00513                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning:  Mark parity is not supported by POSIX systems");
-00514                 Win_CommConfig.dcb.fParity=TRUE;
-00515                 break;
-00516 
-00517             /*no parity*/
-00518             case PAR_NONE:
-00519                 Win_CommConfig.dcb.fParity=FALSE;
-00520                 break;
-00521 
-00522             /*even parity*/
-00523             case PAR_EVEN:
-00524                 Win_CommConfig.dcb.fParity=TRUE;
-00525                 break;
-00526 
-00527             /*odd parity*/
-00528             case PAR_ODD:
-00529                 Win_CommConfig.dcb.fParity=TRUE;
-00530                 break;
-00531         }
-00532         SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00533     }
-00534     UNLOCK_MUTEX();
-00535 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setPortName (const QString &  name  )  [virtual, inherited]
-
-
- -

-Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".

00084 {
-00085     port = name;
-00086 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setQueryMode (QueryMode  mode  )  [virtual, inherited]
-
-
- -

-Set desired serial communication handling style. You may choose from polling or event driven approach. This function does nothing when port is open; to apply changes port must be reopened.

-In event driven approach read() and write() functions are acting asynchronously. They return immediately and the operation is performed in the background, so they doesn't freeze the calling thread. To determine when operation is finished, QextSerialPort runs separate thread and monitors serial port events. Whenever the event occurs, adequate signal is emitted.

-When polling is set, read() and write() are acting synchronously. Signals are not working in this mode and some functions may not be available. The advantage of polling is that it generates less overhead due to lack of signals emissions and it doesn't start separate thread to monitor events.

-Generally event driven approach is more capable and friendly, although some applications may need as low overhead as possible and then polling comes.

-

Parameters:
- - -
mode query mode.
-
-
00075 {
-00076     _queryMode = mechanism;
-00077 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setRts (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

01015 {
-01016     LOCK_MUTEX();
-01017     if (isOpen()) {
-01018         int status;
-01019         ioctl(Posix_File->handle(), TIOCMGET, &status);
-01020         if (set) {
-01021             status|=TIOCM_RTS;
-01022         }
-01023         else {
-01024             status&=~TIOCM_RTS;
-01025         }
-01026         ioctl(Posix_File->handle(), TIOCMSET, &status);
-01027     }
-01028     UNLOCK_MUTEX();
-01029 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setRts (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00893                                         {
-00894     LOCK_MUTEX();
-00895     if (isOpen()) {
-00896         if (set) {
-00897             EscapeCommFunction(Win_Handle, SETRTS);
-00898         }
-00899         else {
-00900             EscapeCommFunction(Win_Handle, CLRRTS);
-00901         }
-00902     }
-00903     UNLOCK_MUTEX();
-00904 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setStopBits (StopBitsType  stopBits  )  [virtual, inherited]
-
-
- -

-Sets the number of stop bits used by the serial port. Possible values of stopBits are:

    STOP_1      1 stop bit
-    STOP_1_5    1.5 stop bits
-    STOP_2      2 stop bits
-
Note:
This function is subject to the following restrictions:
-
2 stop bits cannot be used with 5 data bits.
-
POSIX does not support 1.5 stop bits.
- -

-Implements QextSerialBase.

00706 {
-00707     LOCK_MUTEX();
-00708     if (Settings.StopBits!=stopBits) {
-00709         if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) || stopBits==STOP_1_5) {}
-00710         else {
-00711             Settings.StopBits=stopBits;
-00712         }
-00713     }
-00714     if (isOpen()) {
-00715         switch (stopBits) {
-00716 
-00717             /*one stop bit*/
-00718             case STOP_1:
-00719                 Settings.StopBits=stopBits;
-00720                 Posix_CommConfig.c_cflag&=(~CSTOPB);
-00721                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00722                 break;
-00723 
-00724             /*1.5 stop bits*/
-00725             case STOP_1_5:
-00726                 TTY_WARNING("Posix_QextSerialPort: 1.5 stop bit operation is not supported by POSIX.");
-00727                 break;
-00728 
-00729             /*two stop bits*/
-00730             case STOP_2:
-00731                 if (Settings.DataBits==DATA_5) {
-00732                     TTY_WARNING("Posix_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
-00733                 }
-00734                 else {
-00735                     Settings.StopBits=stopBits;
-00736                     Posix_CommConfig.c_cflag|=CSTOPB;
-00737                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00738                 }
-00739                 break;
-00740         }
-00741     }
-00742     UNLOCK_MUTEX();
-00743 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setStopBits (StopBitsType  stopBits  )  [virtual, inherited]
-
-
- -

-Sets the number of stop bits used by the serial port. Possible values of stopBits are:

    STOP_1      1 stop bit
-    STOP_1_5    1.5 stop bits
-    STOP_2      2 stop bits
-

-

Note:
This function is subject to the following restrictions:
-
2 stop bits cannot be used with 5 data bits.
-
1.5 stop bits cannot be used with 6 or more data bits.
-
POSIX does not support 1.5 stop bits.
- -

-Implements QextSerialBase.

00636                                                           {
-00637     LOCK_MUTEX();
-00638     if (Settings.StopBits!=stopBits) {
-00639         if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) ||
-00640             (stopBits==STOP_1_5 && Settings.DataBits!=DATA_5)) {
-00641         }
-00642         else {
-00643             Settings.StopBits=stopBits;
-00644         }
-00645     }
-00646     if (isOpen()) {
-00647         switch (stopBits) {
-00648 
-00649             /*one stop bit*/
-00650             case STOP_1:
-00651                 Win_CommConfig.dcb.StopBits=ONESTOPBIT;
-00652                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00653                 break;
-00654 
-00655             /*1.5 stop bits*/
-00656             case STOP_1_5:
-00657                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: 1.5 stop bit operation is not supported by POSIX.");
-00658                 if (Settings.DataBits!=DATA_5) {
-00659                     TTY_WARNING("Win_QextSerialPort: 1.5 stop bits can only be used with 5 data bits");
-00660                 }
-00661                 else {
-00662                     Win_CommConfig.dcb.StopBits=ONE5STOPBITS;
-00663                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00664                 }
-00665                 break;
-00666 
-00667             /*two stop bits*/
-00668             case STOP_2:
-00669                 if (Settings.DataBits==DATA_5) {
-00670                     TTY_WARNING("Win_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
-00671                 }
-00672                 else {
-00673                     Win_CommConfig.dcb.StopBits=TWOSTOPBITS;
-00674                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00675                 }
-00676                 break;
-00677         }
-00678     }
-00679     UNLOCK_MUTEX();
-00680 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
void Posix_QextSerialPort::setTimeout (ulong  sec,
ulong  millisec 
) [virtual, inherited]
-
-
- -

-Sets the read and write timeouts for the port to sec seconds and millisec milliseconds. Note that this is a per-character timeout, i.e. the port will wait this long for each individual character, not for the whole read operation. This timeout also applies to the bytesWaiting() function.

-

Note:
POSIX does not support millisecond-level control for I/O timeout values. Any timeout set using this function will be set to the next lowest tenth of a second for the purposes of detecting read or write timeouts. For example a timeout of 550 milliseconds will be seen by the class as a timeout of 500 milliseconds for the purposes of reading and writing the port. However millisecond-level control is allowed by the select() system call, so for example a 550-millisecond timeout will be seen as 550 milliseconds on POSIX systems for the purpose of detecting available bytes in the read buffer.
- -

-Implements QextSerialBase.

00809 {
-00810     LOCK_MUTEX();
-00811     Settings.Timeout_Sec=sec;
-00812     Settings.Timeout_Millisec=millisec;
-00813     Posix_Copy_Timeout.tv_sec=sec;
-00814     Posix_Copy_Timeout.tv_usec=millisec;
-00815     if (isOpen()) {
-00816         tcgetattr(Posix_File->handle(), &Posix_CommConfig);
-00817         Posix_CommConfig.c_cc[VTIME]=sec*10+millisec/100;
-00818         tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00819     }
-00820     UNLOCK_MUTEX();
-00821 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
void Win_QextSerialPort::setTimeout (ulong  sec,
ulong  millisec 
) [virtual, inherited]
-
-
- -

-Sets the read and write timeouts for the port to sec seconds and millisec milliseconds. -

-Implements QextSerialBase.

01005                                                              {
-01006     LOCK_MUTEX();
-01007     Settings.Timeout_Sec=sec;
-01008     Settings.Timeout_Millisec=millisec;
-01009     if(isOpen()) {
-01010         Win_CommTimeouts.ReadIntervalTimeout = sec*1000+millisec;
-01011         Win_CommTimeouts.ReadTotalTimeoutMultiplier = sec*1000+millisec;
-01012         Win_CommTimeouts.ReadTotalTimeoutConstant = 0;
-01013         Win_CommTimeouts.WriteTotalTimeoutMultiplier = sec*1000+millisec;
-01014         Win_CommTimeouts.WriteTotalTimeoutConstant = 0;
-01015         SetCommTimeouts(Win_Handle, &Win_CommTimeouts);
-01016     }
-01017     UNLOCK_MUTEX();
-01018 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Posix_QextSerialPort::size (  )  const [virtual, inherited]
-
-
- -

-This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete QIODevice interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use Posix_QextSerialPort::bytesWaiting() instead. -

-Implements QextSerialBase.

00907 {
-00908     int numBytes;
-00909     if (ioctl(Posix_File->handle(), FIONREAD, &numBytes)<0) {
-00910         numBytes=0;
-00911     }
-00912     return (qint64)numBytes;
-00913 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::size (  )  const [virtual, inherited]
-
-
- -

-This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete QIODevice interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use Win_QextSerialPort::bytesAvailable() instead. -

-Implements QextSerialBase.

00272                                       {
-00273     int availBytes;
-00274     COMSTAT Win_ComStat;
-00275     DWORD Win_ErrorMask=0;
-00276     ClearCommError(Win_Handle, &Win_ErrorMask, &Win_ComStat);
-00277     availBytes = Win_ComStat.cbInQue;
-00278     return (qint64)availBytes;
-00279 }
-
-

- -

-

- -

-
- - - - - - - - -
StopBitsType QextSerialBase::stopBits (  )  const [virtual, inherited]
-
-
- -

-Returns the number of stop bits used by the port. For a list of possible return values, see the definition of the enum StopBitsType.

00133 {
-00134     return Settings.StopBits;
-00135 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::terminateCommWait (  )  [protected, inherited]
-
-
- -

-

00996 {
-00997     SetCommMask(Win_Handle, 0);
-00998 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::translateError (ulong  error  )  [virtual, inherited]
-
-
- -

-Translates a system-specific error code to a QextSerialPort error code. Used internally. -

-Implements QextSerialBase.

00970 {
-00971     switch (error) {
-00972         case EBADF:
-00973         case ENOTTY:
-00974             lastErr=E_INVALID_FD;
-00975             break;
-00976 
-00977         case EINTR:
-00978             lastErr=E_CAUGHT_NON_BLOCKED_SIGNAL;
-00979             break;
-00980 
-00981         case ENOMEM:
-00982             lastErr=E_NO_MEMORY;
-00983             break;
-00984     }
-00985 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::translateError (ulong  error  )  [virtual, inherited]
-
-
- -

-Translates a system-specific error code to a QextSerialPort error code. Used internally. -

-Implements QextSerialBase.

00310                                                    {
-00311     if (error&CE_BREAK) {
-00312         lastErr=E_BREAK_CONDITION;
-00313     }
-00314     else if (error&CE_FRAME) {
-00315         lastErr=E_FRAMING_ERROR;
-00316     }
-00317     else if (error&CE_IOE) {
-00318         lastErr=E_IO_ERROR;
-00319     }
-00320     else if (error&CE_MODE) {
-00321         lastErr=E_INVALID_FD;
-00322     }
-00323     else if (error&CE_OVERRUN) {
-00324         lastErr=E_BUFFER_OVERRUN;
-00325     }
-00326     else if (error&CE_RXPARITY) {
-00327         lastErr=E_RECEIVE_PARITY_ERROR;
-00328     }
-00329     else if (error&CE_RXOVER) {
-00330         lastErr=E_RECEIVE_OVERFLOW;
-00331     }
-00332     else if (error&CE_TXFULL) {
-00333         lastErr=E_TRANSMIT_OVERFLOW;
-00334     }
-00335 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::ungetChar (char  c  )  [virtual, inherited]
-
-
- -

-This function is included to implement the full QIODevice interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect. -

-Implements QextSerialBase.

00960 {
-00961     /*meaningless on unbuffered sequential device - return error and print a warning*/
-00962     TTY_WARNING("Posix_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
-00963 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::ungetChar (char  c  )  [virtual, inherited]
-
-
- -

-This function is included to implement the full QIODevice interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect. -

-Implements QextSerialBase.

00430                                          {
-00431 
-00432     /*meaningless on unbuffered sequential device - return error and print a warning*/
-00433     TTY_WARNING("Win_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
-00434 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Win_QextSerialPort::waitForReadyRead (int  msecs  )  [virtual, inherited]
-
-
- -

-

Todo:
implement.
- -

-Reimplemented from QIODevice.

00948 {
-00949     //@todo implement
-00950     return false;
-00951 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Posix_QextSerialPort::writeData (const char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Writes a block of data to the serial port. This function will write maxSize bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

01120 {
-01121     LOCK_MUTEX();
-01122     int retVal=0;
-01123     retVal=Posix_File->write(data, maxSize);
-01124     if (retVal==-1)
-01125        lastErr=E_WRITE_FAILED;
-01126     UNLOCK_MUTEX();
-01127 //    flush();
-01128     return retVal;
-01129 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Win_QextSerialPort::writeData (const char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Writes a block of data to the serial port. This function will write len bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

00394 {
-00395     DWORD retVal;
-00396     
-00397     LOCK_MUTEX();
-00398 
-00399     retVal = 0;
-00400     if (queryMode() == QextSerialBase::EventDriven) {
-00401         bytesToWriteLock->lockForWrite();
-00402         _bytesToWrite += maxSize;
-00403         bytesToWriteLock->unlock();
-00404         overlapWrite.Internal = 0;
-00405         overlapWrite.InternalHigh = 0;
-00406         overlapWrite.Offset = 0;
-00407         overlapWrite.OffsetHigh = 0;
-00408         overlapWrite.hEvent = CreateEvent(NULL, true, false, NULL);
-00409         if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, & overlapWrite)) {
-00410             lastErr = E_WRITE_FAILED;
-00411             retVal = (DWORD)-1;
-00412         } else
-00413             retVal = maxSize;
-00414     } else if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, NULL)) {
-00415         lastErr = E_WRITE_FAILED;
-00416         retVal = (DWORD)-1;
-00417     }
-00418     
-00419     UNLOCK_MUTEX();
-00420 
-00421     return (qint64)retVal;
-00422 }
-
-

- -

-

-


Member Data Documentation

- -
-
- - - - -
qint64 Win_QextSerialPort::_bytesToWrite [protected, inherited]
-
-
- -

-

Todo:
maybe move to QextSerialBase (and implement in POSIX).
- -
-

- -

-
- - - - -
QextSerialBase::QueryMode QextSerialBase::_queryMode [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QextSerialBase::QueryMode QextSerialBase::_queryMode [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QReadWriteLock* Win_QextSerialPort::bytesToWriteLock [protected, inherited]
-
-
- -

-

Todo:
maybe move to QextSerialBase.
- -
-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
OVERLAPPED Win_QextSerialPort::overlap [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
Win_QextSerialThread* Win_QextSerialPort::overlapThread [protected, inherited]
-
-
- -

-

Todo:
maybe move to QextSerialBase (and implement in POSIX).
- -
-

- -

-
- - - - -
OVERLAPPED Win_QextSerialPort::overlapWrite [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct termios Posix_QextSerialPort::Posix_CommConfig [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct timeval Posix_QextSerialPort::Posix_Copy_Timeout [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QFile* Posix_QextSerialPort::Posix_File [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct timeval Posix_QextSerialPort::Posix_Timeout [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::threadStartEvent [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::threadTerminateEvent [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
COMMCONFIG Win_QextSerialPort::Win_CommConfig [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
COMMTIMEOUTS Win_QextSerialPort::Win_CommTimeouts [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::Win_Handle [protected, inherited]
-
-
- -

- -

-

-


The documentation for this class was generated from the following file: -
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classQextBaseType.png b/src/core/gps/qextserialport/html/classQextBaseType.png deleted file mode 100644 index 63c38d1c6804f0ee2429e2036feb13e5b044c8a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmeAS@N?(olHy`uVBq!ia0y~yU=#qdf3PqE$!ji4YJrqQfKQ0)|NsAi%>Vxn%%7hy z0muU50|yRNANv0U$Ym@E@(X5gcy=R=fq`Ycr;B4q#hkaZqw}692)O3NheIuy4BbUG3$C+~7HFTHfz&m(-to6>k3O_)CMk`Q<@8MP{e` z8yKDlD_onf`JCkA{~1+V#g2Se=X*9=>DIg*+>Z?ZoWHT)@5f?=OY@Uf^av@`Wo+7) zU7?Wfbii=l{6)D(WCh;oAB=gC>wLt(bw1<6cPjk1CAC;4-ZQ*oDNxSYq0P22dxGIr zoy%)3>2W)03(WuS@~7+Ox`HaV3|r+qwwpcW3`tjec5tdp+{GHIeD;>i#ZYC{h>6Pk zzGPO)8mbh8h8lm{dir(8``lRHt5;s}>V0HjXNZWI5_?YqEp;&n|& zp#1vFicyR|E9TbgFOFM&-``l_t%|n87KTNv0=f+uj4s>?Q4ANEI>g{YwrrQqu$!K( zDPa|8xYBUrW}l+@&a`RrLjSJwop`hTrt66h^Mlgvh@~Wco@A8$b{+d3#>g*szFbPY ztdO%^a@%^R`uAp$A9K`&y?;hX3kc0NzY+e==YDqw?~{{9g6yt|r5IWAO3$07w%ye1 z+POHX6syTME*NjVZN8?NYL(%<6@_qJ+#*!|# z<`foYI{gSer0T$8-QaS1`sMg(YCIcH)!8bG%#E7qyf9j)cTWvR(&Aj1>YYmk&v|EG z_uRc!>h)m*ful=To}QTTnQKC?ckn#rIZqd6o!IbRJLA|Vmj2$Ft1XiruaY#5&AGS1 zB>80opLcucXUp2x-Zl;lOcR7Aq~)m>RqeOlJ11&m^lZk=V|lr3OXjAqB83@7F#gyV z|Lvlv149st&|k&Ch5x;?C;U9{M0+ZGRO61F!4vTEZ7qjLvCEm*O~M}M{(tp*C#Ev1?rNi&z@p0Y8TbCrofEUXsAZ9%&(y{;hrYk@ z)7d)N&oC{q2w-`*cf;o%nP2-QCtSTWh0Uw!$)Eel6DEB57%g?Q@sdLOzxQAMvTt80 zwS3hwrGV`4Ymv!TOZR^Y;trBraaR(UaBi_?J}XmN{(bl5(W67{ZVKyr=LthS@p)%%c-^m3Nqo zO8)X}vb$Dpy^DDX|M}i@gJsXluJ`X(laY3_s{F>{VgFCMYTm>f&sKg?`1D3|LS2XD zqvNqnCH#$Fcmx~{U256pf5pPFcKM}m%OoY)W=_k@tO#;yc5M605Z>4#`r>Z`&yu1e z%{G&j|5+)88qb)Z{P^?EESq!2p_A>+3r&AAO|Yws{LM6Bq3DF!OfjPD3e(wlXq^jH zID5zM$(OqFDofkX8;csF7>95Ps9KK diff --git a/src/core/gps/qextserialport/html/classQextSerialBase-members.html b/src/core/gps/qextserialport/html/classQextSerialBase-members.html deleted file mode 100644 index 97173460a685..000000000000 --- a/src/core/gps/qextserialport/html/classQextSerialBase-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - -QextSerialPort: Member List - - - - - - -

QextSerialBase Member List

This is the complete list of members for QextSerialBase, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_queryModeQextSerialBase [protected]
aboutToClose()QIODevice
atEnd() const QextSerialBase [virtual]
QIODevice::atEnd()QIODevice
baudRate() const QextSerialBase [virtual]
bytesAvailable()=0QextSerialBase [pure virtual]
bytesToWrite()QIODevice
bytesWritten(qint64 bytes)QIODevice
canReadLine()QIODevice
close()=0QextSerialBase [pure virtual]
construct()QextSerialBase [virtual]
dataBits() const QextSerialBase [virtual]
dsrChanged(bool status)QextSerialBase [signal]
errorString()QIODevice
EventDriven enum valueQextSerialBase
flowControl() const QextSerialBase [virtual]
flush()=0QextSerialBase [pure virtual]
getChar(char *c)QIODevice
isOpen()QIODevice
isReadable()QIODevice
isSequential() const QextSerialBase [virtual]
QIODevice::isSequential()QIODevice
isTextModeEnabled()QIODevice
isWritable()QIODevice
lastErrQextSerialBase [protected]
lastError() const QextSerialBase [virtual]
lineStatus()=0QextSerialBase [pure virtual]
mutexQextSerialBase [protected]
open(OpenMode mode)=0QextSerialBase [pure virtual]
openMode()QIODevice
parity() const QextSerialBase [virtual]
peek(char *data, qint64 maxSize)QIODevice
peek(qint64 maxSize)QIODevice
Polling enum valueQextSerialBase
portQextSerialBase [protected]
portName() const QextSerialBase [virtual]
pos()QIODevice
putChar(char c)QIODevice
QextSerialBase()QextSerialBase
QextSerialBase(const QString &name)QextSerialBase
QIODevice()QIODevice
QIODevice(QObject *parent)QIODevice
QueryMode enum nameQextSerialBase
queryMode() const QextSerialBase [inline]
read(char *data, qint64 maxSize)QIODevice
read(qint64 maxSize)QIODevice
readAll()QIODevice
readData(char *data, qint64 maxSize)=0QextSerialBase [protected, pure virtual]
readLine(char *data, qint64 maxSize)QextSerialBase [virtual]
QIODevice::readLine(qint64 maxSize=0)QIODevice
readLineData(char *data, qint64 maxSize)QIODevice
readyRead()QIODevice
reset()QIODevice
seek(qint64 pos)QIODevice
setBaudRate(BaudRateType)=0QextSerialBase [pure virtual]
setDataBits(DataBitsType)=0QextSerialBase [pure virtual]
setDtr(bool set=true)=0QextSerialBase [pure virtual]
setErrorString(const QString &str)QIODevice
setFlowControl(FlowType)=0QextSerialBase [pure virtual]
setOpenMode(OpenMode openMode)QIODevice
setParity(ParityType)=0QextSerialBase [pure virtual]
setPortName(const QString &name)QextSerialBase [virtual]
setQueryMode(QueryMode mode)QextSerialBase [virtual]
setRts(bool set=true)=0QextSerialBase [pure virtual]
setStopBits(StopBitsType)=0QextSerialBase [pure virtual]
setTextModeEnabled(bool enabled)QIODevice
setTimeout(ulong, ulong)=0QextSerialBase [pure virtual]
SettingsQextSerialBase [protected]
size() const =0QextSerialBase [pure virtual]
QIODevice::size()QIODevice
stopBits() const QextSerialBase [virtual]
translateError(ulong error)=0QextSerialBase [pure virtual]
ungetChar(char c)=0QextSerialBase [pure virtual]
waitForBytesWritten(int msecs)QIODevice
waitForReadyRead(int msecs)QIODevice
write(const char *data, qint64 maxSize)QIODevice
write(const QByteArray &byteArray)QIODevice
writeData(const char *data, qint64 maxSize)=0QextSerialBase [protected, pure virtual]
~QextSerialBase()QextSerialBase [virtual]


Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classQextSerialBase.html b/src/core/gps/qextserialport/html/classQextSerialBase.html deleted file mode 100644 index 980e34c65bb2..000000000000 --- a/src/core/gps/qextserialport/html/classQextSerialBase.html +++ /dev/null @@ -1,1279 +0,0 @@ - - -QextSerialPort: QextSerialBase Class Reference - - - - - - -

QextSerialBase Class Reference

#include <qextserialbase.h> -

-

Inheritance diagram for QextSerialBase: -

- -QIODevice -Posix_QextSerialPort -Win_QextSerialPort -QextBaseType -QextBaseType -QextSerialPort -QextSerialPort - -List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Types

 EventDriven
 Polling
enum  QueryMode { Polling, -EventDriven - }

Signals

void dsrChanged (bool status)

Public Member Functions

 aboutToClose ()
 atEnd ()
virtual bool atEnd () const
virtual BaudRateType baudRate () const
virtual qint64 bytesAvailable ()=0
 bytesToWrite ()
 bytesWritten (qint64 bytes)
 canReadLine ()
virtual void close ()=0
virtual void construct ()
virtual DataBitsType dataBits () const
 errorString ()
virtual FlowType flowControl () const
virtual void flush ()=0
 getChar (char *c)
 isOpen ()
 isReadable ()
 isSequential ()
virtual bool isSequential () const
 isTextModeEnabled ()
 isWritable ()
virtual ulong lastError () const
virtual ulong lineStatus ()=0
virtual bool open (OpenMode mode)=0
 openMode ()
virtual ParityType parity () const
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
virtual QString portName () const
 pos ()
 putChar (char c)
 QextSerialBase (const QString &name)
 QextSerialBase ()
QextSerialBase::QueryMode queryMode () const
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 readAll ()
 readLine (qint64 maxSize=0)
virtual qint64 readLine (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readyRead ()
 reset ()
 seek (qint64 pos)
virtual void setBaudRate (BaudRateType)=0
virtual void setDataBits (DataBitsType)=0
virtual void setDtr (bool set=true)=0
 setErrorString (const QString &str)
virtual void setFlowControl (FlowType)=0
 setOpenMode (OpenMode openMode)
virtual void setParity (ParityType)=0
virtual void setPortName (const QString &name)
virtual void setQueryMode (QueryMode mode)
virtual void setRts (bool set=true)=0
virtual void setStopBits (StopBitsType)=0
 setTextModeEnabled (bool enabled)
virtual void setTimeout (ulong, ulong)=0
 size ()
virtual qint64 size () const =0
virtual StopBitsType stopBits () const
virtual void translateError (ulong error)=0
virtual void ungetChar (char c)=0
 waitForBytesWritten (int msecs)
 waitForReadyRead (int msecs)
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)
virtual ~QextSerialBase ()

Protected Member Functions

virtual qint64 readData (char *data, qint64 maxSize)=0
virtual qint64 writeData (const char *data, qint64 maxSize)=0

Protected Attributes

QextSerialBase::QueryMode _queryMode
ulong lastErr
QMutex * mutex
QString port
PortSettings Settings
-

Detailed Description

-
Author:
Stefan Sander

-Michal Policht

-A common base class for Win_QextSerialBase, Posix_QextSerialBase and QextSerialPort. -

-


Member Enumeration Documentation

- -
-
- - - - -
enum QextSerialBase::QueryMode
-
-
- -

-

Enumerator:
- - - -
Polling  -
EventDriven  -
-
- -

-Reimplemented in QextSerialPort.

00154                        {
-00155             Polling,
-00156             EventDriven
-00157         };
-
-

- -

-

-


Constructor & Destructor Documentation

- -
-
- - - - - - - - -
QextSerialBase::QextSerialBase (  ) 
-
-
- -

-Default constructor.

00008  : QIODevice()
-00009 {
-00010 
-00011 #ifdef _TTY_WIN_
-00012     setPortName("COM1");
-00013 
-00014 #elif defined(_TTY_IRIX_)
-00015     setPortName("/dev/ttyf1");
-00016 
-00017 #elif defined(_TTY_HPUX_)
-00018     setPortName("/dev/tty1p0");
-00019 
-00020 #elif defined(_TTY_SUN_)
-00021     setPortName("/dev/ttya");
-00022 
-00023 #elif defined(_TTY_DIGITAL_)
-00024     setPortName("/dev/tty01");
-00025 
-00026 #elif defined(_TTY_FREEBSD_)
-00027     setPortName("/dev/ttyd1");
-00028 
-00029 #else
-00030     setPortName("/dev/ttyS0");
-00031 #endif
-00032 
-00033     construct();
-00034 }
-
-

- -

-

- -

-
- - - - - - - - - -
QextSerialBase::QextSerialBase (const QString &  name  ) 
-
-
- -

-Construct a port and assign it to the device specified by the name parameter.

00041  : QIODevice()
-00042 {
-00043     setPortName(name);
-00044     construct();
-00045 }
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::~QextSerialBase (  )  [virtual]
-
-
- -

-Standard destructor.

00052 {
-00053     delete mutex;
-00054 }
-
-

- -

-

-


Member Function Documentation

- -
-
- - - - - - - - -
bool QextSerialBase::atEnd (  )  const [virtual]
-
-
- -

-This function will return true if the input buffer is empty (or on error), and false otherwise. Call QextSerialBase::lastError() for error information.

00164 {
-00165     if (size()) {
-00166         return true;
-00167     }
-00168     return false;
-00169 }
-
-

- -

-

- -

-
- - - - - - - - - -
BaudRateType QextSerialBase::baudRate (void   )  const [virtual]
-
-
- -

-Returns the baud rate of the serial port. For a list of possible return values see the definition of the enum BaudRateType.

00103 {
-00104     return Settings.BaudRate;
-00105 }
-
-

- -

-

- -

-
- - - - - - - - -
virtual qint64 QextSerialBase::bytesAvailable (  )  [pure virtual]
-
-
- -

- -

-Reimplemented from QIODevice. -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - -
virtual void QextSerialBase::close (  )  [pure virtual]
-
-
- -

- -

-Reimplemented from QIODevice. -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - -
void QextSerialBase::construct (  )  [virtual]
-
-
- -

-Common constructor function for setting up default port settings. (115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 0 ms timeout).

00062 {
-00063     Settings.BaudRate=BAUD115200;
-00064     Settings.DataBits=DATA_8;
-00065     Settings.Parity=PAR_NONE;
-00066     Settings.StopBits=STOP_1;
-00067     Settings.FlowControl=FLOW_HARDWARE;
-00068     Settings.Timeout_Sec=0;
-00069     Settings.Timeout_Millisec=0;
-00070     mutex = new QMutex( QMutex::Recursive );
-00071     setOpenMode(QIODevice::NotOpen);
-00072 }
-
-

- -

-

- -

-
- - - - - - - - -
DataBitsType QextSerialBase::dataBits (  )  const [virtual]
-
-
- -

-Returns 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.

00113 {
-00114     return Settings.DataBits;
-00115 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - -
FlowType QextSerialBase::flowControl (  )  const [virtual]
-
-
- -

-Returns 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.

00143 {
-00144     return Settings.FlowControl;
-00145 }
-
-

- -

-

- -

-
- - - - - - - - -
virtual void QextSerialBase::flush (  )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - -
bool QextSerialBase::isSequential (  )  const [virtual]
-
-
- -

-Returns true if device is sequential, otherwise returns false. Serial port is sequential device so this function always returns true. Check QIODevice::isSequential() documentation for more information.

00154 {
-00155     return true;
-00156 }
-
-

- -

-

- -

-
- - - - - - - - -
ulong QextSerialBase::lastError (  )  const [virtual]
-
-
- -

-Returns 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:

-

Error                           Explanation
----------------------------     -------------------------------------------------------------
-E_NO_ERROR                      No Error has occured
-E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
-E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
-E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
-E_PORT_TIMEOUT                  Operation timed out (POSIX)
-E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
-E_BREAK_CONDITION               The port detected a break condition
-E_FRAMING_ERROR                 The port detected a framing error
-                                (usually caused by incorrect baud rate settings)
-E_IO_ERROR                      There was an I/O error while communicating with the port
-E_BUFFER_OVERRUN                Character buffer overrun
-E_RECEIVE_OVERFLOW              Receive buffer overflow
-E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
-E_TRANSMIT_OVERFLOW             Transmit buffer overflow
-E_READ_FAILED                   General read operation failure
-E_WRITE_FAILED                  General write operation failure
-
00225 {
-00226     return lastErr;
-00227 }
-
-

- -

-

- -

-
- - - - - - - - -
virtual ulong QextSerialBase::lineStatus (  )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual bool QextSerialBase::open (OpenMode  mode  )  [pure virtual]
-
-
- -

- -

-Reimplemented from QIODevice. -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - -
ParityType QextSerialBase::parity (  )  const [virtual]
-
-
- -

-Returns 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.

00123 {
-00124     return Settings.Parity;
-00125 }
-
-

- -

-

- -

-
- - - - - - - - -
QString QextSerialBase::portName (  )  const [virtual]
-
-
- -

-Returns the name set by setPortName().

00093 {
-00094     return port;
-00095 }
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
virtual qint64 QextSerialBase::readData (char *  data,
qint64  maxSize 
) [protected, pure virtual]
-
-
- -

- -

-Reimplemented from QIODevice. -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 QextSerialBase::readLine (char *  data,
qint64  maxSize 
) [virtual]
-
-
- -

-This 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. -

-Reimplemented from QIODevice.

00178 {
-00179     qint64 numBytes = bytesAvailable();
-00180     char* pData = data;
-00181 
-00182     if (maxSize < 2)    //maxSize must be larger than 1
-00183         return -1;
-00184 
-00185     /*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
-00186     while (pData<(data+numBytes) && --maxSize) {
-00187         readData(pData, 1);
-00188         if (*pData++ == '\n') {
-00189             break;
-00190         }
-00191     }
-00192     *pData='\0';
-00193 
-00194     /*return size of data read*/
-00195     return (pData-data);
-00196 }
-
-

- -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setBaudRate (BaudRateType   )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setDataBits (DataBitsType   )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setDtr (bool  set = true  )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setFlowControl (FlowType   )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setParity (ParityType   )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setPortName (const QString &  name  )  [virtual]
-
-
- -

-Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".

00084 {
-00085     port = name;
-00086 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setQueryMode (QueryMode  mode  )  [virtual]
-
-
- -

-Set desired serial communication handling style. You may choose from polling or event driven approach. This function does nothing when port is open; to apply changes port must be reopened.

-In event driven approach read() and write() functions are acting asynchronously. They return immediately and the operation is performed in the background, so they doesn't freeze the calling thread. To determine when operation is finished, QextSerialPort runs separate thread and monitors serial port events. Whenever the event occurs, adequate signal is emitted.

-When polling is set, read() and write() are acting synchronously. Signals are not working in this mode and some functions may not be available. The advantage of polling is that it generates less overhead due to lack of signals emissions and it doesn't start separate thread to monitor events.

-Generally event driven approach is more capable and friendly, although some applications may need as low overhead as possible and then polling comes.

-

Parameters:
- - -
mode query mode.
-
-
00075 {
-00076     _queryMode = mechanism;
-00077 }
-
-

- -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setRts (bool  set = true  )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::setStopBits (StopBitsType   )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
virtual void QextSerialBase::setTimeout (ulong ,
ulong  
) [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - -
virtual qint64 QextSerialBase::size (  )  const [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - -
StopBitsType QextSerialBase::stopBits (  )  const [virtual]
-
-
- -

-Returns the number of stop bits used by the port. For a list of possible return values, see the definition of the enum StopBitsType.

00133 {
-00134     return Settings.StopBits;
-00135 }
-
-

- -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::translateError (ulong  error  )  [pure virtual]
-
-
- -

- -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - -
virtual void QextSerialBase::ungetChar (char  c  )  [pure virtual]
-
-
- -

- -

-Reimplemented from QIODevice. -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
virtual qint64 QextSerialBase::writeData (const char *  data,
qint64  maxSize 
) [protected, pure virtual]
-
-
- -

- -

-Reimplemented from QIODevice. -

-Implemented in Posix_QextSerialPort, and Win_QextSerialPort. -

-

-


Member Data Documentation

- -
- -
- -

- -

-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected]
-
-
- -

- -

-

-


The documentation for this class was generated from the following files: -
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classQextSerialBase.png b/src/core/gps/qextserialport/html/classQextSerialBase.png deleted file mode 100644 index c1e645c4948426a53995da453b7fbfa5f3ddb752..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1423 zcmZuxeKga182@dyk{a_;qGH9pVX=$rQh8Zj<|V}D< z001y&CwnXafZ%d0fhfp5*S?Z0KlXdLdO65sGC7pVx*3c>njC$x?(XiCUfI0-3W~?N z;{f!+t55)de&cL^$}6dCxjZOl-ToHlJUG-378phQ%}n! z?(phoZN8LhDAprFRu=G6$aDaLu+t&lDp5D?ortU*G1NWeC<8%_}Yls_-i1&H#fT$4w^Xq``z!n!VWd;qkE9Y<};jt8J z1>*Iius&zg;*$)RStcq+i`t7Pt5t`um#V?-k}4i-Z6VYdMQ6`+^rT%wEhwt(oHDYU zfRu*LxvJ_%U$^KLwt=oOm?)0o5y3@=h4^qQ9F8fd$>P^sUgpiY>_BI?JOL8(XIQao>TYP2`B z0&cc!Xq;6R_|n@d)^CiLE(#52+?u5bPC{fG!2oW1KG)kXIUn-Su)zj#$W#e#5t;fC zJ0OjFL)IS%&3ihOtu_M{QcYi%d*{@0`e$}=vW(br({~7g2J*k6`A0`Ro8;+6CIF_H&<4tl%kf7E}KM|t8EXhbErX)A%`Ua~k+Hr)2P_3tO%Ld7u>iv()0PCD?~=#T%q>f6ZP>AOlbfbaq?UvbM<%|F zC{5-0REU+G_|g-;*14`LH*CP1$v@jmRF|b~1Fb87khIZo#f!|N(3lwB2`8a+uxk!U zA`Yn3RK=!hR(|=!Ub5KV8ZB?N0-{0p{q45l&23%B{$qyfDY8QO_5_?A-0hjC1F!rI Dal@W} diff --git a/src/core/gps/qextserialport/html/classQextSerialPort-members.html b/src/core/gps/qextserialport/html/classQextSerialPort-members.html deleted file mode 100644 index 1b2c956459b4..000000000000 --- a/src/core/gps/qextserialport/html/classQextSerialPort-members.html +++ /dev/null @@ -1,207 +0,0 @@ - - -QextSerialPort: Member List - - - - - - -

QextSerialPort Member List

This is the complete list of members for QextSerialPort, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_bytesToWriteWin_QextSerialPort [protected]
Win_QextSerialPort::_queryModeQextSerialBase [protected]
Posix_QextSerialPort::_queryModeQextSerialBase [protected]
Win_QextSerialPort::aboutToClose()QIODevice
Posix_QextSerialPort::aboutToClose()QIODevice
atEnd() const QextSerialBase [virtual]
Win_QextSerialPort::QIODevice::atEnd()QIODevice
QIODevice::atEnd()QIODevice
baudRate() const QextSerialBase [virtual]
Win_QextSerialPort::bytesAvailable()Win_QextSerialPort [virtual]
Posix_QextSerialPort::bytesAvailable()Posix_QextSerialPort [virtual]
bytesToWrite() const Win_QextSerialPort [virtual]
Win_QextSerialPort::QextSerialBase::bytesToWrite()QIODevice
Posix_QextSerialPort::bytesToWrite()QIODevice
bytesToWriteLockWin_QextSerialPort [protected]
Win_QextSerialPort::bytesWritten(qint64 bytes)QIODevice
Posix_QextSerialPort::bytesWritten(qint64 bytes)QIODevice
Win_QextSerialPort::canReadLine()QIODevice
Posix_QextSerialPort::canReadLine()QIODevice
Win_QextSerialPort::close()Win_QextSerialPort [virtual]
Posix_QextSerialPort::close()Posix_QextSerialPort [virtual]
construct()QextSerialBase [virtual]
dataBits() const QextSerialBase [virtual]
Win_QextSerialPort::dsrChanged(bool status)QextSerialBase [signal]
Posix_QextSerialPort::dsrChanged(bool status)QextSerialBase [signal]
Win_QextSerialPort::errorString()QIODevice
Posix_QextSerialPort::errorString()QIODevice
Win_QextSerialPort::EventDriven enum valueQextSerialBase
Posix_QextSerialPort::EventDriven enum valueQextSerialBase
flowControl() const QextSerialBase [virtual]
Win_QextSerialPort::flush()Win_QextSerialPort [virtual]
Posix_QextSerialPort::flush()Posix_QextSerialPort [virtual]
Win_QextSerialPort::getChar(char *c)QIODevice
Posix_QextSerialPort::getChar(char *c)QIODevice
Win_QextSerialPort::isOpen()QIODevice
Posix_QextSerialPort::isOpen()QIODevice
Win_QextSerialPort::isReadable()QIODevice
Posix_QextSerialPort::isReadable()QIODevice
isSequential() const QextSerialBase [virtual]
Win_QextSerialPort::QIODevice::isSequential()QIODevice
QIODevice::isSequential()QIODevice
Win_QextSerialPort::isTextModeEnabled()QIODevice
Posix_QextSerialPort::isTextModeEnabled()QIODevice
Win_QextSerialPort::isWritable()QIODevice
Posix_QextSerialPort::isWritable()QIODevice
Win_QextSerialPort::lastErrQextSerialBase [protected]
Posix_QextSerialPort::lastErrQextSerialBase [protected]
lastError() const QextSerialBase [virtual]
Win_QextSerialPort::lineStatus(void)Win_QextSerialPort [virtual]
Posix_QextSerialPort::lineStatus()Posix_QextSerialPort [virtual]
monitorCommEvent()Win_QextSerialPort [protected]
Win_QextSerialPort::mutexQextSerialBase [protected]
Posix_QextSerialPort::mutexQextSerialBase [protected]
Win_QextSerialPort::open(OpenMode mode)Win_QextSerialPort [virtual]
Posix_QextSerialPort::open(OpenMode mode)Posix_QextSerialPort [virtual]
Win_QextSerialPort::openMode()QIODevice
Posix_QextSerialPort::openMode()QIODevice
operator=(const QextSerialPort &)QextSerialPort
QextBaseType::operator=(const Win_QextSerialPort &s)Win_QextSerialPort
QextBaseType::operator=(const Posix_QextSerialPort &s)Posix_QextSerialPort
overlapWin_QextSerialPort [protected]
overlapThreadWin_QextSerialPort [protected]
overlapWriteWin_QextSerialPort [protected]
parity() const QextSerialBase [virtual]
Win_QextSerialPort::peek(char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::peek(qint64 maxSize)QIODevice
Posix_QextSerialPort::peek(char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::peek(qint64 maxSize)QIODevice
Win_QextSerialPort::Polling enum valueQextSerialBase
Posix_QextSerialPort::Polling enum valueQextSerialBase
Win_QextSerialPort::portQextSerialBase [protected]
Posix_QextSerialPort::portQextSerialBase [protected]
portName() const QextSerialBase [virtual]
Win_QextSerialPort::pos()QIODevice
Posix_QextSerialPort::pos()QIODevice
Posix_CommConfigPosix_QextSerialPort [protected]
Posix_Copy_TimeoutPosix_QextSerialPort [protected]
Posix_FilePosix_QextSerialPort [protected]
Posix_QextSerialPort()Posix_QextSerialPort
Posix_QextSerialPort(const Posix_QextSerialPort &s)Posix_QextSerialPort
Posix_QextSerialPort(const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_QextSerialPort(const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_QextSerialPort(const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Posix_QextSerialPort
Posix_TimeoutPosix_QextSerialPort [protected]
Win_QextSerialPort::putChar(char c)QIODevice
Posix_QextSerialPort::putChar(char c)QIODevice
Win_QextSerialPort::QextSerialBase()QextSerialBase
Win_QextSerialPort::QextSerialBase(const QString &name)QextSerialBase
Posix_QextSerialPort::QextSerialBase()QextSerialBase
Posix_QextSerialPort::QextSerialBase(const QString &name)QextSerialBase
QextSerialPort()QextSerialPort
QextSerialPort(const QString &name, QueryMode mode=QextSerialPort::Polling)QextSerialPort
QextSerialPort(PortSettings const &s, QueryMode mode=QextSerialPort::Polling)QextSerialPort
QextSerialPort(const QString &name, PortSettings const &s, QueryMode mode=QextSerialPort::Polling)QextSerialPort
QextSerialPort(const QextSerialPort &s)QextSerialPort
Win_QextSerialPort::QIODevice()QIODevice
Win_QextSerialPort::QIODevice(QObject *parent)QIODevice
Posix_QextSerialPort::QIODevice()QIODevice
Posix_QextSerialPort::QIODevice(QObject *parent)QIODevice
QueryMode typedefQextSerialPort
Win_QextSerialPort::queryMode() const QextSerialBase [inline]
Posix_QextSerialPort::queryMode() const QextSerialBase [inline]
Win_QextSerialPort::read(char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::read(qint64 maxSize)QIODevice
Posix_QextSerialPort::read(char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::read(qint64 maxSize)QIODevice
Win_QextSerialPort::readAll()QIODevice
Posix_QextSerialPort::readAll()QIODevice
Win_QextSerialPort::readData(char *data, qint64 maxSize)Win_QextSerialPort [protected, virtual]
Posix_QextSerialPort::readData(char *data, qint64 maxSize)Posix_QextSerialPort [protected, virtual]
readLine(char *data, qint64 maxSize)QextSerialBase [virtual]
Win_QextSerialPort::QIODevice::readLine(qint64 maxSize=0)QIODevice
QIODevice::readLine(qint64 maxSize=0)QIODevice
Win_QextSerialPort::readLineData(char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::readLineData(char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::readyRead()QIODevice
Posix_QextSerialPort::readyRead()QIODevice
Win_QextSerialPort::reset()QIODevice
Posix_QextSerialPort::reset()QIODevice
Win_QextSerialPort::seek(qint64 pos)QIODevice
Posix_QextSerialPort::seek(qint64 pos)QIODevice
Win_QextSerialPort::setBaudRate(BaudRateType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setBaudRate(BaudRateType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setDataBits(DataBitsType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setDataBits(DataBitsType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setDtr(bool set=true)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setDtr(bool set=true)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setErrorString(const QString &str)QIODevice
Posix_QextSerialPort::setErrorString(const QString &str)QIODevice
Win_QextSerialPort::setFlowControl(FlowType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setFlowControl(FlowType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setOpenMode(OpenMode openMode)QIODevice
Posix_QextSerialPort::setOpenMode(OpenMode openMode)QIODevice
Win_QextSerialPort::setParity(ParityType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setParity(ParityType)Posix_QextSerialPort [virtual]
setPortName(const QString &name)QextSerialBase [virtual]
setQueryMode(QueryMode mode)QextSerialBase [virtual]
Win_QextSerialPort::setRts(bool set=true)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setRts(bool set=true)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setStopBits(StopBitsType)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setStopBits(StopBitsType)Posix_QextSerialPort [virtual]
Win_QextSerialPort::setTextModeEnabled(bool enabled)QIODevice
Posix_QextSerialPort::setTextModeEnabled(bool enabled)QIODevice
Win_QextSerialPort::setTimeout(ulong, ulong)Win_QextSerialPort [virtual]
Posix_QextSerialPort::setTimeout(ulong, ulong)Posix_QextSerialPort [virtual]
Win_QextSerialPort::SettingsQextSerialBase [protected]
Posix_QextSerialPort::SettingsQextSerialBase [protected]
Win_QextSerialPort::size() const Win_QextSerialPort [virtual]
Win_QextSerialPort::QIODevice::size()QIODevice
Posix_QextSerialPort::size() const Posix_QextSerialPort [virtual]
QIODevice::size()QIODevice
stopBits() const QextSerialBase [virtual]
terminateCommWait()Win_QextSerialPort [protected]
threadStartEventWin_QextSerialPort [protected]
threadTerminateEventWin_QextSerialPort [protected]
Win_QextSerialPort::translateError(ulong)Win_QextSerialPort [virtual]
Posix_QextSerialPort::translateError(ulong error)Posix_QextSerialPort [virtual]
Win_QextSerialPort::ungetChar(char c)Win_QextSerialPort [virtual]
Posix_QextSerialPort::ungetChar(char c)Posix_QextSerialPort [virtual]
Win_QextSerialPort::waitForBytesWritten(int msecs)QIODevice
Posix_QextSerialPort::waitForBytesWritten(int msecs)QIODevice
waitForReadyRead(int msecs)Win_QextSerialPort [virtual]
Win_CommConfigWin_QextSerialPort [protected]
Win_CommTimeoutsWin_QextSerialPort [protected]
Win_HandleWin_QextSerialPort [protected]
Win_QextSerialPort()Win_QextSerialPort
Win_QextSerialPort(Win_QextSerialPort const &s)Win_QextSerialPort
Win_QextSerialPort(const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort(const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort(const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort::write(const char *data, qint64 maxSize)QIODevice
Win_QextSerialPort::write(const QByteArray &byteArray)QIODevice
Posix_QextSerialPort::write(const char *data, qint64 maxSize)QIODevice
Posix_QextSerialPort::write(const QByteArray &byteArray)QIODevice
Win_QextSerialPort::writeData(const char *data, qint64 maxSize)Win_QextSerialPort [protected, virtual]
Posix_QextSerialPort::writeData(const char *data, qint64 maxSize)Posix_QextSerialPort [protected, virtual]
~Posix_QextSerialPort()Posix_QextSerialPort [virtual]
~QextSerialBase()QextSerialBase [virtual]
~QextSerialPort()QextSerialPort [virtual]
~Win_QextSerialPort()Win_QextSerialPort [virtual]


Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classQextSerialPort.html b/src/core/gps/qextserialport/html/classQextSerialPort.html deleted file mode 100644 index fce2d97e7557..000000000000 --- a/src/core/gps/qextserialport/html/classQextSerialPort.html +++ /dev/null @@ -1,3944 +0,0 @@ - - -QextSerialPort: QextSerialPort Class Reference - - - - - - -

QextSerialPort Class Reference

#include <qextserialport.h> -

-

Inheritance diagram for QextSerialPort: -

- -QextBaseType -Win_QextSerialPort -Posix_QextSerialPort -QextSerialBase -QextSerialBase -QIODevice -QIODevice - -List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Types

 EventDriven
 EventDriven
 Polling
 Polling
typedef QextSerialBase::QueryMode QueryMode

Signals

void dsrChanged (bool status)
void dsrChanged (bool status)

Public Member Functions

 aboutToClose ()
 aboutToClose ()
 atEnd ()
 atEnd ()
virtual bool atEnd () const
virtual BaudRateType baudRate () const
virtual qint64 bytesAvailable ()
virtual qint64 bytesAvailable ()
 bytesToWrite ()
 bytesToWrite ()
virtual qint64 bytesToWrite () const
 bytesWritten (qint64 bytes)
 bytesWritten (qint64 bytes)
 canReadLine ()
 canReadLine ()
virtual void close ()
virtual void close ()
virtual void construct ()
virtual DataBitsType dataBits () const
 errorString ()
 errorString ()
virtual FlowType flowControl () const
virtual void flush ()
virtual void flush ()
 getChar (char *c)
 getChar (char *c)
 isOpen ()
 isOpen ()
 isReadable ()
 isReadable ()
 isSequential ()
 isSequential ()
virtual bool isSequential () const
 isTextModeEnabled ()
 isTextModeEnabled ()
 isWritable ()
 isWritable ()
virtual ulong lastError () const
virtual ulong lineStatus ()
virtual ulong lineStatus (void)
virtual bool open (OpenMode mode)
virtual bool open (OpenMode mode)
 openMode ()
 openMode ()
QextSerialPortoperator= (const QextSerialPort &)
virtual ParityType parity () const
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
virtual QString portName () const
 pos ()
 pos ()
 putChar (char c)
 putChar (char c)
 QextSerialPort (const QextSerialPort &s)
 QextSerialPort (const QString &name, PortSettings const &s, QueryMode mode=QextSerialPort::Polling)
 QextSerialPort (PortSettings const &s, QueryMode mode=QextSerialPort::Polling)
 QextSerialPort (const QString &name, QueryMode mode=QextSerialPort::Polling)
 QextSerialPort ()
QextSerialBase::QueryMode queryMode () const
QextSerialBase::QueryMode queryMode () const
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 readAll ()
 readAll ()
 readLine (qint64 maxSize=0)
 readLine (qint64 maxSize=0)
virtual qint64 readLine (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readyRead ()
 readyRead ()
 reset ()
 reset ()
 seek (qint64 pos)
 seek (qint64 pos)
virtual void setBaudRate (BaudRateType)
virtual void setBaudRate (BaudRateType)
virtual void setDataBits (DataBitsType)
virtual void setDataBits (DataBitsType)
virtual void setDtr (bool set=true)
virtual void setDtr (bool set=true)
 setErrorString (const QString &str)
 setErrorString (const QString &str)
virtual void setFlowControl (FlowType)
virtual void setFlowControl (FlowType)
 setOpenMode (OpenMode openMode)
 setOpenMode (OpenMode openMode)
virtual void setParity (ParityType)
virtual void setParity (ParityType)
virtual void setPortName (const QString &name)
virtual void setQueryMode (QueryMode mode)
virtual void setRts (bool set=true)
virtual void setRts (bool set=true)
virtual void setStopBits (StopBitsType)
virtual void setStopBits (StopBitsType)
 setTextModeEnabled (bool enabled)
 setTextModeEnabled (bool enabled)
virtual void setTimeout (ulong, ulong)
virtual void setTimeout (ulong, ulong)
 size ()
virtual qint64 size () const
 size ()
virtual qint64 size () const
virtual StopBitsType stopBits () const
virtual void translateError (ulong error)
virtual void translateError (ulong)
virtual void ungetChar (char c)
virtual void ungetChar (char c)
 waitForBytesWritten (int msecs)
 waitForBytesWritten (int msecs)
virtual bool waitForReadyRead (int msecs)
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)
virtual ~QextSerialPort ()

Protected Member Functions

void monitorCommEvent ()
virtual qint64 readData (char *data, qint64 maxSize)
virtual qint64 readData (char *data, qint64 maxSize)
void terminateCommWait ()
virtual qint64 writeData (const char *data, qint64 maxSize)
virtual qint64 writeData (const char *data, qint64 maxSize)

Protected Attributes

qint64 _bytesToWrite
QextSerialBase::QueryMode _queryMode
QextSerialBase::QueryMode _queryMode
QReadWriteLock * bytesToWriteLock
ulong lastErr
ulong lastErr
QMutex * mutex
QMutex * mutex
OVERLAPPED overlap
Win_QextSerialThreadoverlapThread
OVERLAPPED overlapWrite
QString port
QString port
termios Posix_CommConfig
timeval Posix_Copy_Timeout
QFile * Posix_File
timeval Posix_Timeout
PortSettings Settings
PortSettings Settings
HANDLE threadStartEvent
HANDLE threadTerminateEvent
COMMCONFIG Win_CommConfig
COMMTIMEOUTS Win_CommTimeouts
HANDLE Win_Handle
-

Detailed Description

-
Author:
Stefan Sander

-Michal Policht

-A 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.

-You may choose from polling or event driven API. For details check setQueryMode() documentation.

-

Note:
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.
- -

-


Member Typedef Documentation

- -
- -
- -

- -

-Reimplemented from QextSerialBase. -

-

-


Constructor & Destructor Documentation

- -
-
- - - - - - - - -
QextSerialPort::QextSerialPort (  ) 
-
-
- -

-Default constructor. Note that the naming convention used by a QextSerialPort 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:

-

Constant         Used By         Naming Convention
-----------       -------------   ------------------------
-_TTY_WIN_        Windows         COM1, COM2
-_TTY_IRIX_       SGI/IRIX        /dev/ttyf1, /dev/ttyf2
-_TTY_HPUX_       HP-UX           /dev/tty1p0, /dev/tty2p0
-_TTY_SUN_        SunOS/Solaris   /dev/ttya, /dev/ttyb
-_TTY_DIGITAL_    Digital UNIX    /dev/tty01, /dev/tty02
-_TTY_FREEBSD_    FreeBSD         /dev/ttyd0, /dev/ttyd1
-_TTY_LINUX_      Linux           /dev/ttyS0, /dev/ttyS1
-<none>           Linux           /dev/ttyS0, /dev/ttyS1
-

-The 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.

00048  : QextBaseType()
-00049 {}
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
QextSerialPort::QextSerialPort (const QString &  name,
QueryMode  mode = QextSerialPort::Polling 
)
-
-
- -

-Constructs 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".

-

See also:
setQueryMode().
-
00059  : QextBaseType(name, mode)
-00060 {
-00061 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
QextSerialPort::QextSerialPort (PortSettings const &  settings,
QueryMode  mode = QextSerialPort::Polling 
)
-
-
- -

-Constructs a port with default name and settings specified by the settings parameter.

-

See also:
setQueryMode().
-
00069  : QextBaseType(settings, mode)
-00070 {}
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
QextSerialPort::QextSerialPort (const QString &  name,
PortSettings const &  settings,
QueryMode  mode = QextSerialPort::Polling 
)
-
-
- -

-Constructs a port with the name and settings specified.

-

See also:
setQueryMode().
-
00078  : QextBaseType(name, settings, mode)
-00079 {}
-
-

- -

-

- -

-
- - - - - - - - - -
QextSerialPort::QextSerialPort (const QextSerialPort s  ) 
-
-
- -

-Copy constructor.

00085  : QextBaseType(s)
-00086 {}
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialPort::~QextSerialPort (  )  [virtual]
-
-
- -

-Standard destructor.

00102 {}
-
-

- -

-

-


Member Function Documentation

- -
-
- - - - - - - - -
bool QextSerialBase::atEnd (  )  const [virtual, inherited]
-
-
- -

-This function will return true if the input buffer is empty (or on error), and false otherwise. Call QextSerialBase::lastError() for error information.

00164 {
-00165     if (size()) {
-00166         return true;
-00167     }
-00168     return false;
-00169 }
-
-

- -

-

- -

-
- - - - - - - - - -
BaudRateType QextSerialBase::baudRate (void   )  const [virtual, inherited]
-
-
- -

-Returns the baud rate of the serial port. For a list of possible return values see the definition of the enum BaudRateType.

00103 {
-00104     return Settings.BaudRate;
-00105 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Posix_QextSerialPort::bytesAvailable (  )  [virtual, inherited]
-
-
- -

-Returns 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(). -

-Implements QextSerialBase.

00922 {
-00923     LOCK_MUTEX();
-00924     if (isOpen()) {
-00925         int bytesQueued;
-00926         fd_set fileSet;
-00927         FD_ZERO(&fileSet);
-00928         FD_SET(Posix_File->handle(), &fileSet);
-00929 
-00930         /*on Linux systems the Posix_Timeout structure will be altered by the select() call.
-00931           Make sure we use the right timeout values*/
-00932         //memcpy(&Posix_Timeout, &Posix_Copy_Timeout, sizeof(struct timeval));
-00933         Posix_Timeout = Posix_Copy_Timeout;
-00934         int n=select(Posix_File->handle()+1, &fileSet, NULL, &fileSet, &Posix_Timeout);
-00935         if (!n) {
-00936             lastErr=E_PORT_TIMEOUT;
-00937             UNLOCK_MUTEX();
-00938             return -1;
-00939         }
-00940         if (n==-1 || ioctl(Posix_File->handle(), FIONREAD, &bytesQueued)==-1) {
-00941             translateError(errno);
-00942             UNLOCK_MUTEX();
-00943             return -1;
-00944         }
-00945         lastErr=E_NO_ERROR;
-00946         UNLOCK_MUTEX();
-00947         return bytesQueued + QIODevice::bytesAvailable();
-00948     }
-00949     UNLOCK_MUTEX();
-00950     return 0;
-00951 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::bytesAvailable (  )  [virtual, inherited]
-
-
- -

-Returns 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(). -

-Implements QextSerialBase.

00287                                           {
-00288     LOCK_MUTEX();
-00289     if (isOpen()) {
-00290         DWORD Errors;
-00291         COMSTAT Status;
-00292         bool success=ClearCommError(Win_Handle, &Errors, &Status);
-00293         translateError(Errors);
-00294         if (success) {
-00295             lastErr=E_NO_ERROR;
-00296             UNLOCK_MUTEX();
-00297             return Status.cbInQue + QIODevice::bytesAvailable();
-00298         }
-00299         UNLOCK_MUTEX();
-00300         return (unsigned int)-1;
-00301     }
-00302     UNLOCK_MUTEX();
-00303     return 0;
-00304 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::bytesToWrite (  )  const [virtual, inherited]
-
-
- -

-Return number of bytes waiting in the buffer. Currently this shows number of bytes queued within write() and before the TX_EMPTY event occured. TX_EMPTY event is created whenever last character in the system buffer was sent.

-

Returns:
number of bytes queued within write(), before the first TX_EMPTY event occur.
-
Warning:
this function may not give you expected results since TX_EMPTY may occur while writing data to the buffer. Eventually some TX_EMPTY events may not be catched.
-
Note:
this function always returns 0 in polling mode.
-
See also:
flush().
-
00954 {
-00955     return _bytesToWrite;
-00956 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::close (  )  [virtual, inherited]
-
-
- -

-Closes a serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00878 {
-00879     LOCK_MUTEX();
-00880     Posix_File->close();
-00881     QIODevice::close();
-00882     UNLOCK_MUTEX();
-00883 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::close (  )  [virtual, inherited]
-
-
- -

-Closes a serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00233 {
-00234     LOCK_MUTEX();
-00235 
-00236     if (isOpen()) {
-00237         flush();
-00238         if (overlapThread->isRunning()) {
-00239             overlapThread->stop();
-00240             if (QThread::currentThread() != overlapThread)
-00241                 overlapThread->wait();
-00242         }
-00243         if (CloseHandle(Win_Handle))
-00244             Win_Handle = INVALID_HANDLE_VALUE;
-00245         _bytesToWrite = 0;
-00246         QIODevice::close();
-00247     }
-00248 
-00249     UNLOCK_MUTEX();
-00250 }
-
-

- -

-

- -

-
- - - - - - - - -
void QextSerialBase::construct (  )  [virtual, inherited]
-
-
- -

-Common constructor function for setting up default port settings. (115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 0 ms timeout).

00062 {
-00063     Settings.BaudRate=BAUD115200;
-00064     Settings.DataBits=DATA_8;
-00065     Settings.Parity=PAR_NONE;
-00066     Settings.StopBits=STOP_1;
-00067     Settings.FlowControl=FLOW_HARDWARE;
-00068     Settings.Timeout_Sec=0;
-00069     Settings.Timeout_Millisec=0;
-00070     mutex = new QMutex( QMutex::Recursive );
-00071     setOpenMode(QIODevice::NotOpen);
-00072 }
-
-

- -

-

- -

-
- - - - - - - - -
DataBitsType QextSerialBase::dataBits (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00113 {
-00114     return Settings.DataBits;
-00115 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal, inherited]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal, inherited]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - -
FlowType QextSerialBase::flowControl (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00143 {
-00144     return Settings.FlowControl;
-00145 }
-
-

- -

-

- -

-
- - - - - - - - -
void Posix_QextSerialPort::flush (  )  [virtual, inherited]
-
-
- -

-Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00891 {
-00892     LOCK_MUTEX();
-00893     if (isOpen()) {
-00894         Posix_File->flush();
-00895     }
-00896     UNLOCK_MUTEX();
-00897 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::flush (  )  [virtual, inherited]
-
-
- -

-Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00257                                {
-00258     LOCK_MUTEX();
-00259     if (isOpen()) {
-00260         FlushFileBuffers(Win_Handle);
-00261     }
-00262     UNLOCK_MUTEX();
-00263 }
-
-

- -

-

- -

-
- - - - - - - - -
bool QextSerialBase::isSequential (  )  const [virtual, inherited]
-
-
- -

-Returns true if device is sequential, otherwise returns false. Serial port is sequential device so this function always returns true. Check QIODevice::isSequential() documentation for more information.

00154 {
-00155     return true;
-00156 }
-
-

- -

-

- -

-
- - - - - - - - -
ulong QextSerialBase::lastError (  )  const [virtual, inherited]
-
-
- -

-Returns 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:

-

Error                           Explanation
----------------------------     -------------------------------------------------------------
-E_NO_ERROR                      No Error has occured
-E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
-E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
-E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
-E_PORT_TIMEOUT                  Operation timed out (POSIX)
-E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
-E_BREAK_CONDITION               The port detected a break condition
-E_FRAMING_ERROR                 The port detected a framing error
-                                (usually caused by incorrect baud rate settings)
-E_IO_ERROR                      There was an I/O error while communicating with the port
-E_BUFFER_OVERRUN                Character buffer overrun
-E_RECEIVE_OVERFLOW              Receive buffer overflow
-E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
-E_TRANSMIT_OVERFLOW             Transmit buffer overflow
-E_READ_FAILED                   General read operation failure
-E_WRITE_FAILED                  General write operation failure
-
00225 {
-00226     return lastErr;
-00227 }
-
-

- -

-

- -

-
- - - - - - - - - -
unsigned long Posix_QextSerialPort::lineStatus (void   )  [virtual, inherited]
-
-
- -

-returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned long with specific bits indicating which lines are high. The following constants should be used to examine the states of individual lines:

-

Mask        Line
-------      ----
-LS_CTS      CTS
-LS_DSR      DSR
-LS_DCD      DCD
-LS_RI       RI
-LS_RTS      RTS (POSIX only)
-LS_DTR      DTR (POSIX only)
-LS_ST       Secondary TXD (POSIX only)
-LS_SR       Secondary RXD (POSIX only)
-

-This function will return 0 if the port associated with the class is not currently open. -

-Implements QextSerialBase.

01055 {
-01056     unsigned long Status=0, Temp=0;
-01057     LOCK_MUTEX();
-01058     if (isOpen()) {
-01059         ioctl(Posix_File->handle(), TIOCMGET, &Temp);
-01060         if (Temp&TIOCM_CTS) {
-01061             Status|=LS_CTS;
-01062         }
-01063         if (Temp&TIOCM_DSR) {
-01064             Status|=LS_DSR;
-01065         }
-01066         if (Temp&TIOCM_RI) {
-01067             Status|=LS_RI;
-01068         }
-01069         if (Temp&TIOCM_CD) {
-01070             Status|=LS_DCD;
-01071         }
-01072         if (Temp&TIOCM_DTR) {
-01073             Status|=LS_DTR;
-01074         }
-01075         if (Temp&TIOCM_RTS) {
-01076             Status|=LS_RTS;
-01077         }
-01078         if (Temp&TIOCM_ST) {
-01079             Status|=LS_ST;
-01080         }
-01081         if (Temp&TIOCM_SR) {
-01082             Status|=LS_SR;
-01083         }
-01084     }
-01085     UNLOCK_MUTEX();
-01086     return Status;
-01087 }
-
-

- -

-

- -

-
- - - - - - - - - -
ulong Win_QextSerialPort::lineStatus (void   )  [virtual, inherited]
-
-
- -

-returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned long with specific bits indicating which lines are high. The following constants should be used to examine the states of individual lines:

-

Mask        Line
-------      ----
-LS_CTS      CTS
-LS_DSR      DSR
-LS_DCD      DCD
-LS_RI       RI
-

-This function will return 0 if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00925                                          {
-00926     unsigned long Status=0, Temp=0;
-00927     LOCK_MUTEX();
-00928     if (isOpen()) {
-00929         GetCommModemStatus(Win_Handle, &Temp);
-00930         if (Temp&MS_CTS_ON) {
-00931             Status|=LS_CTS;
-00932         }
-00933         if (Temp&MS_DSR_ON) {
-00934             Status|=LS_DSR;
-00935         }
-00936         if (Temp&MS_RING_ON) {
-00937             Status|=LS_RI;
-00938         }
-00939         if (Temp&MS_RLSD_ON) {
-00940             Status|=LS_DCD;
-00941         }
-00942     }
-00943     UNLOCK_MUTEX();
-00944     return Status;
-00945 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::monitorCommEvent (  )  [protected, inherited]
-
-
- -

-

00959 {
-00960     DWORD eventMask = 0;
-00961 
-00962     ResetEvent(overlap.hEvent);
-00963     if (!WaitCommEvent(Win_Handle, & eventMask, & overlap))
-00964         if (GetLastError() != ERROR_IO_PENDING)
-00965             qCritical("WaitCommEvent error %ld\n", GetLastError());
-00966 
-00967     if (WaitForSingleObject(overlap.hEvent, INFINITE) == WAIT_OBJECT_0) {
-00968         //overlap event occured
-00969         DWORD undefined;
-00970         if (!GetOverlappedResult(Win_Handle, & overlap, & undefined, false)) {
-00971             qWarning("Comm event overlapped error %ld", GetLastError());
-00972             return;
-00973         }
-00974         if (eventMask & EV_RXCHAR) {
-00975             if (sender() != this)
-00976                 emit readyRead();
-00977         }
-00978         if (eventMask & EV_TXEMPTY) {
-00979             DWORD numBytes;
-00980             GetOverlappedResult(Win_Handle, & overlapWrite, & numBytes, true);
-00981             bytesToWriteLock->lockForWrite();
-00982             if (sender() != this)
-00983                 emit bytesWritten(bytesToWrite());
-00984             _bytesToWrite = 0;
-00985             bytesToWriteLock->unlock();
-00986         }
-00987         if (eventMask & EV_DSR)
-00988             if (lineStatus() & LS_DSR)
-00989                 emit dsrChanged(true);
-00990             else
-00991                 emit dsrChanged(false);
-00992     }
-00993 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Posix_QextSerialPort::open (OpenMode  mode  )  [virtual, inherited]
-
-
- -

-Opens 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. -

-Implements QextSerialBase.

00830 {
-00831     LOCK_MUTEX();
-00832     if (mode == QIODevice::NotOpen)
-00833         return isOpen();
-00834     if (!isOpen()) {
-00835         /*open the port*/
-00836         Posix_File->setFileName(port);
-00837         qDebug("Trying to open File");
-00838         if (Posix_File->open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
-00839             qDebug("Opened File successfully");
-00840             /*set open mode*/
-00841             QIODevice::open(mode);
-00842 
-00843             /*configure port settings*/
-00844             tcgetattr(Posix_File->handle(), &Posix_CommConfig);
-00845 
-00846             /*set up other port settings*/
-00847             Posix_CommConfig.c_cflag|=CREAD|CLOCAL;
-00848             Posix_CommConfig.c_lflag&=(~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG));
-00849             Posix_CommConfig.c_iflag&=(~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY));
-00850             Posix_CommConfig.c_oflag&=(~OPOST);
-00851             Posix_CommConfig.c_cc[VMIN]=0;
-00852             Posix_CommConfig.c_cc[VINTR] = _POSIX_VDISABLE;
-00853             Posix_CommConfig.c_cc[VQUIT] = _POSIX_VDISABLE;
-00854             Posix_CommConfig.c_cc[VSTART] = _POSIX_VDISABLE;
-00855             Posix_CommConfig.c_cc[VSTOP] = _POSIX_VDISABLE;
-00856             Posix_CommConfig.c_cc[VSUSP] = _POSIX_VDISABLE;
-00857             setBaudRate(Settings.BaudRate);
-00858             setDataBits(Settings.DataBits);
-00859             setParity(Settings.Parity);
-00860             setStopBits(Settings.StopBits);
-00861             setFlowControl(Settings.FlowControl);
-00862             setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
-00863             tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00864         } else {
-00865             qDebug("Could not open File! Error code : %d", Posix_File->error());
-00866         }
-00867     }
-00868     UNLOCK_MUTEX();
-00869     return isOpen();
-00870 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Win_QextSerialPort::open (OpenMode  mode  )  [virtual, inherited]
-
-
- -

-Opens a serial port. Note that this function does not specify which device to open. If you need to open a device by name, see 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. -

-Implements QextSerialBase.

00175                                            {
-00176     unsigned long confSize = sizeof(COMMCONFIG);
-00177     Win_CommConfig.dwSize = confSize;
-00178     DWORD dwFlagsAndAttributes = 0;
-00179     if (queryMode() == QextSerialBase::EventDriven)
-00180         dwFlagsAndAttributes += FILE_FLAG_OVERLAPPED;
-00181 
-00182     LOCK_MUTEX();
-00183     if (mode == QIODevice::NotOpen)
-00184         return isOpen();
-00185     if (!isOpen()) {
-00186         /*open the port*/
-00187         Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
-00188                               FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, dwFlagsAndAttributes, NULL);
-00189         if (Win_Handle!=INVALID_HANDLE_VALUE) {
-00190             /*configure port settings*/
-00191             GetCommConfig(Win_Handle, &Win_CommConfig, &confSize);
-00192             GetCommState(Win_Handle, &(Win_CommConfig.dcb));
-00193 
-00194             /*set up parameters*/
-00195             Win_CommConfig.dcb.fBinary=TRUE;
-00196             Win_CommConfig.dcb.fInX=FALSE;
-00197             Win_CommConfig.dcb.fOutX=FALSE;
-00198             Win_CommConfig.dcb.fAbortOnError=FALSE;
-00199             Win_CommConfig.dcb.fNull=FALSE;
-00200             setBaudRate(Settings.BaudRate);
-00201             setDataBits(Settings.DataBits);
-00202             setStopBits(Settings.StopBits);
-00203             setParity(Settings.Parity);
-00204             setFlowControl(Settings.FlowControl);
-00205             setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
-00206             SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00207             
-00208             //init event driven approach
-00209             if (queryMode() == QextSerialBase::EventDriven) {
-00210                 if (!SetCommMask( Win_Handle, EV_TXEMPTY | EV_RXCHAR | EV_DSR)) {
-00211                     qWarning("Failed to set Comm Mask. Error code: %ld", GetLastError());
-00212                     UNLOCK_MUTEX();
-00213                     return false;
-00214                 }
-00215                 overlapThread->start();
-00216             }
-00217             QIODevice::open(mode);
-00218         }
-00219     } else {
-00220         UNLOCK_MUTEX();
-00221         return false;
-00222     }
-00223     UNLOCK_MUTEX();
-00224     return isOpen();
-00225 }
-
-

- -

-

- -

-
- - - - - - - - - -
QextSerialPort & QextSerialPort::operator= (const QextSerialPort s  ) 
-
-
- -

-Overrides the = operator.

00093 {
-00094     return (QextSerialPort&)QextBaseType::operator=(s);
-00095 }
-
-

- -

-

- -

-
- - - - - - - - -
ParityType QextSerialBase::parity (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00123 {
-00124     return Settings.Parity;
-00125 }
-
-

- -

-

- -

-
- - - - - - - - -
QString QextSerialBase::portName (  )  const [virtual, inherited]
-
-
- -

-Returns the name set by setPortName().

00093 {
-00094     return port;
-00095 }
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline, inherited]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline, inherited]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Posix_QextSerialPort::readData (char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Reads 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.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

01099 {
-01100     LOCK_MUTEX();
-01101     int retVal=0;
-01102     retVal=Posix_File->read(data, maxSize);
-01103     if (retVal==-1)
-01104         lastErr=E_READ_FAILED;
-01105     UNLOCK_MUTEX();
-01106 
-01107     return retVal;
-01108 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Win_QextSerialPort::readData (char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Reads 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.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

00347 {
-00348     DWORD retVal;
-00349     
-00350     LOCK_MUTEX();
-00351     
-00352     retVal = 0;
-00353     if (queryMode() == QextSerialBase::EventDriven) {
-00354         COMSTAT Win_ComStat;
-00355         DWORD Win_ErrorMask = 0;
-00356         OVERLAPPED overlapRead;
-00357         overlapRead.Internal = 0;
-00358         overlapRead.InternalHigh = 0;
-00359         overlapRead.Offset = 0;
-00360         overlapRead.OffsetHigh = 0;
-00361         overlapRead.hEvent = CreateEvent(NULL, true, false, NULL);
-00362         ClearCommError(Win_Handle, & Win_ErrorMask, & Win_ComStat);
-00363         //actually in overlapped mode maxSize acts as minSize...
-00364         maxSize = qMin((qint64)Win_ComStat.cbInQue, maxSize);
-00365         if (!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, & overlapRead)) {
-00366             if (GetLastError() == ERROR_IO_PENDING)
-00367                 GetOverlappedResult(Win_Handle, & overlapRead, & retVal, true);
-00368             else {
-00369                 lastErr = E_READ_FAILED;
-00370                 retVal = (DWORD)-1;
-00371             }
-00372         }
-00373         CloseHandle(overlapRead.hEvent);
-00374     } else if (!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, NULL)) {
-00375         lastErr = E_READ_FAILED;
-00376         retVal = (DWORD)-1;
-00377     }
-00378 
-00379     UNLOCK_MUTEX();
-00380 
-00381     return (qint64)retVal;
-00382 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 QextSerialBase::readLine (char *  data,
qint64  maxSize 
) [virtual, inherited]
-
-
- -

-This 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. -

-Reimplemented from QIODevice.

00178 {
-00179     qint64 numBytes = bytesAvailable();
-00180     char* pData = data;
-00181 
-00182     if (maxSize < 2)    //maxSize must be larger than 1
-00183         return -1;
-00184 
-00185     /*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
-00186     while (pData<(data+numBytes) && --maxSize) {
-00187         readData(pData, 1);
-00188         if (*pData++ == '\n') {
-00189             break;
-00190         }
-00191     }
-00192     *pData='\0';
-00193 
-00194     /*return size of data read*/
-00195     return (pData-data);
-00196 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setBaudRate (BaudRateType  baudRate  )  [virtual, inherited]
-
-
- -

-Sets the baud rate of the serial port. Note that not all rates are applicable on all platforms. The following table shows translations of the various baud rate constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.

-

Note:
BAUD76800 may not be supported on all POSIX systems. SGI/IRIX systems do not support BAUD1800.
-
  RATE          Windows Speed   POSIX Speed
-  -----------   -------------   -----------
-   BAUD50                 110          50
-   BAUD75                 110          75
-  *BAUD110                110         110
-   BAUD134                110         134.5
-   BAUD150                110         150
-   BAUD200                110         200
-  *BAUD300                300         300
-  *BAUD600                600         600
-  *BAUD1200              1200        1200
-   BAUD1800              1200        1800
-  *BAUD2400              2400        2400
-  *BAUD4800              4800        4800
-  *BAUD9600              9600        9600
-   BAUD14400            14400        9600
-  *BAUD19200            19200       19200
-  *BAUD38400            38400       38400
-   BAUD56000            56000       38400
-  *BAUD57600            57600       57600
-   BAUD76800            57600       76800
-  *BAUD115200          115200      115200
-   BAUD128000          128000      115200
-   BAUD256000          256000      115200
-
-

-Implements QextSerialBase.

00203 {
-00204     LOCK_MUTEX();
-00205     if (Settings.BaudRate!=baudRate) {
-00206         switch (baudRate) {
-00207             case BAUD14400:
-00208                 Settings.BaudRate=BAUD9600;
-00209                 break;
-00210 
-00211             case BAUD56000:
-00212                 Settings.BaudRate=BAUD38400;
-00213                 break;
-00214 
-00215             case BAUD76800:
-00216 
-00217 #ifndef B76800
-00218                 Settings.BaudRate=BAUD57600;
-00219 #else
-00220                 Settings.BaudRate=baudRate;
-00221 #endif
-00222                 break;
-00223 
-00224             case BAUD128000:
-00225             case BAUD256000:
-00226                 Settings.BaudRate=BAUD115200;
-00227                 break;
-00228 
-00229             default:
-00230                 Settings.BaudRate=baudRate;
-00231                 break;
-00232         }
-00233     }
-00234     if (isOpen()) {
-00235         switch (baudRate) {
-00236 
-00237             /*50 baud*/
-00238             case BAUD50:
-00239                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 50 baud operation.");
-00240 #ifdef CBAUD
-00241                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00242                 Posix_CommConfig.c_cflag|=B50;
-00243 #else
-00244                 cfsetispeed(&Posix_CommConfig, B50);
-00245                 cfsetospeed(&Posix_CommConfig, B50);
-00246 #endif
-00247                 break;
-00248 
-00249             /*75 baud*/
-00250             case BAUD75:
-00251                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 75 baud operation.");
-00252 #ifdef CBAUD
-00253                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00254                 Posix_CommConfig.c_cflag|=B75;
-00255 #else
-00256                 cfsetispeed(&Posix_CommConfig, B75);
-00257                 cfsetospeed(&Posix_CommConfig, B75);
-00258 #endif
-00259                 break;
-00260 
-00261             /*110 baud*/
-00262             case BAUD110:
-00263 #ifdef CBAUD
-00264                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00265                 Posix_CommConfig.c_cflag|=B110;
-00266 #else
-00267                 cfsetispeed(&Posix_CommConfig, B110);
-00268                 cfsetospeed(&Posix_CommConfig, B110);
-00269 #endif
-00270                 break;
-00271 
-00272             /*134.5 baud*/
-00273             case BAUD134:
-00274                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 134.5 baud operation.");
-00275 #ifdef CBAUD
-00276                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00277                 Posix_CommConfig.c_cflag|=B134;
-00278 #else
-00279                 cfsetispeed(&Posix_CommConfig, B134);
-00280                 cfsetospeed(&Posix_CommConfig, B134);
-00281 #endif
-00282                 break;
-00283 
-00284             /*150 baud*/
-00285             case BAUD150:
-00286                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 150 baud operation.");
-00287 #ifdef CBAUD
-00288                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00289                 Posix_CommConfig.c_cflag|=B150;
-00290 #else
-00291                 cfsetispeed(&Posix_CommConfig, B150);
-00292                 cfsetospeed(&Posix_CommConfig, B150);
-00293 #endif
-00294                 break;
-00295 
-00296             /*200 baud*/
-00297             case BAUD200:
-00298                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 200 baud operation.");
-00299 #ifdef CBAUD
-00300                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00301                 Posix_CommConfig.c_cflag|=B200;
-00302 #else
-00303                 cfsetispeed(&Posix_CommConfig, B200);
-00304                 cfsetospeed(&Posix_CommConfig, B200);
-00305 #endif
-00306                 break;
-00307 
-00308             /*300 baud*/
-00309             case BAUD300:
-00310 #ifdef CBAUD
-00311                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00312                 Posix_CommConfig.c_cflag|=B300;
-00313 #else
-00314                 cfsetispeed(&Posix_CommConfig, B300);
-00315                 cfsetospeed(&Posix_CommConfig, B300);
-00316 #endif
-00317                 break;
-00318 
-00319             /*600 baud*/
-00320             case BAUD600:
-00321 #ifdef CBAUD
-00322                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00323                 Posix_CommConfig.c_cflag|=B600;
-00324 #else
-00325                 cfsetispeed(&Posix_CommConfig, B600);
-00326                 cfsetospeed(&Posix_CommConfig, B600);
-00327 #endif
-00328                 break;
-00329 
-00330             /*1200 baud*/
-00331             case BAUD1200:
-00332 #ifdef CBAUD
-00333                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00334                 Posix_CommConfig.c_cflag|=B1200;
-00335 #else
-00336                 cfsetispeed(&Posix_CommConfig, B1200);
-00337                 cfsetospeed(&Posix_CommConfig, B1200);
-00338 #endif
-00339                 break;
-00340 
-00341             /*1800 baud*/
-00342             case BAUD1800:
-00343                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and IRIX do not support 1800 baud operation.");
-00344 #ifdef CBAUD
-00345                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00346                 Posix_CommConfig.c_cflag|=B1800;
-00347 #else
-00348                 cfsetispeed(&Posix_CommConfig, B1800);
-00349                 cfsetospeed(&Posix_CommConfig, B1800);
-00350 #endif
-00351                 break;
-00352 
-00353             /*2400 baud*/
-00354             case BAUD2400:
-00355 #ifdef CBAUD
-00356                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00357                 Posix_CommConfig.c_cflag|=B2400;
-00358 #else
-00359                 cfsetispeed(&Posix_CommConfig, B2400);
-00360                 cfsetospeed(&Posix_CommConfig, B2400);
-00361 #endif
-00362                 break;
-00363 
-00364             /*4800 baud*/
-00365             case BAUD4800:
-00366 #ifdef CBAUD
-00367                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00368                 Posix_CommConfig.c_cflag|=B4800;
-00369 #else
-00370                 cfsetispeed(&Posix_CommConfig, B4800);
-00371                 cfsetospeed(&Posix_CommConfig, B4800);
-00372 #endif
-00373                 break;
-00374 
-00375             /*9600 baud*/
-00376             case BAUD9600:
-00377 #ifdef CBAUD
-00378                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00379                 Posix_CommConfig.c_cflag|=B9600;
-00380 #else
-00381                 cfsetispeed(&Posix_CommConfig, B9600);
-00382                 cfsetospeed(&Posix_CommConfig, B9600);
-00383 #endif
-00384                 break;
-00385 
-00386             /*14400 baud*/
-00387             case BAUD14400:
-00388                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 14400 baud operation.  Switching to 9600 baud.");
-00389 #ifdef CBAUD
-00390                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00391                 Posix_CommConfig.c_cflag|=B9600;
-00392 #else
-00393                 cfsetispeed(&Posix_CommConfig, B9600);
-00394                 cfsetospeed(&Posix_CommConfig, B9600);
-00395 #endif
-00396                 break;
-00397 
-00398             /*19200 baud*/
-00399             case BAUD19200:
-00400 #ifdef CBAUD
-00401                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00402                 Posix_CommConfig.c_cflag|=B19200;
-00403 #else
-00404                 cfsetispeed(&Posix_CommConfig, B19200);
-00405                 cfsetospeed(&Posix_CommConfig, B19200);
-00406 #endif
-00407                 break;
-00408 
-00409             /*38400 baud*/
-00410             case BAUD38400:
-00411 #ifdef CBAUD
-00412                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00413                 Posix_CommConfig.c_cflag|=B38400;
-00414 #else
-00415                 cfsetispeed(&Posix_CommConfig, B38400);
-00416                 cfsetospeed(&Posix_CommConfig, B38400);
-00417 #endif
-00418                 break;
-00419 
-00420             /*56000 baud*/
-00421             case BAUD56000:
-00422                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 56000 baud operation.  Switching to 38400 baud.");
-00423 #ifdef CBAUD
-00424                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00425                 Posix_CommConfig.c_cflag|=B38400;
-00426 #else
-00427                 cfsetispeed(&Posix_CommConfig, B38400);
-00428                 cfsetospeed(&Posix_CommConfig, B38400);
-00429 #endif
-00430                 break;
-00431 
-00432             /*57600 baud*/
-00433             case BAUD57600:
-00434 #ifdef CBAUD
-00435                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00436                 Posix_CommConfig.c_cflag|=B57600;
-00437 #else
-00438                 cfsetispeed(&Posix_CommConfig, B57600);
-00439                 cfsetospeed(&Posix_CommConfig, B57600);
-00440 #endif
-00441                 break;
-00442 
-00443             /*76800 baud*/
-00444             case BAUD76800:
-00445                 TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and some POSIX systems do not support 76800 baud operation.");
-00446 #ifdef CBAUD
-00447                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00448 
-00449 #ifdef B76800
-00450                 Posix_CommConfig.c_cflag|=B76800;
-00451 #else
-00452                 TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud.");
-00453                 Posix_CommConfig.c_cflag|=B57600;
-00454 #endif //B76800
-00455 #else  //CBAUD
-00456 #ifdef B76800
-00457                 cfsetispeed(&Posix_CommConfig, B76800);
-00458                 cfsetospeed(&Posix_CommConfig, B76800);
-00459 #else
-00460                 TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support.  Switching to 57600 baud.");
-00461                 cfsetispeed(&Posix_CommConfig, B57600);
-00462                 cfsetospeed(&Posix_CommConfig, B57600);
-00463 #endif //B76800
-00464 #endif //CBAUD
-00465                 break;
-00466 
-00467             /*115200 baud*/
-00468             case BAUD115200:
-00469 #ifdef CBAUD
-00470                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00471                 Posix_CommConfig.c_cflag|=B115200;
-00472 #else
-00473                 cfsetispeed(&Posix_CommConfig, B115200);
-00474                 cfsetospeed(&Posix_CommConfig, B115200);
-00475 #endif
-00476                 break;
-00477 
-00478             /*128000 baud*/
-00479             case BAUD128000:
-00480                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 128000 baud operation.  Switching to 115200 baud.");
-00481 #ifdef CBAUD
-00482                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00483                 Posix_CommConfig.c_cflag|=B115200;
-00484 #else
-00485                 cfsetispeed(&Posix_CommConfig, B115200);
-00486                 cfsetospeed(&Posix_CommConfig, B115200);
-00487 #endif
-00488                 break;
-00489 
-00490             /*256000 baud*/
-00491             case BAUD256000:
-00492                 TTY_WARNING("Posix_QextSerialPort: POSIX does not support 256000 baud operation.  Switching to 115200 baud.");
-00493 #ifdef CBAUD
-00494                 Posix_CommConfig.c_cflag&=(~CBAUD);
-00495                 Posix_CommConfig.c_cflag|=B115200;
-00496 #else
-00497                 cfsetispeed(&Posix_CommConfig, B115200);
-00498                 cfsetospeed(&Posix_CommConfig, B115200);
-00499 #endif
-00500                 break;
-00501         }
-00502         tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00503     }
-00504     UNLOCK_MUTEX();
-00505 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setBaudRate (BaudRateType  baudRate  )  [virtual, inherited]
-
-
- -

-Sets the baud rate of the serial port. Note that not all rates are applicable on all platforms. The following table shows translations of the various baud rate constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.

  RATE          Windows Speed   POSIX Speed
-  -----------   -------------   -----------
-   BAUD50                 110          50
-   BAUD75                 110          75
-  *BAUD110                110         110
-   BAUD134                110         134.5
-   BAUD150                110         150
-   BAUD200                110         200
-  *BAUD300                300         300
-  *BAUD600                600         600
-  *BAUD1200              1200        1200
-   BAUD1800              1200        1800
-  *BAUD2400              2400        2400
-  *BAUD4800              4800        4800
-  *BAUD9600              9600        9600
-   BAUD14400            14400        9600
-  *BAUD19200            19200       19200
-  *BAUD38400            38400       38400
-   BAUD56000            56000       38400
-  *BAUD57600            57600       57600
-   BAUD76800            57600       76800
-  *BAUD115200          115200      115200
-   BAUD128000          128000      115200
-   BAUD256000          256000      115200
-
-

-Implements QextSerialBase.

00716                                                           {
-00717     LOCK_MUTEX();
-00718     if (Settings.BaudRate!=baudRate) {
-00719         switch (baudRate) {
-00720             case BAUD50:
-00721             case BAUD75:
-00722             case BAUD134:
-00723             case BAUD150:
-00724             case BAUD200:
-00725                 Settings.BaudRate=BAUD110;
-00726                 break;
-00727 
-00728             case BAUD1800:
-00729                 Settings.BaudRate=BAUD1200;
-00730                 break;
-00731 
-00732             case BAUD76800:
-00733                 Settings.BaudRate=BAUD57600;
-00734                 break;
-00735 
-00736             default:
-00737                 Settings.BaudRate=baudRate;
-00738                 break;
-00739         }
-00740     }
-00741     if (isOpen()) {
-00742         switch (baudRate) {
-00743 
-00744             /*50 baud*/
-00745             case BAUD50:
-00746                 TTY_WARNING("Win_QextSerialPort: Windows does not support 50 baud operation.  Switching to 110 baud.");
-00747                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00748                 break;
-00749 
-00750             /*75 baud*/
-00751             case BAUD75:
-00752                 TTY_WARNING("Win_QextSerialPort: Windows does not support 75 baud operation.  Switching to 110 baud.");
-00753                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00754                 break;
-00755 
-00756             /*110 baud*/
-00757             case BAUD110:
-00758                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00759                 break;
-00760 
-00761             /*134.5 baud*/
-00762             case BAUD134:
-00763                 TTY_WARNING("Win_QextSerialPort: Windows does not support 134.5 baud operation.  Switching to 110 baud.");
-00764                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00765                 break;
-00766 
-00767             /*150 baud*/
-00768             case BAUD150:
-00769                 TTY_WARNING("Win_QextSerialPort: Windows does not support 150 baud operation.  Switching to 110 baud.");
-00770                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00771                 break;
-00772 
-00773             /*200 baud*/
-00774             case BAUD200:
-00775                 TTY_WARNING("Win_QextSerialPort: Windows does not support 200 baud operation.  Switching to 110 baud.");
-00776                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00777                 break;
-00778 
-00779             /*300 baud*/
-00780             case BAUD300:
-00781                 Win_CommConfig.dcb.BaudRate=CBR_300;
-00782                 break;
-00783 
-00784             /*600 baud*/
-00785             case BAUD600:
-00786                 Win_CommConfig.dcb.BaudRate=CBR_600;
-00787                 break;
-00788 
-00789             /*1200 baud*/
-00790             case BAUD1200:
-00791                 Win_CommConfig.dcb.BaudRate=CBR_1200;
-00792                 break;
-00793 
-00794             /*1800 baud*/
-00795             case BAUD1800:
-00796                 TTY_WARNING("Win_QextSerialPort: Windows does not support 1800 baud operation.  Switching to 1200 baud.");
-00797                 Win_CommConfig.dcb.BaudRate=CBR_1200;
-00798                 break;
-00799 
-00800             /*2400 baud*/
-00801             case BAUD2400:
-00802                 Win_CommConfig.dcb.BaudRate=CBR_2400;
-00803                 break;
-00804 
-00805             /*4800 baud*/
-00806             case BAUD4800:
-00807                 Win_CommConfig.dcb.BaudRate=CBR_4800;
-00808                 break;
-00809 
-00810             /*9600 baud*/
-00811             case BAUD9600:
-00812                 Win_CommConfig.dcb.BaudRate=CBR_9600;
-00813                 break;
-00814 
-00815             /*14400 baud*/
-00816             case BAUD14400:
-00817                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 14400 baud operation.");
-00818                 Win_CommConfig.dcb.BaudRate=CBR_14400;
-00819                 break;
-00820 
-00821             /*19200 baud*/
-00822             case BAUD19200:
-00823                 Win_CommConfig.dcb.BaudRate=CBR_19200;
-00824                 break;
-00825 
-00826             /*38400 baud*/
-00827             case BAUD38400:
-00828                 Win_CommConfig.dcb.BaudRate=CBR_38400;
-00829                 break;
-00830 
-00831             /*56000 baud*/
-00832             case BAUD56000:
-00833                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 56000 baud operation.");
-00834                 Win_CommConfig.dcb.BaudRate=CBR_56000;
-00835                 break;
-00836 
-00837             /*57600 baud*/
-00838             case BAUD57600:
-00839                 Win_CommConfig.dcb.BaudRate=CBR_57600;
-00840                 break;
-00841 
-00842             /*76800 baud*/
-00843             case BAUD76800:
-00844                 TTY_WARNING("Win_QextSerialPort: Windows does not support 76800 baud operation.  Switching to 57600 baud.");
-00845                 Win_CommConfig.dcb.BaudRate=CBR_57600;
-00846                 break;
-00847 
-00848             /*115200 baud*/
-00849             case BAUD115200:
-00850                 Win_CommConfig.dcb.BaudRate=CBR_115200;
-00851                 break;
-00852 
-00853             /*128000 baud*/
-00854             case BAUD128000:
-00855                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 128000 baud operation.");
-00856                 Win_CommConfig.dcb.BaudRate=CBR_128000;
-00857                 break;
-00858 
-00859             /*256000 baud*/
-00860             case BAUD256000:
-00861                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
-00862                 Win_CommConfig.dcb.BaudRate=CBR_256000;
-00863                 break;
-00864         }
-00865         SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00866     }
-00867     UNLOCK_MUTEX();
-00868 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setDataBits (DataBitsType  dataBits  )  [virtual, inherited]
-
-
- -

-Sets the number of data bits used by the serial port. Possible values of dataBits are:

    DATA_5      5 data bits
-    DATA_6      6 data bits
-    DATA_7      7 data bits
-    DATA_8      8 data bits
-

-

Note:
This function is subject to the following restrictions:
-
5 data bits cannot be used with 2 stop bits.
-
8 data bits cannot be used with space parity on POSIX systems.
- -

-Implements QextSerialBase.

00526 {
-00527     LOCK_MUTEX();
-00528     if (Settings.DataBits!=dataBits) {
-00529         if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
-00530             (Settings.StopBits==STOP_1_5 && dataBits!=DATA_5) ||
-00531             (Settings.Parity==PAR_SPACE && dataBits==DATA_8)) {
-00532         }
-00533         else {
-00534             Settings.DataBits=dataBits;
-00535         }
-00536     }
-00537     if (isOpen()) {
-00538         switch(dataBits) {
-00539 
-00540             /*5 data bits*/
-00541             case DATA_5:
-00542                 if (Settings.StopBits==STOP_2) {
-00543                     TTY_WARNING("Posix_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
-00544                 }
-00545                 else {
-00546                     Settings.DataBits=dataBits;
-00547                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00548                     Posix_CommConfig.c_cflag|=CS5;
-00549                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00550                 }
-00551                 break;
-00552 
-00553             /*6 data bits*/
-00554             case DATA_6:
-00555                 if (Settings.StopBits==STOP_1_5) {
-00556                     TTY_WARNING("Posix_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
-00557                 }
-00558                 else {
-00559                     Settings.DataBits=dataBits;
-00560                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00561                     Posix_CommConfig.c_cflag|=CS6;
-00562                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00563                 }
-00564                 break;
-00565 
-00566             /*7 data bits*/
-00567             case DATA_7:
-00568                 if (Settings.StopBits==STOP_1_5) {
-00569                     TTY_WARNING("Posix_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
-00570                 }
-00571                 else {
-00572                     Settings.DataBits=dataBits;
-00573                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00574                     Posix_CommConfig.c_cflag|=CS7;
-00575                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00576                 }
-00577                 break;
-00578 
-00579             /*8 data bits*/
-00580             case DATA_8:
-00581                 if (Settings.StopBits==STOP_1_5) {
-00582                     TTY_WARNING("Posix_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
-00583                 }
-00584                 else {
-00585                     Settings.DataBits=dataBits;
-00586                     Posix_CommConfig.c_cflag&=(~CSIZE);
-00587                     Posix_CommConfig.c_cflag|=CS8;
-00588                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00589                 }
-00590                 break;
-00591         }
-00592     }
-00593     UNLOCK_MUTEX();
-00594 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setDataBits (DataBitsType  dataBits  )  [virtual, inherited]
-
-
- -

-Sets the number of data bits used by the serial port. Possible values of dataBits are:

    DATA_5      5 data bits
-    DATA_6      6 data bits
-    DATA_7      7 data bits
-    DATA_8      8 data bits
-

-

Note:
This function is subject to the following restrictions:
-
5 data bits cannot be used with 2 stop bits.
-
1.5 stop bits can only be used with 5 data bits.
-
8 data bits cannot be used with space parity on POSIX systems.
- -

-Implements QextSerialBase.

00557                                                           {
-00558     LOCK_MUTEX();
-00559     if (Settings.DataBits!=dataBits) {
-00560         if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
-00561             (Settings.StopBits==STOP_1_5 && dataBits!=DATA_5)) {
-00562         }
-00563         else {
-00564             Settings.DataBits=dataBits;
-00565         }
-00566     }
-00567     if (isOpen()) {
-00568         switch(dataBits) {
-00569 
-00570             /*5 data bits*/
-00571             case DATA_5:
-00572                 if (Settings.StopBits==STOP_2) {
-00573                     TTY_WARNING("Win_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
-00574                 }
-00575                 else {
-00576                     Win_CommConfig.dcb.ByteSize=5;
-00577                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00578                 }
-00579                 break;
-00580 
-00581             /*6 data bits*/
-00582             case DATA_6:
-00583                 if (Settings.StopBits==STOP_1_5) {
-00584                     TTY_WARNING("Win_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
-00585                 }
-00586                 else {
-00587                     Win_CommConfig.dcb.ByteSize=6;
-00588                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00589                 }
-00590                 break;
-00591 
-00592             /*7 data bits*/
-00593             case DATA_7:
-00594                 if (Settings.StopBits==STOP_1_5) {
-00595                     TTY_WARNING("Win_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
-00596                 }
-00597                 else {
-00598                     Win_CommConfig.dcb.ByteSize=7;
-00599                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00600                 }
-00601                 break;
-00602 
-00603             /*8 data bits*/
-00604             case DATA_8:
-00605                 if (Settings.StopBits==STOP_1_5) {
-00606                     TTY_WARNING("Win_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
-00607                 }
-00608                 else {
-00609                     Win_CommConfig.dcb.ByteSize=8;
-00610                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00611                 }
-00612                 break;
-00613         }
-00614     }
-00615     UNLOCK_MUTEX();
-00616 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setDtr (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00993 {
-00994     LOCK_MUTEX();
-00995     if (isOpen()) {
-00996         int status;
-00997         ioctl(Posix_File->handle(), TIOCMGET, &status);
-00998         if (set) {
-00999             status|=TIOCM_DTR;
-01000         }
-01001         else {
-01002             status&=~TIOCM_DTR;
-01003         }
-01004         ioctl(Posix_File->handle(), TIOCMSET, &status);
-01005     }
-01006     UNLOCK_MUTEX();
-01007 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setDtr (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00875                                         {
-00876     LOCK_MUTEX();
-00877     if (isOpen()) {
-00878         if (set) {
-00879             EscapeCommFunction(Win_Handle, SETDTR);
-00880         }
-00881         else {
-00882             EscapeCommFunction(Win_Handle, CLRDTR);
-00883         }
-00884     }
-00885     UNLOCK_MUTEX();
-00886 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setFlowControl (FlowType  flow  )  [virtual, inherited]
-
-
- -

-Sets the flow control used by the port. Possible values of flow are:

    FLOW_OFF            No flow control
-    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
-    FLOW_XONXOFF        Software (XON/XOFF) flow control
-
Note:
FLOW_HARDWARE may not be supported on all versions of UNIX. In cases where it is unsupported, FLOW_HARDWARE is the same as FLOW_OFF.
- -

-Implements QextSerialBase.

00759 {
-00760     LOCK_MUTEX();
-00761     if (Settings.FlowControl!=flow) {
-00762         Settings.FlowControl=flow;
-00763     }
-00764     if (isOpen()) {
-00765         switch(flow) {
-00766 
-00767             /*no flow control*/
-00768             case FLOW_OFF:
-00769                 Posix_CommConfig.c_cflag&=(~CRTSCTS);
-00770                 Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
-00771                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00772                 break;
-00773 
-00774             /*software (XON/XOFF) flow control*/
-00775             case FLOW_XONXOFF:
-00776                 Posix_CommConfig.c_cflag&=(~CRTSCTS);
-00777                 Posix_CommConfig.c_iflag|=(IXON|IXOFF|IXANY);
-00778                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00779                 break;
-00780 
-00781             case FLOW_HARDWARE:
-00782                 Posix_CommConfig.c_cflag|=CRTSCTS;
-00783                 Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
-00784                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00785                 break;
-00786         }
-00787     }
-00788     UNLOCK_MUTEX();
-00789 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setFlowControl (FlowType  flow  )  [virtual, inherited]
-
-
- -

-Sets the flow control used by the port. Possible values of flow are:

    FLOW_OFF            No flow control
-    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
-    FLOW_XONXOFF        Software (XON/XOFF) flow control
-
-

-Implements QextSerialBase.

00445                                                      {
-00446     LOCK_MUTEX();
-00447     if (Settings.FlowControl!=flow) {
-00448         Settings.FlowControl=flow;
-00449     }
-00450     if (isOpen()) {
-00451         switch(flow) {
-00452 
-00453             /*no flow control*/
-00454             case FLOW_OFF:
-00455                 Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
-00456                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
-00457                 Win_CommConfig.dcb.fInX=FALSE;
-00458                 Win_CommConfig.dcb.fOutX=FALSE;
-00459                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00460                 break;
-00461 
-00462             /*software (XON/XOFF) flow control*/
-00463             case FLOW_XONXOFF:
-00464                 Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
-00465                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
-00466                 Win_CommConfig.dcb.fInX=TRUE;
-00467                 Win_CommConfig.dcb.fOutX=TRUE;
-00468                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00469                 break;
-00470 
-00471             case FLOW_HARDWARE:
-00472                 Win_CommConfig.dcb.fOutxCtsFlow=TRUE;
-00473                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_HANDSHAKE;
-00474                 Win_CommConfig.dcb.fInX=FALSE;
-00475                 Win_CommConfig.dcb.fOutX=FALSE;
-00476                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00477                 break;
-00478         }
-00479     }
-00480     UNLOCK_MUTEX();
-00481 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setParity (ParityType  parity  )  [virtual, inherited]
-
-
- -

-Sets the parity associated with the serial port. The possible values of parity are:

    PAR_SPACE       Space Parity
-    PAR_MARK        Mark Parity
-    PAR_NONE        No Parity
-    PAR_EVEN        Even Parity
-    PAR_ODD         Odd Parity
-

-

Note:
This function is subject to the following limitations:
-
POSIX systems do not support mark parity.
-
POSIX systems support space parity only if tricked into doing so, and only with fewer than 8 data bits. Use space parity very carefully with POSIX systems.
- -

-Implements QextSerialBase.

00617 {
-00618     LOCK_MUTEX();
-00619     if (Settings.Parity!=parity) {
-00620         if (parity==PAR_MARK || (parity==PAR_SPACE && Settings.DataBits==DATA_8)) {
-00621         }
-00622         else {
-00623             Settings.Parity=parity;
-00624         }
-00625     }
-00626     if (isOpen()) {
-00627         switch (parity) {
-00628 
-00629             /*space parity*/
-00630             case PAR_SPACE:
-00631                 if (Settings.DataBits==DATA_8) {
-00632                     TTY_PORTABILITY_WARNING("Posix_QextSerialPort:  Space parity is only supported in POSIX with 7 or fewer data bits");
-00633                 }
-00634                 else {
-00635 
-00636                     /*space parity not directly supported - add an extra data bit to simulate it*/
-00637                     Posix_CommConfig.c_cflag&=~(PARENB|CSIZE);
-00638                     switch(Settings.DataBits) {
-00639                         case DATA_5:
-00640                             Settings.DataBits=DATA_6;
-00641                             Posix_CommConfig.c_cflag|=CS6;
-00642                             break;
-00643 
-00644                         case DATA_6:
-00645                             Settings.DataBits=DATA_7;
-00646                             Posix_CommConfig.c_cflag|=CS7;
-00647                             break;
-00648 
-00649                         case DATA_7:
-00650                             Settings.DataBits=DATA_8;
-00651                             Posix_CommConfig.c_cflag|=CS8;
-00652                             break;
-00653 
-00654                         case DATA_8:
-00655                             break;
-00656                     }
-00657                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00658                 }
-00659                 break;
-00660 
-00661             /*mark parity - WINDOWS ONLY*/
-00662             case PAR_MARK:
-00663                 TTY_WARNING("Posix_QextSerialPort: Mark parity is not supported by POSIX.");
-00664                 break;
-00665 
-00666             /*no parity*/
-00667             case PAR_NONE:
-00668                 Posix_CommConfig.c_cflag&=(~PARENB);
-00669                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00670                 break;
-00671 
-00672             /*even parity*/
-00673             case PAR_EVEN:
-00674                 Posix_CommConfig.c_cflag&=(~PARODD);
-00675                 Posix_CommConfig.c_cflag|=PARENB;
-00676                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00677                 break;
-00678 
-00679             /*odd parity*/
-00680             case PAR_ODD:
-00681                 Posix_CommConfig.c_cflag|=(PARENB|PARODD);
-00682                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00683                 break;
-00684         }
-00685     }
-00686     UNLOCK_MUTEX();
-00687 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setParity (ParityType  parity  )  [virtual, inherited]
-
-
- -

-Sets the parity associated with the serial port. The possible values of parity are:

    PAR_SPACE       Space Parity
-    PAR_MARK        Mark Parity
-    PAR_NONE        No Parity
-    PAR_EVEN        Even Parity
-    PAR_ODD         Odd Parity
-
-

-Implements QextSerialBase.

00494                                                     {
-00495     LOCK_MUTEX();
-00496     if (Settings.Parity!=parity) {
-00497         Settings.Parity=parity;
-00498     }
-00499     if (isOpen()) {
-00500         Win_CommConfig.dcb.Parity=(unsigned char)parity;
-00501         switch (parity) {
-00502 
-00503             /*space parity*/
-00504             case PAR_SPACE:
-00505                 if (Settings.DataBits==DATA_8) {
-00506                     TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: Space parity with 8 data bits is not supported by POSIX systems.");
-00507                 }
-00508                 Win_CommConfig.dcb.fParity=TRUE;
-00509                 break;
-00510 
-00511             /*mark parity - WINDOWS ONLY*/
-00512             case PAR_MARK:
-00513                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning:  Mark parity is not supported by POSIX systems");
-00514                 Win_CommConfig.dcb.fParity=TRUE;
-00515                 break;
-00516 
-00517             /*no parity*/
-00518             case PAR_NONE:
-00519                 Win_CommConfig.dcb.fParity=FALSE;
-00520                 break;
-00521 
-00522             /*even parity*/
-00523             case PAR_EVEN:
-00524                 Win_CommConfig.dcb.fParity=TRUE;
-00525                 break;
-00526 
-00527             /*odd parity*/
-00528             case PAR_ODD:
-00529                 Win_CommConfig.dcb.fParity=TRUE;
-00530                 break;
-00531         }
-00532         SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00533     }
-00534     UNLOCK_MUTEX();
-00535 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setPortName (const QString &  name  )  [virtual, inherited]
-
-
- -

-Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".

00084 {
-00085     port = name;
-00086 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setQueryMode (QueryMode  mode  )  [virtual, inherited]
-
-
- -

-Set desired serial communication handling style. You may choose from polling or event driven approach. This function does nothing when port is open; to apply changes port must be reopened.

-In event driven approach read() and write() functions are acting asynchronously. They return immediately and the operation is performed in the background, so they doesn't freeze the calling thread. To determine when operation is finished, QextSerialPort runs separate thread and monitors serial port events. Whenever the event occurs, adequate signal is emitted.

-When polling is set, read() and write() are acting synchronously. Signals are not working in this mode and some functions may not be available. The advantage of polling is that it generates less overhead due to lack of signals emissions and it doesn't start separate thread to monitor events.

-Generally event driven approach is more capable and friendly, although some applications may need as low overhead as possible and then polling comes.

-

Parameters:
- - -
mode query mode.
-
-
00075 {
-00076     _queryMode = mechanism;
-00077 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setRts (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

01015 {
-01016     LOCK_MUTEX();
-01017     if (isOpen()) {
-01018         int status;
-01019         ioctl(Posix_File->handle(), TIOCMGET, &status);
-01020         if (set) {
-01021             status|=TIOCM_RTS;
-01022         }
-01023         else {
-01024             status&=~TIOCM_RTS;
-01025         }
-01026         ioctl(Posix_File->handle(), TIOCMSET, &status);
-01027     }
-01028     UNLOCK_MUTEX();
-01029 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setRts (bool  set = true  )  [virtual, inherited]
-
-
- -

-Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00893                                         {
-00894     LOCK_MUTEX();
-00895     if (isOpen()) {
-00896         if (set) {
-00897             EscapeCommFunction(Win_Handle, SETRTS);
-00898         }
-00899         else {
-00900             EscapeCommFunction(Win_Handle, CLRRTS);
-00901         }
-00902     }
-00903     UNLOCK_MUTEX();
-00904 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::setStopBits (StopBitsType  stopBits  )  [virtual, inherited]
-
-
- -

-Sets the number of stop bits used by the serial port. Possible values of stopBits are:

    STOP_1      1 stop bit
-    STOP_1_5    1.5 stop bits
-    STOP_2      2 stop bits
-
Note:
This function is subject to the following restrictions:
-
2 stop bits cannot be used with 5 data bits.
-
POSIX does not support 1.5 stop bits.
- -

-Implements QextSerialBase.

00706 {
-00707     LOCK_MUTEX();
-00708     if (Settings.StopBits!=stopBits) {
-00709         if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) || stopBits==STOP_1_5) {}
-00710         else {
-00711             Settings.StopBits=stopBits;
-00712         }
-00713     }
-00714     if (isOpen()) {
-00715         switch (stopBits) {
-00716 
-00717             /*one stop bit*/
-00718             case STOP_1:
-00719                 Settings.StopBits=stopBits;
-00720                 Posix_CommConfig.c_cflag&=(~CSTOPB);
-00721                 tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00722                 break;
-00723 
-00724             /*1.5 stop bits*/
-00725             case STOP_1_5:
-00726                 TTY_WARNING("Posix_QextSerialPort: 1.5 stop bit operation is not supported by POSIX.");
-00727                 break;
-00728 
-00729             /*two stop bits*/
-00730             case STOP_2:
-00731                 if (Settings.DataBits==DATA_5) {
-00732                     TTY_WARNING("Posix_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
-00733                 }
-00734                 else {
-00735                     Settings.StopBits=stopBits;
-00736                     Posix_CommConfig.c_cflag|=CSTOPB;
-00737                     tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00738                 }
-00739                 break;
-00740         }
-00741     }
-00742     UNLOCK_MUTEX();
-00743 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setStopBits (StopBitsType  stopBits  )  [virtual, inherited]
-
-
- -

-Sets the number of stop bits used by the serial port. Possible values of stopBits are:

    STOP_1      1 stop bit
-    STOP_1_5    1.5 stop bits
-    STOP_2      2 stop bits
-

-

Note:
This function is subject to the following restrictions:
-
2 stop bits cannot be used with 5 data bits.
-
1.5 stop bits cannot be used with 6 or more data bits.
-
POSIX does not support 1.5 stop bits.
- -

-Implements QextSerialBase.

00636                                                           {
-00637     LOCK_MUTEX();
-00638     if (Settings.StopBits!=stopBits) {
-00639         if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) ||
-00640             (stopBits==STOP_1_5 && Settings.DataBits!=DATA_5)) {
-00641         }
-00642         else {
-00643             Settings.StopBits=stopBits;
-00644         }
-00645     }
-00646     if (isOpen()) {
-00647         switch (stopBits) {
-00648 
-00649             /*one stop bit*/
-00650             case STOP_1:
-00651                 Win_CommConfig.dcb.StopBits=ONESTOPBIT;
-00652                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00653                 break;
-00654 
-00655             /*1.5 stop bits*/
-00656             case STOP_1_5:
-00657                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: 1.5 stop bit operation is not supported by POSIX.");
-00658                 if (Settings.DataBits!=DATA_5) {
-00659                     TTY_WARNING("Win_QextSerialPort: 1.5 stop bits can only be used with 5 data bits");
-00660                 }
-00661                 else {
-00662                     Win_CommConfig.dcb.StopBits=ONE5STOPBITS;
-00663                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00664                 }
-00665                 break;
-00666 
-00667             /*two stop bits*/
-00668             case STOP_2:
-00669                 if (Settings.DataBits==DATA_5) {
-00670                     TTY_WARNING("Win_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
-00671                 }
-00672                 else {
-00673                     Win_CommConfig.dcb.StopBits=TWOSTOPBITS;
-00674                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00675                 }
-00676                 break;
-00677         }
-00678     }
-00679     UNLOCK_MUTEX();
-00680 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
void Posix_QextSerialPort::setTimeout (ulong  sec,
ulong  millisec 
) [virtual, inherited]
-
-
- -

-Sets the read and write timeouts for the port to sec seconds and millisec milliseconds. Note that this is a per-character timeout, i.e. the port will wait this long for each individual character, not for the whole read operation. This timeout also applies to the bytesWaiting() function.

-

Note:
POSIX does not support millisecond-level control for I/O timeout values. Any timeout set using this function will be set to the next lowest tenth of a second for the purposes of detecting read or write timeouts. For example a timeout of 550 milliseconds will be seen by the class as a timeout of 500 milliseconds for the purposes of reading and writing the port. However millisecond-level control is allowed by the select() system call, so for example a 550-millisecond timeout will be seen as 550 milliseconds on POSIX systems for the purpose of detecting available bytes in the read buffer.
- -

-Implements QextSerialBase.

00809 {
-00810     LOCK_MUTEX();
-00811     Settings.Timeout_Sec=sec;
-00812     Settings.Timeout_Millisec=millisec;
-00813     Posix_Copy_Timeout.tv_sec=sec;
-00814     Posix_Copy_Timeout.tv_usec=millisec;
-00815     if (isOpen()) {
-00816         tcgetattr(Posix_File->handle(), &Posix_CommConfig);
-00817         Posix_CommConfig.c_cc[VTIME]=sec*10+millisec/100;
-00818         tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
-00819     }
-00820     UNLOCK_MUTEX();
-00821 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
void Win_QextSerialPort::setTimeout (ulong  sec,
ulong  millisec 
) [virtual, inherited]
-
-
- -

-Sets the read and write timeouts for the port to sec seconds and millisec milliseconds. -

-Implements QextSerialBase.

01005                                                              {
-01006     LOCK_MUTEX();
-01007     Settings.Timeout_Sec=sec;
-01008     Settings.Timeout_Millisec=millisec;
-01009     if(isOpen()) {
-01010         Win_CommTimeouts.ReadIntervalTimeout = sec*1000+millisec;
-01011         Win_CommTimeouts.ReadTotalTimeoutMultiplier = sec*1000+millisec;
-01012         Win_CommTimeouts.ReadTotalTimeoutConstant = 0;
-01013         Win_CommTimeouts.WriteTotalTimeoutMultiplier = sec*1000+millisec;
-01014         Win_CommTimeouts.WriteTotalTimeoutConstant = 0;
-01015         SetCommTimeouts(Win_Handle, &Win_CommTimeouts);
-01016     }
-01017     UNLOCK_MUTEX();
-01018 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Posix_QextSerialPort::size (  )  const [virtual, inherited]
-
-
- -

-This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete QIODevice interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use Posix_QextSerialPort::bytesWaiting() instead. -

-Implements QextSerialBase.

00907 {
-00908     int numBytes;
-00909     if (ioctl(Posix_File->handle(), FIONREAD, &numBytes)<0) {
-00910         numBytes=0;
-00911     }
-00912     return (qint64)numBytes;
-00913 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::size (  )  const [virtual, inherited]
-
-
- -

-This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete QIODevice interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use Win_QextSerialPort::bytesAvailable() instead. -

-Implements QextSerialBase.

00272                                       {
-00273     int availBytes;
-00274     COMSTAT Win_ComStat;
-00275     DWORD Win_ErrorMask=0;
-00276     ClearCommError(Win_Handle, &Win_ErrorMask, &Win_ComStat);
-00277     availBytes = Win_ComStat.cbInQue;
-00278     return (qint64)availBytes;
-00279 }
-
-

- -

-

- -

-
- - - - - - - - -
StopBitsType QextSerialBase::stopBits (  )  const [virtual, inherited]
-
-
- -

-Returns the number of stop bits used by the port. For a list of possible return values, see the definition of the enum StopBitsType.

00133 {
-00134     return Settings.StopBits;
-00135 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::terminateCommWait (  )  [protected, inherited]
-
-
- -

-

00996 {
-00997     SetCommMask(Win_Handle, 0);
-00998 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::translateError (ulong  error  )  [virtual, inherited]
-
-
- -

-Translates a system-specific error code to a QextSerialPort error code. Used internally. -

-Implements QextSerialBase.

00970 {
-00971     switch (error) {
-00972         case EBADF:
-00973         case ENOTTY:
-00974             lastErr=E_INVALID_FD;
-00975             break;
-00976 
-00977         case EINTR:
-00978             lastErr=E_CAUGHT_NON_BLOCKED_SIGNAL;
-00979             break;
-00980 
-00981         case ENOMEM:
-00982             lastErr=E_NO_MEMORY;
-00983             break;
-00984     }
-00985 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::translateError (ulong  error  )  [virtual, inherited]
-
-
- -

-Translates a system-specific error code to a QextSerialPort error code. Used internally. -

-Implements QextSerialBase.

00310                                                    {
-00311     if (error&CE_BREAK) {
-00312         lastErr=E_BREAK_CONDITION;
-00313     }
-00314     else if (error&CE_FRAME) {
-00315         lastErr=E_FRAMING_ERROR;
-00316     }
-00317     else if (error&CE_IOE) {
-00318         lastErr=E_IO_ERROR;
-00319     }
-00320     else if (error&CE_MODE) {
-00321         lastErr=E_INVALID_FD;
-00322     }
-00323     else if (error&CE_OVERRUN) {
-00324         lastErr=E_BUFFER_OVERRUN;
-00325     }
-00326     else if (error&CE_RXPARITY) {
-00327         lastErr=E_RECEIVE_PARITY_ERROR;
-00328     }
-00329     else if (error&CE_RXOVER) {
-00330         lastErr=E_RECEIVE_OVERFLOW;
-00331     }
-00332     else if (error&CE_TXFULL) {
-00333         lastErr=E_TRANSMIT_OVERFLOW;
-00334     }
-00335 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Posix_QextSerialPort::ungetChar (char  c  )  [virtual, inherited]
-
-
- -

-This function is included to implement the full QIODevice interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect. -

-Implements QextSerialBase.

00960 {
-00961     /*meaningless on unbuffered sequential device - return error and print a warning*/
-00962     TTY_WARNING("Posix_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
-00963 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::ungetChar (char  c  )  [virtual, inherited]
-
-
- -

-This function is included to implement the full QIODevice interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect. -

-Implements QextSerialBase.

00430                                          {
-00431 
-00432     /*meaningless on unbuffered sequential device - return error and print a warning*/
-00433     TTY_WARNING("Win_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
-00434 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Win_QextSerialPort::waitForReadyRead (int  msecs  )  [virtual, inherited]
-
-
- -

-

Todo:
implement.
- -

-Reimplemented from QIODevice.

00948 {
-00949     //@todo implement
-00950     return false;
-00951 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Posix_QextSerialPort::writeData (const char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Writes a block of data to the serial port. This function will write maxSize bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

01120 {
-01121     LOCK_MUTEX();
-01122     int retVal=0;
-01123     retVal=Posix_File->write(data, maxSize);
-01124     if (retVal==-1)
-01125        lastErr=E_WRITE_FAILED;
-01126     UNLOCK_MUTEX();
-01127 //    flush();
-01128     return retVal;
-01129 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Win_QextSerialPort::writeData (const char *  data,
qint64  maxSize 
) [protected, virtual, inherited]
-
-
- -

-Writes a block of data to the serial port. This function will write len bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

00394 {
-00395     DWORD retVal;
-00396     
-00397     LOCK_MUTEX();
-00398 
-00399     retVal = 0;
-00400     if (queryMode() == QextSerialBase::EventDriven) {
-00401         bytesToWriteLock->lockForWrite();
-00402         _bytesToWrite += maxSize;
-00403         bytesToWriteLock->unlock();
-00404         overlapWrite.Internal = 0;
-00405         overlapWrite.InternalHigh = 0;
-00406         overlapWrite.Offset = 0;
-00407         overlapWrite.OffsetHigh = 0;
-00408         overlapWrite.hEvent = CreateEvent(NULL, true, false, NULL);
-00409         if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, & overlapWrite)) {
-00410             lastErr = E_WRITE_FAILED;
-00411             retVal = (DWORD)-1;
-00412         } else
-00413             retVal = maxSize;
-00414     } else if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, NULL)) {
-00415         lastErr = E_WRITE_FAILED;
-00416         retVal = (DWORD)-1;
-00417     }
-00418     
-00419     UNLOCK_MUTEX();
-00420 
-00421     return (qint64)retVal;
-00422 }
-
-

- -

-

-


Member Data Documentation

- -
-
- - - - -
qint64 Win_QextSerialPort::_bytesToWrite [protected, inherited]
-
-
- -

-

Todo:
maybe move to QextSerialBase (and implement in POSIX).
- -
-

- -

-
- - - - -
QextSerialBase::QueryMode QextSerialBase::_queryMode [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QextSerialBase::QueryMode QextSerialBase::_queryMode [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QReadWriteLock* Win_QextSerialPort::bytesToWriteLock [protected, inherited]
-
-
- -

-

Todo:
maybe move to QextSerialBase.
- -
-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
OVERLAPPED Win_QextSerialPort::overlap [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
Win_QextSerialThread* Win_QextSerialPort::overlapThread [protected, inherited]
-
-
- -

-

Todo:
maybe move to QextSerialBase (and implement in POSIX).
- -
-

- -

-
- - - - -
OVERLAPPED Win_QextSerialPort::overlapWrite [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct termios Posix_QextSerialPort::Posix_CommConfig [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct timeval Posix_QextSerialPort::Posix_Copy_Timeout [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QFile* Posix_QextSerialPort::Posix_File [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
struct timeval Posix_QextSerialPort::Posix_Timeout [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::threadStartEvent [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::threadTerminateEvent [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
COMMCONFIG Win_QextSerialPort::Win_CommConfig [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
COMMTIMEOUTS Win_QextSerialPort::Win_CommTimeouts [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::Win_Handle [protected, inherited]
-
-
- -

- -

-

-


The documentation for this class was generated from the following files: -
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classQextSerialPort.png b/src/core/gps/qextserialport/html/classQextSerialPort.png deleted file mode 100644 index dc6899556d5d5e90fcf04926f1c8eaf6879224be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1358 zcmeAS@N?(olHy`uVBq!ia0y~yU=#qdf3PqE$!ji4YJrqQfKQ0)|NsAi%>Vxn%%7hy z0muU50|yRNANv0U$Ym@E@(X5gcy=R=fq~_Tr;B4q#hkZuqWk6;2)H^d(CjfByAx$&7c~tu@&!rJt%h zFnr<_$UYJIyob}?-&@Ewh?%7IF@;f+%3=W;nzfksHRUp$}GsIDH!UfZt7fkj| zG&Wq&FW#0RTgcpU+uJ}q`nH52-^Fr=9hN6=SG8z4E-B?I=Q|S1^k|ji8=)i1XQj?^ zy(Q|H!6@`;UdQ(tUwNLpw@g!hq&6Y6-dZ87w?o>|Xk~Pu>845(_mZm~oN^~72K+MF z-zOoo!#VWv?OQ)fRkmz<=W$i$DtpW$MkaxVH_ax+)`6G8KXz#SwUu2cIpO+Gfw=hf zmldNJe^$-47hiw<<>yScC390)JH#BeFf3vf&~395nOPEj`PikK zr<;4+g`}&}ilUe6r9Gd_zVV}k^0`HCp2-MC?`BhBdl2!b>+f+H!Twrlm%bE%o6mZ@ zgM|<43+XW{-4IlX+&AZ+k?F>6*Ke-{7e2XiN`mWdPFBiyy$;`Pg;`IZxmozHja7TQ zD=UZNu)~yP&m#I%W`{TA%$oH}=All1sB>Fwyrc0n_8a+AR;x{u3GY2$va#~Tj z%1kR;{jB=edi{?Kj2sSG4zqU7)p+^&-50N{qj|Y(OC)!1m7GvENfag2&;s(o?|pAC ziaIa^u}=D<7`XJmxA%mX%@@O0@o!-$3|_4DKfE!e=ix7h(}EkP2^HS_uWEUil|%Y) zn3b)7#?y`&yHngJO!_Z9=Z>j|(O*7xDaVdwri)YmmzNaHJtgRM%s`fB3*)Bu|99DV z{5o*PVHLBgKpeMq?}>H)qZuN7d~+A*c%1xym%Y<-{=TJwvKsuGUjOgAUth3#RpF{E zK9;Pvr>ssc5B{gE@9xOQmR0V;z%-%Ek&qv6F;>Pd`mA8O#=j&;88y+^@jscBZYlm^ z*79fu#uJwninYskPP>$|mSZ1#%JoyV1uk2rTF37>ovpq$Zc2r+$EKpIhkO_>o;Jy6 zl*)tGizeDR+N7-483*FMCsNkS@HK#Kie;4X}<3bUA*>=ru&;0fA8}d zZ7;g|D0bb7_EpQ4yr~zjVD2~@ckLd7)7pk7tO5--te4Kbb@7~EzC8SrasO29D_kdB z``%QVGGFrB#Dtc}k)!Kcvcj`9ZQTxj#~DvNWn9JFfY%(d6(kqW^<)nd?q%b z(Ykl`-%p$CzCC=aQ2XaL3tMv1`Z|GM`@SoyD%35OKDKa|_!9owwmjb(592@fH#)ZM z_&-zd;kmOIC%aO}>(C;#&*lLYH079d;#7_}qW;min%Dkpk!3=g(s@ zS+cTH=7@h|$k~KPrAIhsy_8f5^DVEwx<~y$Xdy#UWy9)63{O5Wgdg3>^ - -QextSerialPort: Member List - - - - - - -

Win_QextSerialPort Member List

This is the complete list of members for Win_QextSerialPort, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_bytesToWriteWin_QextSerialPort [protected]
_queryModeQextSerialBase [protected]
aboutToClose()QIODevice
atEnd() const QextSerialBase [virtual]
QIODevice::atEnd()QIODevice
baudRate() const QextSerialBase [virtual]
bytesAvailable()Win_QextSerialPort [virtual]
bytesToWrite() const Win_QextSerialPort [virtual]
QextSerialBase::bytesToWrite()QIODevice
bytesToWriteLockWin_QextSerialPort [protected]
bytesWritten(qint64 bytes)QIODevice
canReadLine()QIODevice
close()Win_QextSerialPort [virtual]
construct()QextSerialBase [virtual]
dataBits() const QextSerialBase [virtual]
dsrChanged(bool status)QextSerialBase [signal]
errorString()QIODevice
EventDriven enum valueQextSerialBase
flowControl() const QextSerialBase [virtual]
flush()Win_QextSerialPort [virtual]
getChar(char *c)QIODevice
init()Win_QextSerialPort [private]
isOpen()QIODevice
isReadable()QIODevice
isSequential() const QextSerialBase [virtual]
QIODevice::isSequential()QIODevice
isTextModeEnabled()QIODevice
isWritable()QIODevice
lastErrQextSerialBase [protected]
lastError() const QextSerialBase [virtual]
lineStatus(void)Win_QextSerialPort [virtual]
monitorCommEvent()Win_QextSerialPort [protected]
mutexQextSerialBase [protected]
open(OpenMode mode)Win_QextSerialPort [virtual]
openMode()QIODevice
operator=(const Win_QextSerialPort &s)Win_QextSerialPort
overlapWin_QextSerialPort [protected]
overlapThreadWin_QextSerialPort [protected]
overlapWriteWin_QextSerialPort [protected]
parity() const QextSerialBase [virtual]
peek(char *data, qint64 maxSize)QIODevice
peek(qint64 maxSize)QIODevice
Polling enum valueQextSerialBase
portQextSerialBase [protected]
portName() const QextSerialBase [virtual]
pos()QIODevice
putChar(char c)QIODevice
QextSerialBase()QextSerialBase
QextSerialBase(const QString &name)QextSerialBase
QIODevice()QIODevice
QIODevice(QObject *parent)QIODevice
queryMode() const QextSerialBase [inline]
QueryMode enum nameQextSerialBase
read(char *data, qint64 maxSize)QIODevice
read(qint64 maxSize)QIODevice
readAll()QIODevice
readData(char *data, qint64 maxSize)Win_QextSerialPort [protected, virtual]
readLine(char *data, qint64 maxSize)QextSerialBase [virtual]
QIODevice::readLine(qint64 maxSize=0)QIODevice
readLineData(char *data, qint64 maxSize)QIODevice
readyRead()QIODevice
reset()QIODevice
seek(qint64 pos)QIODevice
setBaudRate(BaudRateType)Win_QextSerialPort [virtual]
setDataBits(DataBitsType)Win_QextSerialPort [virtual]
setDtr(bool set=true)Win_QextSerialPort [virtual]
setErrorString(const QString &str)QIODevice
setFlowControl(FlowType)Win_QextSerialPort [virtual]
setOpenMode(OpenMode openMode)QIODevice
setParity(ParityType)Win_QextSerialPort [virtual]
setPortName(const QString &name)QextSerialBase [virtual]
setQueryMode(QueryMode mode)QextSerialBase [virtual]
setRts(bool set=true)Win_QextSerialPort [virtual]
setStopBits(StopBitsType)Win_QextSerialPort [virtual]
setTextModeEnabled(bool enabled)QIODevice
setTimeout(ulong, ulong)Win_QextSerialPort [virtual]
SettingsQextSerialBase [protected]
size() const Win_QextSerialPort [virtual]
QIODevice::size()QIODevice
stopBits() const QextSerialBase [virtual]
terminateCommWait()Win_QextSerialPort [protected]
threadStartEventWin_QextSerialPort [protected]
threadTerminateEventWin_QextSerialPort [protected]
translateError(ulong)Win_QextSerialPort [virtual]
ungetChar(char c)Win_QextSerialPort [virtual]
waitForBytesWritten(int msecs)QIODevice
waitForReadyRead(int msecs)Win_QextSerialPort [virtual]
Win_CommConfigWin_QextSerialPort [protected]
Win_CommTimeoutsWin_QextSerialPort [protected]
Win_HandleWin_QextSerialPort [protected]
Win_QextSerialPort()Win_QextSerialPort
Win_QextSerialPort(Win_QextSerialPort const &s)Win_QextSerialPort
Win_QextSerialPort(const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort(const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialPort(const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)Win_QextSerialPort
Win_QextSerialThread classWin_QextSerialPort [friend]
write(const char *data, qint64 maxSize)QIODevice
write(const QByteArray &byteArray)QIODevice
writeData(const char *data, qint64 maxSize)Win_QextSerialPort [protected, virtual]
~QextSerialBase()QextSerialBase [virtual]
~Win_QextSerialPort()Win_QextSerialPort [virtual]


Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classWin__QextSerialPort.html b/src/core/gps/qextserialport/html/classWin__QextSerialPort.html deleted file mode 100644 index bdfb9af69ab5..000000000000 --- a/src/core/gps/qextserialport/html/classWin__QextSerialPort.html +++ /dev/null @@ -1,2528 +0,0 @@ - - -QextSerialPort: Win_QextSerialPort Class Reference - - - - - - -

Win_QextSerialPort Class Reference

#include <win_qextserialport.h> -

-

Inheritance diagram for Win_QextSerialPort: -

- -QextSerialBase -QIODevice -QextBaseType -QextSerialPort - -List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Types

 EventDriven
 Polling
enum  QueryMode { Polling, -EventDriven - }

Signals

void dsrChanged (bool status)

Public Member Functions

 aboutToClose ()
 atEnd ()
virtual bool atEnd () const
virtual BaudRateType baudRate () const
virtual qint64 bytesAvailable ()
 bytesToWrite ()
virtual qint64 bytesToWrite () const
 bytesWritten (qint64 bytes)
 canReadLine ()
virtual void close ()
virtual void construct ()
virtual DataBitsType dataBits () const
 errorString ()
virtual FlowType flowControl () const
virtual void flush ()
 getChar (char *c)
 isOpen ()
 isReadable ()
 isSequential ()
virtual bool isSequential () const
 isTextModeEnabled ()
 isWritable ()
virtual ulong lastError () const
virtual ulong lineStatus (void)
virtual bool open (OpenMode mode)
 openMode ()
Win_QextSerialPortoperator= (const Win_QextSerialPort &s)
virtual ParityType parity () const
 peek (qint64 maxSize)
 peek (char *data, qint64 maxSize)
virtual QString portName () const
 pos ()
 putChar (char c)
QextSerialBase::QueryMode queryMode () const
 read (qint64 maxSize)
 read (char *data, qint64 maxSize)
 readAll ()
 readLine (qint64 maxSize=0)
virtual qint64 readLine (char *data, qint64 maxSize)
 readLineData (char *data, qint64 maxSize)
 readyRead ()
 reset ()
 seek (qint64 pos)
virtual void setBaudRate (BaudRateType)
virtual void setDataBits (DataBitsType)
virtual void setDtr (bool set=true)
 setErrorString (const QString &str)
virtual void setFlowControl (FlowType)
 setOpenMode (OpenMode openMode)
virtual void setParity (ParityType)
virtual void setPortName (const QString &name)
virtual void setQueryMode (QueryMode mode)
virtual void setRts (bool set=true)
virtual void setStopBits (StopBitsType)
 setTextModeEnabled (bool enabled)
virtual void setTimeout (ulong, ulong)
 size ()
virtual qint64 size () const
virtual StopBitsType stopBits () const
virtual void translateError (ulong)
virtual void ungetChar (char c)
 waitForBytesWritten (int msecs)
virtual bool waitForReadyRead (int msecs)
 Win_QextSerialPort (const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)
 Win_QextSerialPort (const PortSettings &settings, QextSerialBase::QueryMode mode=QextSerialBase::Polling)
 Win_QextSerialPort (const QString &name, QextSerialBase::QueryMode mode=QextSerialBase::Polling)
 Win_QextSerialPort (Win_QextSerialPort const &s)
 Win_QextSerialPort ()
 write (const QByteArray &byteArray)
 write (const char *data, qint64 maxSize)
virtual ~Win_QextSerialPort ()

Protected Member Functions

void monitorCommEvent ()
virtual qint64 readData (char *data, qint64 maxSize)
void terminateCommWait ()
virtual qint64 writeData (const char *data, qint64 maxSize)

Protected Attributes

qint64 _bytesToWrite
QextSerialBase::QueryMode _queryMode
QReadWriteLock * bytesToWriteLock
ulong lastErr
QMutex * mutex
OVERLAPPED overlap
Win_QextSerialThreadoverlapThread
OVERLAPPED overlapWrite
QString port
PortSettings Settings
HANDLE threadStartEvent
HANDLE threadTerminateEvent
COMMCONFIG Win_CommConfig
COMMTIMEOUTS Win_CommTimeouts
HANDLE Win_Handle

Private Member Functions

void init ()

Friends

class Win_QextSerialThread
-

Detailed Description

-
Author:
Stefan Sander

-Michal Policht

-A cross-platform serial port class. This class encapsulates the Windows portion of QextSerialPort. The user will be notified of errors and possible portability conflicts at run-time by default - this behavior can be turned off by defining _TTY_NOWARN_ (to turn off all warnings) or _TTY_NOWARN_PORT_ (to turn off portability warnings) in the project. Note that defining _TTY_NOWARN_ also defines _TTY_NOWARN_PORT_.

-

Note:
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.
-
Todo:
rapair copy constructor and assign operator.
- -

-


Member Enumeration Documentation

- -
-
- - - - -
enum QextSerialBase::QueryMode [inherited]
-
-
- -

-

Enumerator:
- - - -
Polling  -
EventDriven  -
-
- -

-Reimplemented in QextSerialPort.

00154                        {
-00155             Polling,
-00156             EventDriven
-00157         };
-
-

- -

-

-


Constructor & Destructor Documentation

- -
-
- - - - - - - - -
Win_QextSerialPort::Win_QextSerialPort (  ) 
-
-
- -

-Default constructor. Note that the name of the device used by a Win_QextSerialPort 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:

-

Constant         Used By         Naming Convention
-----------       -------------   ------------------------
-_TTY_WIN_        Windows         COM1, COM2
-_TTY_IRIX_       SGI/IRIX        /dev/ttyf1, /dev/ttyf2
-_TTY_HPUX_       HP-UX           /dev/tty1p0, /dev/tty2p0
-_TTY_SUN_        SunOS/Solaris   /dev/ttya, /dev/ttyb
-_TTY_DIGITAL_    Digital UNIX    /dev/tty01, /dev/tty02
-_TTY_FREEBSD_    FreeBSD         /dev/ttyd0, /dev/ttyd1
-_TTY_LINUX_      Linux           /dev/ttyS0, /dev/ttyS1
-<none>           Linux           /dev/ttyS0, /dev/ttyS1
-

-This constructor associates the object with the first port on the system, e.g. COM1 for Windows platforms. See the other constructor if you need a port other than the first.

00033                                       :
-00034     QextSerialBase() 
-00035 {
-00036     Win_Handle=INVALID_HANDLE_VALUE;
-00037     init();
-00038 }
-
-
-

- -

-

- -

-
- - - - - - - - - -
Win_QextSerialPort::Win_QextSerialPort (Win_QextSerialPort const &  s  ) 
-
-
- -

-Win_QextSerialPort::Win_QextSerialPort(const Win_QextSerialPort&) Copy constructor.

00043                                                                  :
-00044     QextSerialBase(s.port) 
-00045 {
-00046     Win_Handle=INVALID_HANDLE_VALUE;
-00047     _queryMode = s._queryMode;
-00048     _bytesToWrite = s._bytesToWrite;
-00049     bytesToWriteLock = new QReadWriteLock;
-00050     overlapThread = new Win_QextSerialThread(this);
-00051     memcpy(& overlap, & s.overlap, sizeof(OVERLAPPED));
-00052     memcpy(& overlapWrite, & s.overlapWrite, sizeof(OVERLAPPED));
-00053     setOpenMode(s.openMode());
-00054     lastErr=s.lastErr;
-00055     port = s.port;
-00056     Settings.FlowControl=s.Settings.FlowControl;
-00057     Settings.Parity=s.Settings.Parity;
-00058     Settings.DataBits=s.Settings.DataBits;
-00059     Settings.StopBits=s.Settings.StopBits;
-00060     Settings.BaudRate=s.Settings.BaudRate;
-00061     Win_Handle=s.Win_Handle;
-00062     memcpy(&Win_CommConfig, &s.Win_CommConfig, sizeof(COMMCONFIG));
-00063     memcpy(&Win_CommTimeouts, &s.Win_CommTimeouts, sizeof(COMMTIMEOUTS));
-00064     if (s.overlapThread->isRunning())
-00065         overlapThread->start();
-00066 }
-
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
Win_QextSerialPort::Win_QextSerialPort (const QString &  name,
QextSerialBase::QueryMode  mode = QextSerialBase::Polling 
)
-
-
- -

-

00074                                                                                         :
-00075     QextSerialBase(name) 
-00076 {
-00077     Win_Handle=INVALID_HANDLE_VALUE;
-00078     setQueryMode(mode);
-00079     init();
-00080 }
-
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
Win_QextSerialPort::Win_QextSerialPort (const PortSettings settings,
QextSerialBase::QueryMode  mode = QextSerialBase::Polling 
)
-
-
- -

-

00086                                                                                                  {
-00087     Win_Handle=INVALID_HANDLE_VALUE;
-00088     setBaudRate(settings.BaudRate);
-00089     setDataBits(settings.DataBits);
-00090     setStopBits(settings.StopBits);
-00091     setParity(settings.Parity);
-00092     setFlowControl(settings.FlowControl);
-00093     setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
-00094     setQueryMode(mode);
-00095     init();
-00096 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
Win_QextSerialPort::Win_QextSerialPort (const QString &  name,
const PortSettings settings,
QextSerialBase::QueryMode  mode = QextSerialBase::Polling 
)
-
-
- -

-

00102                                                                                                                        {
-00103     Win_Handle=INVALID_HANDLE_VALUE;
-00104     setPortName(name);
-00105     setBaudRate(settings.BaudRate);
-00106     setDataBits(settings.DataBits);
-00107     setStopBits(settings.StopBits);
-00108     setParity(settings.Parity);
-00109     setFlowControl(settings.FlowControl);
-00110     setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
-00111     setQueryMode(mode);
-00112     init();
-00113 }
-
-

- -

-

- -

-
- - - - - - - - -
Win_QextSerialPort::~Win_QextSerialPort (  )  [virtual]
-
-
- -

-Standard destructor.

00131                                         {
-00132     if (isOpen()) {
-00133         close();
-00134     }
-00135     CloseHandle(overlap.hEvent);
-00136     delete overlapThread;
-00137     delete bytesToWriteLock; 
-00138 }
-
-

- -

-

-


Member Function Documentation

- -
-
- - - - - - - - -
bool QextSerialBase::atEnd (  )  const [virtual, inherited]
-
-
- -

-This function will return true if the input buffer is empty (or on error), and false otherwise. Call QextSerialBase::lastError() for error information.

00164 {
-00165     if (size()) {
-00166         return true;
-00167     }
-00168     return false;
-00169 }
-
-

- -

-

- -

-
- - - - - - - - - -
BaudRateType QextSerialBase::baudRate (void   )  const [virtual, inherited]
-
-
- -

-Returns the baud rate of the serial port. For a list of possible return values see the definition of the enum BaudRateType.

00103 {
-00104     return Settings.BaudRate;
-00105 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::bytesAvailable (  )  [virtual]
-
-
- -

-Returns 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(). -

-Implements QextSerialBase.

00287                                           {
-00288     LOCK_MUTEX();
-00289     if (isOpen()) {
-00290         DWORD Errors;
-00291         COMSTAT Status;
-00292         bool success=ClearCommError(Win_Handle, &Errors, &Status);
-00293         translateError(Errors);
-00294         if (success) {
-00295             lastErr=E_NO_ERROR;
-00296             UNLOCK_MUTEX();
-00297             return Status.cbInQue + QIODevice::bytesAvailable();
-00298         }
-00299         UNLOCK_MUTEX();
-00300         return (unsigned int)-1;
-00301     }
-00302     UNLOCK_MUTEX();
-00303     return 0;
-00304 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::bytesToWrite (  )  const [virtual]
-
-
- -

-Return number of bytes waiting in the buffer. Currently this shows number of bytes queued within write() and before the TX_EMPTY event occured. TX_EMPTY event is created whenever last character in the system buffer was sent.

-

Returns:
number of bytes queued within write(), before the first TX_EMPTY event occur.
-
Warning:
this function may not give you expected results since TX_EMPTY may occur while writing data to the buffer. Eventually some TX_EMPTY events may not be catched.
-
Note:
this function always returns 0 in polling mode.
-
See also:
flush().
-
00954 {
-00955     return _bytesToWrite;
-00956 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::close (  )  [virtual]
-
-
- -

-Closes a serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00233 {
-00234     LOCK_MUTEX();
-00235 
-00236     if (isOpen()) {
-00237         flush();
-00238         if (overlapThread->isRunning()) {
-00239             overlapThread->stop();
-00240             if (QThread::currentThread() != overlapThread)
-00241                 overlapThread->wait();
-00242         }
-00243         if (CloseHandle(Win_Handle))
-00244             Win_Handle = INVALID_HANDLE_VALUE;
-00245         _bytesToWrite = 0;
-00246         QIODevice::close();
-00247     }
-00248 
-00249     UNLOCK_MUTEX();
-00250 }
-
-

- -

-

- -

-
- - - - - - - - -
void QextSerialBase::construct (  )  [virtual, inherited]
-
-
- -

-Common constructor function for setting up default port settings. (115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 0 ms timeout).

00062 {
-00063     Settings.BaudRate=BAUD115200;
-00064     Settings.DataBits=DATA_8;
-00065     Settings.Parity=PAR_NONE;
-00066     Settings.StopBits=STOP_1;
-00067     Settings.FlowControl=FLOW_HARDWARE;
-00068     Settings.Timeout_Sec=0;
-00069     Settings.Timeout_Millisec=0;
-00070     mutex = new QMutex( QMutex::Recursive );
-00071     setOpenMode(QIODevice::NotOpen);
-00072 }
-
-

- -

-

- -

-
- - - - - - - - -
DataBitsType QextSerialBase::dataBits (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00113 {
-00114     return Settings.DataBits;
-00115 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::dsrChanged (bool  status  )  [signal, inherited]
-
-
- -

-This signal is emitted whenever dsr line has changed its state. You may use this signal to check if device is connected.

Parameters:
- - -
status true when DSR signal is on, false otherwise.
-
-
See also:
lineStatus().
- -
-

- -

-
- - - - - - - - -
FlowType QextSerialBase::flowControl (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00143 {
-00144     return Settings.FlowControl;
-00145 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::flush (  )  [virtual]
-
-
- -

-Flushes all pending I/O to the serial port. This function has no effect if the serial port associated with the class is not currently open. -

-Implements QextSerialBase.

00257                                {
-00258     LOCK_MUTEX();
-00259     if (isOpen()) {
-00260         FlushFileBuffers(Win_Handle);
-00261     }
-00262     UNLOCK_MUTEX();
-00263 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::init (  )  [private]
-
-
- -

-This method is a part of constructor.

00116 {
-00117     _bytesToWrite = 0;
-00118     overlap.Internal = 0;
-00119     overlap.InternalHigh = 0;
-00120     overlap.Offset = 0;
-00121     overlap.OffsetHigh = 0;
-00122     overlap.hEvent = CreateEvent(NULL, true, false, NULL);
-00123     overlapThread = new Win_QextSerialThread(this);
-00124     bytesToWriteLock = new QReadWriteLock;
-00125 }
-
-

- -

-

- -

-
- - - - - - - - -
bool QextSerialBase::isSequential (  )  const [virtual, inherited]
-
-
- -

-Returns true if device is sequential, otherwise returns false. Serial port is sequential device so this function always returns true. Check QIODevice::isSequential() documentation for more information.

00154 {
-00155     return true;
-00156 }
-
-

- -

-

- -

-
- - - - - - - - -
ulong QextSerialBase::lastError (  )  const [virtual, inherited]
-
-
- -

-Returns 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:

-

Error                           Explanation
----------------------------     -------------------------------------------------------------
-E_NO_ERROR                      No Error has occured
-E_INVALID_FD                    Invalid file descriptor (port was not opened correctly)
-E_NO_MEMORY                     Unable to allocate memory tables (POSIX)
-E_CAUGHT_NON_BLOCKED_SIGNAL     Caught a non-blocked signal (POSIX)
-E_PORT_TIMEOUT                  Operation timed out (POSIX)
-E_INVALID_DEVICE                The file opened by the port is not a character device (POSIX)
-E_BREAK_CONDITION               The port detected a break condition
-E_FRAMING_ERROR                 The port detected a framing error
-                                (usually caused by incorrect baud rate settings)
-E_IO_ERROR                      There was an I/O error while communicating with the port
-E_BUFFER_OVERRUN                Character buffer overrun
-E_RECEIVE_OVERFLOW              Receive buffer overflow
-E_RECEIVE_PARITY_ERROR          The port detected a parity error in the received data
-E_TRANSMIT_OVERFLOW             Transmit buffer overflow
-E_READ_FAILED                   General read operation failure
-E_WRITE_FAILED                  General write operation failure
-
00225 {
-00226     return lastErr;
-00227 }
-
-

- -

-

- -

-
- - - - - - - - - -
ulong Win_QextSerialPort::lineStatus (void   )  [virtual]
-
-
- -

-returns the line status as stored by the port function. This function will retrieve the states of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned long with specific bits indicating which lines are high. The following constants should be used to examine the states of individual lines:

-

Mask        Line
-------      ----
-LS_CTS      CTS
-LS_DSR      DSR
-LS_DCD      DCD
-LS_RI       RI
-

-This function will return 0 if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00925                                          {
-00926     unsigned long Status=0, Temp=0;
-00927     LOCK_MUTEX();
-00928     if (isOpen()) {
-00929         GetCommModemStatus(Win_Handle, &Temp);
-00930         if (Temp&MS_CTS_ON) {
-00931             Status|=LS_CTS;
-00932         }
-00933         if (Temp&MS_DSR_ON) {
-00934             Status|=LS_DSR;
-00935         }
-00936         if (Temp&MS_RING_ON) {
-00937             Status|=LS_RI;
-00938         }
-00939         if (Temp&MS_RLSD_ON) {
-00940             Status|=LS_DCD;
-00941         }
-00942     }
-00943     UNLOCK_MUTEX();
-00944     return Status;
-00945 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::monitorCommEvent (  )  [protected]
-
-
- -

-

00959 {
-00960     DWORD eventMask = 0;
-00961 
-00962     ResetEvent(overlap.hEvent);
-00963     if (!WaitCommEvent(Win_Handle, & eventMask, & overlap))
-00964         if (GetLastError() != ERROR_IO_PENDING)
-00965             qCritical("WaitCommEvent error %ld\n", GetLastError());
-00966 
-00967     if (WaitForSingleObject(overlap.hEvent, INFINITE) == WAIT_OBJECT_0) {
-00968         //overlap event occured
-00969         DWORD undefined;
-00970         if (!GetOverlappedResult(Win_Handle, & overlap, & undefined, false)) {
-00971             qWarning("Comm event overlapped error %ld", GetLastError());
-00972             return;
-00973         }
-00974         if (eventMask & EV_RXCHAR) {
-00975             if (sender() != this)
-00976                 emit readyRead();
-00977         }
-00978         if (eventMask & EV_TXEMPTY) {
-00979             DWORD numBytes;
-00980             GetOverlappedResult(Win_Handle, & overlapWrite, & numBytes, true);
-00981             bytesToWriteLock->lockForWrite();
-00982             if (sender() != this)
-00983                 emit bytesWritten(bytesToWrite());
-00984             _bytesToWrite = 0;
-00985             bytesToWriteLock->unlock();
-00986         }
-00987         if (eventMask & EV_DSR)
-00988             if (lineStatus() & LS_DSR)
-00989                 emit dsrChanged(true);
-00990             else
-00991                 emit dsrChanged(false);
-00992     }
-00993 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Win_QextSerialPort::open (OpenMode  mode  )  [virtual]
-
-
- -

-Opens a serial port. Note that this function does not specify which device to open. If you need to open a device by name, see 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. -

-Implements QextSerialBase.

00175                                            {
-00176     unsigned long confSize = sizeof(COMMCONFIG);
-00177     Win_CommConfig.dwSize = confSize;
-00178     DWORD dwFlagsAndAttributes = 0;
-00179     if (queryMode() == QextSerialBase::EventDriven)
-00180         dwFlagsAndAttributes += FILE_FLAG_OVERLAPPED;
-00181 
-00182     LOCK_MUTEX();
-00183     if (mode == QIODevice::NotOpen)
-00184         return isOpen();
-00185     if (!isOpen()) {
-00186         /*open the port*/
-00187         Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
-00188                               FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, dwFlagsAndAttributes, NULL);
-00189         if (Win_Handle!=INVALID_HANDLE_VALUE) {
-00190             /*configure port settings*/
-00191             GetCommConfig(Win_Handle, &Win_CommConfig, &confSize);
-00192             GetCommState(Win_Handle, &(Win_CommConfig.dcb));
-00193 
-00194             /*set up parameters*/
-00195             Win_CommConfig.dcb.fBinary=TRUE;
-00196             Win_CommConfig.dcb.fInX=FALSE;
-00197             Win_CommConfig.dcb.fOutX=FALSE;
-00198             Win_CommConfig.dcb.fAbortOnError=FALSE;
-00199             Win_CommConfig.dcb.fNull=FALSE;
-00200             setBaudRate(Settings.BaudRate);
-00201             setDataBits(Settings.DataBits);
-00202             setStopBits(Settings.StopBits);
-00203             setParity(Settings.Parity);
-00204             setFlowControl(Settings.FlowControl);
-00205             setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
-00206             SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00207             
-00208             //init event driven approach
-00209             if (queryMode() == QextSerialBase::EventDriven) {
-00210                 if (!SetCommMask( Win_Handle, EV_TXEMPTY | EV_RXCHAR | EV_DSR)) {
-00211                     qWarning("Failed to set Comm Mask. Error code: %ld", GetLastError());
-00212                     UNLOCK_MUTEX();
-00213                     return false;
-00214                 }
-00215                 overlapThread->start();
-00216             }
-00217             QIODevice::open(mode);
-00218         }
-00219     } else {
-00220         UNLOCK_MUTEX();
-00221         return false;
-00222     }
-00223     UNLOCK_MUTEX();
-00224     return isOpen();
-00225 }
-
-

- -

-

- -

-
- - - - - - - - - -
Win_QextSerialPort & Win_QextSerialPort::operator= (const Win_QextSerialPort s  ) 
-
-
- -

-overrides the = operator

00144                                                                              {
-00145     setOpenMode(s.openMode());
-00146     _queryMode = s._queryMode;
-00147     _bytesToWrite = s._bytesToWrite;
-00148     bytesToWriteLock = new QReadWriteLock;
-00149     overlapThread = new Win_QextSerialThread(this);
-00150     memcpy(& overlap, & s.overlap, sizeof(OVERLAPPED));
-00151     memcpy(& overlapWrite, & s.overlapWrite, sizeof(OVERLAPPED));
-00152     lastErr=s.lastErr;
-00153     port = s.port;
-00154     Settings.FlowControl=s.Settings.FlowControl;
-00155     Settings.Parity=s.Settings.Parity;
-00156     Settings.DataBits=s.Settings.DataBits;
-00157     Settings.StopBits=s.Settings.StopBits;
-00158     Settings.BaudRate=s.Settings.BaudRate;
-00159     Win_Handle=s.Win_Handle;
-00160     memcpy(&Win_CommConfig, &s.Win_CommConfig, sizeof(COMMCONFIG));
-00161     memcpy(&Win_CommTimeouts, &s.Win_CommTimeouts, sizeof(COMMTIMEOUTS));
-00162     if (s.overlapThread->isRunning())
-00163         overlapThread->start();
-00164     return *this;
-00165 }
-
-

- -

-

- -

-
- - - - - - - - -
ParityType QextSerialBase::parity (  )  const [virtual, inherited]
-
-
- -

-Returns 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.

00123 {
-00124     return Settings.Parity;
-00125 }
-
-

- -

-

- -

-
- - - - - - - - -
QString QextSerialBase::portName (  )  const [virtual, inherited]
-
-
- -

-Returns the name set by setPortName().

00093 {
-00094     return port;
-00095 }
-
-

- -

-

- -

-
- - - - - - - - -
QextSerialBase::QueryMode QextSerialBase::queryMode (  )  const [inline, inherited]
-
-
- -

-

00176 { return _queryMode; };
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Win_QextSerialPort::readData (char *  data,
qint64  maxSize 
) [protected, virtual]
-
-
- -

-Reads 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.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

00347 {
-00348     DWORD retVal;
-00349     
-00350     LOCK_MUTEX();
-00351     
-00352     retVal = 0;
-00353     if (queryMode() == QextSerialBase::EventDriven) {
-00354         COMSTAT Win_ComStat;
-00355         DWORD Win_ErrorMask = 0;
-00356         OVERLAPPED overlapRead;
-00357         overlapRead.Internal = 0;
-00358         overlapRead.InternalHigh = 0;
-00359         overlapRead.Offset = 0;
-00360         overlapRead.OffsetHigh = 0;
-00361         overlapRead.hEvent = CreateEvent(NULL, true, false, NULL);
-00362         ClearCommError(Win_Handle, & Win_ErrorMask, & Win_ComStat);
-00363         //actually in overlapped mode maxSize acts as minSize...
-00364         maxSize = qMin((qint64)Win_ComStat.cbInQue, maxSize);
-00365         if (!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, & overlapRead)) {
-00366             if (GetLastError() == ERROR_IO_PENDING)
-00367                 GetOverlappedResult(Win_Handle, & overlapRead, & retVal, true);
-00368             else {
-00369                 lastErr = E_READ_FAILED;
-00370                 retVal = (DWORD)-1;
-00371             }
-00372         }
-00373         CloseHandle(overlapRead.hEvent);
-00374     } else if (!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, NULL)) {
-00375         lastErr = E_READ_FAILED;
-00376         retVal = (DWORD)-1;
-00377     }
-00378 
-00379     UNLOCK_MUTEX();
-00380 
-00381     return (qint64)retVal;
-00382 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 QextSerialBase::readLine (char *  data,
qint64  maxSize 
) [virtual, inherited]
-
-
- -

-This 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. -

-Reimplemented from QIODevice.

00178 {
-00179     qint64 numBytes = bytesAvailable();
-00180     char* pData = data;
-00181 
-00182     if (maxSize < 2)    //maxSize must be larger than 1
-00183         return -1;
-00184 
-00185     /*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
-00186     while (pData<(data+numBytes) && --maxSize) {
-00187         readData(pData, 1);
-00188         if (*pData++ == '\n') {
-00189             break;
-00190         }
-00191     }
-00192     *pData='\0';
-00193 
-00194     /*return size of data read*/
-00195     return (pData-data);
-00196 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setBaudRate (BaudRateType  baudRate  )  [virtual]
-
-
- -

-Sets the baud rate of the serial port. Note that not all rates are applicable on all platforms. The following table shows translations of the various baud rate constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an * are speeds that are usable on both Windows and POSIX.

  RATE          Windows Speed   POSIX Speed
-  -----------   -------------   -----------
-   BAUD50                 110          50
-   BAUD75                 110          75
-  *BAUD110                110         110
-   BAUD134                110         134.5
-   BAUD150                110         150
-   BAUD200                110         200
-  *BAUD300                300         300
-  *BAUD600                600         600
-  *BAUD1200              1200        1200
-   BAUD1800              1200        1800
-  *BAUD2400              2400        2400
-  *BAUD4800              4800        4800
-  *BAUD9600              9600        9600
-   BAUD14400            14400        9600
-  *BAUD19200            19200       19200
-  *BAUD38400            38400       38400
-   BAUD56000            56000       38400
-  *BAUD57600            57600       57600
-   BAUD76800            57600       76800
-  *BAUD115200          115200      115200
-   BAUD128000          128000      115200
-   BAUD256000          256000      115200
-
-

-Implements QextSerialBase.

00716                                                           {
-00717     LOCK_MUTEX();
-00718     if (Settings.BaudRate!=baudRate) {
-00719         switch (baudRate) {
-00720             case BAUD50:
-00721             case BAUD75:
-00722             case BAUD134:
-00723             case BAUD150:
-00724             case BAUD200:
-00725                 Settings.BaudRate=BAUD110;
-00726                 break;
-00727 
-00728             case BAUD1800:
-00729                 Settings.BaudRate=BAUD1200;
-00730                 break;
-00731 
-00732             case BAUD76800:
-00733                 Settings.BaudRate=BAUD57600;
-00734                 break;
-00735 
-00736             default:
-00737                 Settings.BaudRate=baudRate;
-00738                 break;
-00739         }
-00740     }
-00741     if (isOpen()) {
-00742         switch (baudRate) {
-00743 
-00744             /*50 baud*/
-00745             case BAUD50:
-00746                 TTY_WARNING("Win_QextSerialPort: Windows does not support 50 baud operation.  Switching to 110 baud.");
-00747                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00748                 break;
-00749 
-00750             /*75 baud*/
-00751             case BAUD75:
-00752                 TTY_WARNING("Win_QextSerialPort: Windows does not support 75 baud operation.  Switching to 110 baud.");
-00753                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00754                 break;
-00755 
-00756             /*110 baud*/
-00757             case BAUD110:
-00758                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00759                 break;
-00760 
-00761             /*134.5 baud*/
-00762             case BAUD134:
-00763                 TTY_WARNING("Win_QextSerialPort: Windows does not support 134.5 baud operation.  Switching to 110 baud.");
-00764                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00765                 break;
-00766 
-00767             /*150 baud*/
-00768             case BAUD150:
-00769                 TTY_WARNING("Win_QextSerialPort: Windows does not support 150 baud operation.  Switching to 110 baud.");
-00770                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00771                 break;
-00772 
-00773             /*200 baud*/
-00774             case BAUD200:
-00775                 TTY_WARNING("Win_QextSerialPort: Windows does not support 200 baud operation.  Switching to 110 baud.");
-00776                 Win_CommConfig.dcb.BaudRate=CBR_110;
-00777                 break;
-00778 
-00779             /*300 baud*/
-00780             case BAUD300:
-00781                 Win_CommConfig.dcb.BaudRate=CBR_300;
-00782                 break;
-00783 
-00784             /*600 baud*/
-00785             case BAUD600:
-00786                 Win_CommConfig.dcb.BaudRate=CBR_600;
-00787                 break;
-00788 
-00789             /*1200 baud*/
-00790             case BAUD1200:
-00791                 Win_CommConfig.dcb.BaudRate=CBR_1200;
-00792                 break;
-00793 
-00794             /*1800 baud*/
-00795             case BAUD1800:
-00796                 TTY_WARNING("Win_QextSerialPort: Windows does not support 1800 baud operation.  Switching to 1200 baud.");
-00797                 Win_CommConfig.dcb.BaudRate=CBR_1200;
-00798                 break;
-00799 
-00800             /*2400 baud*/
-00801             case BAUD2400:
-00802                 Win_CommConfig.dcb.BaudRate=CBR_2400;
-00803                 break;
-00804 
-00805             /*4800 baud*/
-00806             case BAUD4800:
-00807                 Win_CommConfig.dcb.BaudRate=CBR_4800;
-00808                 break;
-00809 
-00810             /*9600 baud*/
-00811             case BAUD9600:
-00812                 Win_CommConfig.dcb.BaudRate=CBR_9600;
-00813                 break;
-00814 
-00815             /*14400 baud*/
-00816             case BAUD14400:
-00817                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 14400 baud operation.");
-00818                 Win_CommConfig.dcb.BaudRate=CBR_14400;
-00819                 break;
-00820 
-00821             /*19200 baud*/
-00822             case BAUD19200:
-00823                 Win_CommConfig.dcb.BaudRate=CBR_19200;
-00824                 break;
-00825 
-00826             /*38400 baud*/
-00827             case BAUD38400:
-00828                 Win_CommConfig.dcb.BaudRate=CBR_38400;
-00829                 break;
-00830 
-00831             /*56000 baud*/
-00832             case BAUD56000:
-00833                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 56000 baud operation.");
-00834                 Win_CommConfig.dcb.BaudRate=CBR_56000;
-00835                 break;
-00836 
-00837             /*57600 baud*/
-00838             case BAUD57600:
-00839                 Win_CommConfig.dcb.BaudRate=CBR_57600;
-00840                 break;
-00841 
-00842             /*76800 baud*/
-00843             case BAUD76800:
-00844                 TTY_WARNING("Win_QextSerialPort: Windows does not support 76800 baud operation.  Switching to 57600 baud.");
-00845                 Win_CommConfig.dcb.BaudRate=CBR_57600;
-00846                 break;
-00847 
-00848             /*115200 baud*/
-00849             case BAUD115200:
-00850                 Win_CommConfig.dcb.BaudRate=CBR_115200;
-00851                 break;
-00852 
-00853             /*128000 baud*/
-00854             case BAUD128000:
-00855                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 128000 baud operation.");
-00856                 Win_CommConfig.dcb.BaudRate=CBR_128000;
-00857                 break;
-00858 
-00859             /*256000 baud*/
-00860             case BAUD256000:
-00861                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
-00862                 Win_CommConfig.dcb.BaudRate=CBR_256000;
-00863                 break;
-00864         }
-00865         SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00866     }
-00867     UNLOCK_MUTEX();
-00868 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setDataBits (DataBitsType  dataBits  )  [virtual]
-
-
- -

-Sets the number of data bits used by the serial port. Possible values of dataBits are:

    DATA_5      5 data bits
-    DATA_6      6 data bits
-    DATA_7      7 data bits
-    DATA_8      8 data bits
-

-

Note:
This function is subject to the following restrictions:
-
5 data bits cannot be used with 2 stop bits.
-
1.5 stop bits can only be used with 5 data bits.
-
8 data bits cannot be used with space parity on POSIX systems.
- -

-Implements QextSerialBase.

00557                                                           {
-00558     LOCK_MUTEX();
-00559     if (Settings.DataBits!=dataBits) {
-00560         if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
-00561             (Settings.StopBits==STOP_1_5 && dataBits!=DATA_5)) {
-00562         }
-00563         else {
-00564             Settings.DataBits=dataBits;
-00565         }
-00566     }
-00567     if (isOpen()) {
-00568         switch(dataBits) {
-00569 
-00570             /*5 data bits*/
-00571             case DATA_5:
-00572                 if (Settings.StopBits==STOP_2) {
-00573                     TTY_WARNING("Win_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
-00574                 }
-00575                 else {
-00576                     Win_CommConfig.dcb.ByteSize=5;
-00577                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00578                 }
-00579                 break;
-00580 
-00581             /*6 data bits*/
-00582             case DATA_6:
-00583                 if (Settings.StopBits==STOP_1_5) {
-00584                     TTY_WARNING("Win_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
-00585                 }
-00586                 else {
-00587                     Win_CommConfig.dcb.ByteSize=6;
-00588                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00589                 }
-00590                 break;
-00591 
-00592             /*7 data bits*/
-00593             case DATA_7:
-00594                 if (Settings.StopBits==STOP_1_5) {
-00595                     TTY_WARNING("Win_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
-00596                 }
-00597                 else {
-00598                     Win_CommConfig.dcb.ByteSize=7;
-00599                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00600                 }
-00601                 break;
-00602 
-00603             /*8 data bits*/
-00604             case DATA_8:
-00605                 if (Settings.StopBits==STOP_1_5) {
-00606                     TTY_WARNING("Win_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
-00607                 }
-00608                 else {
-00609                     Win_CommConfig.dcb.ByteSize=8;
-00610                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00611                 }
-00612                 break;
-00613         }
-00614     }
-00615     UNLOCK_MUTEX();
-00616 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setDtr (bool  set = true  )  [virtual]
-
-
- -

-Sets DTR line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00875                                         {
-00876     LOCK_MUTEX();
-00877     if (isOpen()) {
-00878         if (set) {
-00879             EscapeCommFunction(Win_Handle, SETDTR);
-00880         }
-00881         else {
-00882             EscapeCommFunction(Win_Handle, CLRDTR);
-00883         }
-00884     }
-00885     UNLOCK_MUTEX();
-00886 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setFlowControl (FlowType  flow  )  [virtual]
-
-
- -

-Sets the flow control used by the port. Possible values of flow are:

    FLOW_OFF            No flow control
-    FLOW_HARDWARE       Hardware (RTS/CTS) flow control
-    FLOW_XONXOFF        Software (XON/XOFF) flow control
-
-

-Implements QextSerialBase.

00445                                                      {
-00446     LOCK_MUTEX();
-00447     if (Settings.FlowControl!=flow) {
-00448         Settings.FlowControl=flow;
-00449     }
-00450     if (isOpen()) {
-00451         switch(flow) {
-00452 
-00453             /*no flow control*/
-00454             case FLOW_OFF:
-00455                 Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
-00456                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
-00457                 Win_CommConfig.dcb.fInX=FALSE;
-00458                 Win_CommConfig.dcb.fOutX=FALSE;
-00459                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00460                 break;
-00461 
-00462             /*software (XON/XOFF) flow control*/
-00463             case FLOW_XONXOFF:
-00464                 Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
-00465                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
-00466                 Win_CommConfig.dcb.fInX=TRUE;
-00467                 Win_CommConfig.dcb.fOutX=TRUE;
-00468                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00469                 break;
-00470 
-00471             case FLOW_HARDWARE:
-00472                 Win_CommConfig.dcb.fOutxCtsFlow=TRUE;
-00473                 Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_HANDSHAKE;
-00474                 Win_CommConfig.dcb.fInX=FALSE;
-00475                 Win_CommConfig.dcb.fOutX=FALSE;
-00476                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00477                 break;
-00478         }
-00479     }
-00480     UNLOCK_MUTEX();
-00481 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setParity (ParityType  parity  )  [virtual]
-
-
- -

-Sets the parity associated with the serial port. The possible values of parity are:

    PAR_SPACE       Space Parity
-    PAR_MARK        Mark Parity
-    PAR_NONE        No Parity
-    PAR_EVEN        Even Parity
-    PAR_ODD         Odd Parity
-
-

-Implements QextSerialBase.

00494                                                     {
-00495     LOCK_MUTEX();
-00496     if (Settings.Parity!=parity) {
-00497         Settings.Parity=parity;
-00498     }
-00499     if (isOpen()) {
-00500         Win_CommConfig.dcb.Parity=(unsigned char)parity;
-00501         switch (parity) {
-00502 
-00503             /*space parity*/
-00504             case PAR_SPACE:
-00505                 if (Settings.DataBits==DATA_8) {
-00506                     TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: Space parity with 8 data bits is not supported by POSIX systems.");
-00507                 }
-00508                 Win_CommConfig.dcb.fParity=TRUE;
-00509                 break;
-00510 
-00511             /*mark parity - WINDOWS ONLY*/
-00512             case PAR_MARK:
-00513                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning:  Mark parity is not supported by POSIX systems");
-00514                 Win_CommConfig.dcb.fParity=TRUE;
-00515                 break;
-00516 
-00517             /*no parity*/
-00518             case PAR_NONE:
-00519                 Win_CommConfig.dcb.fParity=FALSE;
-00520                 break;
-00521 
-00522             /*even parity*/
-00523             case PAR_EVEN:
-00524                 Win_CommConfig.dcb.fParity=TRUE;
-00525                 break;
-00526 
-00527             /*odd parity*/
-00528             case PAR_ODD:
-00529                 Win_CommConfig.dcb.fParity=TRUE;
-00530                 break;
-00531         }
-00532         SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00533     }
-00534     UNLOCK_MUTEX();
-00535 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setPortName (const QString &  name  )  [virtual, inherited]
-
-
- -

-Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".

00084 {
-00085     port = name;
-00086 }
-
-

- -

-

- -

-
- - - - - - - - - -
void QextSerialBase::setQueryMode (QueryMode  mode  )  [virtual, inherited]
-
-
- -

-Set desired serial communication handling style. You may choose from polling or event driven approach. This function does nothing when port is open; to apply changes port must be reopened.

-In event driven approach read() and write() functions are acting asynchronously. They return immediately and the operation is performed in the background, so they doesn't freeze the calling thread. To determine when operation is finished, QextSerialPort runs separate thread and monitors serial port events. Whenever the event occurs, adequate signal is emitted.

-When polling is set, read() and write() are acting synchronously. Signals are not working in this mode and some functions may not be available. The advantage of polling is that it generates less overhead due to lack of signals emissions and it doesn't start separate thread to monitor events.

-Generally event driven approach is more capable and friendly, although some applications may need as low overhead as possible and then polling comes.

-

Parameters:
- - -
mode query mode.
-
-
00075 {
-00076     _queryMode = mechanism;
-00077 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setRts (bool  set = true  )  [virtual]
-
-
- -

-Sets RTS line to the requested state (high by default). This function will have no effect if the port associated with the class is not currently open. -

-Implements QextSerialBase.

00893                                         {
-00894     LOCK_MUTEX();
-00895     if (isOpen()) {
-00896         if (set) {
-00897             EscapeCommFunction(Win_Handle, SETRTS);
-00898         }
-00899         else {
-00900             EscapeCommFunction(Win_Handle, CLRRTS);
-00901         }
-00902     }
-00903     UNLOCK_MUTEX();
-00904 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::setStopBits (StopBitsType  stopBits  )  [virtual]
-
-
- -

-Sets the number of stop bits used by the serial port. Possible values of stopBits are:

    STOP_1      1 stop bit
-    STOP_1_5    1.5 stop bits
-    STOP_2      2 stop bits
-

-

Note:
This function is subject to the following restrictions:
-
2 stop bits cannot be used with 5 data bits.
-
1.5 stop bits cannot be used with 6 or more data bits.
-
POSIX does not support 1.5 stop bits.
- -

-Implements QextSerialBase.

00636                                                           {
-00637     LOCK_MUTEX();
-00638     if (Settings.StopBits!=stopBits) {
-00639         if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) ||
-00640             (stopBits==STOP_1_5 && Settings.DataBits!=DATA_5)) {
-00641         }
-00642         else {
-00643             Settings.StopBits=stopBits;
-00644         }
-00645     }
-00646     if (isOpen()) {
-00647         switch (stopBits) {
-00648 
-00649             /*one stop bit*/
-00650             case STOP_1:
-00651                 Win_CommConfig.dcb.StopBits=ONESTOPBIT;
-00652                 SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00653                 break;
-00654 
-00655             /*1.5 stop bits*/
-00656             case STOP_1_5:
-00657                 TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: 1.5 stop bit operation is not supported by POSIX.");
-00658                 if (Settings.DataBits!=DATA_5) {
-00659                     TTY_WARNING("Win_QextSerialPort: 1.5 stop bits can only be used with 5 data bits");
-00660                 }
-00661                 else {
-00662                     Win_CommConfig.dcb.StopBits=ONE5STOPBITS;
-00663                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00664                 }
-00665                 break;
-00666 
-00667             /*two stop bits*/
-00668             case STOP_2:
-00669                 if (Settings.DataBits==DATA_5) {
-00670                     TTY_WARNING("Win_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
-00671                 }
-00672                 else {
-00673                     Win_CommConfig.dcb.StopBits=TWOSTOPBITS;
-00674                     SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
-00675                 }
-00676                 break;
-00677         }
-00678     }
-00679     UNLOCK_MUTEX();
-00680 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
void Win_QextSerialPort::setTimeout (ulong  sec,
ulong  millisec 
) [virtual]
-
-
- -

-Sets the read and write timeouts for the port to sec seconds and millisec milliseconds. -

-Implements QextSerialBase.

01005                                                              {
-01006     LOCK_MUTEX();
-01007     Settings.Timeout_Sec=sec;
-01008     Settings.Timeout_Millisec=millisec;
-01009     if(isOpen()) {
-01010         Win_CommTimeouts.ReadIntervalTimeout = sec*1000+millisec;
-01011         Win_CommTimeouts.ReadTotalTimeoutMultiplier = sec*1000+millisec;
-01012         Win_CommTimeouts.ReadTotalTimeoutConstant = 0;
-01013         Win_CommTimeouts.WriteTotalTimeoutMultiplier = sec*1000+millisec;
-01014         Win_CommTimeouts.WriteTotalTimeoutConstant = 0;
-01015         SetCommTimeouts(Win_Handle, &Win_CommTimeouts);
-01016     }
-01017     UNLOCK_MUTEX();
-01018 }
-
-

- -

-

- -

-
- - - - - - - - -
qint64 Win_QextSerialPort::size (  )  const [virtual]
-
-
- -

-This function will return the number of bytes waiting in the receive queue of the serial port. It is included primarily to provide a complete QIODevice interface, and will not record errors in the lastErr member (because it is const). This function is also not thread-safe - in multithreading situations, use Win_QextSerialPort::bytesAvailable() instead. -

-Implements QextSerialBase.

00272                                       {
-00273     int availBytes;
-00274     COMSTAT Win_ComStat;
-00275     DWORD Win_ErrorMask=0;
-00276     ClearCommError(Win_Handle, &Win_ErrorMask, &Win_ComStat);
-00277     availBytes = Win_ComStat.cbInQue;
-00278     return (qint64)availBytes;
-00279 }
-
-

- -

-

- -

-
- - - - - - - - -
StopBitsType QextSerialBase::stopBits (  )  const [virtual, inherited]
-
-
- -

-Returns the number of stop bits used by the port. For a list of possible return values, see the definition of the enum StopBitsType.

00133 {
-00134     return Settings.StopBits;
-00135 }
-
-

- -

-

- -

-
- - - - - - - - -
void Win_QextSerialPort::terminateCommWait (  )  [protected]
-
-
- -

-

00996 {
-00997     SetCommMask(Win_Handle, 0);
-00998 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::translateError (ulong  error  )  [virtual]
-
-
- -

-Translates a system-specific error code to a QextSerialPort error code. Used internally. -

-Implements QextSerialBase.

00310                                                    {
-00311     if (error&CE_BREAK) {
-00312         lastErr=E_BREAK_CONDITION;
-00313     }
-00314     else if (error&CE_FRAME) {
-00315         lastErr=E_FRAMING_ERROR;
-00316     }
-00317     else if (error&CE_IOE) {
-00318         lastErr=E_IO_ERROR;
-00319     }
-00320     else if (error&CE_MODE) {
-00321         lastErr=E_INVALID_FD;
-00322     }
-00323     else if (error&CE_OVERRUN) {
-00324         lastErr=E_BUFFER_OVERRUN;
-00325     }
-00326     else if (error&CE_RXPARITY) {
-00327         lastErr=E_RECEIVE_PARITY_ERROR;
-00328     }
-00329     else if (error&CE_RXOVER) {
-00330         lastErr=E_RECEIVE_OVERFLOW;
-00331     }
-00332     else if (error&CE_TXFULL) {
-00333         lastErr=E_TRANSMIT_OVERFLOW;
-00334     }
-00335 }
-
-

- -

-

- -

-
- - - - - - - - - -
void Win_QextSerialPort::ungetChar (char  c  )  [virtual]
-
-
- -

-This function is included to implement the full QIODevice interface, and currently has no purpose within this class. This function is meaningless on an unbuffered device and currently only prints a warning message to that effect. -

-Implements QextSerialBase.

00430                                          {
-00431 
-00432     /*meaningless on unbuffered sequential device - return error and print a warning*/
-00433     TTY_WARNING("Win_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
-00434 }
-
-

- -

-

- -

-
- - - - - - - - - -
bool Win_QextSerialPort::waitForReadyRead (int  msecs  )  [virtual]
-
-
- -

-

Todo:
implement.
- -

-Reimplemented from QIODevice.

00948 {
-00949     //@todo implement
-00950     return false;
-00951 }
-
-

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
qint64 Win_QextSerialPort::writeData (const char *  data,
qint64  maxSize 
) [protected, virtual]
-
-
- -

-Writes a block of data to the serial port. This function will write len bytes from the buffer pointed to by data to the serial port. Return value is the number of bytes actually written, or -1 on error.

-

Warning:
before calling this function ensure that serial port associated with this class is currently open (use isOpen() function to check if port is open).
- -

-Implements QextSerialBase.

00394 {
-00395     DWORD retVal;
-00396     
-00397     LOCK_MUTEX();
-00398 
-00399     retVal = 0;
-00400     if (queryMode() == QextSerialBase::EventDriven) {
-00401         bytesToWriteLock->lockForWrite();
-00402         _bytesToWrite += maxSize;
-00403         bytesToWriteLock->unlock();
-00404         overlapWrite.Internal = 0;
-00405         overlapWrite.InternalHigh = 0;
-00406         overlapWrite.Offset = 0;
-00407         overlapWrite.OffsetHigh = 0;
-00408         overlapWrite.hEvent = CreateEvent(NULL, true, false, NULL);
-00409         if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, & overlapWrite)) {
-00410             lastErr = E_WRITE_FAILED;
-00411             retVal = (DWORD)-1;
-00412         } else
-00413             retVal = maxSize;
-00414     } else if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, & retVal, NULL)) {
-00415         lastErr = E_WRITE_FAILED;
-00416         retVal = (DWORD)-1;
-00417     }
-00418     
-00419     UNLOCK_MUTEX();
-00420 
-00421     return (qint64)retVal;
-00422 }
-
-

- -

-

-


Friends And Related Function Documentation

- -
-
- - - - -
friend class Win_QextSerialThread [friend]
-
-
- -

- -

-

-


Member Data Documentation

- -
-
- - - - -
qint64 Win_QextSerialPort::_bytesToWrite [protected]
-
-
- -

-

Todo:
maybe move to QextSerialBase (and implement in POSIX).
- -
-

- -

-
- - - - -
QextSerialBase::QueryMode QextSerialBase::_queryMode [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QReadWriteLock* Win_QextSerialPort::bytesToWriteLock [protected]
-
-
- -

-

Todo:
maybe move to QextSerialBase.
- -
-

- -

-
- - - - -
ulong QextSerialBase::lastErr [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
QMutex* QextSerialBase::mutex [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
OVERLAPPED Win_QextSerialPort::overlap [protected]
-
-
- -

- -

-

- -

- -
- -

-

Todo:
maybe move to QextSerialBase (and implement in POSIX).
- -
-

- -

-
- - - - -
OVERLAPPED Win_QextSerialPort::overlapWrite [protected]
-
-
- -

- -

-

- -

-
- - - - -
QString QextSerialBase::port [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
PortSettings QextSerialBase::Settings [protected, inherited]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::threadStartEvent [protected]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::threadTerminateEvent [protected]
-
-
- -

- -

-

- -

-
- - - - -
COMMCONFIG Win_QextSerialPort::Win_CommConfig [protected]
-
-
- -

- -

-

- -

-
- - - - -
COMMTIMEOUTS Win_QextSerialPort::Win_CommTimeouts [protected]
-
-
- -

- -

-

- -

-
- - - - -
HANDLE Win_QextSerialPort::Win_Handle [protected]
-
-
- -

- -

-

-


The documentation for this class was generated from the following files: -
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/classWin__QextSerialPort.png b/src/core/gps/qextserialport/html/classWin__QextSerialPort.png deleted file mode 100644 index 68136ec76aa3b393008d6ecffa16c946d837b1ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 863 zcmV-l1EBngP)v=+Vnf!-+no5 z4Im{<1pEVa6!+1@Gx;Fx9$OpP0223zy98nflQ?sfMt&tbjlLY9(=Hl28nVZTI>P;1 zG!1K~N-tt~Gv?aeyYK8CwfCFjEM|7a{7`fH{pfS=$lLAf#`W){FaMrKe_bw5qn{dc zr=51%X{XO%z(yNY*3m>&3SyCB zgXcDUCFUahsL;5eukKrvn8uutOn!;yIqa%qReQs^1 zchcwHk++-cu^*>j`qSTOr=51%=~tn*|K0l6^JCvj&q=W{AqI=0yCvNu#m0nKmn~bR zwKNYHBf)t+_~vIl_<-)BCX%^IHuUcl`iO%V*{Qji>09_PMm@ z#~x0*9&_4hr=52C#c9`LPo-NuHdil_o}jN_T+*9*Y`(ami5fkYM30euhYYovG0TSa z+PO}TB~X!MQe>{=gFSjICH>MGmElrEQ?jHbpSAvQOAC&A%uJ>o^r{})Pq%t3 psU9=W$rPbfFnYb>=hCP2*nd_(Hj0+%tx*5~002ovPDHLkV1mAyqTv7l diff --git a/src/core/gps/qextserialport/html/classes.html b/src/core/gps/qextserialport/html/classes.html deleted file mode 100644 index 82e3fa1b0e38..000000000000 --- a/src/core/gps/qextserialport/html/classes.html +++ /dev/null @@ -1,32 +0,0 @@ - - -QextSerialPort: Alphabetical List - - - - - - -

QextSerialPort Class Index

P | Q | W

- -
  P  
-
  Q  
-
QextSerialBase   QextSerialPort   Win_QextSerialPort   
PortSettings   QextBaseType   QextSerialEnumerator   
  W  
-
Win_QextSerialThread   
Posix_QextSerialPort   QextPortInfo   

P | Q | W

-


Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/doxygen.css b/src/core/gps/qextserialport/html/doxygen.css deleted file mode 100644 index 5d583694ed46..000000000000 --- a/src/core/gps/qextserialport/html/doxygen.css +++ /dev/null @@ -1,358 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { font-weight: bold } -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.nav { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} -A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} -A.codeRef:link { font-weight: normal; color: #0000FF} -A.codeRef:visited { font-weight: normal; color: #0000FF} -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { background: #e8eef2; - font-weight: bold; -} -HR { height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -.directory { font-size: 9pt; font-weight: bold; } -.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } -.directory > h3 { margin-top: 0; } -.directory p { margin: 0px; white-space: nowrap; } -.directory div { display: none; margin: 0px; } -.directory img { vertical-align: -30%; } - diff --git a/src/core/gps/qextserialport/html/doxygen.png b/src/core/gps/qextserialport/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/src/core/gps/qextserialport/html/files.html b/src/core/gps/qextserialport/html/files.html deleted file mode 100644 index a519d650d16a..000000000000 --- a/src/core/gps/qextserialport/html/files.html +++ /dev/null @@ -1,36 +0,0 @@ - - -QextSerialPort: File Index - - - - - - -

QextSerialPort File List

Here is a list of all files with brief descriptions: - - - - - - - - - - -
posix_qextserialport.cpp
posix_qextserialport.h
qextserialbase.cpp
qextserialbase.h
qextserialenumerator.cpp
qextserialenumerator.h
qextserialport.cpp
qextserialport.h
win_qextserialport.cpp
win_qextserialport.h
-
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/ftv2blank.png b/src/core/gps/qextserialport/html/ftv2blank.png deleted file mode 100644 index 493c3c0b615ade5b22027bde773faf2c0e076d66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr2qYM%T@!Q%(o7{me!&ckj8p!u14)&*MwA5S zr6z#mEsk^N1FBF3sc_EE%}vcKVF=AhO-xa6_jFST&P^;T z2~I3aEm8;rVk12R#UIz>f`J-DJY5_^DsClP9B62eH+WF*G=YJMp~A-KbWwke5Kx}M M)78&qol`;+0EL(^EC2ui diff --git a/src/core/gps/qextserialport/html/ftv2doc.png b/src/core/gps/qextserialport/html/ftv2doc.png deleted file mode 100644 index f72999f92172cca6edaa2538286b3e369bec9f49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^5yjnX4egh%q=bp-`Pe zR7&bp17l3gfhmh7Fm(iZ2eAfco|q!h5)>qKG?UBh!IC9QGMbJAHf6IEiufk_g|d7~ qkWqJ4k(|I-Aeo-5U~n{Fnc?dN!3Uwu?t6hQVDNPHb6Mw<&;$TLIZ`G7 diff --git a/src/core/gps/qextserialport/html/ftv2folderclosed.png b/src/core/gps/qextserialport/html/ftv2folderclosed.png deleted file mode 100644 index d6d063440cbf13c4128dacd96661b6fce58abf26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^55uo^`BphW;jCHO69?}tw{JfcdnZ<*@N=4I z?xF5Qc|QYEmKAIZ;JRGVHe=bn*tx1_|J^^vyg*oVM#A1kZlFULJYD@<);T3K0RTgB BWg7qh diff --git a/src/core/gps/qextserialport/html/ftv2folderopen.png b/src/core/gps/qextserialport/html/ftv2folderopen.png deleted file mode 100644 index bbe2c913cf493ee37ad8e3a5132382138d93ac92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^5u(C zYP)Mg%H-DB+{J~>rPn_#pYTax?r*V6ubqGX{lvROQ{?n5_cbm+cQAOm`njxgN@xNA D92;js diff --git a/src/core/gps/qextserialport/html/ftv2lastnode.png b/src/core/gps/qextserialport/html/ftv2lastnode.png deleted file mode 100644 index e7b9ba90cb0cf71c8ce662956bfee7d64cf60fa6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6UZ?L@CkAK|NlRbNhD}!Xpp$P zU;Pg)ksC(lf|p%(p+w2Gk+!>EaktaVt4N i!r*{E4>QXNV>t$uAA#a^n)TVt_DW*G8-srQl%FeIsRSdYm zeDdtWec}u&7@8h5rqv#p7g*pRdwwmugmlS-+cHV~j}#7`Nwj9m+AU)JGGo`8z_}`K z?s#Xsy%Z;1_jl5Y+?Gum8WyK6`MBvup0SAOKJ)mWcHyteJ?WLL>>-)=?&<$H&t5oH Vd!azZ1yDdSc)I$ztaD0e0sw}(dc*(# diff --git a/src/core/gps/qextserialport/html/ftv2mlastnode.png b/src/core/gps/qextserialport/html/ftv2mlastnode.png deleted file mode 100644 index 09ceb6adb01054ce799ad20c0e818ab9272f2df2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr#LU3Jc=+&fg$isFPOjJ*AaIJQGm()YSDb0rfjgNefXW#>UHx3vIVCg! E0ORy6RsaA1 diff --git a/src/core/gps/qextserialport/html/ftv2mnode.png b/src/core/gps/qextserialport/html/ftv2mnode.png deleted file mode 100644 index 3254c05112199fbc80aad313611c58a5b388792d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6Ub2s@Ck7}aNq!ti3c<^Gz9OH zn+a6GSQ6wH%;50sMjDVKR^l2_5}cn_Ql40p%8;I!W>k=uu3)5RqGz-?&YcgaLd(;| zF{I*Fa>4?=2W(CyOv{5p*uLi}G<-ambjQcb>&~4!CzK3KXWY6d$*{eWU47N}X+XCz OFnGH9xvXPg)ksC(lf|p%(p+w2Gk+y>EaktaVt4N l!r*{E4>Lv;t diff --git a/src/core/gps/qextserialport/html/ftv2plastnode.png b/src/core/gps/qextserialport/html/ftv2plastnode.png deleted file mode 100644 index 0b07e00913d8069ebbb51bd7fd6d70d8bba88f75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr#LU3Jc=+&MJ diff --git a/src/core/gps/qextserialport/html/ftv2pnode.png b/src/core/gps/qextserialport/html/ftv2pnode.png deleted file mode 100644 index 2001b797ba2b98a4127f1d3efca64aef08bf6d51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6Ub2s@Ck7}aNq!ti3c<^Gz9OH zn+a6GSQ6wH%;50sMjDVKR^l2_5}cn_Ql40p%8;I!W>k=uu3)5RqGz-?&Ycga!obtT zF{I*Fa>4?=2W(Dkd1@Anj~<0|oqBMOmqox%*rjK-r)THv+0v0L%h-agt(X~hWwYzA SIxU|Ma*U^|pUXO@geCywmoZiV diff --git a/src/core/gps/qextserialport/html/ftv2vertline.png b/src/core/gps/qextserialport/html/ftv2vertline.png deleted file mode 100644 index b330f3a33c0085c183ff39fc56b1b274160c1da0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6UZ?L@CkAK|NlRbNhD}!Xpp$P zU;Pg)ksC(lf|p%(p+w2Gqgt>EaktaVt4N e!r*{^G#i7W2*a|cHZQDzQVgE1elF{r5}E+)J2fZ( diff --git a/src/core/gps/qextserialport/html/functions.html b/src/core/gps/qextserialport/html/functions.html deleted file mode 100644 index 62613713350a..000000000000 --- a/src/core/gps/qextserialport/html/functions.html +++ /dev/null @@ -1,193 +0,0 @@ - - -QextSerialPort: Class Members - - - - - - - -
- -
- -

-Here is a list of all class members with links to the classes they belong to: -

-

- _ -

-

- a -

-

- b -

-

- c -

-

- d -

-

- e -

-

- f -

-

- g -

-

- i -

-

- l -

-

- m -

-

- o -

-

- p -

-

- q -

-

- r -

-

- s -

-

- t -

-

- u -

-

- w -

-

- ~ -

-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/functions_func.html b/src/core/gps/qextserialport/html/functions_func.html deleted file mode 100644 index 278da7d3a4c6..000000000000 --- a/src/core/gps/qextserialport/html/functions_func.html +++ /dev/null @@ -1,153 +0,0 @@ - - -QextSerialPort: Class Members - Functions - - - - - - - -
- -
- -

-  -

-

- a -

-

- b -

-

- c -

-

- d -

-

- f -

-

- g -

-

- i -

-

- l -

-

- m -

-

- o -

-

- p -

-

- q -

-

- r -

-

- s -

-

- t -

-

- u -

-

- w -

-

- ~ -

-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/functions_vars.html b/src/core/gps/qextserialport/html/functions_vars.html deleted file mode 100644 index 227ba7e03b08..000000000000 --- a/src/core/gps/qextserialport/html/functions_vars.html +++ /dev/null @@ -1,116 +0,0 @@ - - -QextSerialPort: Class Members - Variables - - - - - - - -
- -
- -

-  -

-

- _ -

-

- b -

-

- d -

-

- e -

-

- f -

-

- l -

-

- m -

-

- o -

-

- p -

-

- q -

-

- s -

-

- t -

-

- w -

-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/globals.html b/src/core/gps/qextserialport/html/globals.html deleted file mode 100644 index 64c80f1b6651..000000000000 --- a/src/core/gps/qextserialport/html/globals.html +++ /dev/null @@ -1,121 +0,0 @@ - - -QextSerialPort: Class Members - - - - - - - -
- -
- -

-Here is a list of all file members with links to the files they belong to: -

-

- b -

-

- d -

-

- f -

-

- h -

-

- i -

-

- l -

-

- n -

-

- p -

-

- s -

-

- w -

-
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/globals_enum.html b/src/core/gps/qextserialport/html/globals_enum.html deleted file mode 100644 index d51b6f4c6a75..000000000000 --- a/src/core/gps/qextserialport/html/globals_enum.html +++ /dev/null @@ -1,42 +0,0 @@ - - -QextSerialPort: Class Members - - - - - - - -  -

-

-
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/globals_eval.html b/src/core/gps/qextserialport/html/globals_eval.html deleted file mode 100644 index 29072fa12a1a..000000000000 --- a/src/core/gps/qextserialport/html/globals_eval.html +++ /dev/null @@ -1,111 +0,0 @@ - - -QextSerialPort: Class Members - - - - - - - -
- -
- -

-  -

-

- b -

-

- d -

-

- f -

-

- h -

-

- i -

-

- l -

-

- p -

-

- s -

-

- w -

-
Generated on Wed Sep 5 19:31:22 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/hierarchy.html b/src/core/gps/qextserialport/html/hierarchy.html deleted file mode 100644 index 8bbee07fedb7..000000000000 --- a/src/core/gps/qextserialport/html/hierarchy.html +++ /dev/null @@ -1,49 +0,0 @@ - - -QextSerialPort: Hierarchical Index - - - - - - -

QextSerialPort Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: -
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/index.html b/src/core/gps/qextserialport/html/index.html deleted file mode 100644 index 0a2c764b03a1..000000000000 --- a/src/core/gps/qextserialport/html/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - -QextSerialPort - - - - - diff --git a/src/core/gps/qextserialport/html/installdox b/src/core/gps/qextserialport/html/installdox deleted file mode 100644 index 20567ffa14d9..000000000000 --- a/src/core/gps/qextserialport/html/installdox +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/perl - -%subst = ( "qiodevice.tag", ""); -$quiet = 0; - -if (open(F,"search.cfg")) -{ - $_= ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_; - $_= ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_; -} - -while ( @ARGV ) { - $_ = shift @ARGV; - if ( s/^-// ) { - if ( /^l(.*)/ ) { - $v = ($1 eq "") ? shift @ARGV : $1; - ($v =~ /\/$/) || ($v .= "/"); - $_ = $v; - if ( /(.+)\@(.+)/ ) { - if ( exists $subst{$1} ) { - $subst{$1} = $2; - } else { - print STDERR "Unknown tag file $1 given with option -l\n"; - &usage(); - } - } else { - print STDERR "Argument $_ is invalid for option -l\n"; - &usage(); - } - } - elsif ( /^q/ ) { - $quiet = 1; - } - elsif ( /^\?|^h/ ) { - &usage(); - } - else { - print STDERR "Illegal option -$_\n"; - &usage(); - } - } - else { - push (@files, $_ ); - } -} - -foreach $sub (keys %subst) -{ - if ( $subst{$sub} eq "" ) - { - print STDERR "No substitute given for tag file `$sub'\n"; - &usage(); - } - elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) - { - print "Substituting $subst{$sub} for each occurence of tag file $sub\n"; - } -} - -if ( ! @files ) { - if (opendir(D,".")) { - foreach $file ( readdir(D) ) { - $match = ".html"; - next if ( $file =~ /^\.\.?$/ ); - ($file =~ /$match/) && (push @files, $file); - ($file =~ "tree.js") && (push @files, $file); - } - closedir(D); - } -} - -if ( ! @files ) { - print STDERR "Warning: No input files given and none found!\n"; -} - -foreach $f (@files) -{ - if ( ! $quiet ) { - print "Editing: $f...\n"; - } - $oldf = $f; - $f .= ".bak"; - unless (rename $oldf,$f) { - print STDERR "Error: cannot rename file $oldf\n"; - exit 1; - } - if (open(F,"<$f")) { - unless (open(G,">$oldf")) { - print STDERR "Error: opening file $oldf for writing\n"; - exit 1; - } - if ($oldf ne "tree.js") { - while () { - s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; - print G "$_"; - } - } - else { - while () { - s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; - print G "$_"; - } - } - } - else { - print STDERR "Warning file $f does not exist\n"; - } - unlink $f; -} - -sub usage { - print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; - print STDERR "Options:\n"; - print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; - print STDERR " -q Quiet mode\n\n"; - exit 1; -} diff --git a/src/core/gps/qextserialport/html/main.html b/src/core/gps/qextserialport/html/main.html deleted file mode 100644 index e4c04cf9e41c..000000000000 --- a/src/core/gps/qextserialport/html/main.html +++ /dev/null @@ -1,24 +0,0 @@ - - -QextSerialPort: QextSerialPort - - - - - -

QextSerialPort

-

-

1.2 beta

A cross-platform serial port library.
- QextSerialPort encapsulates a serial port on both POSIX and Windows systems.
- QextSerialEnumerator enumerates ports currently available in the system.
- Check Porting Page for sensitive changes since last release.
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/mainpage_8dox.html b/src/core/gps/qextserialport/html/mainpage_8dox.html deleted file mode 100644 index 8c046a705bf2..000000000000 --- a/src/core/gps/qextserialport/html/mainpage_8dox.html +++ /dev/null @@ -1,27 +0,0 @@ - - -QextSerialPort: doc/mainpage.dox File Reference - - - - - - -

doc/mainpage.dox File Reference

- -
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/posix__qextserialport_8cpp.html b/src/core/gps/qextserialport/html/posix__qextserialport_8cpp.html deleted file mode 100644 index a93f8088f017..000000000000 --- a/src/core/gps/qextserialport/html/posix__qextserialport_8cpp.html +++ /dev/null @@ -1,27 +0,0 @@ - - -QextSerialPort: posix_qextserialport.cpp File Reference - - - - - - -

posix_qextserialport.cpp File Reference

- -
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/posix__qextserialport_8h.html b/src/core/gps/qextserialport/html/posix__qextserialport_8h.html deleted file mode 100644 index 0da06925d862..000000000000 --- a/src/core/gps/qextserialport/html/posix__qextserialport_8h.html +++ /dev/null @@ -1,30 +0,0 @@ - - -QextSerialPort: posix_qextserialport.h File Reference - - - - - - -

posix_qextserialport.h File Reference

- - - - -

Classes

class  Posix_QextSerialPort
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/qextbasetype_8dox.html b/src/core/gps/qextserialport/html/qextbasetype_8dox.html deleted file mode 100644 index 68c062ad1ef6..000000000000 --- a/src/core/gps/qextserialport/html/qextbasetype_8dox.html +++ /dev/null @@ -1,30 +0,0 @@ - - -QextSerialPort: doc/qextbasetype.dox File Reference - - - - - - -

doc/qextbasetype.dox File Reference

- - - - -

Classes

class  QextBaseType
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/qextserialbase_8cpp.html b/src/core/gps/qextserialport/html/qextserialbase_8cpp.html deleted file mode 100644 index 4e8d17b8ae92..000000000000 --- a/src/core/gps/qextserialport/html/qextserialbase_8cpp.html +++ /dev/null @@ -1,27 +0,0 @@ - - -QextSerialPort: qextserialbase.cpp File Reference - - - - - - -

qextserialbase.cpp File Reference

- -
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/qextserialbase_8h.html b/src/core/gps/qextserialport/html/qextserialbase_8h.html deleted file mode 100644 index 8be4f41535f0..000000000000 --- a/src/core/gps/qextserialport/html/qextserialbase_8h.html +++ /dev/null @@ -1,373 +0,0 @@ - - -QextSerialPort: qextserialbase.h File Reference - - - - - - -

qextserialbase.h File Reference

- - - - - - - - - - - - - - - - - - - -

Classes

struct  PortSettings
class  QextSerialBase

Enumerations

enum  BaudRateType {
-  BAUD50, -BAUD75, -BAUD110, -BAUD134, -
-  BAUD150, -BAUD200, -BAUD300, -BAUD600, -
-  BAUD1200, -BAUD1800, -BAUD2400, -BAUD4800, -
-  BAUD9600, -BAUD14400, -BAUD19200, -BAUD38400, -
-  BAUD56000, -BAUD57600, -BAUD76800, -BAUD115200, -
-  BAUD128000, -BAUD256000 -
- }
enum  DataBitsType { DATA_5, -DATA_6, -DATA_7, -DATA_8 - }
enum  FlowType { FLOW_OFF, -FLOW_HARDWARE, -FLOW_XONXOFF - }
enum  NamingConvention {
-  WIN_NAMES, -IRIX_NAMES, -HPUX_NAMES, -SUN_NAMES, -
-  DIGITAL_NAMES, -FREEBSD_NAMES, -LINUX_NAMES -
- }
enum  ParityType {
-  PAR_NONE, -PAR_ODD, -PAR_EVEN, -PAR_MARK, -
-  PAR_SPACE -
- }
enum  StopBitsType { STOP_1, -STOP_1_5, -STOP_2 - }
-

Enumeration Type Documentation

- -
-
- - - - -
enum BaudRateType
-
-
- -

-

Enumerator:
- - - - - - - - - - - - - - - - - - - - - - - -
BAUD50  -
BAUD75  -
BAUD110  -
BAUD134  -
BAUD150  -
BAUD200  -
BAUD300  -
BAUD600  -
BAUD1200  -
BAUD1800  -
BAUD2400  -
BAUD4800  -
BAUD9600  -
BAUD14400  -
BAUD19200  -
BAUD38400  -
BAUD56000  -
BAUD57600  -
BAUD76800  -
BAUD115200  -
BAUD128000  -
BAUD256000  -
-
-
00073 {
-00074     BAUD50,                //POSIX ONLY
-00075     BAUD75,                //POSIX ONLY
-00076     BAUD110,
-00077     BAUD134,               //POSIX ONLY
-00078     BAUD150,               //POSIX ONLY
-00079     BAUD200,               //POSIX ONLY
-00080     BAUD300,
-00081     BAUD600,
-00082     BAUD1200,
-00083     BAUD1800,              //POSIX ONLY
-00084     BAUD2400,
-00085     BAUD4800,
-00086     BAUD9600,
-00087     BAUD14400,             //WINDOWS ONLY
-00088     BAUD19200,
-00089     BAUD38400,
-00090     BAUD56000,             //WINDOWS ONLY
-00091     BAUD57600,
-00092     BAUD76800,             //POSIX ONLY
-00093     BAUD115200,
-00094     BAUD128000,            //WINDOWS ONLY
-00095     BAUD256000             //WINDOWS ONLY
-00096 };
-
-

- -

-

- -

-
- - - - -
enum DataBitsType
-
-
- -

-

Enumerator:
- - - - - -
DATA_5  -
DATA_6  -
DATA_7  -
DATA_8  -
-
-
00099 {
-00100     DATA_5,
-00101     DATA_6,
-00102     DATA_7,
-00103     DATA_8
-00104 };
-
-

- -

-

- -

-
- - - - -
enum FlowType
-
-
- -

-

Enumerator:
- - - - -
FLOW_OFF  -
FLOW_HARDWARE  -
FLOW_XONXOFF  -
-
-
00123 {
-00124     FLOW_OFF,
-00125     FLOW_HARDWARE,
-00126     FLOW_XONXOFF
-00127 };
-
-

- -

-

- -

-
- - - - -
enum NamingConvention
-
-
- -

-Enums for port settings.

Enumerator:
- - - - - - - - -
WIN_NAMES  -
IRIX_NAMES  -
HPUX_NAMES  -
SUN_NAMES  -
DIGITAL_NAMES  -
FREEBSD_NAMES  -
LINUX_NAMES  -
-
-
00062 {
-00063     WIN_NAMES,
-00064     IRIX_NAMES,
-00065     HPUX_NAMES,
-00066     SUN_NAMES,
-00067     DIGITAL_NAMES,
-00068     FREEBSD_NAMES,
-00069     LINUX_NAMES
-00070 };
-
-

- -

-

- -

-
- - - - -
enum ParityType
-
-
- -

-

Enumerator:
- - - - - - -
PAR_NONE  -
PAR_ODD  -
PAR_EVEN  -
PAR_MARK  -
PAR_SPACE  -
-
-
00107 {
-00108     PAR_NONE,
-00109     PAR_ODD,
-00110     PAR_EVEN,
-00111     PAR_MARK,               //WINDOWS ONLY
-00112     PAR_SPACE
-00113 };
-
-

- -

-

- -

-
- - - - -
enum StopBitsType
-
-
- -

-

Enumerator:
- - - - -
STOP_1  -
STOP_1_5  -
STOP_2  -
-
-
00116 {
-00117     STOP_1,
-00118     STOP_1_5,               //WINDOWS ONLY
-00119     STOP_2
-00120 };
-
-

- -

-

-


Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/qextserialport_8cpp.html b/src/core/gps/qextserialport/html/qextserialport_8cpp.html deleted file mode 100644 index e9d57ceed49f..000000000000 --- a/src/core/gps/qextserialport/html/qextserialport_8cpp.html +++ /dev/null @@ -1,27 +0,0 @@ - - -QextSerialPort: qextserialport.cpp File Reference - - - - - - -

qextserialport.cpp File Reference

- -
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/qextserialport_8h.html b/src/core/gps/qextserialport/html/qextserialport_8h.html deleted file mode 100644 index 7c09f86f6f0a..000000000000 --- a/src/core/gps/qextserialport/html/qextserialport_8h.html +++ /dev/null @@ -1,30 +0,0 @@ - - -QextSerialPort: qextserialport.h File Reference - - - - - - -

qextserialport.h File Reference

- - - - -

Classes

class  QextSerialPort
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/structPortSettings-members.html b/src/core/gps/qextserialport/html/structPortSettings-members.html deleted file mode 100644 index 2de4d3149d7f..000000000000 --- a/src/core/gps/qextserialport/html/structPortSettings-members.html +++ /dev/null @@ -1,34 +0,0 @@ - - -QextSerialPort: Member List - - - - - - -

PortSettings Member List

This is the complete list of members for PortSettings, including all inherited members.

- - - - - - - -
BaudRatePortSettings
DataBitsPortSettings
FlowControlPortSettings
ParityPortSettings
StopBitsPortSettings
Timeout_MillisecPortSettings
Timeout_SecPortSettings


Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/structPortSettings.html b/src/core/gps/qextserialport/html/structPortSettings.html deleted file mode 100644 index f79e358f848c..000000000000 --- a/src/core/gps/qextserialport/html/structPortSettings.html +++ /dev/null @@ -1,157 +0,0 @@ - - -QextSerialPort: PortSettings Struct Reference - - - - - - -

PortSettings Struct Reference

#include <qextserialbase.h> -

-List of all members. - - - - - - - - - - - - - - - - -

Public Attributes

BaudRateType BaudRate
DataBitsType DataBits
FlowType FlowControl
ParityType Parity
StopBitsType StopBits
ulong Timeout_Millisec
ulong Timeout_Sec
-


Detailed Description

-structure to contain port settings -

-


Member Data Documentation

- -
- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

-
- - - - -
ulong PortSettings::Timeout_Sec
-
-
- -

- -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/tab_b.gif b/src/core/gps/qextserialport/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/src/core/gps/qextserialport/html/tab_l.gif b/src/core/gps/qextserialport/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/src/core/gps/qextserialport/html/tab_r.gif b/src/core/gps/qextserialport/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/src/core/gps/qextserialport/html/tabs.css b/src/core/gps/qextserialport/html/tabs.css deleted file mode 100644 index a61552a67ad2..000000000000 --- a/src/core/gps/qextserialport/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI#current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI#current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.nav -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/src/core/gps/qextserialport/html/tree.html b/src/core/gps/qextserialport/html/tree.html deleted file mode 100644 index 0cdb42b5ba7d..000000000000 --- a/src/core/gps/qextserialport/html/tree.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - TreeView - - - - - - - diff --git a/src/core/gps/qextserialport/html/win__qextserialport_8cpp.html b/src/core/gps/qextserialport/html/win__qextserialport_8cpp.html deleted file mode 100644 index 47323e3857d7..000000000000 --- a/src/core/gps/qextserialport/html/win__qextserialport_8cpp.html +++ /dev/null @@ -1,27 +0,0 @@ - - -QextSerialPort: win_qextserialport.cpp File Reference - - - - - - -

win_qextserialport.cpp File Reference

- -
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/html/win__qextserialport_8h.html b/src/core/gps/qextserialport/html/win__qextserialport_8h.html deleted file mode 100644 index fcfbe2dd3b81..000000000000 --- a/src/core/gps/qextserialport/html/win__qextserialport_8h.html +++ /dev/null @@ -1,32 +0,0 @@ - - -QextSerialPort: win_qextserialport.h File Reference - - - - - - -

win_qextserialport.h File Reference

- - - - - - -

Classes

class  Win_QextSerialPort
class  Win_QextSerialThread
-
Generated on Wed Sep 5 19:31:21 2007 for QextSerialPort by  - -doxygen 1.4.7
- - diff --git a/src/core/gps/qextserialport/qextserialport.pro b/src/core/gps/qextserialport/qextserialport.pro deleted file mode 100644 index 3d6a8b009c42..000000000000 --- a/src/core/gps/qextserialport/qextserialport.pro +++ /dev/null @@ -1,39 +0,0 @@ -PROJECT = qextserialport -TEMPLATE = lib - -CONFIG += qt warn_on thread debug_and_release -CONFIG += dll -#CONFIG += staticlib - -# event driven device enumeration on windows requires the gui module -!win32:QT -= gui - -OBJECTS_DIR = build/obj -MOC_DIR = build/moc -DEPENDDIR = . -INCLUDEDIR = . -HEADERS = qextserialport.h \ - qextserialenumerator.h -SOURCES = qextserialport.cpp \ - qextserialenumerator.cpp - -unix:SOURCES += posix_qextserialport.cpp -macx: LIBS += -framework IOKit - -win32:SOURCES += win_qextserialport.cpp -win32:DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this -win32:LIBS += -lsetupapi - - -DESTDIR = build -#DESTDIR = examples/enumerator/debug -#DESTDIR = examples/qespta/debug -#DESTDIR = examples/event/debug - -CONFIG(debug, debug|release) { - TARGET = qextserialportd -} else { - TARGET = qextserialport -} - -VERSION = 1.2.0