From 4e5df2e71445ca3c0cc412e24510234e671b6072 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期四, 19 六月 2025 16:18:33 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang

---
 SourceCode/Bond/Servo/CMaster.h |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 2be2371..28e2f5f 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -16,11 +16,12 @@
 
 
 namespace SERVO {
-    enum MASTERSTATE {
+    enum class MASTERSTATE {
         READY = 0,
         STARTING,
         RUNNING,
-        STOPPING
+        STOPPING,
+        MSERROR
     };
 
     typedef std::function<void(void* pMaster, MASTERSTATE state)> ONMASTERSTATECHANGED;
@@ -55,6 +56,7 @@
         int term();
         int start();
         int stop();
+        void clearError();
         ULONGLONG getRunTime();
         MASTERSTATE getState();
         unsigned DispatchProc();
@@ -63,6 +65,9 @@
         std::list<CEquipment*>& getEquipmentList();
         CEquipment* getEquipment(int id);
         void setCacheFilepath(const char* pszFilepath);
+        int abortCurrentTask();
+        void setPortType(unsigned int index, BOOL enable, int type, int mode,
+            int cassetteType, int transferMode, BOOL autoChangeEnable);
 
     private:
         inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -85,9 +90,11 @@
         void serialize(CArchive& ar);
         void setState(MASTERSTATE state);
         CRobotTask* createTransferTask(CEquipment* pSrcEq, CEquipment* pTarEq,
-            MaterialsType primaryType = MaterialsType::G1, MaterialsType secondaryType = MaterialsType::G2);
+            MaterialsType primaryType = MaterialsType::G1, MaterialsType secondaryType = MaterialsType::G2,
+            int armNo = 1);
         CRobotTask* createTransferTask_bonder_to_bakecooling(CEquipment* pSrcEq, CEquipment* pTarEq);
         CRobotTask* createTransferTask_bake_to_cooling(CEquipment* pSrcEq);
+        CRobotTask* createTransferTask_bakecooling_to_measurement(CEquipment* pSrcEq, CEquipment* pTarEq);
 
     private:
         CRITICAL_SECTION m_criticalSection;
@@ -117,6 +124,10 @@
         // 当前任务和已完成任务列表
         CRobotTask* m_pActiveRobotTask;
         std::list< CRobotTask* > m_listTask;
+
+        // 错误代码
+        int m_nLastError;
+        std::string m_strLastError;
     };
 }
 

--
Gitblit v1.9.3