From db9d120efcfe76bb73df089dca8986eca9ee0e6f Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期三, 10 十二月 2025 10:11:37 +0800
Subject: [PATCH] 1.扫码上报,但未在配置中设置变量;

---
 SourceCode/Bond/Servo/CPageGraph2.cpp |  106 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 65 insertions(+), 41 deletions(-)

diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index cc44782..1156425 100644
--- a/SourceCode/Bond/Servo/CPageGraph2.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -8,8 +8,12 @@
 #include "CHMPropertyDlg.h"
 #include "CEquipmentPage1.h"
 #include "CEquipmentPage2.h"
+#include "CEquipmentPage3.h"
+#include "CPageLinkSignal.h"
 #include "CPagePortProperty.h"
+#include "CPagePortStatus.h"
 #include "CPageCassetteCtrlCmd.h"
+#include "CJobDataB.h"
 
 
 // CPageGraph2 瀵硅瘽妗�
@@ -60,10 +64,8 @@
 			if (RX_CODE_EQ_DATA_CHANGED == code) {
 				// 閫氱煡璁惧鐘舵��
 				SERVO::CEquipment* pEquipment = nullptr;
-				if (pAny->getPtrValue("ptr", (void*&)pEquipment)) {
-					if (pEquipment != nullptr) {
-						m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty());
-					}
+				if (pAny->getPtrValue("ptr", (void*&)pEquipment) && pEquipment != nullptr) {
+					UpdateItemIndicators(pEquipment);
 				}
 			}
 
@@ -123,22 +125,41 @@
 		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();
+			pPage3->setEquipment(pEquipment);
+			pPage3->Create(IDD_PAGE_EQUIPMENT3);
+			dlg.addPage(pPage3, "Dispatching Mode");
+		}
 
 		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);
@@ -189,18 +210,18 @@
 
 		// 娴嬭瘯
 		else if (nCmd == ID_EQSGRAPHITEM_TEST1) {
-			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
-			if (pEquipment->getID() == EQ_ID_LOADPORT1) {
-				pEquipment->outputGlass(1);
-			}
-			pEquipment->fetchedOutJob("P20250320A1A2");
 		}
 		else if (nCmd == ID_EQSGRAPHITEM_TEST2) {
-			SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
-			pEquipment->storedJob("P20250320A1A2");
 		}
 		else if (nCmd == ID_EQSGRAPHITEM_TEST3) {
+		}
+		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;
+
 
 			// 娴嬭瘯涓嬪彂Cim Message
 			/*
@@ -233,8 +254,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(),
@@ -244,7 +264,6 @@
 					(short)time.GetSecond());
 			}
 			*/
-
 			
 			// 娴嬭瘯璁剧疆cim mode
 			/*
@@ -255,32 +274,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]);
 		}
 
 
@@ -298,6 +303,12 @@
 	m_pEqsGraphWnd->SetBkgndColor(m_crBkgnd);
 	m_pEqsGraphWnd->SetOnListener(listener);
 
+	CString strIniFile, strItem;
+	strIniFile.Format(_T("%s\\configuration.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+	int nIndicatorSize = GetPrivateProfileInt("PageGraph2", _T("IndicatorSize"), 10, strIniFile);
+	int nIndicatorMargin = GetPrivateProfileInt("PageGraph2", _T("IndicatorMargin"), 0, strIniFile);
+	m_pEqsGraphWnd->SetIndicatorSize(nIndicatorSize);
+	m_pEqsGraphWnd->SetIndicatorMargin(nIndicatorMargin);
 
 	return TRUE;  // return TRUE unless you set the focus to a control
 				  // 寮傚父: OCX 灞炴�ч〉搴旇繑鍥� FALSE
@@ -370,7 +381,20 @@
 		m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin);
 	}
 
-	m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty());
+	UpdateItemIndicators(pEquipment);
+}
+
+void CPageGraph2::UpdateItemIndicators(SERVO::CEquipment* pEquipment)
+{
+	for (int i = 0; i < SLOT_MAX; i++) {
+		auto pSlot = pEquipment->getSlot(i);
+
+		int state = 0;
+		if (pSlot->isEnable()) {
+			state = pSlot->getContext() != nullptr ? 1 : 2;
+		}
+		m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, state, i);
+	}
 }
 
 void CPageGraph2::OnTimer(UINT_PTR nIDEvent)

--
Gitblit v1.9.3