56 lines
1.7 KiB
C++
56 lines
1.7 KiB
C++
/*******************************************************************************
|
|
* *
|
|
* Gros Gin électronique *
|
|
* 2023 *
|
|
* *
|
|
* Project: Otarcik CAN *
|
|
* *
|
|
* *
|
|
* *
|
|
*******************************************************************************/
|
|
/*
|
|
Description:
|
|
This is our main program
|
|
|
|
*/
|
|
|
|
#include "OtarcikCan.h"
|
|
|
|
COtarcikCan::COtarcikCan(QObject *parent) : QObject(parent)
|
|
{
|
|
mPCANInterface = new CPCANInterface;
|
|
mCANDatabase = new CCANDatabase;
|
|
mCANAnalyzer = new CCANAnalyzer(mPCANInterface);
|
|
|
|
mCANAnalyzer->mProgramPtr = this;
|
|
}
|
|
|
|
COtarcikCan::~COtarcikCan()
|
|
{
|
|
delete mCANAnalyzer;
|
|
delete mPCANInterface;
|
|
delete mCANDatabase;
|
|
|
|
}
|
|
|
|
int COtarcikCan::Start()
|
|
{
|
|
mMainWindow.show();
|
|
|
|
CGeneralMessagesLogDispatcher::instance()->BindGuiPageHandle(mMainWindow.mGeneralStatusPage);
|
|
CGeneralMessagesLogDispatcher::instance()->Init();
|
|
|
|
mCANAnalyzer->Init(mPCANInterface,mCANDatabase);
|
|
|
|
mCANDatabase->Init();
|
|
mCANDatabase->LoadDatabaseFile("");
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
int COtarcikCan::UpdateCANViewerDataRequest(QList<CCANMessage *> MsgList)
|
|
{
|
|
return mMainWindow.mCANViewerPage->UpdateCANTable(MsgList);
|
|
}
|