-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathasThread.h
More file actions
67 lines (53 loc) · 1.15 KB
/
asThread.h
File metadata and controls
67 lines (53 loc) · 1.15 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef VTTHREAD_H
#define VTTHREAD_H
#include <QThread>
#include <QtCore>
#include <QMap>
#ifdef Q_OS_WIN32
#include <Windows.h>
#endif
#include "vtcom.h"
#include "bledll.h"
typedef struct
{
int state;
char *key_str;
}state_key_str;
int rxbuf_to_be_processed();
class vtThread : public QThread
{
Q_OBJECT
public:
vtThread();
~vtThread();
public:
void uart_proc();
void rxData_display(int rxPos, int rxSize, uint8_t *rxData);
void lookup();
void rxData_process(unsigned char *rxData, unsigned int rxSize);
public:
unsigned char writeBuffer[16];
unsigned char readBuffer[16];
vtble m_BLE;
protected:
void run();
private:
vtcom m_com;
int com;
int writeFlags;
int readFlags;
int ret;
int timeout;
int tx_size;
QMap<int, QString> gapmap;
QMap<int, QString> gattmap;
QMap<int, QString> smpcmap;
protected:
signals:
void rx_raw_data_received(uint8_t *rxData, int rxSize);
void bl_raw_data_received(uint8_t *rxData, int rxSize);
void writeFlagChanged(int );
void readFlagChanged(int );
void exceptionMsg(const QString );
};
#endif // VTCOMTHREAD_H