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 |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index acd3065..35eb6fc 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -19,6 +19,8 @@
 #include "../DAQBridge/core/Collector.h"
 #include "CJobDataS.h"
 
+class CModel;
+
 
 #define CTStep_Unknow                   0
 #define CTStep_LoadPort_Aligner         1
@@ -99,6 +101,7 @@
 
 
     public:
+        void setModelCtx(CModel* pModel);
         void setListener(MasterListener listener);
         CRobotTask* getActiveRobotTask();
         int init();
@@ -192,6 +195,13 @@
         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();
@@ -273,9 +283,11 @@
     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;
@@ -284,5 +296,10 @@
     private:
         Collector* m_pCollector = nullptr;
         void CreateDAQBridgeServer();
+        inline void notifyControlJobChanged() {
+            if (m_listener.onControlJobChanged) {
+                m_listener.onControlJobChanged(this);
+            }
+        }
     };
 }

--
Gitblit v1.9.3