Newer
Older
PrismSoftware / ECTrainer2 / Worker.h
#pragma once

#include "BaseProcess.h"
#include <stdio.h>
#include <Windows.h>
#include <tchar.h>
#include <string>
#include <mutex>

namespace mwut {
	class HPTimer;
};

enum class APP_STATUS;

class Worker : public BaseProcess
{
	const std::wstring LOG_FILENAME = _T("log.txt");
	APP_STATUS _AppStatus;
	FILE* _fpLog;
	mwut::HPTimer* _pTimer;
	std::mutex _mtxLog;

	void WriteLog(const TCHAR* msg = NULL);
	bool Routine();
	bool EventProc(MSG& msg);

public:
	// コンストラクタ
	Worker(ECTrainer* pEct);
	// デストラクタ
	~Worker();
	bool Init();
	bool StartStim();
	bool StopStim();
	APP_STATUS GetAppStatus() { return _AppStatus; }
};