From 3afd6812c6bcb156297a9000db44caf23ede568c Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期日, 04 一月 2026 17:44:42 +0800
Subject: [PATCH] 1.EV_SubEqpStart和EV_SubEqpEnd事件上报
---
SourceCode/Bond/Servo/HsmsPassive.cpp | 72 ++++++++++++++++++++++++++++--------
1 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index fc512d9..8b56b52 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -950,7 +950,8 @@
return -1;
}
- std::wregex pattern(L"^\\d+,[^,]*,[^,]*,\\(\\d+(,\\d+)*\\).*"); // 鍖归厤浠ユ暟瀛�+閫楀彿寮�澶寸殑瀛楃涓�
+ // 鍏佽 Attached RPTID 涓虹┖锛�()
+ std::wregex pattern(L"^\\d+,[^,]*,[^,]*,\\(\\d*(,\\d+)*\\).*"); // 鍖归厤浠ユ暟瀛�+閫楀彿寮�澶寸殑瀛楃涓�
std::vector<SERVO::CCollectionEvent*> events;
int index, last;
CStringW strLine, strRPTIDs;
@@ -1617,18 +1618,18 @@
ASSERT(pMessage);
unsigned char SVU1 = 0;
- unsigned int SVID = 0;
+ unsigned short SVID = 0;
ISECS2Item* pBody = pRecv->getBody();
if (pBody == nullptr || pBody->getType() != SITYPE::L) {
pMessage->getBody()->addU1Item(SVU1, "SV");
goto MYREPLY;
}
- if (!pBody->getSubItemU4(0, SVID)) {
+ if (!pBody->getSubItemU2(0, SVID)) {
pMessage->getBody()->addU1Item(SVU1, "SV");
goto MYREPLY;
}
- SERVO::CVariable* pVariable = getVariable(SVID);
+ SERVO::CVariable* pVariable = getVariable((int)SVID);
if (pVariable == nullptr) {
pMessage->getBody()->addU1Item(SVU1, "SV");
goto MYREPLY;
@@ -2459,7 +2460,7 @@
}
// S6F11
-static unsigned int DATAID = 1;
+static unsigned short DATAID = 0;
int CHsmsPassive::requestEventReportSend(unsigned int CEID)
{
SERVO::CCollectionEvent* pEvent = getEvent(CEID);
@@ -2468,9 +2469,6 @@
}
SERVO::CReport* pReport = pEvent->getFirstReport();
- if (pReport == nullptr) {
- return ER_UNLINK_EVENT_REPORT;
- }
Lock();
@@ -2479,16 +2477,19 @@
HSMS_Create1Message(pMessage, m_nSessionId, 6 | REPLY, 11, ++m_nSystemByte);
ASSERT(pMessage);
ISECS2Item* pItem = pMessage->getBody();
- pItem->addU4Item(++DATAID, "DATAID");
+ // pItem->addU2Item(++DATAID, "DATAID"); // 鏍规嵁鍒殑鏃ュ織鏄剧ずDATAID鎭掍负0锛屾墍浠ユ垜浠厛鐓т娇鐢�0
+ pItem->addU2Item(0, "DATAID");
pItem->addU4Item(CEID, "CEID");
- ISECS2Item* pItemList1 = pItem->addItem();
- ISECS2Item* pItemList2 = pItemList1->addItem();
- pItemList2->addU4Item(pReport->getReportId(), "RPTID");
- ISECS2Item* pItemList3 = pItemList2->addItem();
+ ISECS2Item* pItemList1 = pItem->addItem(); // L[n] reports
+ if (pReport != nullptr) {
+ ISECS2Item* pItemList2 = pItemList1->addItem();
+ pItemList2->addU4Item(pReport->getReportId(), "RPTID");
+ ISECS2Item* pItemList3 = pItemList2->addItem();
- auto vars = pReport->getVariables();
- for (auto var : vars) {
- addVariableValueToItem(pItemList3, var);
+ auto vars = pReport->getVariables();
+ for (auto var : vars) {
+ addVariableValueToItem(pItemList3, var);
+ }
}
pAction->setSendMessage(pMessage);
if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
@@ -2523,6 +2524,21 @@
return requestEventReportSend("CarrierID_Readed");
}
+int CHsmsPassive::requestEventReportSend_CheckSlotMap()
+{
+ return requestEventReportSend("CheckSlotMap");
+}
+
+int CHsmsPassive::requestEventReportSend_SlotMapVerificationOK()
+{
+ return requestEventReportSend("SlotMapVerificationOK");
+}
+
+int CHsmsPassive::requestEventReportSend_SlotMapVerificationNG()
+{
+ return requestEventReportSend("SlotMapVerificationNG");
+}
+
int CHsmsPassive::requestEventReportSend_Port_Unload_Ready()
{
return requestEventReportSend("Port_Unload_Ready");
@@ -2531,6 +2547,11 @@
int CHsmsPassive::requestEventReportSend_Port_Load_Ready()
{
return requestEventReportSend("Port_Load_Ready");
+}
+
+int CHsmsPassive::requestEventReportSend_Port_Ready_To_Release()
+{
+ return requestEventReportSend("Port_Ready_To_Release");
}
int CHsmsPassive::requestEventReportSend_Port_Blocked()
@@ -2578,5 +2599,24 @@
return requestEventReportSend("OCR_PanelID_Read_OK");
}
+int CHsmsPassive::requestEventReportSend_LoadPortNotAssoc()
+{
+ return requestEventReportSend("LoadPortNotAssoc");
+}
+
+int CHsmsPassive::requestEventReportSend_ProcessDataReport()
+{
+ return requestEventReportSend("ProcessDataReport");
+}
+
+int CHsmsPassive::requestEventReportSend_SubEqpStart()
+{
+ return requestEventReportSend("SubEqpStart");
+}
+
+int CHsmsPassive::requestEventReportSend_SubEqpEnd()
+{
+ return requestEventReportSend("SubEqpEnd");
+}
--
Gitblit v1.9.3