mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 03:49:42 +08:00
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
#include "ThreadDataGrabber.h"
|
|
|
|
ZZ_DataGrabberThread::ZZ_DataGrabberThread(QObject* parent /*= nullptr*/)
|
|
{
|
|
SetupSignals();
|
|
StartGrabberThread();
|
|
}
|
|
|
|
ZZ_DataGrabberThread::~ZZ_DataGrabberThread()
|
|
{
|
|
|
|
}
|
|
|
|
int ZZ_DataGrabberThread::SetupSignals()
|
|
{
|
|
connect(this, &ZZ_DataGrabberThread::SignalStartGrabOnce, &m_tcISIFCtrlThread, &ZZ_iSIFControlThread::StartTestAcquisition);
|
|
connect(this, &ZZ_DataGrabberThread::SignalStartGrabOnce, &m_tcIS1CtrlThread, &ZZ_IS1ControlThread::StartTestAcquisition);
|
|
|
|
bool bres = connect(this, &ZZ_DataGrabberThread::SignalStopGrab, &m_tcISIFCtrlThread, &ZZ_iSIFControlThread::StopTestAcquisition, Qt::DirectConnection);
|
|
bres = connect(this, &ZZ_DataGrabberThread::SignalStopGrab, &m_tcIS1CtrlThread, &ZZ_IS1ControlThread::StopTestAcquisition, Qt::DirectConnection);
|
|
|
|
return 0;
|
|
}
|
|
|
|
int ZZ_DataGrabberThread::StartGrabberThread()
|
|
{
|
|
m_pqISIFThreadHolder = new QThread();
|
|
m_tcISIFCtrlThread.moveToThread(m_pqISIFThreadHolder);
|
|
m_pqISIFThreadHolder->start();
|
|
|
|
m_pqIS1ThreadHolder = new QThread();
|
|
m_tcIS1CtrlThread.moveToThread(m_pqIS1ThreadHolder);
|
|
m_pqIS1ThreadHolder->start();
|
|
//m_stCameraServiceThread.SetController(this);
|
|
return 0;
|
|
}
|
|
|
|
int ZZ_DataGrabberThread::TestGrab()
|
|
{
|
|
emit SignalStartGrabOnce();
|
|
return 0;
|
|
}
|
|
|
|
int ZZ_DataGrabberThread::StopTestGrab()
|
|
{
|
|
emit SignalStopGrab();
|
|
//m_tcISIFCtrlThread.StopTestAcquisition();
|
|
//m_tcIS1CtrlThread.StopTestAcquisition();
|
|
return 0;
|
|
}
|