You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB
C

3 years ago
// EMS.h: interface for the CEMS class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
#include "RunTask.h"
#include "Input.h"
#include "Output.h"
#include "commondef.h"
class CEMS : public CRunTask
{
public:
2 years ago
CEMS();
virtual ~CEMS();
3 years ago
bool CanMachineRun();
bool IsEMSEnable() const;
3 years ago
void UpdateMachineStart();
void UpdateMachineStop();
void UpdateUnitCount();
void InitParameters();
2 years ago
UINT RunThread() override;
3 years ago
void SetEMSOutput(int nNo, COutput* copOutput);
void SetEMSInput(int nNo, CInput* cipInput);
void SetGuiWindow(HWND hwnd);
private:
void CheckHostAllowMachineToRun();
void CheckMachineStatus();
void CheckUnitCountUpdate();
void GetMainApp();
CEvt m_evtSendUnitPulse;
CEvt m_evtMachineStop;
CEvt m_evtMachineStart;
2 years ago
HWND m_hwndMainApp{ nullptr };
3 years ago
2 years ago
CInput* m_cipEMSStatus{ nullptr };
COutput* m_copEMSCount{ nullptr };
3 years ago
2 years ago
bool m_bEMSEnable{ false };
bool m_bMsgSendOn{ false };
bool m_bMsgSendOff{ false };
3 years ago
2 years ago
int m_iEmsPulse{ 0 };
3 years ago
};