From e1dade1e252ffe20ba74a091ca9e6b78dae737bb Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 12 九月 2025 17:07:46 +0800
Subject: [PATCH] 1. 添加程序唯一运行凭证 2. 添加程序闪退时的DUMP文件

---
 SourceCode/Bond/Servo/CServoUtilsTool.cpp |  157 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 138 insertions(+), 19 deletions(-)

diff --git a/SourceCode/Bond/Servo/CServoUtilsTool.cpp b/SourceCode/Bond/Servo/CServoUtilsTool.cpp
index 841e980..1bf444a 100644
--- a/SourceCode/Bond/Servo/CServoUtilsTool.cpp
+++ b/SourceCode/Bond/Servo/CServoUtilsTool.cpp
@@ -16,31 +16,13 @@
 
 	std::string CServoUtilsTool::getEqUnitName(int eqid, int unit)
 	{
-		/*
-#define EQ_ID_LOADPORT1			1
-#define EQ_ID_LOADPORT2			2
-#define EQ_ID_LOADPORT3			3
-#define EQ_ID_LOADPORT4			4
-#define EQ_ID_ARM_TRAY1			5
-#define EQ_ID_ARM_TRAY2			6
-#define EQ_ID_ALIGNER			7
-#define EQ_ID_FLIPER			8
-#define EQ_ID_VACUUMBAKE		9
-#define EQ_ID_Bonder1			10
-#define EQ_ID_Bonder2			11
-#define EQ_ID_BAKE_COOLING		12
-#define EQ_ID_MEASUREMENT		13
-#define EQ_ID_EFEM				100
-#define EQ_ID_ARM				101
-#define EQ_ID_OPERATOR_REMOVE	102
-*/
 		char szBuffer[256];
 		if (eqid == EQ_ID_LOADPORT1
 			|| eqid == EQ_ID_LOADPORT2
 			|| eqid == EQ_ID_LOADPORT3
 			|| eqid == EQ_ID_LOADPORT4
 			) {
-			sprintf_s(szBuffer, 256, "Port%d(Slot%d)", unit, eqid - EQ_ID_LOADPORT1 + 1);
+			sprintf_s(szBuffer, 256, "Port%d(Slot%d)", eqid - EQ_ID_LOADPORT1 + 1, unit + 1);
 			return std::string(szBuffer);
 		}
 
@@ -82,6 +64,143 @@
 			return "AOI";
 		}
 
+
+		if (eqid == EQ_ID_ARM_TRAY1) {
+			return "ARM1";
+		}
+
+		if (eqid == EQ_ID_ARM_TRAY2) {
+			return "ARM2";
+		}
+
 		return "";
 	}
+
+	std::string CServoUtilsTool::getEqUnitName(int eqid, int unit, int slot)
+	{
+		char szBuffer[256];
+		if (eqid == EQ_ID_LOADPORT1
+			|| eqid == EQ_ID_LOADPORT2
+			|| eqid == EQ_ID_LOADPORT3
+			|| eqid == EQ_ID_LOADPORT4
+			) {
+			sprintf_s(szBuffer, 256, "Port%d(Slot%d)", eqid - EQ_ID_LOADPORT1 + 1, slot);
+			return std::string(szBuffer);
+		}
+
+		if (eqid == EQ_ID_ALIGNER) {
+			return "Aligner";
+		}
+
+		if (eqid == EQ_ID_FLIPER) {
+			return "Fliper";
+		}
+
+		if (eqid == EQ_ID_VACUUMBAKE) {
+			if (unit == 0) {
+				sprintf_s(szBuffer, 256, "烘烤A腔(Slot%d)", slot);
+				return std::string(szBuffer);
+			}
+			if (unit == 1) {
+				sprintf_s(szBuffer, 256, "烘烤B腔(Slot%d)", slot);
+				return std::string(szBuffer);
+			}
+		}
+
+		if (eqid == EQ_ID_Bonder1) {
+			sprintf_s(szBuffer, 256, "Bonder1(Slot%d)", slot);
+			return std::string(szBuffer);
+		}
+
+		if (eqid == EQ_ID_Bonder2) {
+			sprintf_s(szBuffer, 256, "Bonder2(Slot%d)", slot);
+			return std::string(szBuffer);
+		}
+
+		if (eqid == EQ_ID_BAKE_COOLING) {
+
+			if (slot == 0) return "后烘烤A腔";
+			if (slot == 1) return "冷却A";
+			if (slot == 2) return "后烘烤B腔";
+			if (slot == 3) return "冷却B";
+		}
+
+		if (eqid == EQ_ID_MEASUREMENT) {
+			return "AOI";
+		}
+
+
+		if (eqid == EQ_ID_ARM_TRAY1) {
+			return "ARM1";
+		}
+
+		if (eqid == EQ_ID_ARM_TRAY2) {
+			return "ARM2";
+		}
+
+		return "";
+	}
+
+	std::string CServoUtilsTool::getMaterialsTypeText(MaterialsType type)
+	{
+		if (type == MaterialsType::G1) {
+			return "G1";
+		}
+
+		if (type == MaterialsType::G2) {
+			return "G2";
+		}
+
+		return "";
+	}
+
+	std::string CServoUtilsTool::getGlassStateText(SERVO::GlsState state)
+	{
+		switch (state)
+		{
+		case SERVO::GlsState::NoState:
+			return "NoState";
+			break;
+		case SERVO::GlsState::Queued:
+			return "Queued";
+			break;
+		case SERVO::GlsState::InProcess:
+			return "InProcess";
+			break;
+		case SERVO::GlsState::Paused:
+			return "Paused";
+			break;
+		case SERVO::GlsState::Completed:
+			return "Completed";
+			break;
+		case SERVO::GlsState::Aborted:
+			return "Aborted";
+			break;
+		case SERVO::GlsState::Failed:
+			return "Failed";
+			break;
+		default:
+			return "";
+			break;
+		}
+	}
+
+	std::string CServoUtilsTool::getInspResultText(SERVO::InspResult result)
+	{
+		switch (result)
+		{
+		case SERVO::InspResult::NotInspected:
+			return "";
+			break;
+		case SERVO::InspResult::Pass:
+			return "Pass";
+			break;
+		case SERVO::InspResult::Fail:
+			return "Fail";
+			break;
+		default:
+			return "";
+			break;
+		}
+	}
 }

--
Gitblit v1.9.3