From 1efb832676e8ad27e7a495dba6ffc19479e0c76f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 04 九月 2025 15:51:33 +0800
Subject: [PATCH] 1.机器配方参数的获取;

---
 SourceCode/Bond/Servo/CPageGraph2.cpp |  145 +++++++++++-------------------------------------
 1 files changed, 33 insertions(+), 112 deletions(-)

diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index 3e161a7..cb4d449 100644
--- a/SourceCode/Bond/Servo/CPageGraph2.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -9,11 +9,11 @@
 #include "CEquipmentPage1.h"
 #include "CEquipmentPage2.h"
 #include "CEquipmentPage3.h"
+#include "CPageLinkSignal.h"
 #include "CPagePortProperty.h"
+#include "CPagePortStatus.h"
 #include "CPageCassetteCtrlCmd.h"
 #include "CJobDataB.h"
-#include "CRobotCmdContainerDlg.h"
-#include "CRobotCmdTestDlg.h"
 
 
 // CPageGraph2 瀵硅瘽妗�
@@ -66,7 +66,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());
 					}
 				}
 			}
@@ -127,19 +127,29 @@
 		ASSERT(pItem);
 		SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
 
-		CHMPropertyDlg dlg(pEquipment->getName().c_str(), 600, 680);
+		CHMPropertyDlg dlg(pEquipment->getName().c_str(), 1258, 788);
+
+		CPageLinkSignal* pPage1 = new CPageLinkSignal();
+		pPage1->setEquipment(pEquipment);
+		pPage1->Create(IDD_PAGE_LINK_SIGNAL);
+		dlg.addPage(pPage1, "Link Signal");
 
 		if (_strcmpi(pEquipment->getClassName(), "CLoadPort") == 0) {
-			CPagePortProperty* pPage1 = new CPagePortProperty();
-			pPage1->setLoadPort((SERVO::CLoadPort*)pEquipment);
-			pPage1->Create(IDD_PAGE_PORT_PROPERTY);
-			dlg.addPage(pPage1, "灞炴��");
+			CPagePortProperty* pPageA = new CPagePortProperty();
+			pPageA->setLoadPort((SERVO::CLoadPort*)pEquipment);
+			pPageA->Create(IDD_PAGE_PORT_PROPERTY);
+			dlg.addPage(pPageA, "灞炴��");
+
+			CPagePortStatus* pPageB = new CPagePortStatus();
+			pPageB->setLoadPort((SERVO::CLoadPort*)pEquipment);
+			pPageB->Create(IDD_PAGE_PORT_STATUS);
+			dlg.addPage(pPageB, "Status");
 		}
 
 		CEquipmentPage2* pPage2 = new CEquipmentPage2();
 		pPage2->setEquipment(pEquipment);
 		pPage2->Create(IDD_PAGE_EQUIPMENT2);
