-
Notifications
You must be signed in to change notification settings - Fork 1
/
cansnifer.h
45 lines (42 loc) · 1012 Bytes
/
cansnifer.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 CANSNIFER_H
#define CANSNIFER_H
#include <QtGui/QWidget>
#include "ui_cansnifer.h"
#include "CanOperator.h"
#include "iCANMSGReciever.h"
#include <QTextEdit>
#include <QLineEdit>
#include <QMutex>
#include <QQueue>
#include <QTime>
#include "iMsgHandler.h"
#include <QVector>
class CANSnifer : public QWidget, public iCANMSGReciever
{
Q_OBJECT
CanOperator * _can_operator;
QTextEdit *_text_edit;
QLineEdit *_line_edit;
QLineEdit *_response_edit;
QMutex _mutex;
QQueue<iCANMSG*> _msges;
int _counter;
double _omega;
QTime _timer;
double _amp;
unsigned char peredacha;
QVector<iMsgHandler*> _handlers;
public:
CANSnifer(QWidget *parent = 0);
virtual void SetCANMSG(iCANMSG* canmsg);
~CANSnifer();
public slots:
void slotGetMessage(iCANMSG *msg);
void slotSetPeredacha();
protected:
void timerEvent(QTimerEvent *event);
virtual void closeEvent ( QCloseEvent * event );
private:
Ui::CANSniferClass ui;
};
#endif // CANSNIFER_H