Logo Search packages:      
Sourcecode: qtemu version File versions  Download package

Win_QextSerialPort Class Reference

#include <win_qextserialport.h>

Inheritance diagram for Win_QextSerialPort:

QextSerialBase

List of all members.


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:
remove copy constructor and assign operator.

Definition at line 36 of file win_qextserialport.h.


Public Types

enum  QueryMode { Polling, EventDriven }

Signals

void dsrChanged (bool status)

Public Member Functions

virtual bool atEnd () const
virtual BaudRateType baudRate () const
virtual qint64 bytesAvailable () const
virtual qint64 bytesToWrite () const
virtual void close ()
virtual void construct ()
virtual DataBitsType dataBits () const
virtual FlowType flowControl () const
virtual void flush ()
virtual bool isSequential () const
virtual ulong lastError () const
virtual ulong lineStatus (void)
virtual bool open (OpenMode mode)
Win_QextSerialPortoperator= (const Win_QextSerialPort &s)
virtual ParityType parity () const
virtual QString portName () const
QextSerialBase::QueryMode queryMode () const
virtual qint64 readLine (char *data, qint64 maxSize)
virtual void setBaudRate (BaudRateType)
virtual void setDataBits (DataBitsType)
virtual void setDtr (bool set=true)
virtual void setFlowControl (FlowType)
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)
virtual void setTimeout (long)
virtual qint64 size () const
virtual StopBitsType stopBits () const
virtual void translateError (ulong)
virtual void ungetChar (char c)
virtual bool waitForReadyRead (int msecs)
 Win_QextSerialPort (const QString &name, const PortSettings &settings, QextSerialBase::QueryMode mode)
 Win_QextSerialPort (const PortSettings &settings, QextSerialBase::QueryMode mode)
 Win_QextSerialPort (const QString &name, QextSerialBase::QueryMode mode)
 Win_QextSerialPort (Win_QextSerialPort const &s)
 Win_QextSerialPort (QextSerialBase::QueryMode mode)
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
QList< OVERLAPPED * > overlappedWrites
Win_QextSerialThreadoverlapThread
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

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index