From c743df7d475735b26395c6ed5c17b4be2d972be2 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 28 五月 2025 16:21:12 +0800
Subject: [PATCH] 1.初步去掉GlassList, 替换为Slot,待测;

---
 SourceCode/Bond/Servo/CArm.cpp            |   36 +-
 SourceCode/Bond/Servo/CVacuumBake.cpp     |   35 --
 SourceCode/Bond/Servo/CJobDataS.h         |    3 
 SourceCode/Bond/Servo/CFliper.cpp         |   35 --
 SourceCode/Bond/Servo/CJobDataS.cpp       |   12 
 SourceCode/Bond/Servo/CEFEM.h             |    1 
 SourceCode/Bond/Servo/CBakeCooling.cpp    |   10 
 SourceCode/Bond/Servo/CSlot.cpp           |   10 
 SourceCode/Bond/Servo/CBakeCooling.h      |    1 
 SourceCode/Bond/Servo/CEquipment.cpp      |  312 ++++++++---------------
 SourceCode/Bond/Servo/CAligner.h          |    2 
 SourceCode/Bond/Servo/CBonder.h           |    2 
 SourceCode/Bond/Servo/CPageGraph2.cpp     |   18 
 SourceCode/Bond/Servo/CJobDataC.cpp       |   11 
 SourceCode/Bond/Servo/CLoadPort.h         |    4 
 SourceCode/Bond/Servo/CJobDataB.cpp       |   12 
 SourceCode/Bond/Servo/CLoadPort.cpp       |   38 +-
 SourceCode/Bond/Servo/CMeasurement.h      |    1 
 SourceCode/Bond/Servo/CVacuumBake.h       |    2 
 SourceCode/Bond/Servo/CSlot.h             |    1 
 SourceCode/Bond/Servo/CMeasurement.cpp    |   10 
 SourceCode/Bond/Servo/CJobDataA.cpp       |   12 
 SourceCode/Bond/Servo/CJobDataA.h         |    3 
 SourceCode/Bond/Servo/CJobDataB.h         |    3 
 SourceCode/Bond/Servo/CAligner.cpp        |   30 --
 SourceCode/Bond/Servo/CEquipmentPage2.cpp |   16 
 SourceCode/Bond/Servo/CJobDataC.h         |    3 
 SourceCode/Bond/Servo/CPin.cpp            |    2 
 SourceCode/Bond/Servo/CEFEM.cpp           |   10 
 SourceCode/Bond/Servo/CEquipment.h        |   23 
 SourceCode/Bond/Servo/CBonder.cpp         |   59 ----
 SourceCode/Bond/Servo/CFliper.h           |    2 
 SourceCode/Bond/Servo/Common.h            |    5 
 33 files changed, 261 insertions(+), 463 deletions(-)

diff --git a/SourceCode/Bond/Servo/CAligner.cpp b/SourceCode/Bond/Servo/CAligner.cpp
index f656bf6..c15885e 100644
--- a/SourceCode/Bond/Servo/CAligner.cpp
+++ b/SourceCode/Bond/Servo/CAligner.cpp
@@ -67,34 +67,4 @@
 	{
 		return __super::recvIntent(pPin, pIntent);
 	}
-
-	BOOL CAligner::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return m_glassList.empty();
-	}
-
-	BOOL CAligner::onPreStoredJob(int port, CJobDataB* pJobDataB)
-	{
-		CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-		if (pJobDataS == nullptr) {
-			LOGE("<CAligner-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(),
-				pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-			return FALSE;
-		}
-
-		// 只能一片一片的对位
-		Lock();
-		if (!m_glassList.empty()) {
-			Unlock();
-			LOGE("<CEquipment-%s>onPreFetchedOutJob,当前机器或单元存在玻璃片,不能进料,请注意风险!", m_strName.c_str());
-			return FALSE;
-		}
-
-		return TRUE;
-	}
 }
diff --git a/SourceCode/Bond/Servo/CAligner.h b/SourceCode/Bond/Servo/CAligner.h
index d48eb87..a1ce3be 100644
--- a/SourceCode/Bond/Servo/CAligner.h
+++ b/SourceCode/Bond/Servo/CAligner.h
@@ -20,8 +20,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
-        virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB);
 	};
 }
 
diff --git a/SourceCode/Bond/Servo/CArm.cpp b/SourceCode/Bond/Servo/CArm.cpp
index 77e43d3..3a8d15b 100644
--- a/SourceCode/Bond/Servo/CArm.cpp
+++ b/SourceCode/Bond/Servo/CArm.cpp
@@ -37,7 +37,14 @@
 	// 必须要实现的虚函数,在此初始化Slot信息
 	void CArm::initSlots()
 	{
-
+		m_slot[0].enable();
+		m_slot[0].setPosition(m_nID);
+		m_slot[0].setNo(1);
+		m_slot[0].setName("Slot 1(Temp)");
+		m_slot[1].enable();
+		m_slot[1].setPosition(m_nID);
+		m_slot[1].setNo(2);
+		m_slot[1].setName("Slot 2(Temp)");
 	}
 
 	void CArm::onTimer(UINT nTimerid)
@@ -65,13 +72,19 @@
 		// 原:保证列表中只存储一个物料
 		// 修改为:先清空之前的,再添加当前pGlass, 如果pGlass有buddy,也要加入列表中
 		Lock();
-		for (auto item : m_glassList) {
-			item->release();
+		CGlass* pPreviousGlass;
+		pPreviousGlass = (CGlass*)m_slot[0].getContext();
+		if (pPreviousGlass != nullptr) {
+			pPreviousGlass->release();
 		}
-		m_glassList.clear();
-		addGlassToList(pGlass);
+		pPreviousGlass = (CGlass*)m_slot[1].getContext();
+		if (pPreviousGlass != nullptr) {
+			pPreviousGlass->release();
+		}
+
+		m_slot[0].setContext(pGlass);
 		if (pGlass->getBuddy() != nullptr) {
-			addGlassToList(pGlass->getBuddy());
+			m_slot[1].setContext(pGlass->getBuddy());
 		}
 		Unlock();
 
@@ -85,17 +98,14 @@
 	int CArm::tempFetchOut(OUT CGlass*& pGlass)
 	{
 		Lock();
-		if (m_glassList.empty()) {
+		CGlass* pPreviousGlass = (CGlass*)m_slot[0].getContext();
+		if (pPreviousGlass == nullptr) {
 			Unlock();
 			return -1;
 		}
-
-		pGlass = m_glassList.front();
+		pGlass = pPreviousGlass;
 		pGlass->addRef();
-		for (auto item : m_glassList) {
-			item->release();
-		}
-		m_glassList.clear();
+		m_slot[0].setContext(nullptr);
 		Unlock();
 
 		if (m_listener.onDataChanged != nullptr) {
diff --git a/SourceCode/Bond/Servo/CBakeCooling.cpp b/SourceCode/Bond/Servo/CBakeCooling.cpp
index 7d91de0..4850fb6 100644
--- a/SourceCode/Bond/Servo/CBakeCooling.cpp
+++ b/SourceCode/Bond/Servo/CBakeCooling.cpp
@@ -67,16 +67,6 @@
 		return __super::recvIntent(pPin, pIntent);
 	}
 
-	BOOL CBakeCooling::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return (m_glassList.size() < 4);
-	}
-
 	int CBakeCooling::getIndexerOperationModeBaseValue()
 	{
 		return 25000;
diff --git a/SourceCode/Bond/Servo/CBakeCooling.h b/SourceCode/Bond/Servo/CBakeCooling.h
index 6ecf093..5af948a 100644
--- a/SourceCode/Bond/Servo/CBakeCooling.h
+++ b/SourceCode/Bond/Servo/CBakeCooling.h
@@ -20,7 +20,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
         virtual int getIndexerOperationModeBaseValue();
 	};
 }
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 87f4a7d..8be694e 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -371,16 +371,6 @@
 		return __super::recvIntent(pPin, pIntent);
 	}
 
