forked from collin80/SavvyCAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbchandler.h
45 lines (34 loc) · 1.06 KB
/
dbchandler.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 DBCHANDLER_H
#define DBCHANDLER_H
#include <QObject>
#include "dbc_classes.h"
#include "can_structs.h"
/*
* For ease of quick testing and development this is all run together.
* It should be decoupled once the functionality is confirmed.
*/
class DBCHandler : public QObject
{
Q_OBJECT
public:
explicit DBCHandler(QObject *parent = 0);
void loadDBCFile(QString);
void saveDBCFile(QString);
void listDebugging();
QString processSignal(const CANFrame &frame, const DBC_SIGNAL &sig);
DBC_NODE *findNodeByName(QString name);
DBC_NODE *findNodeByIdx(int idx);
DBC_MESSAGE *findMsgByID(int id);
DBC_MESSAGE *findMsgByIdx(int idx);
DBC_MESSAGE *findMsgByName(QString name);
DBC_SIGNAL *findSignalByName(DBC_MESSAGE *msg, QString name);
DBC_SIGNAL *findSignalByIdx(DBC_MESSAGE *msg, int idx);
QList<DBC_NODE> dbc_nodes;
QList<DBC_MESSAGE> dbc_messages;
signals:
public slots:
private:
unsigned char reverseBits(unsigned char);
unsigned char processByte(unsigned char, int, int);
};
#endif // DBCHANDLER_H