add sniffer

This commit is contained in:
canpadawan
2016-07-07 16:47:43 +02:00
parent e9d3b718c9
commit 314ea0769d
10 changed files with 862 additions and 0 deletions
+17
View File
@@ -80,6 +80,7 @@ MainWindow::MainWindow(QWidget *parent) :
fuzzingWindow = NULL;
udsScanWindow = NULL;
isoWindow = NULL;
snifferWindow = NULL;
dbcHandler = new DBCHandler;
bDirty = false;
inhibitFilterUpdate = false;
@@ -123,6 +124,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionFuzzing, &QAction::triggered, this, &MainWindow::showFuzzingWindow);
connect(ui->actionUDS_Scanner, &QAction::triggered, this, &MainWindow::showUDSScanWindow);
connect(ui->actionISO_TP_Decoder, &QAction::triggered, this, &MainWindow::showISOInterpreterWindow);
connect(ui->actionSniffer, &QAction::triggered, this, &MainWindow::showSnifferWindow);
connect(CANConManager::getInstance(), &CANConManager::framesReceived, model, &CANFrameModel::addFrames);
@@ -264,6 +266,12 @@ MainWindow::~MainWindow()
isoWindow->close();
delete isoWindow;
}
if (snifferWindow)
{
snifferWindow->close();
delete snifferWindow;
snifferWindow = NULL;
}
delete elapsedTime;
@@ -291,6 +299,7 @@ void MainWindow::exitApp()
if (fuzzingWindow) fuzzingWindow->close();
if (udsScanWindow) udsScanWindow->close();
if (isoWindow) isoWindow->close();
if (snifferWindow) snifferWindow->close();
this->close();
}
@@ -839,6 +848,14 @@ void MainWindow::showISOInterpreterWindow()
isoWindow->show();
}
void MainWindow::showSnifferWindow()
{
if (!snifferWindow)
snifferWindow = new SnifferWindow(this);
snifferWindow->show();
}
void MainWindow::showFrameSenderWindow()
{
if (!frameSenderWindow)