-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproceesframe.h
45 lines (36 loc) · 853 Bytes
/
proceesframe.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 PROCEESFRAME_H
#define PROCEESFRAME_H
#include <controlcan.h>
#include <QDebug>
#include <unistd.h>
#include <QObject>
#include <QThread>
#define msleep(ms) usleep((ms)*1000)
typedef struct {
unsigned channel; // channel index, 0~1
unsigned stop; // stop RX-thread
unsigned total; // total received
unsigned error; // error(s) detected
} RX_CTX;
typedef struct{
uint32_t Rece_CAN_ID;
EventID Send_event;
uint Bit_num;
BYTE * Data;
bool Trans_flag;
} ReceTab;
class proceesframe : public QObject
{
Q_OBJECT
public:
explicit proceesframe(QObject *parent = nullptr);
signals:
void Send2UI(unsigned);
void Send2Main(EventID);
void Sendcan(EventID, QByteArray);
public slots:
int Verify_Frame(VCI_CAN_OBJ, uint, BYTE *);
void rx_thread();
private:
};
#endif // PROCEESFRAME_H