From 2b9a05133cb79683a940c9d8f53e0e7bc495009d Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 23 五月 2025 16:29:36 +0800
Subject: [PATCH] 1.Port状态展示界面;

---
 SourceCode/Bond/Servo/CLoadPort.cpp |  185 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 185 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index 940dbbc..1c7becf 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -466,6 +466,41 @@
 		return m_bAutoChangeEnable;
 	}
 
+	int CLoadPort::getPortStatus()
+	{
+		return m_portStatusReport.getPortStatus();
+	}
+
+	int CLoadPort::getCassetteSequenceNo()
+	{
+		return m_portStatusReport.getCassetteSequenceNo();
+	}
+
+	std::string& CLoadPort::getCassetteId()
+	{
+		return m_portStatusReport.getCassetteId();
+	}
+
+	int CLoadPort::getLoadingCassetteType()
+	{
+		return m_portStatusReport.getLoadingCassetteType();
+	}
+
+	int CLoadPort::getQTimeFlag()
+	{
+		return m_portStatusReport.getQTimeFlag();
+	}
+
+	int CLoadPort::getCassetteMappingState()
+	{
+		return m_portStatusReport.getCassetteMappingState();
+	}
+
+	int CLoadPort::getCassetteStatus()
+	{
+		return m_portStatusReport.getCassetteStatus();
+	}
+
 	/*
 	 1: Loading Port
 	 2: Unloading Port
@@ -616,6 +651,156 @@
 		return strDescription;
 	}
 
+	/*
+	 1: Load Ready(Load Request)
+	 2: Loaded
+	 3: In Use (Load Complete)
+	 4: Unload Ready (Unload Request)
+	 5: Empty (Unload Complete)
+	 6: Blocked
+ */
+	std::string& CLoadPort::getPortStatusDescription(int portStatus, std::string& strDescription)
+	{
+		switch (portStatus) {
+		case 1:
+			strDescription = _T("Load Ready(Load Request)");
+			break;
+		case 2:
+			strDescription = _T("Loaded");
+			break;
+		case 3:
+			strDescription = _T("In Use(Load Complete)");
+			break;
+		case 4:
+			strDescription = _T("Unload Ready(Unload Request)");
+			break;
+		case 5:
+			strDescription = _T("Empty(Unload Complete)");
+			break;
+		case 6:
+			strDescription = _T("Blocked");
+			break;
+		default:
+			strDescription = _T("");
+			break;
+		}
+
+		return strDescription;
+	}
+
+	/*
+	 1: G1 Cassette
+	 2: G2 Cassette
+	 3: G1 + G2 Cassette
+	 4: Empty Cassette
+	 *  Include this item only when cassette exists"
+	*/
+	std::string& CLoadPort::getLoadingCassetteTypeDescription(int type, std::string& strDescription)
+	{
+		switch (type) {
+		case 1:
+			strDescription = _T("G1 Cassette)");
+			break;
+		case 2:
+			strDescription = _T("G2 Cassette");
+			break;
+		case 3:
+			strDescription = _T("G1+G2 Cassette)");
+			break;
+		case 4:
+			strDescription = _T("Empty Cassette)");
+			break;
+		default:
+			strDescription = _T("");
+			break;
+		}
+
+		return strDescription;
+	}
+
+	/*
+	 1: Normal Un-loading
+	 2: Q-Time Over & Un-loading
+	*/
+	std::string& CLoadPort::getQTimeFlagDescription(int flag, std::string& strDescription)
+	{
+		switch (flag) {
+		case 1:
+			strDescription = _T("Normal Un-loading");
+			break;
+		case 2:
+			strDescription = _T("Q-Time Over & Un-loading");
+			break;
+		default:
+			strDescription = _T("");
+			break;
+		}
+
+		return strDescription;
+	}
+
+	/*
+	 1: mapping use
+	 2: mapping not use
+	*/
+	std::string& CLoadPort::getCassetteMappingStateDescription(int state, std::string& strDescription)
+	{
+		switch (state) {
+		case 1:
+			strDescription = _T("Mapping use");
+			break;
+		case 2:
+			strDescription = _T("Mapping not use");
+			break;
+		default:
+			strDescription = _T("");
+			break;
+		}
+
+		return strDescription;
+	}
+
+	/*
+	 1: No Cassette Exist
+	 2: Waiting for Cassette Data
+	 3: Waiting for Start Command
+	 4: Waiting for Processing
+	 5: In Processing
+	 6: Process Paused
+	 7: Process Completed
+	*/
+	std::string& CLoadPort::getCassetteStatusDescription(int state, std::string& strDescription)
+	{
+		switch (state) {
+		case 1:
+			strDescription = _T("No Cassette Exist");
+			break;
+		case 2:
+			strDescription = _T("Waiting for Cassette Data");
+			break;
+		case 3:
+			strDescription = _T("Waiting for Start Command");
+			break;
+		case 4:
+			strDescription = _T("Waiting for Processing");
+			break;
+		case 5:
+			strDescription = _T("In Processing");
+			break;
+		case 6:
+			strDescription = _T("Process Paused");
+			break;
+		case 7:
+			strDescription = _T("Process Completed");
+			break;
+		default:
+			strDescription = _T("");
+			break;
+		}
+
+		return strDescription;
+	}
+
 	void CLoadPort::onReceiveLBData(const char* pszData, size_t size)
 	{
 		static int type[] = { STEP_ID_PORT1_TYPE_CHANGE, STEP_ID_PORT2_TYPE_CHANGE,

--
Gitblit v1.9.3