-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexccominterface.h
45 lines (33 loc) · 955 Bytes
/
exccominterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef EXCCOMINTERFACE_H
#define EXCCOMINTERFACE_H
#ifndef COMPORTINTERFACE_H
#include "comportinterface.h"
#endif
#include "qextserialport.h"
#include <QStringList>
class ExcComInterface : public ComPortInterface
{
QextSerialPort * port;
QString portName;
public:
ExcComInterface();
~ExcComInterface();
void setPortName(QString n);
bool open (int baudrate,int flowContol, int partity,int dataBits, int stopBits);
void close ();
void write (QByteArray data);
QByteArray read ();
int bytesAvailable ();
void setDTR (bool e);
void setRTS (bool e);
void setTimeout(int v);
bool isAvable() {return true;}
QString name() {return "EXTCOM";}
QString description() {return QObject::tr("COM Port over QExtSerialPort");}
QString reason() {return "";}
bool load() {return true;}
void unload() {}
QString getPortName();
QStringList getPortList();
};
#endif // EXCCOMINTERFACE_H