From 7eea9aae73318cd76f65a5dcce36b5575b9f12fa Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 06 六月 2025 14:29:45 +0800
Subject: [PATCH] 1.不同的Slot绑定不同的信号(Link Signal path)

---
 SourceCode/Bond/Servo/CPageGraph2.cpp  |    4 ++++
 SourceCode/Bond/Servo/CSlot.cpp        |   11 +++++++++++
 SourceCode/Bond/Servo/CEquipment.cpp   |   18 ++++++++++--------
 SourceCode/Bond/Servo/CBakeCooling.cpp |    4 ++++
 SourceCode/Bond/Servo/CSlot.h          |    3 +++
 5 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/SourceCode/Bond/Servo/CBakeCooling.cpp b/SourceCode/Bond/Servo/CBakeCooling.cpp
index cf4caf4..422a81e 100644
--- a/SourceCode/Bond/Servo/CBakeCooling.cpp
+++ b/SourceCode/Bond/Servo/CBakeCooling.cpp
@@ -45,18 +45,22 @@
 		m_slot[0].setPosition(m_nID);
 		m_slot[0].setNo(1);
 		m_slot[0].setName("Bake 1");
+		m_slot[0].setLinkSignalPath(0);
 		m_slot[1].enable();
 		m_slot[1].setPosition(m_nID);
 		m_slot[1].setNo(2);
 		m_slot[1].setName("Bake 2");
+		m_slot[1].setLinkSignalPath(0);
 		m_slot[2].enable();
 		m_slot[2].setPosition(m_nID);
 		m_slot[2].setNo(3);
 		m_slot[2].setName("Cooling 1");
+		m_slot[2].setLinkSignalPath(1);
 		m_slot[3].enable();
 		m_slot[3].setPosition(m_nID);
 		m_slot[3].setNo(4);
 		m_slot[3].setName("Cooling 2");
+		m_slot[3].setLinkSignalPath(1);
 	}
 
 	void CBakeCooling::onTimer(UINT nTimerid)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 0aa06b1..2bc7c6e 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -1149,10 +1149,11 @@
 			if (m_slot[i].isLock()) continue;
 			CGlass* pGlass = (CGlass*)m_slot[i].getContext();
 			if (pGlass == nullptr) continue;
-			if(!m_bLinkSignal[0][SIGNAL_UPSTREAM_INLINE]
-				|| m_bLinkSignal[0][SIGNAL_UPSTREAM_TROUBLE]
-				|| !m_bLinkSignal[0][SIGNAL_INTERLOCK]
-				|| !m_bLinkSignal[0][SIGNAL_SEND_ABLE] ) continue;
+			int lsPath = m_slot[i].getLinkSignalPath();
+			if(!m_bLinkSignal[lsPath][SIGNAL_UPSTREAM_INLINE]
+				|| m_bLinkSignal[lsPath][SIGNAL_UPSTREAM_TROUBLE]
+				|| !m_bLinkSignal[lsPath][SIGNAL_INTERLOCK]
+				|| !m_bLinkSignal[lsPath][SIGNAL_SEND_ABLE] ) continue;
 
 			MaterialsType glassType = pGlass->getType();
 			if (glassType == MaterialsType::G1 && putSlotType == MaterialsType::G2) continue;
@@ -1173,10 +1174,11 @@
 					if (m_slot[i].isLock()) continue;
 					CGlass* pGlass = (CGlass*)m_slot[i].getContext();
 					if (pGlass == nullptr) continue;
-					if (!m_bLinkSignal[0][SIGNAL_UPSTREAM_INLINE]
-						|| m_bLinkSignal[0][SIGNAL_UPSTREAM_TROUBLE]
-						|| !m_bLinkSignal[0][SIGNAL_INTERLOCK]
-						|| !m_bLinkSignal[0][SIGNAL_SEND_ABLE]) continue;
+					int lsPath = m_slot[i].getLinkSignalPath();
+					if (!m_bLinkSignal[lsPath][SIGNAL_UPSTREAM_INLINE]
+						|| m_bLinkSignal[lsPath][SIGNAL_UPSTREAM_TROUBLE]
+						|| !m_bLinkSignal[lsPath][SIGNAL_INTERLOCK]
+						|| !m_bLinkSignal[lsPath][SIGNAL_SEND_ABLE]) continue;
 
 					MaterialsType glassType = pGlass->getType();
 					if (glassType == MaterialsType::G1 && putSlotType == MaterialsType::G2) continue;
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index b16eae2..5c6e012 100644
--- a/SourceCode/Bond/Servo/CPageGraph2.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -269,6 +269,10 @@
 				pEquipment->setLinkSignal(0, SIGNAL_UPSTREAM_TROUBLE, FALSE);
 				pEquipment->setLinkSignal(0, SIGNAL_INTERLOCK, TRUE);
 				pEquipment->setLinkSignal(0, SIGNAL_SEND_ABLE, TRUE);
+				pEquipment->setLinkSignal(1, SIGNAL_UPSTREAM_INLINE, TRUE);
+				pEquipment->setLinkSignal(1, SIGNAL_UPSTREAM_TROUBLE, FALSE);
+				pEquipment->setLinkSignal(1, SIGNAL_INTERLOCK, TRUE);
+				pEquipment->setLinkSignal(1, SIGNAL_SEND_ABLE, TRUE);
 			}
 
 			if (pEquipment != nullptr && (pEquipment->getID() == EQ_ID_Bonder1
diff --git a/SourceCode/Bond/Servo/CSlot.cpp b/SourceCode/Bond/Servo/CSlot.cpp
index 94299a1..629f7ac 100644
--- a/SourceCode/Bond/Servo/CSlot.cpp
+++ b/SourceCode/Bond/Servo/CSlot.cpp
@@ -12,6 +12,7 @@
 		m_bLock = FALSE;
 		m_pContext = nullptr;
 		m_pTempContext = nullptr;
+		m_nLinkSignalPath = 0;
 	}
 
 	CSlot::~CSlot()
@@ -119,6 +120,16 @@
 		return m_pTempContext;
 	}
 
+	void CSlot::setLinkSignalPath(int path)
+	{
+		m_nLinkSignalPath = path;
+	}
+
+	int CSlot::getLinkSignalPath()
+	{
+		return m_nLinkSignalPath;
+	}
+
 	void CSlot::serialize(CArchive& ar)
 	{
 		if (ar.IsStoring()) {
diff --git a/SourceCode/Bond/Servo/CSlot.h b/SourceCode/Bond/Servo/CSlot.h
index 76461d8..d1869fc 100644
--- a/SourceCode/Bond/Servo/CSlot.h
+++ b/SourceCode/Bond/Servo/CSlot.h
@@ -29,6 +29,8 @@
 		CContext* getContext();
 		CContext* getTempContext();
 		void setContext(CContext* pContext);
+		void setLinkSignalPath(int path);
+		int getLinkSignalPath();
 		void serialize(CArchive& ar);
 
 	private:
@@ -44,6 +46,7 @@
 		CContext* m_pTempContext;
 		BOOL m_bEnable;
 		BOOL m_bLock;
+		int m_nLinkSignalPath;
 	};
 }
 

--
Gitblit v1.9.3