-	BOOL CBonder::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return m_glassList.empty();
-	}
-
 	void CBonder::setIndex(unsigned int index)
 	{
 		m_nIndex = index;
@@ -391,39 +381,6 @@
 		return m_nIndex;
 	}
 
-	BOOL CBonder::onPreStoredJob(int port, CJobDataB* pJobDataB)
-	{
-		CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-		if (pJobDataS == nullptr) {
-			LOGE("<CBonder-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(),
-				pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-			return FALSE;
-		}
-
-		// 如果为空,可以进G1或G2
-		// 如果有一片玻璃,当前玻璃为G1则可进G2, 当前玻璃为G2则可进G1
-		BOOL bCheck = FALSE;
-		Lock();
-		size_t size = m_glassList.size();
-		if (size == 0) {
-			bCheck = TRUE;
-		}
-		else if (size == 1) {
-			CGlass* pGlass = m_glassList.front();
-			if ((pGlass->getType() == MaterialsType::G1 && pJobDataS->getMaterialsType() == (int)MaterialsType::G2)
-				|| (pGlass->getType() == MaterialsType::G2 && pJobDataS->getMaterialsType() == (int)MaterialsType::G1)) {
-				bCheck = TRUE;
-			}
-		}
-		Unlock();
-
-		if (!bCheck) {
-			LOGE("<CEquipment-%s>onPreFetchedOutJob,当前机器不满足进料条件,或已存在两片玻璃,或G2与G1不匹配,请注意风险!", m_strName.c_str());
-		}
-
-		return bCheck;
-	}
-
 	int CBonder::onProcessData(CProcessData* pProcessData)
 	{
 		CEquipment::onProcessData(pProcessData);
@@ -431,28 +388,23 @@
 
 		// 检查数据,当前两片玻璃,一片为G1, 一片为G2, 且pProcessData中的id能匹配G1或G2
 		Lock();
-		if (m_glassList.size() != 2) {
-			Unlock();
-			LOGE("<CBonder-%s>onProcessData,绑定失败,腔体内必须有且仅有两片玻璃!", m_strName.c_str());
-			return -1;
-		}
-
-		CGlass* pGlass1 = m_glassList.front();
-		CGlass* pGlass2 = m_glassList.back();
-		Unlock();
-
+		CGlass* pGlass1 = getGlassFromSlot(1);
+		CGlass* pGlass2 = getGlassFromSlot(2);
 		if (pGlass1->getBuddy() != nullptr || pGlass2->getBuddy() != nullptr) {
 			LOGE("<CBonder-%s>onProcessData,错误!玻璃较早前已被绑定,请检查数据是否正确!", m_strName.c_str());
+			Unlock();
 			return -1;
 		}
 
 		if (pGlass1->getBuddy() != nullptr || pGlass2->getBuddy() != nullptr) {
 			LOGE("<CBonder-%s>onProcessData,错误!玻璃较早前已被贴合,请检查数据是否正确!", m_strName.c_str());
+			Unlock();
 			return -1;
 		}
 
 		if (pGlass1->getType() == pGlass2->getType()) {
 			LOGE("<CBonder-%s>onProcessData,错误!两片玻璃未匹配,必须分别为G1和G2类型,请检查数据是否正确!", m_strName.c_str());
+			Unlock();
 			return -1;
 		}
 
@@ -460,6 +412,7 @@
 		pGlass2->setBuddy(pGlass1);
 		LOGE("<CBonder-%s>onProcessData,%s和%s已贴合!", m_strName.c_str(),
 			pGlass1->getID().c_str(), pGlass2->getID().c_str());
+		Unlock();
 
 		return 0;
 	}
diff --git a/SourceCode/Bond/Servo/CBonder.h b/SourceCode/Bond/Servo/CBonder.h
index 90acdfc..28f557f 100644
--- a/SourceCode/Bond/Servo/CBonder.h
+++ b/SourceCode/Bond/Servo/CBonder.h
@@ -21,8 +21,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
-        virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB);
         virtual int onProcessData(CProcessData* pProcessData);
         virtual int getIndexerOperationModeBaseValue();
 
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index ec044d2..e697f02 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -654,16 +654,6 @@
 		return __super::recvIntent(pPin, pIntent);
 	}
 
