source: ntrip/trunk/BNC/src/serial/win_qextserialport.h@ 6920

Last change on this file since 6920 was 1317, checked in by mervart, 16 years ago

* empty log message *

File size: 1.5 KB
Line 
1#ifndef _WIN_QEXTSERIALPORT_H_
2#define _WIN_QEXTSERIALPORT_H_
3
4#include "qextserialbase.h"
5
6/*if all warning messages are turned off, flag portability warnings to be turned off as well*/
7#ifdef _TTY_NOWARN_
8#define _TTY_NOWARN_PORT_
9#endif
10
11#include <windows.h>
12
13class Win_QextSerialPort:public QextSerialBase {
14public:
15 Win_QextSerialPort();
16 Win_QextSerialPort(Win_QextSerialPort const& s);
17 Win_QextSerialPort(const QString & name);
18 Win_QextSerialPort(const PortSettings& settings);
19 Win_QextSerialPort(const QString & name, const PortSettings& settings);
20 Win_QextSerialPort& operator=(const Win_QextSerialPort& s);
21 virtual ~Win_QextSerialPort();
22 virtual bool open(OpenMode mode=0);
23 virtual void close();
24 virtual void flush();
25 virtual qint64 size() const;
26 virtual void ungetChar(char c);
27 virtual void setFlowControl(FlowType);
28 virtual void setParity(ParityType);
29 virtual void setDataBits(DataBitsType);
30 virtual void setStopBits(StopBitsType);
31 virtual void setBaudRate(BaudRateType);
32 virtual void setDtr(bool set=true);
33 virtual void setRts(bool set=true);
34 virtual ulong lineStatus(void);
35 virtual qint64 bytesAvailable();
36 virtual void translateError(ulong);
37 virtual void setTimeout(ulong, ulong);
38
39protected:
40 HANDLE Win_Handle;
41 COMMCONFIG Win_CommConfig;
42 COMMTIMEOUTS Win_CommTimeouts;
43
44 virtual qint64 readData(char *data, qint64 maxSize);
45 virtual qint64 writeData(const char *data, qint64 maxSize);
46};
47
48#endif
Note: See TracBrowser for help on using the repository browser.