From 549e14363badd7e33f497897ea5a2454e1a1f7a1 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 20 九月 2025 16:16:16 +0800
Subject: [PATCH] 1.续费完善批工艺;
---
SourceCode/Bond/Servo/CMaster.h | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 2d4d697..e014f7c 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();
@@ -123,7 +128,15 @@
CControlJob* getControlJob();
CLoadPort* getPortWithCarrierId(const std::string& carrierId) const;
bool saveState() const;
- bool loadState(const std::string& path);
+ bool loadState();
+ void setStateFile(const std::string& path);
+ int getWipGlasses(std::vector<CGlass*>& glasses);
+ void test();
+ bool moveGlassToBuf(int eqid, int slotNo);
+ bool moveGlassToSlot(int eqid, int slotNo);
+ int getPortCassetteSnSeed(int port);
+ void setPortCassetteSnSeed(int port, int seed);
+ CGlass* getGlass(int scrPort, int scrSlot);
private:
inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -164,6 +177,10 @@
bool ceidDefined(uint32_t ceid) const override;
public:
+ int getLastError();
+ std::string& getLastErrorText();
+
+ public:
// 新增函数
CProcessJob* acquireNextProcessJob();
CGlass* acquireNextGlass();
@@ -175,7 +192,11 @@
bool checkAndUpdatePjComplete(CProcessJob* pJob);
bool checkAndUpdateCjComplete(CControlJob* pJob);
CProcessJob* getGlassProcessJob(CGlass* pGlass);
-
+ bool completeControlJob();
+ bool forceCompleteControlJob(std::string description);
+ bool canCreateControlJob();
+ bool canCompleteControlJob();
+ bool canDeleteControlJob();
private:
CRITICAL_SECTION m_criticalSection;
@@ -220,6 +241,8 @@
// 千传圈数计数
int m_nContinuousTransferCount;
int m_nContinuousTransferStep;
+ int m_nContinuousWorkingPort;
+ int m_nContinuousWorkingSlot;
// 新增已经开始处理的ProcessJob列表
std::vector<CProcessJob*> m_inProcesJobs;
@@ -236,6 +259,7 @@
std::string m_strStatePath;
int m_nTestFlag;
+ std::list<CGlass*> m_bufGlass;
};
}
--
Gitblit v1.9.3