123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #pragma once
- #include "DiosSMachineV3.h"
- #define SM_isDisplayCall 0
- // CSMachineDlg 对话框
- //namespace DIOS::Dev::Detail::SMachine
- //{
- class CSMachineDlg : public CDiosBasicDlg
- {
- DECLARE_DYNAMIC(CSMachineDlg)
- public:
- CSMachineDlg(CWnd* pParent = nullptr); // 标准构造函数
- ~CSMachineDlg();
- void SetMagMap() override; //设置消息对照表
- void InitPageElements(bool act) override;
- void ShowPageElements(bool init = FALSE, bool exit = FALSE, bool cfg = FALSE,
- bool general = FALSE);
- bool CreatMode(bool act) override; //初始化设备模块
- // 对话框数据
- #ifdef AFX_DESIGN_TIME
- enum { IDD = IDD_DIALOG4 };
- #endif
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
- bool AppInitial(bool act); //初始化模块
- bool InitLog(); //初始化日志模块
- void ExitLog();
- // 生成的消息映射函数
- virtual BOOL OnInitDialog();
- //类属性
- //SMachine
- string m_strWorkflowFile{ "" };
- string m_strSetSMName{ "" };
- string m_strDeviceUID{ "" };
- string m_strWS{ "" };
- string m_strTriggerEvent{ "" };
- string m_strError{ "" };
- string m_strGetSMName{ "" };
- string m_strCurrentState{ "" };
- bool m_bRunMode{ true };
- bool m_bDebugMode{ false };
-
- public:
- //按钮
- afx_msg void OnBnClickedButton3();//选择配置
- afx_msg void OnBnClickedButton1();//初始化
- afx_msg void OnBnClickedButton2();//退出
- afx_msg void OnBnClickedButton4();//LoadMachine
- afx_msg void OnBnClickedButton5();//SetMSName
- afx_msg void OnBnClickedButton6();//AddDevices
- afx_msg void OnBnClickedButton7();//InitPreState
- afx_msg void OnBnClickedButton8();//StartSM
- afx_msg void OnBnClickedButton9();//StopSM
- afx_msg void OnBnClickedButton10();//TriggerEvent
- afx_msg void OnBnClickedButton11();//GetSMError
- afx_msg void OnBnClickedButton12();//GetSMName
- afx_msg void OnBnClickedButton13();//GoToState
- afx_msg void OnBnClickedButton14();//RunMode?
- afx_msg void OnBnClickedButton15();//DebugMode?
- DECLARE_MESSAGE_MAP()
- public:
- #if SM_isDisplayCall
- inline bool CheckHasFunInMap(const char* name);
- #endif
- static DWORD WaitforStateNotify(LPVOID pParam); //循环线程
- #if SM_isDisplayCall
- map<string, void*> m_SMFunMap; //状态机接口映射
- DiosSMachine* m_ptrSMachine{ nullptr };
- #else
- DiosSMachine* m_ptrSMachine{ nullptr };
- #endif
- HANDLE m_hNotifyThread{ NULL }; //状态更新线程句柄
- HANDLE m_hStateFinishFlag{ NULL }; //状态更新结束句柄
- HANDLE m_hStateExitFlag{ NULL }; //状态更新线程退出句柄
- };
- //}
|