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.

75 lines
2.9 KiB
C++

#pragma once
#include "SmartPtr.h"
#include "WorkCmd.h"
#include "WorkCmdContainer.h"
#include "WorkTime.h"
class CWorkCmdInvoker
{
public:
CWorkCmdInvoker();
virtual ~CWorkCmdInvoker(void);
void ExcuteAllCmd(bool bNewThread = true,bool WaitForThread = true);
void ExcuteAllCmdExt();
void Excute();
void UpdateInfo();
bool IsCancel(){return m_bCancel;};
void AddCmd(CWorkCmd *p);
void ClearCmd();
void ExcuteCmd(bool bNewThread,bool WaitForThread);
void ExcuteCmdExt();
bool IsAllCmdExcuted();
void SetCmdInvokerName(CString s){m_CmdInvokerName = s;};
bool IsbExcuting(){return m_bExcuting;};
void InitCmdList(CListCtrl &List);
void UpdateCmdList(CListCtrl &List);
COLORREF GetCmdListColor(int Idx);
CString GetCurExcuteCmdInfo(){return m_CurExcuteCmdInfo;};
void SetbDlgWorkCmdListOpened(bool b){m_bDlgWorkCmdListOpened = b;};
bool IsbDlgWorkCmdListOpened(){return m_bDlgWorkCmdListOpened;};
void SetbExcutingPause(bool b);
void SetbExcutingStop(){m_bExcutingStop = true;};
bool IsbExcutingPause(){return m_bExcutingPause;};
CString GetInvokerWorkTime(){return m_InvokerWorkTime.GetTimeSpanStr();};//获取当前执行时间字符串
private:
private:
bool m_bCancel;//指令执行是否被中断
bool m_bExcuting;//是否正在执行
CString m_CmdInvokerName;//Invoker 的名称
CString m_CurExcuteCmdInfo;//当前执行的cmd 信息
vector<Sptr<CWorkCmd>> m_WorkCmdVec;//工作指令容器
bool m_bNeedUpdateCmdList;//是否需要刷新cmd 列表
bool m_bDlgWorkCmdListOpened;//list 对话框是否打开
bool m_bExcutingStop;//停止cmd 执行
bool m_bExcutingPause;//执行cmd 暂停(可以恢复)
CWorkTime m_InvokerWorkTime;//每个Invoker 都有自己的计时器
};
extern bool gStopAllWrokCmd;
extern bool gAllCmdInvokerStopFlg;
extern CWorkCmdInvoker gCmdInvoker_WaferTransfer;//手动wafer 传输的Invoker
extern CWorkCmdInvoker gCmdInvoker_WaferAneal;//负责管理wafer 退火的Invoker
extern CWorkCmdInvoker gCmdInvoker_ManualOperation;//负责管理手动操作 cmd 的Invoker
extern CWorkCmdInvoker gCmdInvoker_JobQueueCtrl;//用于job 控制的Invoker
extern CWorkCmdInvoker gCmdInvoker_FoupLoadPort1;//用于FoupLoadPort1 控制的Invoker
extern CWorkCmdInvoker gCmdInvoker_FoupLoadPort2;//用于FoupLoadPort2 控制的Invoker
extern CWorkCmdInvoker gCmdInvoker_TrheeLightCtrl;//用于TrheeLightCtrl 控制的Invoker
extern CWorkCmdInvoker gCmdInvoker_ClearWarning;//用于清除报警的Invoker