-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataframe.h
More file actions
45 lines (36 loc) · 889 Bytes
/
dataframe.h
File metadata and controls
45 lines (36 loc) · 889 Bytes
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 DATAFRAME_H
#define DATAFRAME_H
#include <QObject>
#include <QtGlobal>
#include <QByteArray>
#include "datatype.h"
class DataFrame : public QObject
{
Q_OBJECT
private:
void SplitTail();
void send();
public:
explicit DataFrame();
~DataFrame();
void setFrame(QList<int> &list, QList<int> &h_list, QByteArray &h_data);
void ReadData(const QByteArray * buf);
void clear();
inline int getFrameLen() const { return framelength; }
inline int getHeadLen() const { return headlist.size(); }
inline int getTailLen() const { return taillen; }
signals:
void frame_ok(uchar *p_data);
private:
int framelength;
int datacnt;
int headlen;
int taillen;
uchar *p_data;
QList<int> framelist;
QList<int> headlist;
QList<int> taillist;
QByteArray headdata;
QByteArray taildata;
};
#endif // DATAFRAME_H