From 3b9f1a5229885901e646751242d9d88bf3d068ff Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 27 六月 2025 09:04:14 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/Servo.vcxproj | 2
SourceCode/Bond/Servo/CStep.h | 1
SourceCode/Bond/Servo/ServoGraph.cpp | 7 +
SourceCode/Bond/Servo/CEquipment.cpp | 147 +++++++++++++++++++++++++++++++++---
SourceCode/Bond/Servo/ServoGraph.h | 1
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.7(5).xlsx | 0
SourceCode/Bond/Servo/CEquipment.h | 2
SourceCode/Bond/Servo/CLoadPort.cpp | 4
SourceCode/Bond/Servo/CBonder.cpp | 43 ++++++++++
SourceCode/Bond/Servo/CStep.cpp | 11 ++
SourceCode/Bond/Servo/Common.h | 4 +
11 files changed, 202 insertions(+), 20 deletions(-)
diff --git "a/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.7\0505\051.xlsx" "b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.7\0505\051.xlsx"
new file mode 100644
index 0000000..96c9835
--- /dev/null
+++ "b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.7\0505\051.xlsx"
Binary files differ
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 0943eea..7fe8a94 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -381,6 +381,38 @@
delete pStep;
}
}
+
+ // process start/end report
+ {
+ CEqReadStep* pStep = new CEqReadStep(m_nIndex == 0 ? 0x9D3F : 0xDD3F, 13 * 2,
+ [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
+ if (code == ROK && pszData != nullptr && size > 0) {
+ decodeJobProcessStartReport((CStep*)pFrom, pszData, size);
+ }
+ return -1;
+ });
+ pStep->setName(STEP_EQ_JOB_PROCESS_START_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(m_nIndex == 0 ? 0x333 : 0x633);
+ if (addStep(STEP_ID_JOB_PROCESS_START_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqReadStep* pStep = new CEqReadStep(m_nIndex == 0 ? 0x9D4C : 0xDD4C, 13 * 2,
+ [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
+ if (code == ROK && pszData != nullptr && size > 0) {
+ decodeJobProcessEndReport((CStep*)pFrom, pszData, size);
+ }
+ return -1;
+ });
+ pStep->setName(STEP_EQ_JOB_PROCESS_END_REPORT);
+ pStep->setProp("Port", (void*)1);
+ pStep->setWriteSignalDev(m_nIndex == 0 ? 0x334 : 0x634);
+ if (addStep(STEP_ID_JOB_PROCESS_END_REPORT, pStep) != 0) {
+ delete pStep;
+ }
+ }
}
// 必须要实现的虚函数,在此初始化Slot信息
@@ -401,6 +433,17 @@
void CBonder::onTimer(UINT nTimerid)
{
CEquipment::onTimer(nTimerid);
+
+ // test
+ /*
+ static int i[2] = { 0, 0 };
+ i[m_nIndex]++;
+
+ if (i[m_nIndex] == 15) {
+ char szBuffer[26];
+ decodeJobProcessStartReport(getStep(STEP_ID_JOB_PROCESS_START_REPORT), szBuffer, 26);
+ }
+ */
}
void CBonder::serialize(CArchive& ar)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 5518246..81b6bbf 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -604,6 +604,10 @@
// Job Data Request
CHECK_READ_STEP_SIGNAL(STEP_ID_JOB_DATA_REQUEST, pszData, size);
+
+ // job process start/end report
+ CHECK_READ_STEP_SIGNAL(STEP_ID_JOB_PROCESS_START_REPORT, pszData, size);
+ CHECK_READ_STEP_SIGNAL(STEP_ID_JOB_PROCESS_END_REPORT, pszData, size);
}
BOOL CEquipment::isBitOn(const char* pszData, size_t size, int index)
@@ -1405,11 +1409,8 @@
// 缓存Attribute,用于调试时显示信息
unsigned int weight = 201;
- CAttributeVector attrubutes;
+ CAttributeVector& attrubutes = pStep->attributeVector();
processData.getAttributeVector(attrubutes, weight);
- pStep->addAttributeVector(attrubutes);
-
-
onProcessData(&processData);
return nRet;
@@ -1423,11 +1424,8 @@
// 缓存Attribute,用于调试时显示信息
unsigned int weight = 201;
- CAttributeVector attrubutes;
+ CAttributeVector& attrubutes = pStep->attributeVector();
jobDataS.getAttributeVector(attrubutes, weight);
- pStep->addAttributeVector(attrubutes);
-
-
onReceivedJob(port, &jobDataS);
return nRet;
@@ -1447,11 +1445,8 @@
// 缓存Attribute,用于调试时显示信息
unsigned int weight = 201;
- CAttributeVector attrubutes;
+ CAttributeVector& attrubutes = pStep->attributeVector();
jobDataS.getAttributeVector(attrubutes, weight);
- pStep->addAttributeVector(attrubutes);
-
-
onSentOutJob(port, &jobDataS);
return nRet;
@@ -1597,9 +1592,8 @@
// 缓存Attribute,用于调试时显示信息
unsigned int weight = 201;
- CAttributeVector attrubutes;
+ CAttributeVector& attrubutes = pStep->attributeVector();
vcrEventReport.getAttributeVector(attrubutes, weight);
- pStep->addAttributeVector(attrubutes);
// 0426, 先固定返回1(OK)
((CReadStep*)pStep)->setReturnCode((short)VCR_Reply_Code::OK);
@@ -1682,6 +1676,131 @@
return 0;
}
+ int CEquipment::decodeJobProcessStartReport(CStep* pStep, const char* pszData, size_t size)
+ {
+ LOGI("<CEquipment-%s>decodeJobProcessStartReport", getName().c_str());
+ short cassetteNo, jobSequenceNo, unitNo, subUnitNo, slotNo;
+ int year, month, day, hour, minute, second;
+
+ int index = 0;
+ memcpy(&cassetteNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&jobSequenceNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&unitNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&subUnitNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&slotNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+
+ memcpy(&year, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ month = (int)pszData[index];
+ index += 1;
+ day = (int)pszData[index];
+ index += 1;
+ hour = (int)pszData[index];
+ index += 1;
+ minute = (int)pszData[index];
+ index += 1;
+ second = (int)pszData[index];
+ index += 1;
+
+ LOGI("<CEquipment-%s>cassetteNo:%d, jobSequenceNo:%d,unitNo:%d, subUnitNo:%d, slotNo:%d %d-%d-%d %d:%d:%d",
+ getName().c_str(),
+ cassetteNo,
+ jobSequenceNo,
+ unitNo,
+ subUnitNo,
+ slotNo,
+ year, month, day, hour, minute, second
+ );
+
+
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ pStep->addAttribute(new CAttribute("CassetteNo",
+ std::to_string(cassetteNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("JobSequenceNo",
+ std::to_string(jobSequenceNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("UnitNo",
+ std::to_string(unitNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SubUnitNo",
+ std::to_string(subUnitNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SlotNo",
+ std::to_string(slotNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("ProcessStartTime",
+ (std::to_string(year) + std::to_string(day) + std::to_string(day) + std::to_string(hour) + std::to_string(minute) + std::to_string(second)).c_str()
+ , "", weight++));
+
+ return 0;
+ }
+
+ int CEquipment::decodeJobProcessEndReport(CStep* pStep, const char* pszData, size_t size)
+ {
+ LOGI("<CEquipment-%s>decodeJobProcessEndReport", getName().c_str());
+
+ short cassetteNo, jobSequenceNo, unitNo, subUnitNo, slotNo;
+ int year, month, day, hour, minute, second;
+
+ int index = 0;
+ std::string strPanelJudgeData, strPanelGradeData;
+ memcpy(&cassetteNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&jobSequenceNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&unitNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&subUnitNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ memcpy(&slotNo, &pszData[index], sizeof(short));
+ index += sizeof(short);
+
+ memcpy(&year, &pszData[index], sizeof(short));
+ index += sizeof(short);
+ month = (int)pszData[index];
+ index += 1;
+ day = (int)pszData[index];
+ index += 1;
+ hour = (int)pszData[index];
+ index += 1;
+ minute = (int)pszData[index];
+ index += 1;
+ second = (int)pszData[index];
+ index += 1;
+
+ LOGI("<CEquipment-%s>cassetteNo:%d, jobSequenceNo:%d,unitNo:%d, subUnitNo:%d, slotNo:%d %d-%d-%d %d:%d:%d",
+ getName().c_str(),
+ cassetteNo,
+ jobSequenceNo,
+ unitNo,
+ subUnitNo,
+ slotNo,
+ year, month, day, hour, minute, second
+ );
+
+
+ // 缓存Attribute,用于调试时显示信息
+ unsigned int weight = 201;
+ pStep->addAttribute(new CAttribute("CassetteNo",
+ std::to_string(cassetteNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("JobSequenceNo",
+ std::to_string(jobSequenceNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("UnitNo",
+ std::to_string(unitNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SubUnitNo",
+ std::to_string(subUnitNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("SlotNo",
+ std::to_string(slotNo).c_str(), "", weight++));
+ pStep->addAttribute(new CAttribute("ProcessStartTime",
+ (std::to_string(year) + std::to_string(day) + std::to_string(day) + std::to_string(hour) + std::to_string(minute) + std::to_string(second)).c_str()
+ , "", weight++));
+
+ return 0;
+ }
+
int CEquipment::onPreStoredJob(int port, CJobDataB* pJobDataB, short& putSlot)
{
LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s",
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 1aa5abd..c2e880b 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -232,6 +232,8 @@
int decodePanelDataReport(CStep* pStep, const char* pszData, size_t size);
int decodeFacDataReport(CStep* pStep, const char* pszData, size_t size);
int decodeJobDataRequest(CStep* pStep, const char* pszData, size_t size);
+ int decodeJobProcessStartReport(CStep* pStep, const char* pszData, size_t size);
+ int decodeJobProcessEndReport(CStep* pStep, const char* pszData, size_t size);
BOOL compareJobData(CJobDataB* pJobDataB, CJobDataS* pJobDataS);
void setProcessState(PROCESS_STATE state);
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index c6591e7..25d2306 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -893,10 +893,8 @@
// 缓存Attribute,用于调试时显示信息
unsigned int weight = 201;
- CAttributeVector attrubutes;
+ CAttributeVector& attrubutes = pStep->attributeVector();
m_portStatusReport.getAttributeVector(attrubutes, weight);
- pStep->addAttributeVector(attrubutes);
-
LOGI("<CCassetteTranserStateStep>decodePortStatusReport<Status:%d, CassetteSequenceNo:%d>",
m_portStatusReport.getPortStatus(), m_portStatusReport.getCassetteSequenceNo());
diff --git a/SourceCode/Bond/Servo/CStep.cpp b/SourceCode/Bond/Servo/CStep.cpp
index 4ac3dfd..cf7dff5 100644
--- a/SourceCode/Bond/Servo/CStep.cpp
+++ b/SourceCode/Bond/Servo/CStep.cpp
@@ -59,8 +59,17 @@
std::to_string(m_station.nNetNo).c_str(), "", weight++));
attrubutes.addAttribute(new CAttribute("Station",
std::to_string(m_station.nStNo).c_str(), "", weight++));
- attrubutes.addAttributeVector(m_attributeVector);
+ auto as = m_attributeVector.getAttributes();
+ for (auto item : as) {
+ attrubutes.addAttribute(new CAttribute(item->getName().c_str(),
+ item->getValue().c_str(), item->getDescription().c_str(), item->getWeight()));
+ }
+ }
+
+ CAttributeVector& CStep::attributeVector()
+ {
+ return m_attributeVector;
}
void CStep::init()
diff --git a/SourceCode/Bond/Servo/CStep.h b/SourceCode/Bond/Servo/CStep.h
index 20520f3..6e40acf 100644
--- a/SourceCode/Bond/Servo/CStep.h
+++ b/SourceCode/Bond/Servo/CStep.h
@@ -24,6 +24,7 @@
int getID();
void setName(const char* pszName);
std::string& getName();
+ CAttributeVector& attributeVector();
virtual void getAttributeVector(CAttributeVector& attrubutes);
virtual void init();
virtual void term();
diff --git a/SourceCode/Bond/Servo/Common.h b/SourceCode/Bond/Servo/Common.h
index 21fe6c9..ce4a9d9 100644
--- a/SourceCode/Bond/Servo/Common.h
+++ b/SourceCode/Bond/Servo/Common.h
@@ -291,6 +291,8 @@
#define STEP_EQ_PANEL_DATA_REPORT _T("EQPanelDataReport")
#define STEP_EQ_FAC_DATA_REPORT _T("EQFacDataReport")
#define STEP_EFEM_PANEL_DATA_REQUEST _T("EFEMPanelDataRequest")
+#define STEP_EQ_JOB_PROCESS_START_REPORT _T("EQJobProcessStartReport")
+#define STEP_EQ_JOB_PROCESS_END_REPORT _T("EQJobProcessEndReport")
/* Step ID */
#define STEP_ID_CIMMODE_CHANGED_CMD_REPLY 0x550
@@ -363,6 +365,8 @@
#define STEP_ID_FETCHED_OUT_JOB_REPORT13 0x5BB
#define STEP_ID_FETCHED_OUT_JOB_REPORT14 0x5BC
#define STEP_ID_FETCHED_OUT_JOB_REPORT15 0x5BD
+#define STEP_ID_JOB_PROCESS_START_REPORT 0x5BF
+#define STEP_ID_JOB_PROCESS_END_REPORT 0x5C0
#define STEP_ID_JOB_DATA_REQUEST 0x5C1
#define STEP_ID_PANEL_DATA_REQUEST 0x5D0
#define STEP_ID_PANEL_DATA_REPORT 0x5D1
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj b/SourceCode/Bond/Servo/Servo.vcxproj
index e754738..4eddc5d 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj
+++ b/SourceCode/Bond/Servo/Servo.vcxproj
@@ -46,7 +46,7 @@
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
- <EnableASAN>true</EnableASAN>
+ <EnableASAN>false</EnableASAN>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
diff --git a/SourceCode/Bond/Servo/ServoGraph.cpp b/SourceCode/Bond/Servo/ServoGraph.cpp
index 8e037e1..9925dcb 100644
--- a/SourceCode/Bond/Servo/ServoGraph.cpp
+++ b/SourceCode/Bond/Servo/ServoGraph.cpp
@@ -722,4 +722,9 @@
}
return nullptr;
-}
\ No newline at end of file
+}
+
+void CServoGraph::Invalidata()
+{
+ ::InvalidateRect(m_hWnd, NULL, TRUE);
+}
diff --git a/SourceCode/Bond/Servo/ServoGraph.h b/SourceCode/Bond/Servo/ServoGraph.h
index 0440181..398c638 100644
--- a/SourceCode/Bond/Servo/ServoGraph.h
+++ b/SourceCode/Bond/Servo/ServoGraph.h
@@ -148,6 +148,7 @@
LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam);
public:
+ void Invalidata();
void AddImage(int id, char* pszPath, int x, int y);
void AddIndicateBox(int id, int x, int y, int width);
void AddIndicateBox(int id, int x, int y, int width,
--
Gitblit v1.9.3