#pragma once
#include "pch.h"
#include "ZZ_Types.h"
using namespace ZZ_MISCDEF::ZZ_DATAFILE;
using namespace ZZ_MISCDEF::ZZ_RUNPARAMS;
using namespace ZZ_MISCDEF::IRIS::FS;
class DataFileProcessor :public QObject
{
	Q_OBJECT
public:
	DataFileProcessor(QObject* parent = nullptr);
	virtual ~DataFileProcessor();
public:
public:
	void SetEnvironmentContex(EContext struEC);
	void SetManmadeEnviromentalContext(MEContext struMEC);
	void SetDeviceInfo(FSContext struDeviceContext);
	void SetData(std::vector<std::vector<DataFrame>> vecData);
	bool WriteDataFile();
private:
	void GenerateFilePath();
	bool WriteEnvironmentInfo();
	void WriteDeviceInfo();
	bool WriteData();


public:
private:
	QString m_qstrFullFileName;
	QString m_qstrFileName;
	QString m_qstrFilePath;

	QDateTime m_qdtTime;

	EContext  m_struEC;
	MEContext m_struMEC;
	FSContext m_struDeviceContext;
	std::vector<std::vector<DataFrame>> m_vecData;
};