forked from collin80/SavvyCAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathudsscanwindow.h
56 lines (48 loc) · 1.32 KB
/
udsscanwindow.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
46
47
48
49
50
51
52
53
54
55
56
#ifndef UDSSCANWINDOW_H
#define UDSSCANWINDOW_H
#include "can_structs.h"
#include "connections/canconnection.h"
#include "bus_protocols/uds_handler.h"
#include <QDialog>
#include <QFile>
#include <QTreeWidget>
namespace Ui {
class UDSScanWindow;
}
class UDSScanWindow : public QDialog
{
Q_OBJECT
public:
explicit UDSScanWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
~UDSScanWindow();
private slots:
void updatedFrames(int numFrames);
void gotUDSReply(UDS_MESSAGE msg);
void scanUDS();
void saveResults();
void timeOut();
void adaptiveToggled();
void wildcardToggled();
void readByToggled();
void numBytesChanged();
void checkIDRange();
void checkServiceRange();
void checkSubFuncRange();
private:
Ui::UDSScanWindow *ui;
const QVector<CANFrame> *modelFrames;
UDS_HANDLER *udsHandler;
QTimer *waitTimer;
QList<UDS_MESSAGE> sendingFrames;
QTreeWidgetItem *nodeID;
QTreeWidgetItem *nodeService;
QTreeWidgetItem *nodeSubFunc;
int currIdx = 0;
bool currentlyRunning;
void sendNextMsg();
void sendOnBuses(UDS_MESSAGE frame, int buses);
void setupNodes(uint32_t replyID);
void dumpNode(QTreeWidgetItem* item, QFile *file, int indent);
bool eventFilter(QObject *obj, QEvent *event);
};
#endif // UDSSCANWINDOW_H