From d68541dce155a682f65b7c3fbfbfbeef17ea5b8f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 12 五月 2025 12:00:41 +0800
Subject: [PATCH] 1.StoredJob, Fetched out Job实现; 2.CStep增加定制的Attribute, 以便通过的Step不使用getAttributeVector也能添加不一样的Attribute;
---
SourceCode/Bond/Servo/CEqPortChangeStep.cpp | 15 +-
SourceCode/Bond/Servo/CEqCassetteTransferStateStep.cpp | 17 +-
SourceCode/Bond/Servo/CEqCassetteCtrlCmdStep.cpp | 3
SourceCode/Bond/Servo/CPanelAttributes.cpp | 1
SourceCode/Bond/Servo/CEqModeChangeStep.cpp | 3
SourceCode/Bond/Servo/CStep.h | 2
SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp | 3
SourceCode/Bond/Servo/CEqWriteStep.cpp | 3
SourceCode/Bond/Servo/CEquipment.cpp | 82 +++++++++--
SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp | 3
SourceCode/Bond/Servo/CEqCurrentRecipeChangeStep.cpp | 7
SourceCode/Bond/Servo/CEqReadStep.cpp | 3
SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp | 3
SourceCode/Bond/Servo/CEqReadIntStep.cpp | 5
SourceCode/Bond/Servo/CStep.cpp | 13 +
SourceCode/Bond/Servo/CReadStep.cpp | 5
SourceCode/Bond/Servo/CEqVcrEventStep.cpp | 15 +-
SourceCode/Bond/Servo/CWriteStep.cpp | 5
SourceCode/Bond/Servo/CEqAlarmStep.cpp | 15 +-
SourceCode/Bond/Servo/CLoadPort.cpp | 15 +-
SourceCode/Bond/Servo/CEqProcessStep.cpp | 15 +-
SourceCode/Bond/Servo/CAttribute.cpp | 10 +
SourceCode/Bond/Servo/CAttributeVector.h | 4
SourceCode/Bond/Servo/CAttribute.h | 4
SourceCode/Bond/Servo/CEqModeStep.cpp | 5
SourceCode/Bond/Servo/CEqJobEventStep.cpp | 63 ++++----
SourceCode/Bond/Servo/CEqVCREnableStep.cpp | 2
SourceCode/Bond/Servo/CEqStatusStep.cpp | 7
SourceCode/Bond/Servo/CAttributeVector.cpp | 31 ++++
SourceCode/Bond/Servo/CEFEM.cpp | 28 +++
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp | 3
SourceCode/Bond/Servo/CEquipment.h | 4
SourceCode/Bond/Servo/CBonder.cpp | 4
SourceCode/Bond/Servo/Common.h | 10 +
34 files changed, 278 insertions(+), 130 deletions(-)
diff --git a/SourceCode/Bond/Servo/CAttribute.cpp b/SourceCode/Bond/Servo/CAttribute.cpp
index 468ebf2..e9c902d 100644
--- a/SourceCode/Bond/Servo/CAttribute.cpp
+++ b/SourceCode/Bond/Servo/CAttribute.cpp
@@ -4,14 +4,15 @@
namespace SERVO {
CAttribute::CAttribute()
{
-
+ m_nWeight = 0;
}
- CAttribute::CAttribute(const char* pszName, const char* pszValue, const char* pszDescription)
+ CAttribute::CAttribute(const char* pszName, const char* pszValue, const char* pszDescription, unsigned int weight)
{
m_strName = pszName;
m_strValue = pszValue;
m_strDescription = pszDescription;
+ m_nWeight = weight;
}
CAttribute::~CAttribute()
@@ -33,4 +34,9 @@
{
return m_strDescription;
}
+
+ unsigned int CAttribute::getWeight()
+ {
+ return m_nWeight;
+ }
}
diff --git a/SourceCode/Bond/Servo/CAttribute.h b/SourceCode/Bond/Servo/CAttribute.h
index 5c96b72..ee5098b 100644
--- a/SourceCode/Bond/Servo/CAttribute.h
+++ b/SourceCode/Bond/Servo/CAttribute.h
@@ -6,18 +6,20 @@
{
public:
CAttribute();
- CAttribute(const char* pszName, const char* pszValue, const char* pszDescription);
+ CAttribute(const char* pszName, const char* pszValue, const char* pszDescription, unsigned int weight);
~CAttribute();
public:
std::string& getName();
std::string& getValue();
std::string& getDescription();
+ unsigned int getWeight();
private:
std::string m_strName;
std::string m_strValue;
std::string m_strDescription;
+ unsigned int m_nWeight; // 权重,用于排序
};
}
diff --git a/SourceCode/Bond/Servo/CAttributeVector.cpp b/SourceCode/Bond/Servo/CAttributeVector.cpp
index 6d9213a..733c629 100644
--- a/SourceCode/Bond/Servo/CAttributeVector.cpp
+++ b/SourceCode/Bond/Servo/CAttributeVector.cpp
@@ -1,5 +1,6 @@
#include "stdafx.h"
#include "CAttributeVector.h"
+#include <algorithm>
namespace SERVO {
@@ -16,14 +17,33 @@
m_attributes.clear();
}
- void CAttributeVector::addAttribute(CAttribute* pAttribute)
+ void CAttributeVector::addAttribute(CAttribute* pAttribute, BOOL bReplace/* = FALSE*/)
{
+ if (bReplace) {
+ for (auto it = m_attributes.begin(); it != m_attributes.end(); ) {
+ if ((*it)->getName().compare(pAttribute->getName()) == 0) {
+ delete (*it);
+ it = m_attributes.erase(it);
+ }
+ else {
+ ++it;
+ }
+ }
+ }
+
m_attributes.push_back(pAttribute);
+ }
+
+ void CAttributeVector::addAttributeVector(CAttributeVector& av)
+ {
+ for (auto item : av.m_attributes) {
+ m_attributes.push_back(item);
+ }
}
unsigned int CAttributeVector::size()
{
- return m_attributes.size();
+ return (unsigned int)m_attributes.size();
}
void CAttributeVector::clear()
@@ -34,6 +54,13 @@
m_attributes.clear();
}
+ void CAttributeVector::sortWithWeight()
+ {
+ std::sort(m_attributes.begin(), m_attributes.end(), [](CAttribute* pAttribute1, CAttribute* pAttribut2) {
+ return pAttribute1->getWeight() < pAttribut2->getWeight();
+ });
+ }
+
bool CAttributeVector::empty()
{
return m_attributes.empty();
diff --git a/SourceCode/Bond/Servo/CAttributeVector.h b/SourceCode/Bond/Servo/CAttributeVector.h
index c3b9b34..fdbb30a 100644
--- a/SourceCode/Bond/Servo/CAttributeVector.h
+++ b/SourceCode/Bond/Servo/CAttributeVector.h
@@ -11,8 +11,10 @@
~CAttributeVector();
public:
- void addAttribute(CAttribute* pAttribute);
+ void addAttribute(CAttribute* pAttribute, BOOL bReplace = FALSE);
+ void addAttributeVector(CAttributeVector& av);
void clear();
+ void sortWithWeight();
unsigned int size();
bool empty();
CAttribute* getAttribute(unsigned int index);
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 0167d1c..fb29c2e 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -281,7 +281,7 @@
if (code == ROK && pszData != nullptr && size > 0) {
int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
if (port > 0) {
- decodeFetchedOutJobReport(port, pszData, size);
+ decodeFetchedOutJobReport((CStep*)pFrom, port, pszData, size);
}
}
return -1;
@@ -305,7 +305,7 @@
if (code == ROK && pszData != nullptr && size > 0) {
int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
if (port > 0) {
- decodeStoredJobReport(port, pszData, size);
+ decodeStoredJobReport((CStep*)pFrom, port, pszData, size);
}
}
return -1;
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index bae19e5..32e9233 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -294,6 +294,30 @@
STEP_ID_PORT4_CASSETTIE_BLOCKED, 0x60b0);
{
+ // Received Job Report Upstream#1~9
+ char szBuffer[256];
+ for (int i = 0; i < 9; i++) {
+ CEqReadStep* pStep = new CEqReadStep(0x4c90 + 320 * i, 320 * 2,
+ [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
+ if (code == ROK && pszData != nullptr && size > 0) {
+ int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
+ if (port > 0) {
+ decodeFetchedOutJobReport((CStep*)pFrom, port, pszData, size);
+ }
+ }
+ return -1;
+ });
+ sprintf_s(szBuffer, "%s%d", STEP_EQ_RECEIVED_JOBn, i + 1);
+ pStep->setName(szBuffer);
+ pStep->setProp("Upstream", (void*)(__int64)(i + 1));
+ pStep->setWriteSignalDev(0x0 + i);
+ if (addStep(STEP_ID_FETCHED_OUT_JOB_REPORT1 + i, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ }
+
+ {
// Fetched Out Job Report #1~15
char szBuffer[256];
for (int i = 0; i < 15; i++) {
@@ -302,7 +326,7 @@
if (code == ROK && pszData != nullptr && size > 0) {
int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
if (port > 0) {
- decodeFetchedOutJobReport(port, pszData, size);
+ decodeFetchedOutJobReport((CStep*)pFrom, port, pszData, size);
}
}
return -1;
@@ -326,7 +350,7 @@
if (code == ROK && pszData != nullptr && size > 0) {
int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
if (port > 0) {
- decodeStoredJobReport(port, pszData, size);
+ decodeStoredJobReport((CStep*)pFrom, port, pszData, size);
}
}
return -1;
diff --git a/SourceCode/Bond/Servo/CEqAlarmStep.cpp b/SourceCode/Bond/Servo/CEqAlarmStep.cpp
index db6f707..f488927 100644
--- a/SourceCode/Bond/Servo/CEqAlarmStep.cpp
+++ b/SourceCode/Bond/Servo/CEqAlarmStep.cpp
@@ -24,20 +24,21 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
attrubutes.addAttribute(new CAttribute("Alarm State",
- std::to_string(m_nAlarmState).c_str(), ""));
+ std::to_string(m_nAlarmState).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Unit ID",
- std::to_string(m_nUnitId).c_str(), ""));
+ std::to_string(m_nUnitId).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Alarm Level",
- std::to_string(m_nAlarmLevel).c_str(), ""));
+ std::to_string(m_nAlarmLevel).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Alarm Code",
- std::to_string(m_nAlarmCode).c_str(), ""));
+ std::to_string(m_nAlarmCode).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Alarm ID",
- std::to_string(m_nAlarmId).c_str(), ""));
+ std::to_string(m_nAlarmId).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Text",
- m_strText.c_str(), ""));
+ m_strText.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Description",
- m_strDescription.c_str(), ""));
+ m_strDescription.c_str(), "", weight++));
}
int CEqAlarmStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqCassetteCtrlCmdStep.cpp b/SourceCode/Bond/Servo/CEqCassetteCtrlCmdStep.cpp
index fd4b4a8..63cf42b 100644
--- a/SourceCode/Bond/Servo/CEqCassetteCtrlCmdStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCassetteCtrlCmdStep.cpp
@@ -41,9 +41,10 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Control Command Dev",
- ("W" + CToolUnits::toHexString(m_nCtrlCmdDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nCtrlCmdDev, strTemp)).c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqCassetteTransferStateStep.cpp b/SourceCode/Bond/Servo/CEqCassetteTransferStateStep.cpp
index 22c85a7..2dc627e 100644
--- a/SourceCode/Bond/Servo/CEqCassetteTransferStateStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCassetteTransferStateStep.cpp
@@ -25,23 +25,24 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Dev",
- ("W" + CToolUnits::toHexString(m_nPortStatusDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nPortStatusDev, strTemp)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Port Status",
- getPortStatusDescription(strTemp).c_str(), ""));
+ getPortStatusDescription(strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteSequenceNo",
- std::to_string(m_nCassetteSequenceNo).c_str(), ""));
+ std::to_string(m_nCassetteSequenceNo).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteID",
- m_strCassetteID.c_str(), ""));
+ m_strCassetteID.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("LoadingCassetteType",
- getLoadingCassetteTypeDescription(strTemp).c_str(), ""));
+ getLoadingCassetteTypeDescription(strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Q-Time Flag",
- getQTimeFlagDescription(strTemp).c_str(), ""));
+ getQTimeFlagDescription(strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteMappingState",
- getCassetteMappingStateDescription(strTemp).c_str(), ""));
+ getCassetteMappingStateDescription(strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteStatus",
- getCassetteStatusDescription(strTemp).c_str(), ""));
+ getCassetteStatusDescription(strTemp).c_str(), "", weight++));
}
int CEqCassetteTransferStateStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp b/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp
index 3a4acee..3dc038c 100644
--- a/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp
@@ -30,8 +30,9 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Clear Cim Message Dev",
- ("W" + CToolUnits::toHexString(m_nClearCimMessageDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nClearCimMessageDev, strTemp)).c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp b/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp
index 3439d3a..d766185 100644
--- a/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp
@@ -31,8 +31,9 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Cim Message Dev",
- ("W" + CToolUnits::toHexString(m_nCimMessageDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nCimMessageDev, strTemp)).c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp b/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
index cbb8e17..5b29e6e 100644
--- a/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
@@ -39,8 +39,9 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Cim Mode Dev",
- ("W" + CToolUnits::toHexString(m_nCimModeDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nCimModeDev, strTemp)).c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqCurrentRecipeChangeStep.cpp b/SourceCode/Bond/Servo/CEqCurrentRecipeChangeStep.cpp
index 37a7abe..cb022ea 100644
--- a/SourceCode/Bond/Servo/CEqCurrentRecipeChangeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCurrentRecipeChangeStep.cpp
@@ -24,12 +24,13 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
attrubutes.addAttribute(new CAttribute("UnitNo",
- std::to_string(m_nUnitNo).c_str(), ""));
+ std::to_string(m_nUnitNo).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CurrentMasterRecipeId",
- std::to_string(m_nCurrentMasterRecipeId).c_str(), ""));
+ std::to_string(m_nCurrentMasterRecipeId).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("LocalRecipeId",
- std::to_string(m_nLocalRecipeId).c_str(), ""));
+ std::to_string(m_nLocalRecipeId).c_str(), "", weight++));
}
int CEqCurrentRecipeChangeStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp b/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp
index 57a8d92..244c96e 100644
--- a/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp
+++ b/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp
@@ -29,8 +29,9 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("DateTime Dev",
- ("W" + CToolUnits::toHexString(m_nDateTimeDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nDateTimeDev, strTemp)).c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqJobEventStep.cpp b/SourceCode/Bond/Servo/CEqJobEventStep.cpp
index 49d43b8..2bdc84a 100644
--- a/SourceCode/Bond/Servo/CEqJobEventStep.cpp
+++ b/SourceCode/Bond/Servo/CEqJobEventStep.cpp
@@ -23,99 +23,100 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Dev",
- ("W" + CToolUnits::toHexString(m_nJobDataADev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nJobDataADev, strTemp)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteSequenceNo",
- std::to_string(m_jobDataS.getCassetteSequenceNo()).c_str(), ""));
+ std::to_string(m_jobDataS.getCassetteSequenceNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("JobSequenceNo",
- std::to_string(m_jobDataS.getJobSequenceNo()).c_str(), ""));
+ std::to_string(m_jobDataS.getJobSequenceNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("LotId",
- m_jobDataS.getLotId().c_str(), ""));
+ m_jobDataS.getLotId().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("ProductId",
- m_jobDataS.getProductId().c_str(), ""));
+ m_jobDataS.getProductId().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("OperationId",
- m_jobDataS.getOperationId().c_str(), ""));
+ m_jobDataS.getOperationId().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Glass1Id",
- m_jobDataS.getGlass1Id().c_str(), ""));
+ m_jobDataS.getGlass1Id().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Glass2Id",
- m_jobDataS.getGlass2Id().c_str(), ""));
+ m_jobDataS.getGlass2Id().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("JobType",
- std::to_string(m_jobDataS.getJobType()).c_str(), ""));
+ std::to_string(m_jobDataS.getJobType()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("MaterialsType",
- std::to_string(m_jobDataS.getMaterialsType()).c_str(), ""));
+ std::to_string(m_jobDataS.getMaterialsType()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("ProductType",
- std::to_string(m_jobDataS.getProductType()).c_str(), ""));
+ std::to_string(m_jobDataS.getProductType()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("DummyType",
- std::to_string(m_jobDataS.getDummyType()).c_str(), ""));
+ std::to_string(m_jobDataS.getDummyType()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("SkipFlag",
- std::to_string(m_jobDataS.getSkipFlag()).c_str(), ""));
+ std::to_string(m_jobDataS.getSkipFlag()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("ProcessFlag",
- std::to_string(m_jobDataS.getProcessFlag()).c_str(), ""));
+ std::to_string(m_jobDataS.getProcessFlag()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("ProcessResonCode",
- std::to_string(m_jobDataS.getProcessResonCode()).c_str(), ""));
+ std::to_string(m_jobDataS.getProcessResonCode()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("LastGlassFlag",
- std::to_string(m_jobDataS.getLastGlassFlag()).c_str(), ""));
+ std::to_string(m_jobDataS.getLastGlassFlag()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("FirstGlassFlag",
- std::to_string(m_jobDataS.getFirstGlassFlag()).c_str(), ""));
+ std::to_string(m_jobDataS.getFirstGlassFlag()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("QTime1",
- std::to_string(m_jobDataS.getQTime(0)).c_str(), ""));
+ std::to_string(m_jobDataS.getQTime(0)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("QTime2",
- std::to_string(m_jobDataS.getQTime(1)).c_str(), ""));
+ std::to_string(m_jobDataS.getQTime(1)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("QTime3",
- std::to_string(m_jobDataS.getQTime(2)).c_str(), ""));
+ std::to_string(m_jobDataS.getQTime(2)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("QTimeOverFlag",
- std::to_string(m_jobDataS.getQTimeOverFlag()).c_str(), ""));
+ std::to_string(m_jobDataS.getQTimeOverFlag()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("MasterRecipe",
- std::to_string(m_jobDataS.getMasterRecipe()).c_str(), ""));
+ std::to_string(m_jobDataS.getMasterRecipe()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("ProductRecipeId",
- m_jobDataS.getProductRecipeId().c_str(), ""));
+ m_jobDataS.getProductRecipeId().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("PCode",
- m_jobDataS.getPCode().c_str(), ""));
+ m_jobDataS.getPCode().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("UseType",
- m_jobDataS.getUseType().c_str(), ""));
+ m_jobDataS.getUseType().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("PanelMeasure",
- m_jobDataS.getPanelMeasure().c_str(), ""));
+ m_jobDataS.getPanelMeasure().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("SlotUnitSelectFlag",
- std::to_string(m_jobDataS.getSlotUnitSelectFlag()).c_str(), ""));
+ std::to_string(m_jobDataS.getSlotUnitSelectFlag()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("SourcePortNo",
- std::to_string(m_jobDataS.getSourcePortNo()).c_str(), ""));
+ std::to_string(m_jobDataS.getSourcePortNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("SourceSlotNo",
- std::to_string(m_jobDataS.getSourceSlotNo()).c_str(), ""));
+ std::to_string(m_jobDataS.getSourceSlotNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("TargetPortNo",
- std::to_string(m_jobDataS.getTargetPortNo()).c_str(), ""));
+ std::to_string(m_jobDataS.getTargetPortNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("TargetSlotNo",
- std::to_string(m_jobDataS.getTargetSlotNo()).c_str(), ""));
+ std::to_string(m_jobDataS.getTargetSlotNo()).c_str(), "", weight++));
}
int CEqJobEventStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqModeChangeStep.cpp b/SourceCode/Bond/Servo/CEqModeChangeStep.cpp
index 6bb6f1e..2802c4b 100644
--- a/SourceCode/Bond/Servo/CEqModeChangeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqModeChangeStep.cpp
@@ -39,8 +39,9 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Equipment Mode Dev",
- ("W" + CToolUnits::toHexString(m_nEqModeDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nEqModeDev, strTemp)).c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqModeStep.cpp b/SourceCode/Bond/Servo/CEqModeStep.cpp
index 8b21988..91d1803 100644
--- a/SourceCode/Bond/Servo/CEqModeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqModeStep.cpp
@@ -19,11 +19,12 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Mode",
- std::to_string(m_nMode).c_str(), getModeDescription(strTemp).c_str()));
+ std::to_string(m_nMode).c_str(), getModeDescription(strTemp).c_str(), weight++));
attrubutes.addAttribute(new CAttribute("Mode Dev",
- ("W" + CToolUnits::toHexString(m_nModeDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nModeDev, strTemp)).c_str(), "", weight++));
}
int CEqModeStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqPortChangeStep.cpp b/SourceCode/Bond/Servo/CEqPortChangeStep.cpp
index 0927225..5d85b6c 100644
--- a/SourceCode/Bond/Servo/CEqPortChangeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqPortChangeStep.cpp
@@ -24,21 +24,22 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Port Dev",
- ("W" + CToolUnits::toHexString(m_nPortDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nPortDev, strTemp)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("PortType",
- std::to_string(m_nPortType).c_str(), getPortTypeDescription(strTemp).c_str()));
+ std::to_string(m_nPortType).c_str(), getPortTypeDescription(strTemp).c_str(), weight++));
attrubutes.addAttribute(new CAttribute("PortMode",
- std::to_string(m_nPortMode).c_str(), getPortModeDescription(strTemp).c_str()));
+ std::to_string(m_nPortMode).c_str(), getPortModeDescription(strTemp).c_str(), weight++));
attrubutes.addAttribute(new CAttribute("PortCassetteType",
- std::to_string(m_nPortCassetteType).c_str(), getPortCassetteTypeDescription(strTemp).c_str()));
+ std::to_string(m_nPortCassetteType).c_str(), getPortCassetteTypeDescription(strTemp).c_str(), weight++));
attrubutes.addAttribute(new CAttribute("PortTransferMode",
- std::to_string(m_nPortTransferMode).c_str(), getPortTransferModeDescription(strTemp).c_str()));
+ std::to_string(m_nPortTransferMode).c_str(), getPortTransferModeDescription(strTemp).c_str(), weight++));
attrubutes.addAttribute(new CAttribute("PortEnableMode",
- std::to_string(m_nPortEanbleMode).c_str(), getPortEnableModeDescription(strTemp).c_str()));
+ std::to_string(m_nPortEanbleMode).c_str(), getPortEnableModeDescription(strTemp).c_str(), weight++));
attrubutes.addAttribute(new CAttribute("PortTypeAutoChangeMode",
- std::to_string(m_nPortTypeAutoChangeMode).c_str(), getPortTypeAutoChangeModeDescription(strTemp).c_str()));
+ std::to_string(m_nPortTypeAutoChangeMode).c_str(), getPortTypeAutoChangeModeDescription(strTemp).c_str(), weight++));
}
int CEqPortChangeStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqProcessStep.cpp b/SourceCode/Bond/Servo/CEqProcessStep.cpp
index 4f08edc..8c607bc 100644
--- a/SourceCode/Bond/Servo/CEqProcessStep.cpp
+++ b/SourceCode/Bond/Servo/CEqProcessStep.cpp
@@ -22,25 +22,26 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
attrubutes.addAttribute(new CAttribute("Glass ID",
- m_strGlassId.c_str(), ""));
+ m_strGlassId.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Start Time",
- m_strStartTime.c_str(), ""));
+ m_strStartTime.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("End Time",
- m_strEndTime.c_str(), ""));
+ m_strEndTime.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Total Parameter",
- std::to_string(m_nTotalParameter).c_str(), ""));
+ std::to_string(m_nTotalParameter).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Total Group",
- std::to_string(m_nTotalGroup).c_str(), ""));
+ std::to_string(m_nTotalGroup).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Current Group",
- std::to_string(m_nCurrentGroup).c_str(), ""));
+ std::to_string(m_nCurrentGroup).c_str(), "", weight++));
char szName[256];
int index = 0;
for (auto item : m_params) {
sprintf_s(szName, 256, "Parameter %d", ++index);
attrubutes.addAttribute(new CAttribute(szName,
- item.c_str(), ""));
+ item.c_str(), "", weight++));
}
}
diff --git a/SourceCode/Bond/Servo/CEqReadIntStep.cpp b/SourceCode/Bond/Servo/CEqReadIntStep.cpp
index e966f42..c6bb18e 100644
--- a/SourceCode/Bond/Servo/CEqReadIntStep.cpp
+++ b/SourceCode/Bond/Servo/CEqReadIntStep.cpp
@@ -27,11 +27,12 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Dev",
- ("W" + CToolUnits::toHexString(m_nValueDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nValueDev, strTemp)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Value",
- std::to_string(m_nValue).c_str(), ""));
+ std::to_string(m_nValue).c_str(), "", weight++));
}
int CEqReadIntStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqReadStep.cpp b/SourceCode/Bond/Servo/CEqReadStep.cpp
index c1bf97d..e94ba79 100644
--- a/SourceCode/Bond/Servo/CEqReadStep.cpp
+++ b/SourceCode/Bond/Servo/CEqReadStep.cpp
@@ -27,9 +27,10 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Dev",
- ("W" + CToolUnits::toHexString(m_nDataDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nDataDev, strTemp)).c_str(), "", weight++));
}
int CEqReadStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqStatusStep.cpp b/SourceCode/Bond/Servo/CEqStatusStep.cpp
index bfc2e19..6108c58 100644
--- a/SourceCode/Bond/Servo/CEqStatusStep.cpp
+++ b/SourceCode/Bond/Servo/CEqStatusStep.cpp
@@ -25,19 +25,20 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
char szName[256];
for (int i = 0; i < STATUS_MAX; i++) {
sprintf_s(szName, 256, "Status %d", i + 1);
attrubutes.addAttribute(new CAttribute(szName,
- std::to_string(m_nStatus[i]).c_str(), ""));
+ std::to_string(m_nStatus[i]).c_str(), "", weight++));
sprintf_s(szName, 256, "Reason Code %d", i + 1);
attrubutes.addAttribute(new CAttribute(szName,
- std::to_string(m_nReasonCode[i]).c_str(), ""));
+ std::to_string(m_nReasonCode[i]).c_str(), "", weight++));
}
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Status Dev",
- ("W" + CToolUnits::toHexString(m_nStatusDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nStatusDev, strTemp)).c_str(), "", weight++));
}
int CEqStatusStep::getStatus(unsigned int uint)
diff --git a/SourceCode/Bond/Servo/CEqVCREnableStep.cpp b/SourceCode/Bond/Servo/CEqVCREnableStep.cpp
index 5f07263..ab73e23 100644
--- a/SourceCode/Bond/Servo/CEqVCREnableStep.cpp
+++ b/SourceCode/Bond/Servo/CEqVCREnableStep.cpp
@@ -43,6 +43,6 @@
std::string strTemp;
attrubutes.addAttribute(new CAttribute("VCR Mode Dev",
- ("W" + CToolUnits::toHexString(m_nEqVCRModeDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nEqVCRModeDev, strTemp)).c_str(), "", 31));
}
}
diff --git a/SourceCode/Bond/Servo/CEqVcrEventStep.cpp b/SourceCode/Bond/Servo/CEqVcrEventStep.cpp
index e4c14d7..fd24db2 100644
--- a/SourceCode/Bond/Servo/CEqVcrEventStep.cpp
+++ b/SourceCode/Bond/Servo/CEqVcrEventStep.cpp
@@ -23,21 +23,22 @@
{
CReadStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Dev",
- ("W" + CToolUnits::toHexString(m_nVcrEventReportDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nVcrEventReportDev, strTemp)).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("GlassId",
- m_vcrEventReport.getGlassId().c_str(), ""));
+ m_vcrEventReport.getGlassId().c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteSequenceNo",
- std::to_string(m_vcrEventReport.getCassetteSequenceNo()).c_str(), ""));
+ std::to_string(m_vcrEventReport.getCassetteSequenceNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("JobSequenceNo",
- std::to_string(m_vcrEventReport.getJobSequenceNo()).c_str(), ""));
+ std::to_string(m_vcrEventReport.getJobSequenceNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("UnitNo",
- std::to_string(m_vcrEventReport.getUnitNo()).c_str(), ""));
+ std::to_string(m_vcrEventReport.getUnitNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("VCR No",
- std::to_string(m_vcrEventReport.getVcrNo()).c_str(), ""));
+ std::to_string(m_vcrEventReport.getVcrNo()).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("VCR Result",
- m_vcrEventReport.getVcrResultDescription(strTemp).c_str(), ""));
+ m_vcrEventReport.getVcrResultDescription(strTemp).c_str(), "", weight++));
}
int CEqVcrEventStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqWriteStep.cpp b/SourceCode/Bond/Servo/CEqWriteStep.cpp
index da4a0cc..5bd1025 100644
--- a/SourceCode/Bond/Servo/CEqWriteStep.cpp
+++ b/SourceCode/Bond/Servo/CEqWriteStep.cpp
@@ -41,9 +41,10 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ unsigned int weight = 31;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Data Dev",
- ("W" + CToolUnits::toHexString(m_nDataDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nDataDev, strTemp)).c_str(), "", weight++));
}
int CEqWriteStep::onComplete()
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index b14e096..0bf4132 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -203,48 +203,50 @@
void CEquipment::getAttributeVector(CAttributeVector& attrubutes)
{
attrubutes.clear();
+
+ unsigned int weight = 0;
attrubutes.addAttribute(new CAttribute("Network",
- std::to_string(m_station.nNetNo).c_str(), ""));
+ std::to_string(m_station.nNetNo).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Station",
- std::to_string(m_station.nStNo).c_str(), ""));
+ std::to_string(m_station.nStNo).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("ID",
- std::to_string(m_nID).c_str(), ""));
+ std::to_string(m_nID).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Name",
- m_strName.c_str(), ""));
+ m_strName.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Description",
- m_strDescription.c_str(), ""));
+ m_strDescription.c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Alive",
- this->isAlive() ? _T("TRUE") : _T("FALSE"), ""));
+ this->isAlive() ? _T("TRUE") : _T("FALSE"), "", weight++));
attrubutes.addAttribute(new CAttribute("CIM State",
- m_bCimState ? _T("ON") : _T("OFF"), ""));
+ m_bCimState ? _T("ON") : _T("OFF"), "", weight++));
attrubutes.addAttribute(new CAttribute("Upstream",
- m_bUpstreamInline ? _T("Inline") : _T("Offline"), ""));
+ m_bUpstreamInline ? _T("Inline") : _T("Offline"), "", weight++));
attrubutes.addAttribute(new CAttribute("Downstream",
- m_bDownstreamInline ? _T("Inline") : _T("Offline"), ""));
+ m_bDownstreamInline ? _T("Inline") : _T("Offline"), "", weight++));
attrubutes.addAttribute(new CAttribute("Local Alarm",
- m_bLocalAlarm ? _T("TRUE") : _T("FALSE"), ""));
+ m_bLocalAlarm ? _T("TRUE") : _T("FALSE"), "", weight++));
attrubutes.addAttribute(new CAttribute("Auto Recipe Change",
- m_bAutoRecipeChange ? _T("TRUE") : _T("FALSE"), ""));
+ m_bAutoRecipeChange ? _T("TRUE") : _T("FALSE"), "", weight++));
char szTemp[256];
for (int i = 0; i < VCR_MAX; i++) {
sprintf_s(szTemp, 256, "VCR-%d", i + 1);
attrubutes.addAttribute(new CAttribute(szTemp,
- m_bVCREnable[i] ? _T("Enable") : _T("Disable"), ""));
+ m_bVCREnable[i] ? _T("Enable") : _T("Disable"), "", weight++));
}
for (auto item : m_inputPins) {
attrubutes.addAttribute(new CAttribute(item->getName().c_str(),
- std::to_string((int)item->getType()).c_str(), ""));
+ std::to_string((int)item->getType()).c_str(), "", weight++));
}
for (auto item : m_outputPins) {
attrubutes.addAttribute(new CAttribute(item->getName().c_str(),
- std::to_string((int)item->getType()).c_str(), ""));
+ std::to_string((int)item->getType()).c_str(), "", weight++));
}
for (auto item : m_glassList) {
attrubutes.addAttribute(new CAttribute("Glass",
- item->getID().c_str(), ""));
+ item->getID().c_str(), "", weight++));
}
}
@@ -1059,12 +1061,12 @@
return m_recipesManager.decodeRecipeParameterReport(pszData, size);
}
- int CEquipment::decodeFetchedOutJobReport(int port, const char* pszData, size_t size)
+ int CEquipment::decodeFetchedOutJobReport(CStep* pStep, int port, const char* pszData, size_t size)
{
int index = 0;
short unitOrPort, unitOrPortNo, subUnitNo, subSlotNo;
CJobDataB jobDataB;
- int nRet = jobDataB.unserialize(&pszData[index], size);
+ int nRet = jobDataB.unserialize(&pszData[index], (int)size);
if (nRet < 0) return nRet;
index += nRet;
@@ -1076,6 +1078,25 @@
index += sizeof(short);
memcpy(&subSlotNo, &pszData[index], sizeof(short));
index += sizeof(short);
+
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ pStep->addAttribute(new CAttribute("UnitOrPort",
+ std::to_string(unitOrPort).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("UnitOrPortNo",
+ std::to_string(unitOrPortNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SubUnitNo",
+ std::to_string(subUnitNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SubSlotNo",
+ std::to_string(subSlotNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("CassetteSequenceNo",
+ std::to_string(jobDataB.getCassetteSequenceNo()).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("JobSequenceNo",
+ std::to_string(jobDataB.getJobSequenceNo()).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("GlassId",
+ jobDataB.getGlassId().c_str(), "", weight++));
+
onFetchedOut(port, jobDataB.getGlassId().c_str());
@@ -1084,15 +1105,17 @@
int CEquipment::onFetchedOut(int port, const char* pszGlassId)
{
+ LOGI("<CEquipment-%s>onFetchedOut:port:%d|GlassId:%s",
+ m_strName.c_str(), port, pszGlassId);
return fetchedOut(pszGlassId);
}
- int CEquipment::decodeStoredJobReport(int port, const char* pszData, size_t size)
+ int CEquipment::decodeStoredJobReport(CStep* pStep, int port, const char* pszData, size_t size)
{
int index = 0;
short unitOrPort, unitOrPortNo, subUnitNo, subSlotNo;
CJobDataB jobDataB;
- int nRet = jobDataB.unserialize(&pszData[index], size);
+ int nRet = jobDataB.unserialize(&pszData[index], (int)size);
if (nRet < 0) return nRet;
index += nRet;
@@ -1105,6 +1128,25 @@
memcpy(&subSlotNo, &pszData[index], sizeof(short));
index += sizeof(short);
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ pStep->addAttribute(new CAttribute("UnitOrPort",
+ std::to_string(unitOrPort).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("UnitOrPortNo",
+ std::to_string(unitOrPortNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SubUnitNo",
+ std::to_string(subUnitNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SubSlotNo",
+ std::to_string(subSlotNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("CassetteSequenceNo",
+ std::to_string(jobDataB.getCassetteSequenceNo()).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("JobSequenceNo",
+ std::to_string(jobDataB.getJobSequenceNo()).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("GlassId",
+ jobDataB.getGlassId().c_str(), "", weight++));
+
+
onStore(port, jobDataB.getGlassId().c_str());
return index;
@@ -1112,6 +1154,8 @@
int CEquipment::onStore(int port, const char* pszGlassId)
{
+ LOGI("<CEquipment-%s>onStore:port:%d|GlassId:%s",
+ m_strName.c_str(), port, pszGlassId);
return storedJob(pszGlassId);
}
}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 2861c80..22a6a52 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -171,8 +171,8 @@
void addGlassToList(CGlass* pGlass);
short decodeRecipeListReport(const char* pszData, size_t size);
short decodeRecipeParameterReport(const char* pszData, size_t size);
- int decodeFetchedOutJobReport(int port, const char* pszData, size_t size);
- int decodeStoredJobReport(int port, const char* pszData, size_t size);
+ int decodeFetchedOutJobReport(CStep* pStep, int port, const char* pszData, size_t size);
+ int decodeStoredJobReport(CStep* pStep, int port, const char* pszData, size_t size);
protected:
EquipmentListener m_listener;
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index 32ee535..9cab3d1 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -181,21 +181,22 @@
{
__super::getAttributeVector(attrubutes);
+ unsigned int weight = 101;
std::string strTemp;
attrubutes.addAttribute(new CAttribute("Index",
- std::to_string(m_nIndex).c_str(), ""));
+ std::to_string(m_nIndex).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Type",
- getPortTypeDescription(m_nType, strTemp).c_str(), ""));
+ getPortTypeDescription(m_nType, strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Mode",
- getPortModeDescription(m_nMode, strTemp).c_str(), ""));
+ getPortModeDescription(m_nMode, strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("CassetteType",
- getPortCassetteTypeDescription(m_nCassetteType, strTemp).c_str(), ""));
+ getPortCassetteTypeDescription(m_nCassetteType, strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("TransferMode",
- getPortTransferModeDescription(m_nTransferMode, strTemp).c_str(), ""));
+ getPortTransferModeDescription(m_nTransferMode, strTemp).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Enable",
- m_bEnable ? "Eanble" : "Disable", ""));
+ m_bEnable ? "Eanble" : "Disable", "", weight++));
attrubutes.addAttribute(new CAttribute("Auto Change",
- m_bAutoChangeEnable ? "Eanble" : "Disable", ""));
+ m_bAutoChangeEnable ? "Eanble" : "Disable", "", weight++));
}
int CLoadPort::recvIntent(CPin* pPin, CIntent* pIntent)
diff --git a/SourceCode/Bond/Servo/CPanelAttributes.cpp b/SourceCode/Bond/Servo/CPanelAttributes.cpp
index f278435..611ebac 100644
--- a/SourceCode/Bond/Servo/CPanelAttributes.cpp
+++ b/SourceCode/Bond/Servo/CPanelAttributes.cpp
@@ -59,6 +59,7 @@
SetDlgItemText(IDC_LABEL_TITLE, pStep->getName().c_str());
SERVO::CAttributeVector attrubutes;
pStep->getAttributeVector(attrubutes);
+ attrubutes.sortWithWeight();
unsigned int nSize = attrubutes.size();
for (unsigned int i = 0; i < nSize; i++) {
SERVO::CAttribute* pAttribute = attrubutes.getAttribute(i);
diff --git a/SourceCode/Bond/Servo/CReadStep.cpp b/SourceCode/Bond/Servo/CReadStep.cpp
index 5fd5dfd..d3c7747 100644
--- a/SourceCode/Bond/Servo/CReadStep.cpp
+++ b/SourceCode/Bond/Servo/CReadStep.cpp
@@ -154,10 +154,11 @@
CStep::getAttributeVector(attrubutes);
std::string strTemp;
+ unsigned int weight = 21;
attrubutes.addAttribute(new CAttribute("Current Step",
- std::to_string(m_nCurStep).c_str(), ""));
+ std::to_string(m_nCurStep).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Signal Dev",
- ("W" + CToolUnits::toHexString(m_nWriteSignalDev, strTemp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nWriteSignalDev, strTemp)).c_str(), "", weight++));
}
void CReadStep::init()
diff --git a/SourceCode/Bond/Servo/CStep.cpp b/SourceCode/Bond/Servo/CStep.cpp
index e600414..0597e6e 100644
--- a/SourceCode/Bond/Servo/CStep.cpp
+++ b/SourceCode/Bond/Servo/CStep.cpp
@@ -53,11 +53,14 @@
void CStep::getAttributeVector(CAttributeVector& attrubutes)
{
+ unsigned int weight = 1;
attrubutes.clear();
attrubutes.addAttribute(new CAttribute("Network",
- std::to_string(m_station.nNetNo).c_str(), ""));
+ std::to_string(m_station.nNetNo).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Station",
- std::to_string(m_station.nStNo).c_str(), ""));
+ std::to_string(m_station.nStNo).c_str(), "", weight++));
+ attrubutes.addAttributeVector(m_attributeVector);
+
}
void CStep::init()
@@ -82,6 +85,12 @@
return iter->second;
}
+ void CStep::addAttribute(CAttribute* pAttribute)
+ {
+ // 添加attribute时,要前删除存在的同名的attribute
+ m_attributeVector.addAttribute(pAttribute, TRUE);
+ }
+
void CStep::convertString(const char* pszBuffer, int size, std::string& strOut)
{
strOut.clear();
diff --git a/SourceCode/Bond/Servo/CStep.h b/SourceCode/Bond/Servo/CStep.h
index d82e99a..fee9d57 100644
--- a/SourceCode/Bond/Servo/CStep.h
+++ b/SourceCode/Bond/Servo/CStep.h
@@ -29,6 +29,7 @@
virtual void term();
void setProp(const char* pszKey, void* pValue);
void* getProp(const char* pszKey);
+ void addAttribute(CAttribute* pAttribute);
protected:
inline void Lock() { EnterCriticalSection(&m_criticalSection); }
@@ -43,6 +44,7 @@
CCCLinkIEControl* m_pCclink;
CRITICAL_SECTION m_criticalSection;
std::map<std::string, void*> m_mapProp;
+ CAttributeVector m_attributeVector;
};
}
diff --git a/SourceCode/Bond/Servo/CWriteStep.cpp b/SourceCode/Bond/Servo/CWriteStep.cpp
index ba18a5c..0470421 100644
--- a/SourceCode/Bond/Servo/CWriteStep.cpp
+++ b/SourceCode/Bond/Servo/CWriteStep.cpp
@@ -141,10 +141,11 @@
CStep::getAttributeVector(attrubutes);
std::string temp;
+ unsigned int weight = 20;
attrubutes.addAttribute(new CAttribute("Current Step",
- std::to_string(m_nCurStep).c_str(), ""));
+ std::to_string(m_nCurStep).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Signal Dev",
- ("W" + CToolUnits::toHexString(m_nWriteSignalDev, temp)).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nWriteSignalDev, temp)).c_str(), "", weight++));
}
void CWriteStep::init()
diff --git a/SourceCode/Bond/Servo/Common.h b/SourceCode/Bond/Servo/Common.h
index e6c3025..5cf76f2 100644
--- a/SourceCode/Bond/Servo/Common.h
+++ b/SourceCode/Bond/Servo/Common.h
@@ -147,6 +147,16 @@
#define STEP_EQ_MASTER_RECIPE_LIST _T("EQMasterRecipeListReport")
#define STEP_EQ_RECIPE_PARAMETER_REQ _T("EQRecipeParameterReq")
#define STEP_EQ_RECIPE_PARAMETER _T("EQRecipeParameterReport")
+#define STEP_EQ_RECEIVED_JOBn _T("EQReceivedJobReport")
+#define STEP_EQ_RECEIVED_JOB1 _T("EQReceivedJobReport1")
+#define STEP_EQ_RECEIVED_JOB2 _T("EQReceivedJobReport2")
+#define STEP_EQ_RECEIVED_JOB3 _T("EQReceivedJobReport3")
+#define STEP_EQ_RECEIVED_JOB4 _T("EQReceivedJobReport4")
+#define STEP_EQ_RECEIVED_JOB5 _T("EQReceivedJobReport5")
+#define STEP_EQ_RECEIVED_JOB6 _T("EQReceivedJobReport6")
+#define STEP_EQ_RECEIVED_JOB7 _T("EQReceivedJobReport7")
+#define STEP_EQ_RECEIVED_JOB8 _T("EQReceivedJobReport8")
+#define STEP_EQ_RECEIVED_JOB9 _T("EQReceivedJobReport9")
#define STEP_EQ_FETCHED_OUT_JOBn _T("EQFetchedOutJobReport")
#define STEP_EQ_FETCHED_OUT_JOB1 _T("EQFetchedOutJobReport1")
#define STEP_EQ_FETCHED_OUT_JOB2 _T("EQFetchedOutJobReport2")
--
Gitblit v1.9.3