-
Notifications
You must be signed in to change notification settings - Fork 0
/
sth.h
41 lines (32 loc) · 806 Bytes
/
sth.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
#ifndef STH_H
#define STH_H
#include <QThread>
#include <QSerialPort>
class STH : public QThread
{
Q_OBJECT
public:
explicit STH(QObject *parent = 0);
~STH();
void letsbegin();
void returnparams();
void controlport(bool state);
bool isportopen();
signals:
void sendserialdata(QByteArray data);
void retparam(QString data);
public slots:
void write(QByteArray dt);
void read();
void getserialparams(QString PortName,
QSerialPort::BaudRate baud,
QSerialPort::DataBits data,
QSerialPort::Parity parity,
QSerialPort::StopBits stopbit);
public:
unsigned long int rxc=0,txc=0;
private:
QSerialPort Serial;
QByteArray temp;
};
#endif // STH_H