From d14420e7f85b5fe7289aafe6bef0c053dede3657 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期五, 16 一月 2026 11:20:39 +0800
Subject: [PATCH] 1.修复以下问题: CEID 校验恒通过:ceidDefined 返回 true,PauseEvent ID 不做有效性检查。Host 若下发无效 CEID,将被接受但运行时无法触发暂停,风险难以察觉。 建议的上线前防护 / 改进(无需真机也可先改) 2.软件侧警告id上抛;
---
SourceCode/Bond/Servo/CMaster.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index acd3065..c1f1755 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;
--
Gitblit v1.9.3