source: projects/punch-card/punch-card-editor/src/libs/qextserialport/win_qextserialport.h @ 53

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

Punch Card Editor, ongoing development

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

Statistics: About 3500 Lines of code (without libqextserialport)

-- sven @ workstation

  • Property svn:executable set to *
File size: 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.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License