|
|
|
|
@ -165,7 +165,7 @@ void CCoreCtrl::ISnapImage(const QStringList& camKeys)
|
|
|
|
|
if (camKeys.size() <= 0)
|
|
|
|
|
return;
|
|
|
|
|
CameraCtrl ctrl;
|
|
|
|
|
ctrl.m_ctrlType = 3;
|
|
|
|
|
ctrl.m_ctrlType = EM_SNAPCAM;
|
|
|
|
|
ctrl.strCamName = camKeys.first();
|
|
|
|
|
m_safeList.push_back(ctrl);
|
|
|
|
|
}
|
|
|
|
|
@ -190,6 +190,42 @@ void CCoreCtrl::ISetCameraProperty(const QString& strSerial, TP_CAMERA_PROPERTY&
|
|
|
|
|
return m_camDevManager->ISetCameraProperty(strSerial, property);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CCoreCtrl::IOpenCamera(const QString& strSerial)
|
|
|
|
|
{
|
|
|
|
|
CameraCtrl ctrl;
|
|
|
|
|
ctrl.m_ctrlType = EM_OPENCAM;
|
|
|
|
|
ctrl.strCamName = strSerial;
|
|
|
|
|
m_safeList.push_back(ctrl);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CCoreCtrl::ICloseCamera(const QString& strSerial)
|
|
|
|
|
{
|
|
|
|
|
CameraCtrl ctrl;
|
|
|
|
|
ctrl.m_ctrlType = EM_CLOSECAM;
|
|
|
|
|
ctrl.strCamName = strSerial;
|
|
|
|
|
m_safeList.push_back(ctrl);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CCoreCtrl::IStartCamera(const QString& strSerial)
|
|
|
|
|
{
|
|
|
|
|
CameraCtrl ctrl;
|
|
|
|
|
ctrl.m_ctrlType = EM_STARTCAM;
|
|
|
|
|
ctrl.strCamName = strSerial;
|
|
|
|
|
m_safeList.push_back(ctrl);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CCoreCtrl::IStopCamera(const QString& strSerial)
|
|
|
|
|
{
|
|
|
|
|
CameraCtrl ctrl;
|
|
|
|
|
ctrl.m_ctrlType = EM_STOPCAM;
|
|
|
|
|
ctrl.strCamName = strSerial;
|
|
|
|
|
m_safeList.push_back(ctrl);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CCoreCtrl::IRunAlg(const QString& strSerial, bool bRun)
|
|
|
|
|
{
|
|
|
|
|
return m_camDevManager->IRunAlg(strSerial, bRun);
|
|
|
|
|
@ -319,24 +355,30 @@ void CCoreCtrl::onRunTask()
|
|
|
|
|
if (m_safeList.getSize() > 0) {
|
|
|
|
|
CameraCtrl ctrl;
|
|
|
|
|
m_safeList.pop_front(ctrl);
|
|
|
|
|
if (ctrl.m_ctrlType == 0)//开始相机 外触发
|
|
|
|
|
if (ctrl.m_ctrlType == EM_OPENCAM)//开始相机 外触发
|
|
|
|
|
{
|
|
|
|
|
//onStartCamera(ctrl.strCamName);
|
|
|
|
|
m_camDevManager->IOpenCamera(ctrl.strCamName);
|
|
|
|
|
}
|
|
|
|
|
else if (ctrl.m_ctrlType == 1)//停止相机
|
|
|
|
|
else if (ctrl.m_ctrlType == EM_CLOSECAM)//停止相机
|
|
|
|
|
{
|
|
|
|
|
//onStopCamera(ctrl.strCamName);
|
|
|
|
|
m_camDevManager->ICloseCamera(ctrl.strCamName);
|
|
|
|
|
}
|
|
|
|
|
else if (ctrl.m_ctrlType == 2)//开始相机 软触发
|
|
|
|
|
else if (ctrl.m_ctrlType == EM_STARTCAM)//开始相机 软触发
|
|
|
|
|
{
|
|
|
|
|
//onStartSoftCamera(ctrl.strCamName);
|
|
|
|
|
m_camDevManager->IStartCamera(ctrl.strCamName);
|
|
|
|
|
}
|
|
|
|
|
else if (ctrl.m_ctrlType == EM_STOPCAM) {//停止相机
|
|
|
|
|
m_camDevManager->IStopCamera(ctrl.strCamName);
|
|
|
|
|
}
|
|
|
|
|
else if (ctrl.m_ctrlType == 3)//软触发一次相机
|
|
|
|
|
else if (ctrl.m_ctrlType == EM_SNAPCAM)//软触发一次相机
|
|
|
|
|
{
|
|
|
|
|
//onSoftTrigerCamera(ctrl.strCamName);
|
|
|
|
|
m_camDevManager->ISnapImage(QStringList()<<ctrl.strCamName);
|
|
|
|
|
}
|
|
|
|
|
else if (ctrl.m_ctrlType == 4)//开始相机 内触发相机
|
|
|
|
|
else if (ctrl.m_ctrlType == 5)//开始相机 内触发相机
|
|
|
|
|
{
|
|
|
|
|
//onAutoTrigerCamera(ctrl.strCamName);
|
|
|
|
|
}
|
|
|
|
|
|