From ee4945bb0e32a065ce1d5d23ec6afbcba4bbcc03 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 09 九月 2025 09:33:49 +0800
Subject: [PATCH] 1.VCR转移到Aligner
---
SourceCode/Bond/Servo/CPageGraph2.cpp | 122 +++++++++++++++++++++++++++++++---------
1 files changed, 93 insertions(+), 29 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index 4d81345..cb4d449 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 瀵硅瘽妗�
@@ -22,6 +26,7 @@
m_pEqsGraphWnd = nullptr;
m_crBkgnd = PAGE_GRPAH2_BACKGROUND_COLOR;
m_hbrBkgnd = nullptr;
+ m_pObserver = nullptr;
}
CPageGraph2::~CPageGraph2()
@@ -45,9 +50,44 @@
// CPageGraph2 娑堟伅澶勭悊绋嬪簭
+void CPageGraph2::InitRxWindows()
+{
+ /* code */
+ // 璁㈤槄鏁版嵁
+ IRxWindows* pRxWindows = RX_GetRxWindows();
+ pRxWindows->enableLog(5);
+ if (m_pObserver == NULL) {
+ m_pObserver = pRxWindows->allocObserver([&](IAny* pAny) -> void {
+ // onNext
+ pAny->addRef();
+ int code = pAny->getCode();
+ 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->hasGlass());
+ }
+ }
+ }
+
+ pAny->release();
+ }, [&]() -> void {
+ // onComplete
+ }, [&](IThrowable* pThrowable) -> void {
+ // onErrorm
+ pThrowable->printf();
+ });
+
+ theApp.m_model.getObservable()->observeOn(pRxWindows->mainThread())
+ ->subscribe(m_pObserver);
+ }
+}
+
BOOL CPageGraph2::OnInitDialog()
{
CDialogEx::OnInitDialog();
+ InitRxWindows();
SetTimer(1, 2000, nullptr);
@@ -87,22 +127,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);
@@ -153,15 +212,18 @@
// 娴嬭瘯
else if (nCmd == ID_EQSGRAPHITEM_TEST1) {
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- pEquipment->outputGlass(0);
}
else if (nCmd == ID_EQSGRAPHITEM_TEST2) {
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- pEquipment->outputGlass(1);
}
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
/*
@@ -176,8 +238,10 @@
}
}
*/
+
+
// 娴嬭瘯娓呴櫎Cim Message
-
+ /*
if (pEquipment->getID() == EQ_ID_Bonder1
|| pEquipment->getID() == EQ_ID_Bonder2) {
static int msgId = 0; msgId++;
@@ -188,12 +252,11 @@
pEquipment->clearCimMessage(msgId, 2);
}
}
-
+ */
// 娴嬭瘯璁剧疆鏃堕棿
/*
- 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(),
@@ -203,7 +266,6 @@
(short)time.GetSecond());
}
*/
-
// 娴嬭瘯璁剧疆cim mode
/*
@@ -221,19 +283,11 @@
pEquipment->setEqMode((ii % 5) + 1);
}
*/
- /*
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- 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();
- }
- }
- */
+
+ 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]);
}
@@ -282,6 +336,11 @@
if (m_hbrBkgnd != nullptr) {
::DeleteObject(m_hbrBkgnd);
}
+
+ if (m_pObserver != nullptr) {
+ m_pObserver->unsubscribe();
+ m_pObserver = NULL;
+ }
}
@@ -317,6 +376,8 @@
for (auto outPin : outPins) {
m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin);
}
+
+ m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass());
}
void CPageGraph2::OnTimer(UINT_PTR nIDEvent)
@@ -350,6 +411,9 @@
std::list<SERVO::CEquipment*>& eqs = theApp.m_model.m_master.getEquipmentList();
for (auto item : eqs) {
EQITEM* pEqItem = m_pEqsGraphWnd->GetItem((DWORD_PTR)item);
+ if (nullptr == pEqItem) {
+ continue;
+ }
strValue.Format(_T("%d"), pEqItem->rect.left);
WritePrivateProfileString(item->getName().c_str(), _T("Left"),
--
Gitblit v1.9.3