From 44360bc2cdeee16be72f9cc4bfb42e0ac26b5b44 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期一, 19 一月 2026 14:47:19 +0800
Subject: [PATCH] 1.修改优化

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

diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 567a7b1..35eb6fc 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -1,5 +1,6 @@
 锘�#pragma once
 #include <list>
+#include <unordered_set>
 #include "CEquipment.h"
 #include "CEFEM.h"
 #include "CBonder.h"
@@ -17,6 +18,8 @@
 #include "CControlJob.h"
 #include "../DAQBridge/core/Collector.h"
 #include "CJobDataS.h"
+
+class CModel;
 
 
 #define CTStep_Unknow                   0
@@ -98,6 +101,7 @@
 
 
     public:
+        void setModelCtx(CModel* pModel);
         void setListener(MasterListener listener);
         CRobotTask* getActiveRobotTask();
         int init();
@@ -189,6 +193,15 @@
         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;
+        void setAllowedCeids(const std::vector<unsigned int>& ceids);
+        void handleCollectionEvent(uint32_t ceid);
+        bool raiseSoftAlarm(int alarmId,
+            const std::string& desc,
+            int level = -1,
+            int deviceId = 0,
+            int unitId = 0,
+            const char* deviceName = "Software",
+            const char* unitName = "App");
 
     public:
         int getLastError();
@@ -270,15 +283,23 @@
     private:
         bool m_bEnableEventReport;
         bool m_bEnableAlarmReport;
+        bool m_bPauseAlarmRaised;
         SERVO::CControlJob* m_pControlJob;
         std::vector<SERVO::CProcessJob*> m_processJobs;
         std::string m_strStatePath;
+        CModel* m_pModelCtx;
 
         int m_nTestFlag;
         std::list<CGlass*> m_bufGlass;
+        std::unordered_set<uint32_t> m_allowedCeids;
 
     private:
         Collector* m_pCollector = nullptr;
         void CreateDAQBridgeServer();
+        inline void notifyControlJobChanged() {
+            if (m_listener.onControlJobChanged) {
+                m_listener.onControlJobChanged(this);
+            }
+        }
     };
 }

--
Gitblit v1.9.3