From 6cd9f24e01c7ecbb7ad47137677590d1d4ae2f04 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 24 三月 2025 08:44:06 +0800
Subject: [PATCH] 1.将CPanel修改为CGlass

---
 /dev/null                                   |   41 -------------
 SourceCode/Bond/Servo/Servo.vcxproj         |    4 
 SourceCode/Bond/Servo/Servo.vcxproj.filters |    4 
 SourceCode/Bond/Servo/CGlass.cpp            |   41 +++++++++++++
 SourceCode/Bond/Servo/CEquipment.cpp        |   30 +++++-----
 SourceCode/Bond/Servo/CGlass.h              |    6 +-
 SourceCode/Bond/Servo/CEquipment.h          |   10 +-
 SourceCode/Bond/Servo/CLoadPort.cpp         |    8 +-
 8 files changed, 72 insertions(+), 72 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index ad4a356..c24767e 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -201,7 +201,7 @@
 				std::to_string((int)item->getType()).c_str(), ""));
 		}
 
-		for (auto item : m_panelList) {
+		for (auto item : m_glassList) {
 			attrubutes.addAttribute(new CAttribute("Panel",
 				item->getID().c_str(), ""));
 		}
@@ -492,12 +492,12 @@
 
 		// 物料
 		if (code == FLOW_MOVE_MATERIAL) {
-			CPanel* pPanel = (CPanel*)pIntent->getContext();
-			ASSERT(pPanel);
-			if (!glassWillArrive(pPanel)) {
+			CGlass* pGlass = (CGlass*)pIntent->getContext();
+			ASSERT(pGlass);
+			if (!glassWillArrive(pGlass)) {
 				return FLOW_REJECT;
 			}
-			return glassArrived(pPanel);
+			return glassArrived(pGlass);
 		}
 
 
@@ -524,7 +524,7 @@
 
 		// 模拟取出第一张Panel,传送到下一环节
 		Lock();
-		CPanel* pContext = m_panelList.front();
+		CGlass* pContext = m_glassList.front();
 		pContext->addRef();
 
 		CIntent intent(FLOW_MOVE_MATERIAL, "", pContext);
@@ -533,7 +533,7 @@
 			LOGE("<CEquipment>对方拒绝接收Intent.");
 		}
 		else if (nRet == FLOW_ACCEPT) {
-			m_panelList.pop_front();
+			m_glassList.pop_front();
 			pContext->release();		// 添加到列队时addRef, 取出时release
 		}
 
@@ -543,27 +543,27 @@
 		return 0;
 	}
 
-	BOOL CEquipment::glassWillArrive(CPanel* pPanel)
+	BOOL CEquipment::glassWillArrive(CGlass* pGlass)
 	{
 		return TRUE;
 	}
 
-	int CEquipment::glassArrived(CPanel* pPanel)
+	int CEquipment::glassArrived(CGlass* pGlass)
 	{
 		Lock();
-		pPanel->addRef();
-		m_panelList.push_back(pPanel);
+		pGlass->addRef();
+		m_glassList.push_back(pGlass);
 		Unlock();
 		return FLOW_ACCEPT;
 	}
 
-	void CEquipment::addPanelToList(CPanel* pPanel)
+	void CEquipment::addGlassToList(CGlass* pGlass)
 	{
-		ASSERT(pPanel);
+		ASSERT(pGlass);
 
 		Lock();
-		pPanel->addRef();
-		m_panelList.push_back(pPanel);
+		pGlass->addRef();
+		m_glassList.push_back(pGlass);
 		Unlock();
 	}
 }
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 0ada23c..576adaa 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -16,7 +16,7 @@
 #include <vector>
 #include <map>
 #include <list>
