From 217f07665553605caa3f3339321d04bd2c3e8256 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 15 五月 2025 17:18:58 +0800
Subject: [PATCH] 1.Bonder 处理ProcessDataReport, 并将G1与G2绑定一起。
---
SourceCode/Bond/Servo/CLoadPort.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 42 insertions(+), 13 deletions(-)
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index 9cab3d1..ff98b63 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -206,19 +206,6 @@
int CLoadPort::outputGlass(int port)
{
- // 如果列表中没有Panel,模拟生成10张
- if (m_glassList.empty()) {
- static int ii = 0;
- char szBuffer[64];
- LOGI("<CLoadPort>模拟生成10张PANEL");
- for (int i = 0; i < 10; i++) {
- sprintf_s(szBuffer, "P20250320A1A%d", ++ii);
- CGlass* pGlass = new CGlass();
- pGlass->setID(szBuffer);
- addGlassToList(pGlass);
- }
- }
-
return __super::outputGlass(port);
}
@@ -515,4 +502,46 @@
return 0;
}
+
+ /*
+ * 生成测试用的玻璃列表
+ */
+ int CLoadPort::testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix)
+ {
+ // 如果非空就不生成了
+ Lock();
+ if (!m_glassList.empty()) {
+ Unlock();
+ return -1;
+ }
+ Unlock();
+
+
+ char szBuffer[64];
+ int suffix = startSuffix;
+ for (int i = 0; i < count; i++) {
+ CJobDataB jb;
+ CJobDataS js;
+
+ sprintf_s(szBuffer, "%s%d", pszPrefix, suffix++);
+ jb.setGlassId(szBuffer);
+ js.setMaterialsType((int)type);
+ if (type == MaterialsType::G1) {
+ js.setGlass1Id(szBuffer);
+ }
+ else if (type == MaterialsType::G2) {
+ js.setGlass2Id(szBuffer);
+ }
+
+ CGlass* pGlass = new CGlass();
+ pGlass->setID(szBuffer);
+ pGlass->setJobDataB(&jb);
+ pGlass->setType(type);
+ pGlass->setJobDataS(&js);
+ addGlassToList(pGlass);
+ }
+
+ return 0;
+ }
+
}
--
Gitblit v1.9.3