forked from donaloconnor/automon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdtchelper.h
58 lines (50 loc) · 2.44 KB
/
dtchelper.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
57
58
#ifndef DTCHELPER_H
#define DTCHELPER_H
/*
==================================================================================================
| dtchelper.h |
| Part of the Automon application. |
| |
| Final Year Project - "An Embedded Automotive Monitoring Device" |
| |
| By Donal O' Connor for completion of B.Sc (Hons) Software Development and Computer Networking |
| Email: [email protected] |
| Website/Blog: http://automon.killarneyonline.eu |
| |
| Cork Institute of Technology, Cork, Ireland - http://www.cit.ie/ |
| |
| Copyright © 2009 Donal O'Connor <[email protected]> |
==================================================================================================
The DTCHelper class is used by the AutomonKernel for DTC related functions such as loading up
number of DTCs present, loading in DTC database, creating DTC objects. Checking if MIL on,
resetting the MIL and clearing the DTCs
*/
#include "dtc.h"
#include "serialhelper.h"
namespace AutomonKernel
{
class DTCHelper
{
public:
DTCHelper(SerialHelper * serialHelper);
QList<Sensor> getFreezeFrame() const;
QList<DTC*> getCodesFound() const;
bool resetMilAndClearCodes();
bool addDTCs(QList<DTC>);
int getNumberOfCodes() const;
bool checkMil() const;
void init();
void refreshDTCInformation();
private:
void loadCodes();
void loadFoundCodes();
void setNumCodes();
QList<DTC*> m_codeDB;
QList<DTC*> m_codesFound;
QList<Sensor*> m_freezeFrame;
int m_numCodes;
bool m_milOn;
SerialHelper * m_serialHelper;
};
}
#endif // DTCHELPER_H