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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
/**
* @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/.
*
* \file dummycontrolplugin.cpp
* For further information see http://www.covesa.global/.
* @licence end@
*/
#include <QtGui>
#include "dummycontrolplugin.h"
DummyControlPlugin::DummyControlPlugin()
{
form = NULL;
counterMessages = 0;
counterNonVerboseMessages = 0;
counterVerboseMessages = 0;
dltFile = 0;
dltControl = 0;
ecuList = 0;
}
DummyControlPlugin::~DummyControlPlugin()
{
}
QString DummyControlPlugin::name()
{
return QString("Dummy Control Plugin");
}
QString DummyControlPlugin::pluginVersion(){
return DUMMY_CONTROL_PLUGIN_VERSION;
}
QString DummyControlPlugin::pluginInterfaceVersion(){
return PLUGIN_INTERFACE_VERSION;
}
QString DummyControlPlugin::description()
{
return QString();
}
QString DummyControlPlugin::error()
{
return QString();
}
bool DummyControlPlugin::loadConfig(QString /* filename */)
{
return true;
}
bool DummyControlPlugin::saveConfig(QString /* filename */)
{
return true;
}
QStringList DummyControlPlugin::infoConfig()
{
return QStringList();
}
QWidget* DummyControlPlugin::initViewer()
{
form = new DummyControl::Form(this);
return form;
}
bool DummyControlPlugin::initControl(QDltControl *control)
{
dltControl = control;
return true;
}
bool DummyControlPlugin::initConnections(QStringList list)
{
ecuList = new QStringList(list);
form->setConnections(list);
return false;
}
bool DummyControlPlugin::controlMsg(int , QDltMsg &)
{
return false;
}
void DummyControlPlugin::updateCounters(int ,int )
{
}
bool DummyControlPlugin::stateChanged(int index, QDltConnection::QDltConnectionState connectionState,QString hostname){
qDebug() << ecuList->at(index) << "ConnectionState:" << connectionState << "Hostname:" << hostname << endl;
return true;
}
bool DummyControlPlugin::autoscrollStateChanged(bool enabled)
{
form->autoscrollStateChanged(enabled);
return true;
}
void DummyControlPlugin::initMessageDecoder(QDltMessageDecoder* pMessageDecoder)
{
Q_UNUSED(pMessageDecoder);
}
void DummyControlPlugin::initMainTableView(QTableView* pTableView)
{
Q_UNUSED(pTableView);
}
void DummyControlPlugin::configurationChanged()
{}
void DummyControlPlugin::selectedIdxMsg(int , QDltMsg &) {
}
void DummyControlPlugin::selectedIdxMsgDecoded(int , QDltMsg &){
}
void DummyControlPlugin::initFileStart(QDltFile *file){
dltFile = file;
}
void DummyControlPlugin::initMsg(int , QDltMsg &){
}
void DummyControlPlugin::initMsgDecoded(int , QDltMsg &){
}
void DummyControlPlugin::initFileFinish(){
}
void DummyControlPlugin::updateFileStart(){
}
void DummyControlPlugin::updateMsg(int , QDltMsg &){
}
void DummyControlPlugin::updateMsgDecoded(int , QDltMsg &){
}
void DummyControlPlugin::updateFileFinish(){
}
#ifndef QT5
Q_EXPORT_PLUGIN2(dummycontrolplugin, DummyControlPlugin);
#endif
|