#pragma once
#include "pch.h"
#include "ATPControl_Serial_QT.h"
#include "OControl_USB.h"
#include <atomic>
#include <vector>
#include "IS11_Ctrl_Qt.h"

using namespace ZZ_MISCDEF::ZZ_RUNPARAMS;
using namespace ZZ_MISCDEF::MISC_DETECTOR;
using namespace ZZ_MISCDEF::IRIS;
class CAbsFSController :public QObject
{
	Q_OBJECT
public:
	CAbsFSController(QObject* parent = nullptr);
	virtual ~CAbsFSController();
public:
	//call first
	virtual void SetContext(OneFSContext struFSParam);

	virtual int Initialize();
	virtual int Initialize_Self(); 

	int SetExposureTime(int iMilliSec);
	int GetExposureTime(int& iMilliSec);
	int SingleShot(DataFrame &struSingleFrame);

	int PerformAutoExposure();
	int CheckAndAdjust_Fast();

	int GetDarkPixelIndices();

	void GetDeviceAttr(DeviceAttribute &struDeviceAttr);
public:
	std::atomic_int  m_iFlagInit;
	std::vector<int> m_vecDarkPixleIndices;
	DeviceAttribute  m_struDeviceAttr;
private:
	
	CIrisFSBase*     m_pFSCtrl;
	OneFSContext     m_struFSParam;
	DataFrame        m_struSingleFrame;
	QString          m_qstrWaveLengthPath;
private:
	//int CreateWavelengthFile();
public slots:

signals:
};