From fcc340fc812ee692f72fa1774c114e6f4d788f5c Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期二, 18 十一月 2025 14:33:14 +0800
Subject: [PATCH] 1.实现用户管理。
---
SourceCode/Bond/Servo/CPageGraph2.cpp | 168 +++++++++++++++++--------------------------------------
1 files changed, 53 insertions(+), 115 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index 3e161a7..1156425 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 瀵硅瘽妗�
@@ -64,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);
}
}
@@ -127,19 +125,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 +157,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 +210,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 +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(),
@@ -330,7 +264,6 @@
(short)time.GetSecond());
}
*/
-
// 娴嬭瘯璁剧疆cim mode
/*
@@ -341,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]);
}
@@ -384,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
@@ -456,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