From 3a9d54f7454c6085cdd9fde71ea8e321b9ac0402 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 12 九月 2025 11:50:01 +0800
Subject: [PATCH] 1.PanelDataReport事件上抛,以便上层检测到AOI 检测NG后停机; 2.CessetteSn种子数设定,保存到配置,以便程序关闭重开后,CessetteSn也能继续; 3.AOI增加工艺参数,修改解释规则;

---
 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 e79589d..8536ab2 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -33,6 +33,10 @@
 #define CTStep_begin                    CTStep_LoadPort_Aligner
 #define CTStep_end                      CTStep_Measurement_LoadPort
 
+#define ER_CODE_NOERROR                0
+#define ER_CODE_OPERATION_MODE_FAIL    -1
+#define ER_CODE_AOI_NG                 -2
+
 namespace SERVO {
     enum class MASTERSTATE {
         READY = 0,
@@ -41,7 +45,8 @@
         RUNNING_CONTINUOUS_TRANSFER,
         RUNNING_BATCH,
         STOPPING,
-        MSERROR
+        MSERROR,
+        ATHERERROR
     };
 
     typedef std::function<void(void* pMaster, MASTERSTATE state)> ONMASTERSTATECHANGED;
@@ -88,7 +93,7 @@
         int start();
         int startContinuousTransfer();
         int startBatch();
-        int stop();
+        int stop(int nErCode = ER_CODE_NOERROR);
         void clearError();
         ULONGLONG getRunTime();
         MASTERSTATE getState();
@@ -125,6 +130,9 @@
         bool saveState() const;
         bool loadState(const std::string& path);
         int getWipGlasses(std::vector<CGlass*>& glasses);
+        void test();
+        int getPortCassetteSnSeed(int port);
+        void setPortCassetteSnSeed(int port, int seed);
 
     private:
         inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -165,6 +173,10 @@
         bool ceidDefined(uint32_t ceid) const override;
 
     public:
+        int getLastError();
+        std::string& getLastErrorText();
+
+    public:
         // 新增函数
         CProcessJob* acquireNextProcessJob();
         CGlass* acquireNextGlass();

--
Gitblit v1.9.3