#pragma once
#include "pch.h"
#include "ZZ_Types.h"
using namespace ZZ_MISCDEF::ZZ_RUNPARAMS;
using namespace ZZ_MISCDEF::ZZ_DATAFILE;

class ZZ_SysConfigger :public QObject
{
	Q_OBJECT

public:
	ZZ_SysConfigger(QObject *parent = nullptr);
	virtual ~ZZ_SysConfigger();
public:
	int Initialize();
	int GetGrabberRunParams(RunTimeGrabberParams &struGrabberRTParams);
	    
	int LoadSettingsFromFile_IS1();
	int LoadSettingsFromFile_iSIF();
	int LoadSettingsFromFile_System();
	int LoadSettingsFromFile_MISC();
	int LoadSettings_Test();
public:
	enum ConfiggerDeviceModel
	{
		OSIFAlpha = 0,
		OSIFBeta,
		ISIF,
		IS1,
		IS2,
		Null
	};
	Q_ENUM(ConfiggerDeviceModel);
	//////////////////////////////////////////////////////////////////////////run-time settings
	AcqTimeSettings      m_struAcqTime;
	FSContext        m_struDeviceContext;
	AcqPosSettings       m_struAcqPosition;
	//////////////////////////////////////////////////////////////////////////
	EContext        m_struEC;
	MEContext       m_struMEC;
	IS1Info         m_struIS1Info;
	ISIFInfo        m_struISIFInfo;
	
private:
	QString m_qstrDeviceConfigFilePath;
	QString m_qstrJSONConfigFilePath;
	QFile qfJConfig/*,qfDeviceConfig*/;
	QSettings *m_qsDeviceConfig;

	QByteArray m_qbaJData;
	QJsonParseError m_qjpeJErr;
	QJsonObject m_qjoJObj;
	QJsonDocument m_qjdJDoc;

	

};