mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-18 19:39:43 +08:00
102 lines
2.6 KiB
C++
102 lines
2.6 KiB
C++
#include "pch.h"
|
|
#include "ATPControl_Serial_QT.h"
|
|
#include "Logger.h"
|
|
#include "SystemConfigger.h"
|
|
#include "MainDataGrabber.h"
|
|
#include "DataFileProcessor.h"
|
|
#include "Scheduler.h"
|
|
using namespace std;
|
|
#pragma once
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication a(argc, argv);
|
|
//////////////////////////////////////////////////////////////////////////logger
|
|
//QT_LOG::ZZ_InitLogger(QCoreApplication::applicationDirPath() + "/Log/");
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////configger
|
|
DataFileProcessor testdp;
|
|
ZZ_SysConfigger test;
|
|
Scheduler testS;
|
|
|
|
RunTimeGrabberParams testp;
|
|
EContext testEC;
|
|
MEContext testMEC;
|
|
test.Initialize();
|
|
test.LoadSettingsFromFile_System();
|
|
test.LoadSettingsFromFile_MISC();
|
|
test.GetGrabberRunParams(testp);
|
|
test.GetECParams(testEC);
|
|
test.GetMECParams(testMEC);
|
|
|
|
testS.SetAcqTimeParams(testp.atsParams);
|
|
|
|
|
|
|
|
testdp.SetEnvironmentContex(testEC);
|
|
testdp.SetManmadeEnviromentalContext(testMEC);
|
|
//testdp.WriteDataFile();
|
|
//////////////////////////////////////////////////////////////////////////test
|
|
using namespace ZZ_MISCDEF::ZZ_RUNPARAMS;
|
|
CMainDataGrabber testDG;
|
|
QThread* m_pqDataGrabberThreadHolder = new QThread();
|
|
testDG.moveToThread(m_pqDataGrabberThreadHolder);
|
|
testDG.SetContext(testp, testdp, testS);
|
|
testDG.Init_Normal();
|
|
//testDG.SetGrabberFileProcessor(testdp);
|
|
//testDG.SetGrabberParams(testp);
|
|
//testDG.SetTimer(testS);
|
|
//testDG.InitThreadStatus();
|
|
//testDG.InitializeWorkers();
|
|
//testDG.SetupMsgPipelines();
|
|
//testDG.StartWorkers();
|
|
m_pqDataGrabberThreadHolder->start();
|
|
testDG.Init_Self();
|
|
//testDG.InitThreadStatus();
|
|
//testDG.InitializeWorkers();
|
|
//testDG.InitLS();
|
|
//testDG.SetupMsgPipelines();
|
|
//testDG.StartWorkers();
|
|
|
|
|
|
|
|
|
|
//testDG.StartGrab();
|
|
|
|
QThread* m_pqTimerThreadHolder = new QThread();
|
|
testS.moveToThread(m_pqTimerThreadHolder);
|
|
m_pqTimerThreadHolder->start();
|
|
testS.SelfStart();
|
|
|
|
//QString qstrTest = "This is a test message 2";
|
|
//qDebug() << qstrTest;
|
|
//cout << "This is a test message";
|
|
|
|
//test.LoadSettings_Test();
|
|
|
|
//ZZ_DataGrabberThread m_test;
|
|
//m_test.GrabOnce();
|
|
//QThread* m_pqDataGrabberThreadHolder;
|
|
|
|
|
|
//m_pqDataGrabberThreadHolder->start();
|
|
//m_test.TestGrabOnce();
|
|
//m_test.StartGrabCall();
|
|
//QThread::msleep(5000);
|
|
|
|
//m_test.StopTestGrab();
|
|
// ZZ_ATPControl_Serial_Qt m_ctrlATP;
|
|
// QByteArray qbTest;
|
|
// m_ctrlATP.ATPInitialize(7);
|
|
// m_ctrlATP.GetDeviceAttribute();
|
|
// m_ctrlATP.SetExposureTime(m_ctrlATP.m_adaDeviceAttr.iMinIntegrationTime);
|
|
// m_ctrlATP.RecvData(qbTest);
|
|
//////////////////////////////////////////////////////////////////////////
|
|
return a.exec();
|
|
}
|
|
|
|
|
|
|