-	BOOL CEFEM::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return m_glassList.empty();
-	}
-
 	void CEFEM::onReceiveLBData(const char* pszData, size_t size)
 	{
 		__super::onReceiveLBData(pszData, size);
diff --git a/SourceCode/Bond/Servo/CEFEM.h b/SourceCode/Bond/Servo/CEFEM.h
index 3e10d3f..b01036f 100644
--- a/SourceCode/Bond/Servo/CEFEM.h
+++ b/SourceCode/Bond/Servo/CEFEM.h
@@ -25,7 +25,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
         virtual void onReceiveLBData(const char* pszData, size_t size);
         virtual int onReceivedJob(int port, CJobDataS* pJobDataS);
         virtual int onSentOutJob(int port, CJobDataS* pJobDataS);
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index d8cad41..edd9ed3 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -43,10 +43,13 @@
 
 	CEquipment::~CEquipment()
 	{
-		for (auto item : m_glassList) {
-			item->release();
+		for (int i = 0; i < SLOT_MAX; i++) {
+			CContext* pContext = m_slot[i].getContext();
+			if (pContext != nullptr) {
+				pContext->release();
+				m_slot[i].setContext(nullptr);
+			}
 		}
-		m_glassList.clear();
 
 		for (auto item : m_mapStep) {
 			delete item.second;
@@ -149,6 +152,7 @@
 	{
 		initPins();
 		initSteps();
+		initSlots();
 		for (auto item : m_mapStep) {
 			item.second->init();
 		}
@@ -251,9 +255,19 @@
 				std::to_string((int)item->getType()).c_str(), "", weight++));
 		}
 
-		for (auto item : m_glassList) {
-			attrubutes.addAttribute(new CAttribute("Glass",
-				item->getID().c_str(), "", weight++));
+		for (int i = 0; i < SLOT_MAX; i++) {
+			if (!m_slot[i].isEnable()) continue;
+
+			CGlass* pGlass = (CGlass*)m_slot[i].getContext();
+			if (pGlass == nullptr) {
+				attrubutes.addAttribute(new CAttribute(m_slot[i].getName().c_str(),
+					"", "", weight++));
+			}
+			else {
+				attrubutes.addAttribute(new CAttribute(m_slot[i].getName().c_str(),
+					pGlass->getID().c_str(), "", weight++));
+			}
+
 		}
 	}
 
@@ -305,24 +319,23 @@
 	{
 		if (ar.IsStoring()) {
 			Lock();
-			int count = (int)m_glassList.size();
-			ar << count;
-			for (auto item : m_glassList) {
-				item->serialize(ar);
+			for (int i = 0; i < SLOT_MAX; i++) {
+				m_slot[i].serialize(ar);
 			}
 			Unlock();
 		}
 		else {
-			// addGlassToList前不需要上锁,因其内部有锁
-			int count;
-			ar >> count;
-			for (int i = 0; i < count; i++) {
-				CGlass* pGlass = theApp.m_model.m_glassPool.allocaGlass();
-				pGlass->serialize(ar);
-				addGlassToList(pGlass);
+			for (int i = 0; i < SLOT_MAX; i++) {
+				m_slot[i].serialize(ar);
+				if (m_slot[i].getContext() != nullptr) {
+					CGlass* pGlass = theApp.m_model.m_glassPool.allocaGlass();
+					pGlass->serialize(ar);
+					m_slot[i].setContext(pGlass);
+				}
 			}
 			
 			// 梳理各玻璃之间的绑定关系
+			/*
 			Lock();
 			std::list<CGlass*> list = m_glassList;
 			for (auto item : list) {
@@ -337,6 +350,7 @@
 				}
 			}
 			Unlock();
+			*/
 		}
 	}
 
@@ -690,175 +704,10 @@
 		// 测试
 		if (code == FLOW_TEST) {
 			AfxMessageBox(pIntent->getMsg());
-			return FLOW_ACCEPT;
 		}
 
-
-		// 信号
-		if (code == FLOW_SIGNAL) {
-			return FLOW_ACCEPT;
-		}
-
-
-		// 数据
-		if (code == FLOW_SIGNAL) {
-			return FLOW_ACCEPT;
-		}
-
-
-		// 物料
-		if (code == FLOW_MOVE_MATERIAL) {
-			CGlass* pGlass = (CGlass*)pIntent->getContext();
-			ASSERT(pGlass);
-			if (!glassWillArrive(pGlass)) {
-				return FLOW_REJECT;
-			}
-			return glassArrived(pGlass);
-		}
-
-
-
-		return FLOW_ACCEPT;
-	}
-
-	int CEquipment::outputGlass(int port)
-	{
-		CPin* pOutPin = nullptr;
-		if (port == 0) {
-			pOutPin = getPin("Out");
-			if (pOutPin == nullptr) {
-				pOutPin = getPin("Out1");
-			}
-		}
-		else if (port == 1) {
-			pOutPin = getPin("Out2");
-		}
-		if (pOutPin == nullptr) {
-			return -1;
-		}
-
-
-		// 模拟取出第一张Panel,传送到下一环节
-		ULONGLONG time = CToolUnits::getTimestamp();
-		Lock();
-		if (m_glassList.empty()) {
-			Unlock();
-			return -2;
-		}
-		CGlass* pContext = m_glassList.front();
-		pContext->addRef();
-
-		CIntent intent(FLOW_MOVE_MATERIAL, "", pContext);
-		int nRet = pOutPin->sendIntent(&intent);
-		if (nRet == FLOW_REJECT) {
-			LOGE("<CEquipment>对方拒绝接收Intent.");
-		}
-		else if (nRet == FLOW_ACCEPT) {
-			CPath* pPath = pContext->getPathWithSiteID(m_nID);
-			if (pPath != nullptr) {
-				pPath->setOutTime(time);
-			}
-			m_glassList.pop_front();
-			pContext->release();		// 添加到列队时addRef, 取出时release
-			if (m_listener.onDataChanged != nullptr) {
-				m_listener.onDataChanged(this, 0);
-			}
-		}
-
-		pContext->release();
-		Unlock();
 
 		return 0;
-	}
-
-	BOOL CEquipment::glassWillArrive(CGlass* pGlass)
-	{
-		return TRUE;
-	}
-
-	int CEquipment::glassArrived(CGlass* pGlass)
-	{
-		Lock();
-		pGlass->addPath(m_nID);
-		pGlass->addRef();
-		m_glassList.push_back(pGlass);
-		Unlock();
-
-		if (m_listener.onDataChanged != nullptr) {
-			m_listener.onDataChanged(this, 0);
-		}
-
-		return FLOW_ACCEPT;
-	}
-
-	void CEquipment::addGlassToList(CGlass* pGlass)
-	{
-		ASSERT(pGlass);
-
-		Lock();
-		pGlass->addRef();
-		m_glassList.push_back(pGlass);
-		Unlock();
-
-		if (m_listener.onDataChanged != nullptr) {
-			m_listener.onDataChanged(this, 0);
-		}
-	}
-
-	CGlass* CEquipment::getGlassFromList(const char* pszId)
-	{
-		CGlass* pGlass = nullptr;
-		Lock();
-		for (auto item : m_glassList) {
-			if (item->getID().compare(pszId) == 0) {
-				pGlass = item;
-				break;
-			}
-		}
-		Unlock();
-
-		return pGlass;
-	}
-
-	BOOL CEquipment::removeClass(CGlass* pGlass)
-	{
-		Lock();
-		bool bExist = std::find(m_glassList.begin(), m_glassList.end(), pGlass) != m_glassList.end();
-		if (bExist) {
-			pGlass->addPath(EQ_ID_OPERATOR_REMOVE);
-			pGlass->release();
-			m_glassList.remove(pGlass);
-		}
-		Unlock();
-
-		if (bExist && m_listener.onDataChanged != nullptr) {
-			m_listener.onDataChanged(this, 0);
-		}
-
-		return bExist;
-	}
-
-	void CEquipment::getGlassList(std::list<CGlass*>& list)
-	{
-		Lock();
-		for (auto item : m_glassList) {
-			item->addRef();
-			list.push_back(item);
-		}
-		Unlock();
-	}
-
-	CGlass* CEquipment::getFrontGlass()
-	{
-		CGlass* pGlass = nullptr;
-
-		Lock();
-		if (!m_glassList.empty()) {
-			pGlass = m_glassList.front();
-		}
-		Unlock();
-
-		return pGlass;
 	}
 
 	int CEquipment::fetchedOutJob(CJobDataB* pJobDataB)
@@ -869,16 +718,12 @@
 
 		// 找到指定的glass id, 
 		Lock();
-		if (m_glassList.empty()) {
-			Unlock();
-			return -2;
-		}
-
 		CGlass* pContext = nullptr;
-		for (auto iter = m_glassList.begin(); iter != m_glassList.end(); iter++) {
-			if ((*iter)->getID().compare(pJobDataB->getGlassId()) == 0) {
-				pContext = (*iter);
-				m_glassList.erase(iter);
+		for (int i = 0; i < SLOT_MAX; i++) {
+			CGlass* pGlass = (CGlass*)m_slot[i].getContext();
+			if (pGlass != nullptr && compareJobDataB(pJobDataB, pGlass->getJobDataB())) {
+				pContext = pGlass;
+				m_slot[i].setContext(nullptr);
 				break;
 			}
 		}
@@ -890,10 +735,11 @@
 		// 如果此玻璃已经贴合,贴合的玻璃也要从列表中移除
 		CGlass* pBuddy = pContext->getBuddy();
 		if (pBuddy != nullptr) {
-			for (auto iter = m_glassList.begin(); iter != m_glassList.end(); iter++) {
-				if ((*iter)->getID().compare(pBuddy->getID()) == 0) {
-					(*iter)->release();
-					m_glassList.erase(iter);
+			for (int i = 0; i < SLOT_MAX; i++) {
+				CGlass* pGlass = (CGlass*)m_slot[i].getContext();
+				if (pGlass != nullptr && compareJobDataB(pBuddy->getJobDataB(), pGlass->getJobDataB())) {
+					pContext->release();
+					m_slot[i].setContext(nullptr);
 					break;
 				}
 			}
@@ -913,6 +759,7 @@
 
 	int CEquipment::storedJob(CJobDataB* pJobDataB)
 	{
+		/*
 		if (m_pArm == nullptr) {
 			return -1;
 		}
@@ -946,13 +793,19 @@
 		if (m_listener.onDataChanged != nullptr) {
 			m_listener.onDataChanged(this, 0);
 		}
-
+		*/
 		return 0;
 	}
 
-	BOOL CEquipment::isGlassListEmpty()
+	BOOL CEquipment::hasGlass()
 	{
-		return m_glassList.empty();
+		for (int i = 0; i < SLOT_MAX; i++) {
+			if (m_slot[i].isEnable() && !m_slot[i].isEmpty()) {
+				return TRUE;
+			}
+		}
+
+		return FALSE;
 	}
 
 	bool CEquipment::isAlarmStep(SERVO::CStep* pStep)
@@ -1183,7 +1036,7 @@
 		return nullptr;
 	}
 
-	CSlot* CEquipment::getEmptySlot(MaterialsType type)
+	CSlot* CEquipment::getAvailableSlotForGlass(MaterialsType type)
 	{
 		for (int i = 0; i < SLOT_MAX; i++) {
 			if (!m_slot[i].isEnable()) continue;
@@ -1213,6 +1066,36 @@
 			if (glassType == MaterialsType::G2 && putSlotType == MaterialsType::G1) continue;
 
 			return &m_slot[i];
+		}
+
+		return nullptr;
+	}
+
+	CGlass* CEquipment::getGlassFromSlot(int slotNo)
+	{
+		CSlot* pSlot = nullptr;
+		for (int i = 0; i < SLOT_MAX; i++) {
+			if (!m_slot[i].isEnable()) continue;
+			if (m_slot[i].getNo() != slotNo) continue;
+			pSlot = &m_slot[i];
+			break;
+		}
+
+		if (pSlot != nullptr) {
+			return (CGlass*)pSlot->getContext();
+		}
+
+		return nullptr;
+	}
+
+	CGlass* CEquipment::getAnyGlass()
+	{
+		CSlot* pSlot = nullptr;
+		for (int i = 0; i < SLOT_MAX; i++) {
+			if (!m_slot[i].isEnable()) continue;
+			CGlass* pGlass = (CGlass*)m_slot[i].getContext();
+			if (pGlass == nullptr) continue;
+			return pGlass;
 		}
 
 		return nullptr;
@@ -1437,6 +1320,24 @@
 	{
 		LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s",
 			m_strName.c_str(), port, pJobDataB->getGlassId().c_str());
+
+		CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
+		if (pJobDataS == nullptr) {
+			LOGE("<CFliper-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(),
+				pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
+			return FALSE;
+		}
+
+		// 当前不能有任何玻璃,且当前准备进的片是G2
+		Lock();
+		CSlot* pSlot = getAvailableSlotForGlass((MaterialsType)pJobDataS->getMaterialsType());
+		if (pSlot == nullptr) {
+			Unlock();
+			LOGE("<CFliper-%s>onPreFetchedOutJob,找不到匹配的Slot,不能进料,请注意风险!", m_strName.c_str());
+			return FALSE;
+		}
+		Unlock();
+
 		return TRUE;
 	}
 
@@ -1557,4 +1458,17 @@
 
 		return nullptr;
 	}
+
+	BOOL CEquipment::compareJobDataB(CJobDataB* pJobDataB1, CJobDataB* pJobDataB2)
+	{
+		ASSERT(pJobDataB1);
+		ASSERT(pJobDataB2);
+
+		if (pJobDataB1->getCassetteSequenceNo() != pJobDataB2->getCassetteSequenceNo())
+			return FALSE;
+		if (pJobDataB1->getJobSequenceNo() != pJobDataB2->getJobSequenceNo())
+			return FALSE;
+
+		return TRUE;
+	}
 }
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 7bdc2b8..b47ea75 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -101,9 +101,6 @@
 		std::vector<CPin*>& CEquipment::getInputPins();
 		std::vector<CPin*>& CEquipment::getOutputPins();
 		virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-		virtual BOOL glassWillArrive(CGlass* pGlass);
-		virtual int outputGlass(int port);
-		virtual int glassArrived(CGlass* pGlass);
 		virtual int fetchedOutJob(CJobDataB* pJobDataB);
 		virtual int storedJob(CJobDataB* pJobDataB);
 		virtual int onReceivedJob(int port, CJobDataS* pJobDataS);
@@ -114,10 +111,6 @@
 		virtual int onStoredJob(int port, CJobDataB* pJobDataB);
 		virtual int onProcessData(CProcessData* pProcessData);
 		virtual int getIndexerOperationModeBaseValue();
-		void getGlassList(std::list<CGlass*>& list);
-		CGlass* getGlassFromList(const char* pszId);
-		CGlass* getFrontGlass();
-		BOOL removeClass(CGlass* pGlass);
 		bool isAlarmStep(SERVO::CStep* pStep);
 		bool isVcrEventStep(SERVO::CStep* pStep);
 		bool isCassetteTransferStateStep(SERVO::CStep* pStep);
@@ -152,13 +145,20 @@
 		CSlot* getAvailableSlot();
 
 		// 获取一个指定物料类型(G1,G2,G1&G2)的空槽位
-		CSlot* getEmptySlot(MaterialsType type);
+		CSlot* getAvailableSlotForGlass(MaterialsType type);
 
 		// 获取一个指定物料类型(G1,G2,G1&G2)的非空槽位
 		CSlot* getNonEmptySlot(MaterialsType type);
 
-	public:
-		BOOL isGlassListEmpty();
+		// 获取玻璃物料
+		CGlass* getGlassFromSlot(int slotNo);
+		CGlass* getAnyGlass();
+
+		// 验证玻璃和槽是否匹配
+		BOOL ValidateGlassSlotMatch();
+
+		// 是否有玻璃
+		BOOL hasGlass();
 
 	// 以下为从CC-Link读取到的Bit标志位检测函数
 	public:
@@ -175,7 +175,6 @@
 		inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
 		BOOL isBitOn(const char* pszData, size_t size, int index);
 		inline BOOL equalBool(BOOL b1, BOOL b2);
-		void addGlassToList(CGlass* pGlass);
 		short decodeRecipeListReport(const char* pszData, size_t size);
 		short decodeRecipeParameterReport(const char* pszData, size_t size);
 		int decodeProcessDataReport(CStep* pStep, const char* pszData, size_t size);
@@ -190,6 +189,7 @@
 		int addJobDataS(CJobDataS* pJobDataS);
 		int removeJobDataS(int nCassetteSequenceNo, int nJobSequenceNo);
 		CJobDataS* getJobDataS(int nCassetteSequenceNo, int nJobSequenceNo);
+		BOOL compareJobDataB(CJobDataB* pJobDataB1, CJobDataB* pJobDataB2);
 
 	protected:
 		EquipmentListener m_listener;
@@ -202,7 +202,6 @@
 		MemoryBlock m_blockWriteBit;
 		std::vector<CPin*> m_inputPins;
 		std::vector<CPin*> m_outputPins;
-		std::list<CGlass*> m_glassList;
 
 
 		// 以下为从CC-Link读取到的Bit标志位
diff --git a/SourceCode/Bond/Servo/CEquipmentPage2.cpp b/SourceCode/Bond/Servo/CEquipmentPage2.cpp
index 3bffbe7..e28bc78 100644
--- a/SourceCode/Bond/Servo/CEquipmentPage2.cpp
+++ b/SourceCode/Bond/Servo/CEquipmentPage2.cpp
@@ -80,16 +80,14 @@
 
 
 	ASSERT(m_pEquipment);
-	std::list<SERVO::CGlass*> list;
-	m_pEquipment->getGlassList(list);
-	for (auto item : list) {
-		item->addRef();				
-		item->release();		// 閲婃斁list涓殑寮曠敤
+	for (int i = 0; i < SLOT_MAX; i++) {
+		SERVO::CGlass* pGlass = m_pEquipment->getGlassFromSlot(i+1);
+		pGlass->addRef();
 
-		SERVO::CGlass* pBuddy = item->getBuddy();
+		SERVO::CGlass* pBuddy = pGlass->getBuddy();
 		int index = m_listCtrl.InsertItem(m_listCtrl.GetItemCount(), _T(""));
-		m_listCtrl.SetItemData(index, (DWORD_PTR)item);
-		m_listCtrl.SetItemText(index, 1, item->getID().c_str());
+		m_listCtrl.SetItemData(index, (DWORD_PTR)pGlass);
+		m_listCtrl.SetItemText(index, 1, pGlass->getID().c_str());
 		if (pBuddy != nullptr) {
 			m_listCtrl.SetItemText(index, 2, pBuddy->getID().c_str());
 		}
@@ -172,6 +170,7 @@
 
 void CEquipmentPage2::OnBnClickedButtonRemove()
 {
+	/*
 	int index = GetSelectedItemIndex();
 	if (index >= 0) {
 		SERVO::CGlass* pGlass = (SERVO::CGlass*)m_listCtrl.GetItemData(index);
@@ -182,4 +181,5 @@
 			m_listCtrl.DeleteItem(index);
 		}
 	}
+	*/
 }
diff --git a/SourceCode/Bond/Servo/CFliper.cpp b/SourceCode/Bond/Servo/CFliper.cpp
index 7322d95..4065835 100644
--- a/SourceCode/Bond/Servo/CFliper.cpp
+++ b/SourceCode/Bond/Servo/CFliper.cpp
@@ -67,39 +67,4 @@
 	{
 		return __super::recvIntent(pPin, pIntent);
 	}
-
-	BOOL CFliper::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return m_glassList.empty();
-	}
-
-	BOOL CFliper::onPreStoredJob(int port, CJobDataB* pJobDataB)
-	{
-		CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-		if (pJobDataS == nullptr) {
-			LOGE("<CFliper-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(), 
-				pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-			return FALSE;
-		}
-
-		// 当前不能有任何玻璃,且当前准备进的片是G2
-		Lock();
-		if (!m_glassList.empty()) {
-			Unlock();
-			LOGE("<CFliper-%s>onPreFetchedOutJob,当前机器或单元存在玻璃片,不能进料,请注意风险!", m_strName.c_str());
-			return FALSE;
-		}
-
-		if (pJobDataS->getMaterialsType() != (int)MaterialsType::G2) {
-			LOGE("<CFliper-%s>onPreFetchedOutJob,当前机器或单元只能进G2玻璃片,请注意风险!", m_strName.c_str());
-			return FALSE;
-		}
-
-		return TRUE;
-	}
 }
diff --git a/SourceCode/Bond/Servo/CFliper.h b/SourceCode/Bond/Servo/CFliper.h
index fb4df7e..9e7b404 100644
--- a/SourceCode/Bond/Servo/CFliper.h
+++ b/SourceCode/Bond/Servo/CFliper.h
@@ -20,8 +20,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
-        virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB);
 	};
 }
 
diff --git a/SourceCode/Bond/Servo/CJobDataA.cpp b/SourceCode/Bond/Servo/CJobDataA.cpp
index cf33400..4a1e3f3 100644
--- a/SourceCode/Bond/Servo/CJobDataA.cpp
+++ b/SourceCode/Bond/Servo/CJobDataA.cpp
@@ -6,7 +6,7 @@
 namespace SERVO {
 	CJobDataA::CJobDataA()
 	{
-
+		m_pOwner = nullptr;
 	}
 
 	CJobDataA::~CJobDataA()
@@ -14,6 +14,16 @@
 
 	}
 
+	void* CJobDataA::getOwner()
+	{
+		return m_pOwner;
+	}
+
+	void CJobDataA::setOwner(void* pOwner)
+	{
+		m_pOwner = pOwner;
+	}
+
 	short CJobDataA::getPortNo()
 	{
 		return m_nPortNo;
diff --git a/SourceCode/Bond/Servo/CJobDataA.h b/SourceCode/Bond/Servo/CJobDataA.h
index 4599707..49c2071 100644
--- a/SourceCode/Bond/Servo/CJobDataA.h
+++ b/SourceCode/Bond/Servo/CJobDataA.h
@@ -11,6 +11,8 @@
 		virtual ~CJobDataA();
 
 	public:
+		void* getOwner();
+		void setOwner(void* pOwner);
 		short getPortNo();
 		std::string& getCarrierId();
 		std::string& getPruductId();
@@ -23,6 +25,7 @@
 		int unserialize(const char* pszBuffer, int nBufferSize);
 
 	private:
+		void* m_pOwner;
 		short m_nPortNo;
 		std::string m_strCarrierId;
 		std::string m_pruductId;
diff --git a/SourceCode/Bond/Servo/CJobDataB.cpp b/SourceCode/Bond/Servo/CJobDataB.cpp
index 596259a..7622790 100644
--- a/SourceCode/Bond/Servo/CJobDataB.cpp
+++ b/SourceCode/Bond/Servo/CJobDataB.cpp
@@ -8,6 +8,7 @@
 	{
 		m_nCassetteSequenceNo = 0;
 		m_nJobSequenceNo = 0;
+		m_pOwner = nullptr;
 	}
 
 	CJobDataB::CJobDataB(CJobDataB&& other) noexcept
@@ -25,6 +26,17 @@
 		m_nCassetteSequenceNo = pScr->m_nCassetteSequenceNo;
 		m_nJobSequenceNo = pScr->m_nJobSequenceNo;
 		m_strGlassId = pScr->m_strGlassId;
+		m_pOwner = pScr->m_pOwner;
+	}
+
+	void* CJobDataB::getOwner()
+	{
+		return m_pOwner;
+	}
+
+	void CJobDataB::setOwner(void* pOwner)
+	{
+		m_pOwner = pOwner;
 	}
 
 	int CJobDataB::getCassetteSequenceNo()
diff --git a/SourceCode/Bond/Servo/CJobDataB.h b/SourceCode/Bond/Servo/CJobDataB.h
index 703eae5..b609376 100644
--- a/SourceCode/Bond/Servo/CJobDataB.h
+++ b/SourceCode/Bond/Servo/CJobDataB.h
@@ -11,6 +11,8 @@
 		virtual ~CJobDataB();
 
 	public:
+		void* getOwner();
+		void setOwner(void* pOwner);
 		void copy(CJobDataB* pScr);
 		int getCassetteSequenceNo();
 		void setCassetteSequenceNo(int no);
@@ -22,6 +24,7 @@
 		int unserialize(const char* pszBuffer, int nBufferSize);
 
 	private:
+		void* m_pOwner;
 		int m_nCassetteSequenceNo;
 		int m_nJobSequenceNo;
 		std::string m_strGlassId;
diff --git a/SourceCode/Bond/Servo/CJobDataC.cpp b/SourceCode/Bond/Servo/CJobDataC.cpp
index 4781964..54913e7 100644
--- a/SourceCode/Bond/Servo/CJobDataC.cpp
+++ b/SourceCode/Bond/Servo/CJobDataC.cpp
@@ -6,6 +6,7 @@
 	CJobDataC::CJobDataC()
 	{
 		m_nCassetteSequenceNo = 0;
+		m_pOwner = nullptr;
 	}
 
 	CJobDataC::~CJobDataC()
@@ -13,6 +14,16 @@
 		m_nCassetteProcessFlag = 0;
 	}
 
+	void* CJobDataC::getOwner()
+	{
+		return m_pOwner;
+	}
+
+	void CJobDataC::setOwner(void* pOwner)
+	{
+		m_pOwner = pOwner;
+	}
+
 	int CJobDataC::getCassetteSequenceNo()
 	{
 		return m_nCassetteSequenceNo;
diff --git a/SourceCode/Bond/Servo/CJobDataC.h b/SourceCode/Bond/Servo/CJobDataC.h
index 5562466..ecb8d4c 100644
--- a/SourceCode/Bond/Servo/CJobDataC.h
+++ b/SourceCode/Bond/Servo/CJobDataC.h
@@ -9,6 +9,8 @@
 		virtual ~CJobDataC();
 
 	public:
+		void* getOwner();
+		void setOwner(void* pOwner);
 		int getCassetteSequenceNo();
 		void setCassetteSequenceNo(int no);
 		std::string& getCassetteId();
@@ -21,6 +23,7 @@
 		void setMasterRecipe(const char* pszRecipe);
 
 	private:
+		void* m_pOwner;
 		int m_nCassetteSequenceNo;
 		std::string m_strCassetteId;
 		std::string m_strCassetteJudge;
diff --git a/SourceCode/Bond/Servo/CJobDataS.cpp b/SourceCode/Bond/Servo/CJobDataS.cpp
index 9351215..18f1b0e 100644
--- a/SourceCode/Bond/Servo/CJobDataS.cpp
+++ b/SourceCode/Bond/Servo/CJobDataS.cpp
@@ -30,6 +30,7 @@
 		m_nTargetPortNo = 0;
 		m_nTargetSlotNo = 0;
 		m_pRawData = nullptr;
+		m_pOwner = nullptr;
 		if (ENABLE_JOBDATAS_RAWDATA) {
 			m_pRawData = new char[JOBDATAS_SIZE];
 			serialize(m_pRawData, JOBDATAS_SIZE);
@@ -84,6 +85,17 @@
 		m_nSourceSlotNo = pScr->m_nSourceSlotNo;
 		m_nTargetPortNo = pScr->m_nTargetPortNo;
 		m_nTargetSlotNo = pScr->m_nTargetSlotNo;
+		m_pOwner = pScr->m_pOwner;
+	}
+
+	void* CJobDataS::getOwner()
+	{
+		return m_pOwner;
+	}
+
+	void CJobDataS::setOwner(void* pOwner)
+	{
+		m_pOwner = pOwner;
 	}
 
 	int CJobDataS::getCassetteSequenceNo()
diff --git a/SourceCode/Bond/Servo/CJobDataS.h b/SourceCode/Bond/Servo/CJobDataS.h
index 9dda64a..87b1cde 100644
--- a/SourceCode/Bond/Servo/CJobDataS.h
+++ b/SourceCode/Bond/Servo/CJobDataS.h
@@ -12,6 +12,8 @@
 		virtual ~CJobDataS();
 
 	public:
+		void* getOwner();
+		void setOwner(void* pOwner);
 		void copy(CJobDataS* pScr);
 		int getCassetteSequenceNo();
 		void setCassetteSequenceNo(int no);
@@ -77,6 +79,7 @@
 
 
 	private:
+		void* m_pOwner;
 		int m_nCassetteSequenceNo;
 		int m_nJobSequenceNo;
 		std::string m_strLotId;
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index c98dede..6df5ce3 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -70,6 +70,18 @@
 		m_slot[2].enable();
 		m_slot[2].setNo(3);
 		m_slot[2].setName("Slot 3");
+		m_slot[3].setPosition(m_nID);
+		m_slot[3].enable();
+		m_slot[3].setNo(4);
+		m_slot[3].setName("Slot 4");
+		m_slot[4].setPosition(m_nID);
+		m_slot[4].enable();
+		m_slot[4].setNo(5);
+		m_slot[4].setName("Slot 5");
+		m_slot[5].setPosition(m_nID);
+		m_slot[5].enable();
+		m_slot[5].setNo(6);
+		m_slot[5].setName("Slot 6");
 	}
 
 	void CLoadPort::initSteps()
@@ -391,21 +403,6 @@
 	int CLoadPort::recvIntent(CPin* pPin, CIntent* pIntent)
 	{
 		return __super::recvIntent(pPin, pIntent);
-	}
-
-	int CLoadPort::outputGlass(int port)
-	{
-		return __super::outputGlass(port);
-	}
-
-	BOOL CLoadPort::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return (m_glassList.size() < 8);
 	}
 
 	int CLoadPort::sendCassetteCtrlCmd(short cmd,
@@ -1061,11 +1058,11 @@
 	/*
 	 * 生成测试用的玻璃列表
 	 */
-	int CLoadPort::testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix)
+	int CLoadPort::testGenerateGlassList(MaterialsType type, const char* pszPrefix, int startSuffix)
 	{
 		// 如果非空就不生成了
 		Lock();
-		if (!m_glassList.empty()) {
+		if (hasGlass()) {
 			Unlock();
 			return -1;
 		}
@@ -1074,7 +1071,9 @@
 
 		char szBuffer[64];
 		int suffix = startSuffix;
-		for (int i = 0; i < count; i++) {
+		for (int i = 0; i < SLOT_MAX; i++) {
+			if (!m_slot[i].isEnable()) continue;
+
 			CJobDataB jb;
 			CJobDataS js;
 
@@ -1093,7 +1092,8 @@
 			pGlass->setJobDataB(&jb);
 			pGlass->setType(type);
 			pGlass->setJobDataS(&js);
-			addGlassToList(pGlass);
+			pGlass->addRef();
+			m_slot[i].setContext(pGlass);
 		}
 
 		return 0;
diff --git a/SourceCode/Bond/Servo/CLoadPort.h b/SourceCode/Bond/Servo/CLoadPort.h
index 92adfc8..7bc8702 100644
--- a/SourceCode/Bond/Servo/CLoadPort.h
+++ b/SourceCode/Bond/Servo/CLoadPort.h
@@ -22,7 +22,6 @@
 		virtual void serialize(CArchive& ar);
 		virtual void getAttributeVector(CAttributeVector& attrubutes);
 		virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-		virtual BOOL glassWillArrive(CGlass* pGlass);
 		virtual void onReceiveLBData(const char* pszData, size_t size);
 
 	public:
@@ -49,7 +48,7 @@
 		int getQTimeFlag();
 		int getCassetteMappingState();
 		int getCassetteStatus();
-		int testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix);
+		int testGenerateGlassList(MaterialsType type, const char* pszPrefix, int startSuffix);
 
 	public:
 		static std::string& getPortTypeDescription(PortType portType, std::string& strDescription);
@@ -64,7 +63,6 @@
 		static std::string& getCassetteStatusDescription(int state, std::string& strDescription);
 
 	public:
-		virtual int outputGlass(int port);
 		int sendCassetteCtrlCmd(short cmd,
 			short* jobExistence,
 			int jobExistenceSize,
diff --git a/SourceCode/Bond/Servo/CMeasurement.cpp b/SourceCode/Bond/Servo/CMeasurement.cpp
index c74db1e..4821891 100644
--- a/SourceCode/Bond/Servo/CMeasurement.cpp
+++ b/SourceCode/Bond/Servo/CMeasurement.cpp
@@ -67,16 +67,6 @@
 		return __super::recvIntent(pPin, pIntent);
 	}
 
-	BOOL CMeasurement::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return m_glassList.empty();
-	}
-
 	int CMeasurement::getIndexerOperationModeBaseValue()
 	{
 		return 35000;
diff --git a/SourceCode/Bond/Servo/CMeasurement.h b/SourceCode/Bond/Servo/CMeasurement.h
index 896d889..a1d8bac 100644
--- a/SourceCode/Bond/Servo/CMeasurement.h
+++ b/SourceCode/Bond/Servo/CMeasurement.h
@@ -20,7 +20,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
         virtual int getIndexerOperationModeBaseValue();
 
 	};
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index 7f3da57..1b4c9ae 100644
--- a/SourceCode/Bond/Servo/CPageGraph2.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -65,7 +65,7 @@
 				SERVO::CEquipment* pEquipment = nullptr;
 				if (pAny->getPtrValue("ptr", (void*&)pEquipment)) {
 					if (pEquipment != nullptr) {
-						m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty());
+						m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass());
 					}
 				}
 			}
