From cf1497e3bba45ddc3b31cf9768954248bedc0bc1 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期三, 14 一月 2026 16:03:21 +0800
Subject: [PATCH] 1.修复以下问题:Only-1 Job 支持:isProcessJobsEmpty()/validate 决定了当前实现只支持单个 PJ/CJ。Host 如果按标准一次下多 PJ 或在运行中追加 PJ,会被拒绝但无明确回应,容易引起 Host/设备状态脱节。
---
SourceCode/Bond/Servo/HsmsPassive.cpp | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index 9186aff..3095a09 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -3405,6 +3405,26 @@
// 瑙i噴鏁版嵁锛屽緱鍒癈ProcessJob
+ // 瀹归噺鍓嶇疆妫�鏌ワ細褰撳墠瀹炵幇浠呮敮鎸佸崟鎵� PJ 闆嗗悎锛屽鏋滃凡鏈� PJ/CJ锛岀洿鎺ヨ繑鍥� ACKA=false
+ if (m_pModel != nullptr && !m_pModel->getMaster().isProcessJobsEmpty()) {
+ IMessage* pMessage = NULL;
+ HSMS_Create1Message(pMessage, m_nSessionId, 16, 16, ++m_nSystemByte);
+ ASSERT(pMessage);
+ pMessage->getBody()->addItem(); // PRJOBID list 涓虹┖
+ ISECS2Item* pItemErrors = pMessage->getBody()->addItem();
+ pItemErrors->addBoolItem(false, "ACKA");
+ ISECS2Item* pItemErrors2 = pItemErrors->addItem();
+ auto err = pItemErrors2->addItem();
+ err->addU4Item(1000, "ERRCODE");
+ err->addItem("PJobSpace=0 (existing ProcessJob/ControlJob)", "ERRTEXT");
+ m_pPassive->sendMessage(pMessage);
+ LOGI("<HSMS>[SEND]sessionId:%d, sType:%d systemBytes:%d",
+ pMessage->getHeader()->sessionId, pMessage->getHeader()->sType, pMessage->getHeader()->systemBytes);
+ LogSecsMessageBrief("<HSMS>[SEND]", pMessage);
+ HSMS_Destroy1Message(pMessage);
+ return 0;
+ }
+
ISECS2Item* pItemPjs, * pItemPj,* pItemCarriers, * pItemCarrier, *pItemSlots, *pItemRecipes;
unsigned short DATAID;
const char* pszPrjobid, *pszMF, *pszCarrierId, *pszRecipeName;
--
Gitblit v1.9.3