From a2209cc432cb9c80779d83e51ef090f782e8404a Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 14 八月 2025 17:30:52 +0800
Subject: [PATCH] 1.Create PJ功能实现;

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

diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index cf687de..f19f047 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -13,7 +13,7 @@
 #include "CArmTray.h"
 #include "CCLinkIEControl.h"
 #include "CRobotTask.h"
-
+#include "ProcessJob.h"
 
 
 #define CTStep_Unknow                   0
@@ -64,7 +64,7 @@
         ONCTROUNDEND            onCTRoundEnd;
     } MasterListener;
 
-    class CMaster
+    class CMaster : public IResourceView
     {
     public:
         CMaster();
@@ -87,6 +87,7 @@
         void onTimer(UINT nTimerid);
         std::list<CEquipment*>& getEquipmentList();
         CEquipment* getEquipment(int id);
+        CEquipment* getEquipment(int id) const;
         void setCacheFilepath(const char* pszFilepath);
         int abortCurrentTask();
         int restoreCurrentTask();
@@ -104,6 +105,8 @@
         int carrierRelease(unsigned int port);
         int getContinuousTransferCount();
         void setContinuousTransferCount(int round);
+        int setProcessJobs(std::vector<SERVO::CProcessJob*>& pjs);
+        CLoadPort* getPortWithCarrierId(const std::string& carrierId) const;
 
     private:
         inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -134,6 +137,14 @@
         CRobotTask* createTransferTask_restore(CEquipment* pEqSrc, CLoadPort** pPorts);
         CRobotTask* createTransferTask_continuous_transfer(CEquipment* pSrcEq, int nSrcSlot,
             CEquipment* pTarEq, int nTarSlot, int armNo = 1);
+
+    public:
+        // —— IResourceView 覆写 ——(注意 const)
+        bool isProcessJobsEmpty() const override;
+        bool recipeExists(const std::string& ppid) const override;
+        bool carrierPresent(const std::string& carrierId) const override;
+        bool slotUsable(const std::string& carrierId, uint16_t slot) const override;
+        bool ceidDefined(uint32_t ceid) const override;
 
     private:
         CRITICAL_SECTION m_criticalSection;
@@ -179,6 +190,7 @@
     private:
         bool m_bEnableEventReport;
         bool m_bEnableAlarmReport;
+        std::vector<SERVO::CProcessJob*> m_processJobs;
     };
 }
 

--
Gitblit v1.9.3