-		dlg.addPage(pPage2, "Glass");
+		dlg.addPage(pPage2, "Slots");
 
 		if (pEquipment->getID() == EQ_ID_EFEM) {
 			CEquipmentPage3* pPage3 = new CEquipmentPage3();
@@ -149,7 +159,9 @@
 		}
 
 		if (pEquipment->getID() == EQ_ID_LOADPORT1
-			|| pEquipment->getID() == EQ_ID_LOADPORT2) {
+			|| pEquipment->getID() == EQ_ID_LOADPORT2
+			|| pEquipment->getID() == EQ_ID_LOADPORT3
+			|| pEquipment->getID() == EQ_ID_LOADPORT4) {
 			CPageCassetteCtrlCmd* pPage = new CPageCassetteCtrlCmd();
 			pPage->setEquipment(pEquipment);
 			pPage->Create(IDD_PAGE_CASSETTE_CTRL_CMD);
@@ -200,92 +212,17 @@
 
 		// 娴嬭瘯
 		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, 
-					"P20250320G1X", 1);
-			}
-			else if (pEquipment->getID() == EQ_ID_LOADPORT2) {
-				((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2, 10,
-					"P20250320G2X", 1);
-			}
-			SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
-			if (pGlass != nullptr) {
-				SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB();
-				SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
-				if (pJobDataB != nullptr && pJobDataS != nullptr) {
-					pEquipment->fetchedOutJob(pJobDataB);
-					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();
-				if (pGlass != nullptr) {
-					SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB();
-					SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
-					if (pJobDataB != nullptr && pJobDataS != nullptr) {
-						pEquipment->onReceivedJob(0, pJobDataS);
-						Sleep(600);
-						pEquipment->onStoredJob(0, pJobDataB);
-					}
-				}
-			}
 		}
 		else if (nCmd == ID_EQSGRAPHITEM_TEST3) {
-			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
-			if (pEquipment != nullptr) {
-				SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
-				if (pGlass != nullptr) {
-					SERVO::CProcessData pd;
-					pd.setGlassId(pGlass->getID().c_str());
-					pEquipment->onProcessData(&pd);
-				}
-			}
 		}
 		else if (nCmd == ID_EQSGRAPHITEM_TEST4) {
+		}
+		else if (nCmd == ID_EQSGRAPHITEM_TEST5) {
+		}
+		else if (nCmd == ID_EQSGRAPHITEM_TEST6) {
 			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
-
-			/* 娴嬭瘯 RobotCMD */
-			if (pEquipment->getID() == EQ_ID_EFEM) {
-				SERVO::CEFEM* pEFEM = (SERVO::CEFEM*)pEquipment;
-
-				//SERVO::ROBOT_CMD_PARAM cmds[4];
-				//cmds[0].sequenceNo = 1;
-				//cmds[0].rcmd = (short)SERVO::RCMD::Move;
-				//cmds[0].armNo = 1;
-				//cmds[0].getPosition = 1;
-				//cmds[0].putPosition = 2;
-				//cmds[0].getSlotNo = 3;
-				//cmds[0].putSlotNo = 4;
-				//cmds[0].subCmd = 5;
-				//cmds[1].sequenceNo = 2;
-				//cmds[1].rcmd = (short)SERVO::RCMD::Transfer;
-				//cmds[1].armNo = 2;
-				//cmds[1].getPosition = 6;
-				//cmds[1].putPosition = 7;
-				//cmds[1].getSlotNo = 8;
-				//cmds[1].putSlotNo = 9;
-				//cmds[1].subCmd = 10;
-				//pEFEM->robotCmds(cmds, 2);
-
-				//CRobotCmdContainerDlg dlg;
-				//if (dlg.DoModal() == IDOK) {
-				//	std::vector<SERVO::ROBOT_CMD_PARAM>& cmds = dlg.GetResultCmds();
-				//	if (!cmds.empty()) {
-				//		pEFEM->robotCmds(cmds.data(), (int)cmds.size());
-				//	}
-				//}
-
-				CRobotCmdTestDlg dlg;
-				dlg.SetEFEM(pEFEM);
-				dlg.DoModal();
-			}
-
-
 
 
 			// 娴嬭瘯涓嬪彂Cim Message
@@ -319,8 +256,7 @@
 
 			// 娴嬭瘯璁剧疆鏃堕棿
 			/*
-			if (pEquipment->getID() == EQ_ID_Bonder1
-				|| pEquipment->getID() == EQ_ID_Bonder2) {
+			if (pEquipment->getID() == EQ_ID_EFEM) {
 				CTime time = CTime::GetCurrentTime();
 				pEquipment->setDateTime((short)time.GetYear(),
 					(short)time.GetMonth(),
@@ -330,7 +266,6 @@
 					(short)time.GetSecond());
 			}
 			*/
-
 			
 			// 娴嬭瘯璁剧疆cim mode
 			/*
@@ -341,32 +276,18 @@
 			}
 			*/
 			
-			
+			/*
 			if (pEquipment->getID() == EQ_ID_Bonder1
 				|| pEquipment->getID() == EQ_ID_Bonder2) {
 				static int ii = 0; ii++;
 				pEquipment->setEqMode((ii % 5) + 1);
 			}
-			
-
-			/*
-			SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
-			if (pGlass != nullptr) {
-				std::string strDescription;
-				SERVO::CPath* pPath = pGlass->getPath();
-				while (pPath != nullptr) {
-					pPath->getDescription(strDescription);
-					AfxMessageBox(strDescription.c_str());
-					pPath = pPath->getNext();
-				}
-			}
 			*/
 
-
-			// 璇锋眰涓婚厤鏂瑰垪琛�
-			if (pEquipment != nullptr) {
-				pEquipment->masterRecipeListRequest(0);
-			}			
+			static int i = 0;
+			i++;
+			static char* pszText[] = {"123", "456", "789", "abc", "def"};
+			theApp.m_model.m_hsmsPassive.requestAlarmReport(i%3, i, pszText[i%5]);
 		}
 
 
@@ -456,7 +377,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)

--
Gitblit v1.9.3