From 31aa10eaae103c30e02d7dc6c71ff4e50de361b3 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期一, 12 五月 2025 15:28:32 +0800
Subject: [PATCH] 1. 修改报警的显示模式(包括日志,需要后期修复) 2. 添加Release模式编译
---
SourceCode/Bond/Servo/CJobDataB.cpp | 139 ++++-----------------------------------------
1 files changed, 14 insertions(+), 125 deletions(-)
diff --git a/SourceCode/Bond/Servo/CJobDataB.cpp b/SourceCode/Bond/Servo/CJobDataB.cpp
index 8373485..cf25ff2 100644
--- a/SourceCode/Bond/Servo/CJobDataB.cpp
+++ b/SourceCode/Bond/Servo/CJobDataB.cpp
@@ -1,12 +1,12 @@
#include "stdafx.h"
#include "CJobDataB.h"
-#include "ToolUnits.h"
namespace SERVO {
CJobDataB::CJobDataB()
{
-
+ m_nCassetteSequenceNo = 0;
+ m_nJobSequenceNo = 0;
}
CJobDataB::~CJobDataB()
@@ -14,144 +14,33 @@
}
- short CJobDataB::getPortNo()
+ int CJobDataB::getCassetteSequenceNo()
{
- return m_nPortNo;
+ return m_nCassetteSequenceNo;
}
- std::string& CJobDataB::getCarrierId()
+ void CJobDataB::setCassetteSequenceNo(int no)
{
- return m_strCarrierId;
+ m_nCassetteSequenceNo = no;
}
- std::string& CJobDataB::getPruductId()
+ int CJobDataB::getJobSequenceNo()
{
- return m_pruductId;
+ return m_nJobSequenceNo;
}
- int CJobDataB::serialize(char* pszBuffer, int nBufferSize)
+ void CJobDataB::setJobSequenceNo(int no)
{
- if (nBufferSize < 640) return -1;
-
- int index = 0;
- memcpy(&pszBuffer[index], &m_nPortNo, sizeof(short));
- index += sizeof(short);
-
- int strLen = min(20, m_strCarrierId.size());
- memcpy(&pszBuffer[index], m_strCarrierId.c_str(), strLen);
- index += 20;
-
- strLen = min(20, m_pruductId.size());
- memcpy(&pszBuffer[index], m_pruductId.c_str(), strLen);
- index += 20;
-
- memcpy(&pszBuffer[index], &m_nCarrierState, sizeof(short));
- index += sizeof(short);
-
- memcpy(&pszBuffer[index], &m_nSlotMapping, sizeof(int));
- index += sizeof(int);
-
- memcpy(&pszBuffer[index], &m_nSlotSelectedFlag, sizeof(int));
- index += sizeof(int);
-
- for (int i = 0; i < min(25, m_glassIds.size()); i++) {
- std::string& strGlassId = m_glassIds.at(i);
- strLen = min(20, strGlassId.size());
- memcpy(&pszBuffer[index], strGlassId.c_str(), strLen);
- index += 20;
- }
-
- return 320 * 2;
+ m_nJobSequenceNo = no;
}
- int CJobDataB::unserialize(char* pszBuffer, int nBufferSize)
+ std::string& CJobDataB::getGlassId()
{
- if (nBufferSize < 640) return -1;
-
- int index = 0;
- memcpy(&m_nPortNo, &pszBuffer[index], sizeof(short));
- index += sizeof(short);
-
- CToolUnits::convertString(&pszBuffer[index], 20, m_strCarrierId);
- index += 20;
-
- CToolUnits::convertString(&pszBuffer[index], 20, m_pruductId);
- index += 20;
-
- memcpy(&m_nCarrierState, &pszBuffer[index], sizeof(short));
- index += sizeof(short);
-
- memcpy(&m_nSlotMapping, &pszBuffer[index], sizeof(int));
- index += sizeof(int);
-
- memcpy(&m_nSlotSelectedFlag, &pszBuffer[index], sizeof(int));
- index += sizeof(int);
-
- std::string strGlassId;
- m_glassIds.clear();
- for (int i = 0; i < 25; i++) {
- CToolUnits::convertString(&pszBuffer[index], 20, strGlassId);
- index += 20;
- if (!strGlassId.empty()) {
- m_glassIds.push_back(strGlassId);
- }
- }
-
- return 320 * 2;
+ return m_strGlassId;
}
- short CJobDataB::getCarrierState()
+ void CJobDataB::setGlassId(const char* pszGlassId)
{
- return m_nCarrierState;
- }
-
- std::string& CJobDataB::getCarrierStateDescription(std::string& strDescription)
- {
- static char* pszDescription[20] = {
- "Bind",
- "CancelPod",
- "CancelPodNotification",
- "CancelPodOut",
- "CancelPodAtPort",
- "CancelBind",
- "Clamp",
- "ClosePod",
- "IndexDown",
- "IndexUp",
- "OpenPod",
- "PodComplete",
- "PodIn",
- "PodNotification",
- "PodOut",
- "PodRelease",
- "PodTagReadData",
- "PodTagWriteData",
- "Proceed WithPod",
- "Unclamp"
- };
-
- if (0 <= m_nCarrierState && m_nCarrierState < 20) {
- strDescription = pszDescription[m_nCarrierState];
- }
- else {
- strDescription = "";
- }
-
- return strDescription;
- }
-
- int CJobDataB::getSlotMapping()
- {
- return m_nSlotMapping;
- }
-
- int CJobDataB::getSlotSelectedFlag()
- {
- return m_nSlotSelectedFlag;
- }
-
- std::vector<std::string>& CJobDataB::getGlassIds()
- {
- return m_glassIds;
+ m_strGlassId = pszGlassId;
}
}
--
Gitblit v1.9.3