forked from COVESA/dlt-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqdltcontrol.cpp
131 lines (111 loc) · 3.21 KB
/
qdltcontrol.cpp
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/**
* @licence app begin@
* Copyright (C) 2011-2012 BMW AG
*
* This file is part of COVESA Project Dlt Viewer.
*
* Contributions are licensed to the COVESA Alliance under one or more
* Contribution License Agreements.
*
* \copyright
* This Source Code Form is subject to the terms of the
* Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
* this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* \author Alexander Wenzel <[email protected]> 2011-2012
*
* \file qdlt.cpp
* For further information see http://www.covesa.global/.
* @licence end@
*/
#include <QtDebug>
#include "qdlt.h"
extern "C"
{
#include "dlt_common.h"
}
QDltControl::QDltControl(QObject *_server)
{
server = _server;
connect(this, SIGNAL(sendInjectionSignal(int,QString,QString,int,QByteArray)),
server, SLOT(sendInjection(int,QString,QString,int,QByteArray)));
connect(this, SIGNAL(jumpToMsgSignal(int)),
server, SLOT(jumpToMsgSignal(int)));
connect(this, SIGNAL(markerSignal()),
server, SLOT(markerSignal()));
connect(this, SIGNAL(connectEcuSignal(int)),
server, SLOT(connectEcuSignal(int)));
connect(this, SIGNAL(disconnectEcuSignal(int)),
server, SLOT(disconnectEcuSignal(int)));
connect(this, SIGNAL(connectAllEcuSignal()),
server, SLOT(connectAllEcuSignal()));
connect(this, SIGNAL(disconnectAllEcuSignal()),
server, SLOT(disconnectAllEcuSignal()));
connect(this, SIGNAL(openFileSignal(QStringList)),
server, SLOT(onOpenTriggered(QStringList)));
connect(this, SIGNAL(newFileSignal(QString)),
server, SLOT(onNewTriggered(QString)));
connect(this, SIGNAL(saveAsFileSignal(QString)),
server, SLOT(onSaveAsTriggered(QString)));
connect(this, SIGNAL(clearFileSignal()),
server, SLOT(on_action_menuFile_Clear_triggered()));
connect(this, SIGNAL(quitDltViewerSignal()),
server, SLOT(on_action_menuFile_Quit_triggered()));
connect(this, SIGNAL(reopenFileSignal()),
server, SLOT(reopenFileSignal()));
}
QDltControl::~QDltControl()
{
}
void QDltControl::sendInjection(int index,QString applicationId,QString contextId,int serviceId,QByteArray data)
{
emit sendInjectionSignal(index,applicationId,contextId,serviceId,data);
}
void QDltControl::jumpToMsg(int index)
{
emit jumpToMsgSignal(index);
}
void QDltControl::newFile(QString filename)
{
emit newFileSignal(filename);
}
void QDltControl::openFile(QStringList filenames)
{
emit openFileSignal(filenames);
}
void QDltControl::saveAsFile(QString filename)
{
emit saveAsFileSignal(filename);
}
void QDltControl::clearFile()
{
emit clearFileSignal();
}
void QDltControl::quitDltViewer()
{
emit quitDltViewerSignal();
}
void QDltControl::marker()
{
emit markerSignal();
}
void QDltControl::connectEcu(int index)
{
emit connectEcuSignal(index);
}
void QDltControl::disconnectEcu(int index)
{
emit disconnectEcuSignal(index);
}
void QDltControl::connectAllEcu()
{
emit connectAllEcuSignal();
}
void QDltControl::disconnectAllEcu()
{
emit disconnectAllEcuSignal();
}
void QDltControl::reopenFile()
{
emit reopenFileSignal();
}