-#include "CPanel.h"
+#include "CGlass.h"
 
 
 namespace SERVO {
@@ -89,9 +89,9 @@
 		std::vector<CPin*>& CEquipment::getInputPins();
 		std::vector<CPin*>& CEquipment::getOutputPins();
 		virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-		virtual BOOL glassWillArrive(CPanel* pPanel);
+		virtual BOOL glassWillArrive(CGlass* pGlass);
 		virtual int outputGlass(int port);
-		virtual int glassArrived(CPanel* pPanel);
+		virtual int glassArrived(CGlass* pGlass);
 
 	// 以下为从CC-Link读取到的Bit标志位检测函数
 	public:
@@ -111,7 +111,7 @@
 	protected:
 		inline void Lock() { EnterCriticalSection(&m_criticalSection); }
 		inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
-		void addPanelToList(CPanel* pPanel);
+		void addGlassToList(CGlass* pGlass);
 
 	protected:
 		EquipmentListener m_listener;
@@ -124,7 +124,7 @@
 		MemoryBlock m_blockWriteBit;
 		std::vector<CPin*> m_inputPins;
 		std::vector<CPin*> m_outputPins;
-		std::list<CPanel*> m_panelList;
+		std::list<CGlass*> m_glassList;
 
 
 		// 以下为从CC-Link读取到的Bit标志位
diff --git a/SourceCode/Bond/Servo/CGlass.cpp b/SourceCode/Bond/Servo/CGlass.cpp
new file mode 100644
index 0000000..b7d05fe
--- /dev/null
+++ b/SourceCode/Bond/Servo/CGlass.cpp
@@ -0,0 +1,41 @@
+#include "stdafx.h"
+#include "CGlass.h"
+
+
+namespace SERVO {
+	CGlass::CGlass()
+	{
+
+	}
+
+	CGlass::~CGlass()
+	{
+
+	}
+
+	std::string& CGlass::getClassName()
+	{
+		static std::string strName = "CGlass";
+		return strName;
+	}
+
+	std::string CGlass::toString()
+	{
+		std::string strText;
+		strText += "CGlass[";
+		strText += ("ID:" + m_strID + ";");
+		strText += "]";
+
+		return strText;
+	}
+
+	void CGlass::setID(const char* pszID)
+	{
+		m_strID = pszID;
+	}
+
+	std::string& CGlass::getID()
+	{
+		return m_strID;
+	}
+}
diff --git a/SourceCode/Bond/Servo/CPanel.h b/SourceCode/Bond/Servo/CGlass.h
similarity index 80%
rename from SourceCode/Bond/Servo/CPanel.h
rename to SourceCode/Bond/Servo/CGlass.h
index bc9c51a..fc50ed5 100644
--- a/SourceCode/Bond/Servo/CPanel.h
+++ b/SourceCode/Bond/Servo/CGlass.h
@@ -4,11 +4,11 @@
 
 
 namespace SERVO {
-	class CPanel : public CContext
+	class CGlass : public CContext
 	{
 	public:
-		CPanel();
-		virtual ~CPanel();
+		CGlass();
+		virtual ~CGlass();
 
 	public:
 		virtual std::string& getClassName();
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index 079b3f2..feef8e9 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -62,15 +62,15 @@
 	int CLoadPort::outputGlass(int port)
 	{
 		// 如果列表中没有Panel,模拟生成10张
-		if (m_panelList.empty()) {
+		if (m_glassList.empty()) {
 			static int ii = 0;
 			char szBuffer[64];
 			LOGI("<CLoadPort>模拟生成10张PANEL");
 			for (int i = 0; i < 10; i++) {
 				sprintf_s(szBuffer, "P20250320A1A%d", ++ii);
-				CPanel* pPanel = new CPanel();
-				pPanel->setID(szBuffer);
-				addPanelToList(pPanel);
+				CGlass* pGlass = new CGlass();
+				pGlass->setID(szBuffer);
+				addGlassToList(pGlass);
 			}
 		}
 
diff --git a/SourceCode/Bond/Servo/CPanel.cpp b/SourceCode/Bond/Servo/CPanel.cpp
deleted file mode 100644
index 00b3b46..0000000
--- a/SourceCode/Bond/Servo/CPanel.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "stdafx.h"
-#include "CPanel.h"
-
-
-namespace SERVO {
-	CPanel::CPanel()
-	{
-
-	}
-
-	CPanel::~CPanel()
-	{
-
-	}
-
-	std::string& CPanel::getClassName()
-	{
-		static std::string strName = "CPanel";
-		return strName;
-	}
-
-	std::string CPanel::toString()
-	{
-		std::string strText;
-		strText += "CPanel[";
-		strText += ("ID:" + m_strID + ";");
-		strText += "]";
-
-		return strText;
-	}
-
-	void CPanel::setID(const char* pszID)
-	{
-		m_strID = pszID;
-	}
-
-	std::string& CPanel::getID()
-	{
-		return m_strID;
-	}
-}
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj b/SourceCode/Bond/Servo/Servo.vcxproj
index 8b33129..1278d72 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj
+++ b/SourceCode/Bond/Servo/Servo.vcxproj
@@ -217,12 +217,12 @@
     <ClInclude Include="CEqStatusStep.h" />
     <ClInclude Include="CEqVCREnableStep.h" />
     <ClInclude Include="CFliper.h" />
+    <ClInclude Include="CGlass.h" />
     <ClInclude Include="CLoadPort.h" />
     <ClInclude Include="CMeasurement.h" />
     <ClInclude Include="ColorTransfer.h" />
     <ClInclude Include="CPageGraph1.h" />
     <ClInclude Include="CPageGraph2.h" />
-    <ClInclude Include="CPanel.h" />
     <ClInclude Include="CPanelAttributes.h" />
     <ClInclude Include="CPanelEquipment.h" />
     <ClInclude Include="CPanelMaster.h" />
@@ -285,12 +285,12 @@
     <ClCompile Include="CEqStatusStep.cpp" />
     <ClCompile Include="CEqVCREnableStep.cpp" />
     <ClCompile Include="CFliper.cpp" />
+    <ClCompile Include="CGlass.cpp" />
     <ClCompile Include="CLoadPort.cpp" />
     <ClCompile Include="CMeasurement.cpp" />
     <ClCompile Include="ColorTransfer.cpp" />
     <ClCompile Include="CPageGraph1.cpp" />
     <ClCompile Include="CPageGraph2.cpp" />
-    <ClCompile Include="CPanel.cpp" />
     <ClCompile Include="CPanelAttributes.cpp" />
     <ClCompile Include="CPanelEquipment.cpp" />
     <ClCompile Include="CPanelMaster.cpp" />
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj.filters b/SourceCode/Bond/Servo/Servo.vcxproj.filters
index ae66fd9..ef39ee3 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj.filters
+++ b/SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -67,13 +67,13 @@
     <ClCompile Include="CBakeCooling.cpp" />
     <ClCompile Include="CVacuumBake.cpp" />
     <ClCompile Include="Intent.cpp" />
-    <ClCompile Include="CPanel.cpp" />
     <ClCompile Include="EqsGraphWnd.cpp" />
     <ClCompile Include="ColorTransfer.cpp" />
     <ClCompile Include="MapPosWnd.cpp" />
     <ClCompile Include="HmTab.cpp" />
     <ClCompile Include="CPageGraph1.cpp" />
     <ClCompile Include="CPageGraph2.cpp" />
+    <ClCompile Include="CGlass.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="AlarmManager.h" />
@@ -139,13 +139,13 @@
     <ClInclude Include="CBakeCooling.h" />
     <ClInclude Include="CVacuumBake.h" />
     <ClInclude Include="Intent.h" />
-    <ClInclude Include="CPanel.h" />
     <ClInclude Include="EqsGraphWnd.h" />
     <ClInclude Include="ColorTransfer.h" />
     <ClInclude Include="MapPosWnd.h" />
     <ClInclude Include="HmTab.h" />
     <ClInclude Include="CPageGraph1.h" />
     <ClInclude Include="CPageGraph2.h" />
+    <ClInclude Include="CGlass.h" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="Servo.rc" />

--
Gitblit v1.9.3