@@ -206,14 +206,15 @@
 		else if (nCmd == ID_EQSGRAPHITEM_TEST1) {
 			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
 			if (pEquipment->getID() == EQ_ID_LOADPORT1) {
-				((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1, 10, 
+				((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1, 
 					"P20250320G1X", 1);
 			}
 			else if (pEquipment->getID() == EQ_ID_LOADPORT2) {
-				((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2, 10,
+				((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2,
 					"P20250320G2X", 1);
 			}
-			SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
+			/*
+			SERVO::CGlass* pGlass = pEquipment->getAnyGlass();
 			if (pGlass != nullptr) {
 				SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB();
 				SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
@@ -222,12 +223,13 @@
 					pEquipment->onSentOutJob(0, pJobDataS);
 				}
 			}
+			*/
 		}
 		else if (nCmd == ID_EQSGRAPHITEM_TEST2) {
 			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
 			SERVO::CArm* pArm = (SERVO::CArm*)pEquipment->getArm();
 			if (pArm != nullptr) {
-				SERVO::CGlass* pGlass = pArm->getFrontGlass();
+				SERVO::CGlass* pGlass = pArm->getAnyGlass();
 				if (pGlass != nullptr) {
 					SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB();
 					SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
@@ -242,7 +244,7 @@
 		else if (nCmd == ID_EQSGRAPHITEM_TEST3) {
 			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
 			if (pEquipment != nullptr) {
-				SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
+				SERVO::CGlass* pGlass = pEquipment->getAnyGlass();
 				if (pGlass != nullptr) {
 					SERVO::CProcessData pd;
 					pd.setGlassId(pGlass->getID().c_str());
@@ -316,7 +318,7 @@
 			
 
 			/*
-			SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
+			SERVO::CGlass* pGlass = pEquipment->getAnyGlass();
 			if (pGlass != nullptr) {
 				std::string strDescription;
 				SERVO::CPath* pPath = pGlass->getPath();
@@ -422,7 +424,7 @@
 		m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin);
 	}
 
-	m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty());
+	m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass());
 }
 
 void CPageGraph2::OnTimer(UINT_PTR nIDEvent)
diff --git a/SourceCode/Bond/Servo/CPin.cpp b/SourceCode/Bond/Servo/CPin.cpp
index f005a61..832e74a 100644
--- a/SourceCode/Bond/Servo/CPin.cpp
+++ b/SourceCode/Bond/Servo/CPin.cpp
@@ -118,7 +118,7 @@
 			return m_pConnectedPin->recvIntent(pIntent);
 		}
 
-		return FLOW_REJECT;
+		return 0;
 	}
 
 	int CPin::recvIntent(CIntent* pIntent)
diff --git a/SourceCode/Bond/Servo/CSlot.cpp b/SourceCode/Bond/Servo/CSlot.cpp
index 0a254cb..74a1e57 100644
--- a/SourceCode/Bond/Servo/CSlot.cpp
+++ b/SourceCode/Bond/Servo/CSlot.cpp
@@ -101,4 +101,14 @@
 	{
 		m_pContext = pContext;
 	}
+
+	void CSlot::serialize(CArchive& ar)
+	{
+		if (ar.IsStoring()) {
+
+		}
+		else {
+
+		}
+	}
 }
diff --git a/SourceCode/Bond/Servo/CSlot.h b/SourceCode/Bond/Servo/CSlot.h
index f7445aa..455c5a5 100644
--- a/SourceCode/Bond/Servo/CSlot.h
+++ b/SourceCode/Bond/Servo/CSlot.h
@@ -28,6 +28,7 @@
 		BOOL isEmpty();
 		CContext* getContext();
 		void setContext(CContext* pContext);
+		void serialize(CArchive& ar);
 
 	private:
 		int m_nPosition;
diff --git a/SourceCode/Bond/Servo/CVacuumBake.cpp b/SourceCode/Bond/Servo/CVacuumBake.cpp
index e9a1c9c..290035f 100644
--- a/SourceCode/Bond/Servo/CVacuumBake.cpp
+++ b/SourceCode/Bond/Servo/CVacuumBake.cpp
@@ -68,41 +68,6 @@
 		return __super::recvIntent(pPin, pIntent);
 	}
 
-	BOOL CVacuumBake::glassWillArrive(CGlass* pGlass)
-	{
-		BOOL bRet = __super::glassWillArrive(pGlass);
-		if (!bRet) {
-			return FALSE;
-		}
-
-		return m_glassList.empty();
-	}
-
-	BOOL CVacuumBake::onPreStoredJob(int port, CJobDataB* pJobDataB)
-	{
-		CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-		if (pJobDataS == nullptr) {
-			LOGE("<CVacuumBake-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(),
-				pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo());
-			return FALSE;
-		}
-
-		// 当前不能有任何玻璃,且当前准备进的片是G1
-		Lock();
-		if (!m_glassList.empty()) {
-			Unlock();
-			LOGE("<CVacuumBake-%s>onPreFetchedOutJob,当前机器或单元存在玻璃片,不能进料,请注意风险!", m_strName.c_str());
-			return FALSE;
-		}
-
-		if (pJobDataS->getMaterialsType() != (int)MaterialsType::G1) {
-			LOGE("<CVacuumBake-%s>onPreFetchedOutJob,当前机器或单元只能进G2玻璃片,请注意风险!", m_strName.c_str());
-			return FALSE;
-		}
-
-		return TRUE;
-	}
-
 	int CVacuumBake::getIndexerOperationModeBaseValue()
 	{
 		return 30000;
diff --git a/SourceCode/Bond/Servo/CVacuumBake.h b/SourceCode/Bond/Servo/CVacuumBake.h
index 4530b42..8619b43 100644
--- a/SourceCode/Bond/Servo/CVacuumBake.h
+++ b/SourceCode/Bond/Servo/CVacuumBake.h
@@ -20,8 +20,6 @@
         virtual void serialize(CArchive& ar);
         virtual void getAttributeVector(CAttributeVector& attrubutes);
         virtual int recvIntent(CPin* pPin, CIntent* pIntent);
-        virtual BOOL glassWillArrive(CGlass* pGlass);
-        virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB);
         virtual int getIndexerOperationModeBaseValue();
 
 	};
diff --git a/SourceCode/Bond/Servo/Common.h b/SourceCode/Bond/Servo/Common.h
index df10509..f0e5917 100644
--- a/SourceCode/Bond/Servo/Common.h
+++ b/SourceCode/Bond/Servo/Common.h
@@ -409,12 +409,7 @@
 
 
 /* 流程控制相关代码 */
-#define FLOW_REJECT					0x0
-#define FLOW_ACCEPT					0x1
 #define FLOW_TEST					0x1000
-#define FLOW_SIGNAL					0x1001
-#define FLOW_DATA					0x1002
-#define FLOW_MOVE_MATERIAL			0x1003
 
 
 /* Port Status */

--
Gitblit v1.9.3