From 697fa6b857fe202fe2e5f50d4ecf2c7268e527cc Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 15 八月 2025 15:22:19 +0800
Subject: [PATCH] 1.变量(代EAP查询的数据)增加列表类型; 2.实现ProcessJob Queued上报功能;
---
SourceCode/Bond/Servo/HsmsPassive.h | 2 +
SourceCode/Bond/Servo/CVariable.h | 6 ++
SourceCode/Bond/EAPSimulator/CHsmsActive.h | 1
SourceCode/Bond/Servo/HsmsPassive.cpp | 32 ++++++++++++++-
SourceCode/Bond/Servo/CMaster.h | 1
SourceCode/Bond/Servo/Model.cpp | 13 ++++++
SourceCode/Bond/Servo/CLoadPort.cpp | 2
SourceCode/Bond/x64/Debug/VariableList.txt | 3 +
SourceCode/Bond/EAPSimulator/CHsmsActive.cpp | 4 ++
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp | 2
SourceCode/Bond/x64/Debug/CollectionEventList.txt | 1
SourceCode/Bond/Servo/CMaster.cpp | 5 ++
SourceCode/Bond/Servo/CVariable.cpp | 16 +++++++
SourceCode/Bond/x64/Debug/ReportList.txt | 1
Document/Panel Bonder八零联合 SecsTest CheckList_v3.0.xlsx | 0
15 files changed, 80 insertions(+), 9 deletions(-)
diff --git "a/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx" "b/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
index 16c9afe..64eba06 100644
--- "a/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
+++ "b/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
Binary files differ
diff --git a/SourceCode/Bond/EAPSimulator/CHsmsActive.cpp b/SourceCode/Bond/EAPSimulator/CHsmsActive.cpp
index b094a6a..7969e15 100644
--- a/SourceCode/Bond/EAPSimulator/CHsmsActive.cpp
+++ b/SourceCode/Bond/EAPSimulator/CHsmsActive.cpp
@@ -72,6 +72,10 @@
// S5F1
replyAck(5, 2, pMessage->getHeader()->systemBytes, 0, _T("ACK0"));
}
+ else if (nStream == 6 && pHeader->function == 11) {
+ // S5F1
+ replyAck(6, 12, pMessage->getHeader()->systemBytes, 0, _T("ACK0"));
+ }
};
ActiveListener listener;
diff --git a/SourceCode/Bond/EAPSimulator/CHsmsActive.h b/SourceCode/Bond/EAPSimulator/CHsmsActive.h
index f46f279..4ea6387 100644
--- a/SourceCode/Bond/EAPSimulator/CHsmsActive.h
+++ b/SourceCode/Bond/EAPSimulator/CHsmsActive.h
@@ -9,6 +9,7 @@
#define SVID_CJobSpace 5001
#define SVID_PJobSpace 5002
+#define SVID_PJobQueued 5003
typedef std::function<void(void* pFrom, ACTIVESTATE state)> STATECHANGED;
diff --git a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
index 9ced073..13bb28c 100644
--- a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
+++ b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
@@ -390,7 +390,7 @@
void CEAPSimulatorDlg::OnBnClickedButtonQueryPjSpace()
{
- theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(SVID_PJobSpace);
+ theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(SVID_PJobQueued);
}
void CEAPSimulatorDlg::OnBnClickedButtonQueryPpidList()
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index 0050200..28ce403 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -382,7 +382,7 @@
ii++;
if (ii == 55) {
char szBuffer[64] = { 0 };
- CStep* pStep = getStepWithName(STEP_EQ_PORT1_INUSE);
+ CStep* pStep = getStepWithName(STEP_EQ_PORT2_INUSE);
CPortStatusReport portStatusReport;
portStatusReport.setPortStatus(PORT_INUSE);
portStatusReport.setJobExistenceSlot(0xf);
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index f664b6e..ccd1f5d 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -1860,6 +1860,11 @@
return m_processJobs.size();
}
+ std::vector<SERVO::CProcessJob*>& CMaster::getProcessJobs()
+ {
+ return m_processJobs;
+ }
+
CLoadPort* CMaster::getPortWithCarrierId(const std::string& carrierId) const
{
CLoadPort* pPort;
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index f19f047..6cb2965 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -106,6 +106,7 @@
int getContinuousTransferCount();
void setContinuousTransferCount(int round);
int setProcessJobs(std::vector<SERVO::CProcessJob*>& pjs);
+ std::vector<SERVO::CProcessJob*>& getProcessJobs();
CLoadPort* getPortWithCarrierId(const std::string& carrierId) const;
private:
diff --git a/SourceCode/Bond/Servo/CVariable.cpp b/SourceCode/Bond/Servo/CVariable.cpp
index 60d0ab9..e7b916c 100644
--- a/SourceCode/Bond/Servo/CVariable.cpp
+++ b/SourceCode/Bond/Servo/CVariable.cpp
@@ -43,6 +43,9 @@
if (_strcmpi("A20", pszFormat) == 0) {
return SVFromat::A20;
}
+ if (_strcmpi("L", pszFormat) == 0) {
+ return SVFromat::L;
+ }
return SVFromat::U1;
}
@@ -64,6 +67,9 @@
}
if (SVFromat::A20 == format) {
return "A20";
+ }
+ if (SVFromat::L == format) {
+ return "L";
}
return "U1";
@@ -113,6 +119,11 @@
m_strValue = strTemp;
}
+ void CVariable::setValue(std::vector<CVariable>& vars)
+ {
+ m_varsValue = vars;
+ }
+
std::string CVariable::getValue()
{
std::string strRet;
@@ -135,5 +146,8 @@
return 0;
}
-
+ std::vector<CVariable>& CVariable::getVarsValue()
+ {
+ return m_varsValue;
+ }
}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/CVariable.h b/SourceCode/Bond/Servo/CVariable.h
index 8cf68a7..597b84d 100644
--- a/SourceCode/Bond/Servo/CVariable.h
+++ b/SourceCode/Bond/Servo/CVariable.h
@@ -9,7 +9,8 @@
U2,
I2,
A20,
- A50
+ A50,
+ L
};
class CVariable
@@ -28,8 +29,10 @@
std::string& getRemark();
void setValue(__int64 value);
void setValue(const char* pszValue);
+ void setValue(std::vector<CVariable>& vars);
std::string getValue();
__int64 getIntValue();
+ std::vector<CVariable>& getVarsValue();
private:
unsigned int m_nVarialbeId;
@@ -38,6 +41,7 @@
std::string m_strRemark;
__int64 m_nValue;
std::string m_strValue;
+ std::vector<CVariable> m_varsValue;
};
}
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index f44acb0..b71785e 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -108,6 +108,8 @@
ASSERT(pParent);
ASSERT(pVariable);
+
+ ISECS2Item* pItemList;
SERVO::SVFromat format = pVariable->getFormat();
switch (format)
{
@@ -123,6 +125,16 @@
case SERVO::SVFromat::A20:
case SERVO::SVFromat::A50:
pParent->addItem(pVariable->getValue().c_str(), "SV");
+ break;
+ case SERVO::SVFromat::L:
+ pItemList = pParent->addItem();
+ {
+ auto vars = pVariable->getVarsValue();
+ for (auto v : vars) {
+ addVariableValueToItem(pItemList, &v);
+ }
+ }
+ break;
default:
break;
}
@@ -313,6 +325,14 @@
auto v = getVariable(pszName);
if (v != nullptr) {
v->setValue(value);
+ }
+}
+
+void CHsmsPassive::setVariableValue(const char* pszName, std::vector<SERVO::CVariable>& vars)
+{
+ auto v = getVariable(pszName);
+ if (v != nullptr) {
+ v->setValue(vars);
}
}
@@ -933,6 +953,7 @@
return 0;
}
+// S1F3
int CHsmsPassive::replySelectedEquipmentStatusData(IMessage* pRecv)
{
if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
@@ -1679,9 +1700,9 @@
pItemList2->addU4Item(pReport->getReportId(), "RPTID");
ISECS2Item* pItemList3 = pItemList2->addItem();
- auto values = pReport->getVariables();
- for (auto item : values) {
- pItemList3->addItem(item->getValue().c_str(), "V");
+ auto vars = pReport->getVariables();
+ for (auto var : vars) {
+ addVariableValueToItem(pItemList3, var);
}
pAction->setSendMessage(pMessage);
if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
@@ -1716,6 +1737,11 @@
return requestEventReportSend("CarrierID_Readed");
}
+int CHsmsPassive::requestEventReportSend_PJ_Queued()
+{
+ return requestEventReportSend("PJ_Queued");
+}
+
diff --git a/SourceCode/Bond/Servo/HsmsPassive.h b/SourceCode/Bond/Servo/HsmsPassive.h
index ba36e0d..f229e93 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.h
+++ b/SourceCode/Bond/Servo/HsmsPassive.h
@@ -147,6 +147,7 @@
// 设置变量值
void setVariableValue(const char* pszName, __int64 value);
void setVariableValue(const char* pszName, const char* value);
+ void setVariableValue(const char* pszName, std::vector<SERVO::CVariable>& vars);
// 从文件中加载CReport列表
int loadReports(const char* pszFilepath);
@@ -187,6 +188,7 @@
int requestEventReportSend(unsigned int CEID);
int requestEventReportSend(const char* pszEventName);
int requestEventReportSend_CarrierID_Readed();
+ int requestEventReportSend_PJ_Queued();
private:
void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName);
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 260c4fc..71d4eef 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -179,7 +179,18 @@
for (auto p : pjs) {
LOGI("<Model>onPRJobMultiCreate %s %s", p->id().c_str(), p->recipeSpec().c_str());
}
- return m_master.setProcessJobs(pjs);
+ int nRet = m_master.setProcessJobs(pjs);
+ auto processJobs = m_master.getProcessJobs();
+ std::vector<SERVO::CVariable> vars;
+ for (auto pj : processJobs) {
+ SERVO::CVariable var("", "PRJOBID", "A50", "PRJOBID");
+ var.setValue(pj->id().c_str());
+ vars.push_back(var);
+ }
+
+ m_hsmsPassive.setVariableValue("PJQueued", vars);
+ m_hsmsPassive.requestEventReportSend_PJ_Queued();
+ return nRet;
};
m_hsmsPassive.setListener(listener);
m_hsmsPassive.setEquipmentModelType((LPTSTR)(LPCTSTR)strModeType);
diff --git a/SourceCode/Bond/x64/Debug/CollectionEventList.txt b/SourceCode/Bond/x64/Debug/CollectionEventList.txt
index 8732aaf..44350fa 100644
--- a/SourceCode/Bond/x64/Debug/CollectionEventList.txt
+++ b/SourceCode/Bond/x64/Debug/CollectionEventList.txt
@@ -38,3 +38,4 @@
40000,E90_SPSM_NoState_To_NeedsProcessing,,(40000)
40001,E90_SPSM_InProcess_To_ProcessCompleted,,(40000)
50000,CarrierID_Readed,,(50000)
+50001,PJ_Queued,,(50001)
diff --git a/SourceCode/Bond/x64/Debug/ReportList.txt b/SourceCode/Bond/x64/Debug/ReportList.txt
index fe7fc97..ce240e3 100644
--- a/SourceCode/Bond/x64/Debug/ReportList.txt
+++ b/SourceCode/Bond/x64/Debug/ReportList.txt
@@ -16,4 +16,5 @@
31000,(1,31000,31001)
40000,(1,10203,20000)
50000,(5000)
+50001,(5003)
diff --git a/SourceCode/Bond/x64/Debug/VariableList.txt b/SourceCode/Bond/x64/Debug/VariableList.txt
index 51b976d..02fd14e 100644
--- a/SourceCode/Bond/x64/Debug/VariableList.txt
+++ b/SourceCode/Bond/x64/Debug/VariableList.txt
@@ -36,4 +36,5 @@
2025,FFUParameter,U2,FFU设定值
5000,CarrierID,A20,卡匣ID
5001,CJobSpace,U1,CJ Space
-5002,PJobSpace,U1,PJ Space
\ No newline at end of file
+5002,PJobSpace,U1,PJ Space
+5003,PJQueued,L,PJ Queued
\ No newline at end of file
--
Gitblit v1.9.3