From 1fac536ec86ccda881c75d751224d353f72234ee Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期四, 12 二月 2026 09:38:08 +0800
Subject: [PATCH] 1.手动测试支持,PJ创建,支持多Port

---
 SourceCode/Bond/Servo/Model.cpp |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 129d51d..6785250 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -272,6 +272,9 @@
 		int seed = m_configuration.getPortCassetteSnSeed(i + 1);
 		m_master.setPortCassetteSnSeed(i + 1, seed);
 	}
+
+	// 鎸夎皟搴︽ā寮忚鍐欑敓浜х鍙i厤缃�
+	m_master.applySchedulingModePortMapping();
 }
 
 void CModel::setPortType(unsigned int index, SERVO::PortType type)
@@ -302,7 +305,7 @@
 	m_configuration.getUnitId(strUnitId);
 
 	// 鏈哄櫒鍨嬪彿鍜岃蒋浠剁増鏈彿搴斾粠閰嶇疆涓鍙栵紝褰撳墠鍏堝浐瀹氬��
-	CString strModeType = _T("Master");
+	CString strModeType = _T("Panel Bonder");
 	CString strSoftRev = _T("1.0.2");
 
 
@@ -534,7 +537,7 @@
 	m_hsmsPassive.loadEquipmentConstants((LPTSTR)(LPCTSTR)strVarialbleFile);
 	setControlState(m_currentControlState);
 	refreshDerivedSVs();
-	m_hsmsPassive.init(this, "APP", 7000);
+	m_hsmsPassive.init(this, "APP", 5000);
 	strVarialbleFile.Format(_T("%s\\ReportList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
 	m_hsmsPassive.loadReports((LPTSTR)(LPCTSTR)strVarialbleFile);
 	strVarialbleFile.Format(_T("%s\\CollectionEventList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
@@ -975,13 +978,15 @@
 		if (pEquipment == nullptr) return;
 		m_hsmsPassive.withVariableLock([&] {
 			m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
-			m_hsmsPassive.setVariableValue("SubEqpSlot", unitId);
+			m_hsmsPassive.setVariableValue("SubEqpSlot", (__int64)unitId);
 			m_hsmsPassive.setVariableValue("EquipmentStatus", (__int64)status);
 			m_hsmsPassive.requestEventReportSend("SubEqpStateChange");
 		});
 	};
 	masterListener.onSVDataReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, const std::vector<CParam>& params) {
 		(void)pMaster;
+		// 瀹㈡埛瑕佹眰鏆傛椂鍏虫帀SV涓婃姤锛屽皢鏉ユ崲鍙︿竴绉嶆柟寮�
+		/*
 		const int eqId = pEquipment ? pEquipment->getID() : 0;
 
 		auto sendSv = [&](const auto& vidMap, const char* evName) {
@@ -990,7 +995,7 @@
 				if (pEquipment != nullptr) {
 					m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
 				}
-				m_hsmsPassive.setVariableValue("SubEqpSlot", 0);
+				m_hsmsPassive.setVariableValue("SubEqpSlot", (__int64)0);
 				m_hsmsPassive.setVariableValue("Clock", CToolUnits::getCurrentTimeString().c_str());
 				for (size_t idx = 0; idx < count; ++idx) {
 					const std::string val = formatParamValue(params[idx]);
@@ -1025,6 +1030,7 @@
 			static constexpr std::array<int, 2> vids = { 6600, 6601 };
 			sendSv(vids, "MeasurementSVData");
 		}
+		*/
 	};
 	masterListener.onProcessDataReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, const std::vector<CParam>& params) {
 		(void)pMaster;
@@ -1036,7 +1042,7 @@
 				if (pEquipment != nullptr) {
 					m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
 				}
-				m_hsmsPassive.setVariableValue("SubEqpSlot", 0);
+				m_hsmsPassive.setVariableValue("SubEqpSlot", (__int64)0);
 				m_hsmsPassive.setVariableValue("Clock", CToolUnits::getCurrentTimeString().c_str());
 				for (size_t idx = 0; idx < count; ++idx) {
 					const std::string val = formatParamValue(params[idx]);
@@ -1129,6 +1135,7 @@
 	m_master.setCacheFilepath((LPTSTR)(LPCTSTR)strMasterDataFile);
 	m_master.setCompareMapsBeforeProceeding(m_configuration.isCompareMapsBeforeProceeding());
 	m_master.setJobMode(m_configuration.isJobMode());
+	m_master.setSchedulingMode((SERVO::SchedulingMode)m_configuration.getSchedulingMode());
 
 	// 鍔犳埅Job
 	strMasterDataFile.Format(_T("%s\\MasterState.dat"), (LPTSTR)(LPCTSTR)m_strWorkDir);

--
Gitblit v1.9.3