From a8fb417ef1fb696723c8b8d5a340e8ca2e0312ae Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期六, 09 八月 2025 10:43:17 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang

---
 SourceCode/Bond/Servo/CMaster.h |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index ed55cd9..e5f868d 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -15,11 +15,15 @@
 #include "CRobotTask.h"
 
 
+#define CTStep_begin        0
+#define CTStep_end          99
+
 namespace SERVO {
     enum class MASTERSTATE {
         READY = 0,
         STARTING,
         RUNNING,
+        RUNNING_CONTINUOUS_TRANSFER,
         STOPPING,
         MSERROR
     };
@@ -31,7 +35,8 @@
     typedef std::function<void(void* pMaster, CEquipment* pEquipment, CVcrEventReport* pReport)> ONEQVCREVENTREPORT;
     typedef std::function<void(void* pMaster, CEquipment* pEquipment, int code)> ONEQDATACHANGED;
     typedef std::function<void(void* pMaster, CRobotTask* pTask, int code)> ONROBOTTASKEVENT;
-    typedef std::function<void(void* pMaster, CEquipment* pEquipment, short scanMap)> ONLOADPORTINUSE;
+    typedef std::function<void(void* pMaster, CEquipment* pEquipment, short status, __int64 data)> ONLOADPORTSTATUSCHANGED;
+    typedef std::function<void(void* pMaster, int round)> ONCTROUNDEND;
     typedef struct _MasterListener
     {
         ONMASTERSTATECHANGED    onMasterStateChanged;
@@ -41,7 +46,8 @@
         ONEQVCREVENTREPORT	    onEqVcrEventReport;
         ONEQDATACHANGED         onEqDataChanged;
         ONROBOTTASKEVENT        onRobotTaskEvent;
-        ONLOADPORTINUSE			onLoadPortInUse;
+        ONLOADPORTSTATUSCHANGED	onLoadPortStatusChanged;
+        ONCTROUNDEND            onCTRoundEnd;
     } MasterListener;
 
     class CMaster
@@ -57,6 +63,7 @@
         int init();
         int term();
         int start();
+        int startContinuousTransfer();
         int stop();
         void clearError();
         ULONGLONG getRunTime();
@@ -79,6 +86,10 @@
         void enableEventReport(bool bEnable);
         void enableAlarmReport(bool bEnable);
         bool isAlarmReportEnable();
+        int proceedWithCarrier(unsigned int port);
+        int carrierRelease(unsigned int port);
+        int getContinuousTransferCount();
+        void setContinuousTransferCount(int round);
 
     private:
         inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -107,6 +118,8 @@
         CRobotTask* createTransferTask_bake_to_cooling(CEquipment* pSrcEq);
         CRobotTask* createTransferTask_bakecooling_to_measurement(CEquipment* pSrcEq, CEquipment* pTarEq);
         CRobotTask* createTransferTask_restore(CEquipment* pEqSrc, CLoadPort** pPorts);
+        CRobotTask* createTransferTask_continuous_transfer(CEquipment* pSrcEq, int nSrcSlot,
+            CEquipment* pTarEq, int nTarSlot, int armNo = 1);
 
     private:
         CRITICAL_SECTION m_criticalSection;
@@ -115,6 +128,7 @@
         std::list<CEquipment*> m_listEquipment;
         std::string m_strFilepath;
         BOOL m_bDataModify;
+        bool m_bContinuousTransfer;
 
     private:
         /* 监控比特位的线程*/
@@ -143,6 +157,11 @@
 
         // 在开始工艺前是否先需要先比较map
         BOOL m_isCompareMapsBeforeProceeding;
+
+        // 千传圈数计数
+        int m_nContinuousTransferCount;
+        int m_nContinuousTransferStep;
+
     private:
         bool m_bEnableEventReport;
         bool m_bEnableAlarmReport;

--
Gitblit v1.9.3