From 7784fe230849d70345758d787a71f079a5cec9d7 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 20 五月 2025 13:54:03 +0800
Subject: [PATCH] 1.添加并连接CMeasurement
---
SourceCode/Bond/Servo/CEquipment.cpp | 87 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 86 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index a9d456a..ad9ab25 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -3,6 +3,8 @@
#include "ToolUnits.h"
#include <regex>
#include "CArm.h"
+#include "CGlassPool.h"
+#include "Servo.h"
#define CHECK_READ_STEP_SIGNAL(addr, data, size) { \
@@ -315,7 +317,7 @@
int count;
ar >> count;
for (int i = 0; i < count; i++) {
- CGlass* pGlass = new CGlass();
+ CGlass* pGlass = theApp.m_model.m_glassPool.allocaGlass();
pGlass->serialize(ar);
addGlassToList(pGlass);
}
@@ -593,6 +595,7 @@
panelNo = (value & 0xffff);
LOGI("Cim Message Confirm(msgID = %d, panel no.=%d).", msgId, panelNo);
}
+ /*
else if (isVcrEventStep(pStep)) {
SERVO::CEqVcrEventStep* pEqVcrEventStep = (SERVO::CEqVcrEventStep*)pStep;
CVcrEventReport* pVcrEventReport = pEqVcrEventStep->getVcrEventReport();
@@ -605,6 +608,7 @@
pEqVcrEventStep->setReturnCode(1);
return 1;
}
+ */
}
@@ -1061,6 +1065,61 @@
return pStep->setDateTime(year, month, day, hour, minute, second);
}
+ int CEquipment::setDispatchingMode(DISPATCHING_MODE mode, ONWRITED onWritedBlock/* = nullptr*/)
+ {
+ SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(STEP_EQ_DISPATCHINT_MODE_CHANGE);
+ if (pStep == nullptr) {
+ return -1;
+ }
+
+ LOGI("<CEquipment-%s>准备设置DispatchingMode<%d>", m_strName.c_str(), (int)mode);
+ if (onWritedBlock != nullptr) {
+ pStep->writeShort((short)mode, onWritedBlock);
+ }
+ else {
+ pStep->writeShort((short)mode, [&, mode](int code) -> int {
+ if (code == WOK) {
+ LOGI("<CEquipment-%s>设置DispatchingMode成功.", m_strName.c_str());
+ }
+ else {
+ LOGI("<CEquipment-%s>设置DispatchingMode失败,code:%d", m_strName.c_str(), code);
+ }
+
+ return 0;
+ });
+ }
+
+ return 0;
+ }
+
+ int CEquipment::indexerOperationModeChange(IDNEXER_OPERATION_MODE mode, ONWRITED onWritedBlock/* = nullptr*/)
+ {
+ SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(STEP_EFEM_IN_OP_MODE_CHANGE);
+ if (pStep == nullptr) {
+ return -1;
+ }
+
+ unsigned short operationMode = (unsigned short)(mode + getIndexerOperationModeBaseValue());
+ LOGI("<CEquipment-%s>准备设置indexerOperationMode<%d>", m_strName.c_str(), (int)mode);
+ if (onWritedBlock != nullptr) {
+ pStep->writeShort(operationMode, onWritedBlock);
+ }
+ else {
+ pStep->writeShort(operationMode, [&, mode](int code) -> int {
+ if (code == WOK) {
+ LOGI("<CEquipment-%s>设置indexerOperationMode成功.", m_strName.c_str());
+ }
+ else {
+ LOGI("<CEquipment-%s>设置indexerOperationMode失败,code:%d", m_strName.c_str(), code);
+ }
+
+ return 0;
+ });
+ }
+
+ return 0;
+ }
+
int CEquipment::masterRecipeListRequest(short unitNo)
{
SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(STEP_EQ_MASTER_RECIPE_LIST_REQ);
@@ -1305,6 +1364,27 @@
return index;
}
+ int CEquipment::decodeVCREventReport(CStep* pStep, const char* pszData, size_t size)
+ {
+ CVcrEventReport vcrEventReport;
+ vcrEventReport.unserialize(pszData, size);
+ LOGI("<CEquipment-%s>decodeVCREventReport<Result:%d, GlassId:%s>\n", m_strName.c_str(),
+ vcrEventReport.getVcrResult(),
+ vcrEventReport.getGlassId().c_str());
+
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ CAttributeVector attrubutes;
+ vcrEventReport.getAttributeVector(attrubutes, weight);
+ pStep->addAttributeVector(attrubutes);
+
+ // 0426, 先固定返回1(OK)
+ ((CReadStep*)pStep)->setReturnCode((short)VCR_Reply_Code::OK);
+
+ return 0;
+ }
+
int CEquipment::onPreStoredJob(int port, CJobDataB* pJobDataB)
{
LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s",
@@ -1335,6 +1415,11 @@
return 0;
}
+ int CEquipment::getIndexerOperationModeBaseValue()
+ {
+ return 0;
+ }
+
int CEquipment::addJobDataB(CJobDataB* pJobDataB)
{
// 添加之前先删除旧的,以免数据重复
--
Gitblit v1.9.3