-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconsolecomportinterface.h
45 lines (34 loc) · 1.04 KB
/
consolecomportinterface.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
45
#ifndef CONSOLECOMPORTINTERFACE_H
#define CONSOLECOMPORTINTERFACE_H
#ifndef COMPORTINTERFACE_H
#include "comportinterface.h"
#endif
#include "qextserialport.h"
#include "consoleinterface.h"
#include <QStringList>
class ConsoleComPortInterface : public ComPortInterface
{
ConsoleInterface * con;
public:
ConsoleComPortInterface();
~ConsoleComPortInterface();
void setConsole(ConsoleInterface * acon);
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 "CONCOM";}
QString description() {return QObject::tr("Virtual COM -> Console Interface");}
QString reason() {return "";}
bool load() {return true;}
void unload() {}
void setPortName(QString n);
QString getPortName();
QStringList getPortList();
};
#endif // CONSOLECOMPORTINTERFACE_H