From da9df9d46ed3fc50e0c03497bd9f76b8aa1a4595 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期三, 14 一月 2026 15:37:48 +0800
Subject: [PATCH] 1.修复以下问题: 作业前置条件不足导致 PJ 验证失败:onPRJobMultiCreate 调 CMaster::setProcessJobs,CProcessJob::validate 要求“当前没有其它 PJ”(issue 1000),且 carrierPresent/slotUsable 必须为真。只要本地还有未结批的 PJ/CJ 或载具/槽位状态未就绪(ID 未绑、Slot 未使能),Host 发送的 CreateMultiPJ 会直接被丢弃(返回 size=0),但当前代码没有向 Host 回 ACK/NAK,Host 会误以为创建成功。
---
SourceCode/Bond/Servo/CLoadPort.h | 86 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 81 insertions(+), 5 deletions(-)
diff --git a/SourceCode/Bond/Servo/CLoadPort.h b/SourceCode/Bond/Servo/CLoadPort.h
index a6b2831..1fb70d7 100644
--- a/SourceCode/Bond/Servo/CLoadPort.h
+++ b/SourceCode/Bond/Servo/CLoadPort.h
@@ -1,5 +1,6 @@
-#pragma once
+锘�#pragma once
#include "CEquipment.h"
+#include "ServoCommo.h"
namespace SERVO {
@@ -15,21 +16,96 @@
virtual void init();
virtual void term();
virtual void initPins();
+ virtual void initSteps();
+ virtual void initSlots();
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
virtual void getAttributeVector(CAttributeVector& attrubutes);
virtual int recvIntent(CPin* pPin, CIntent* pIntent);
- virtual BOOL glassWillArrive(CGlass* pGlass);
+ virtual void onReceiveLBData(const char* pszData, size_t size);
public:
- virtual int outputGlass(int port);
+ int setPortType(PortType type, ONWRITED onWritedBlock = nullptr);
+ int eablePort(BOOL bEnable, ONWRITED onWritedBlock = nullptr);
+ int setPortMode(PortMode mode, ONWRITED onWritedBlock = nullptr);
+ int setCassetteType(CassetteType type, ONWRITED onWritedBlock = nullptr);
+ int setTransferMode(TransferMode mode, ONWRITED onWritedBlock = nullptr);
+ int eableAutoChange(BOOL bEnable, ONWRITED onWritedBlock = nullptr);
+ void localEanblePort(BOOL bEnable);
+ void localSetPortType(PortType type);
+ void localSetPortMode(PortMode mode);
+ void localSetCessetteType(CassetteType type);
+ void localSetTransferMode(TransferMode mode);
+ void localAutoChangeEnable(BOOL bEnable);
+ short getScanCassetteMap();
+ short getDownloadCassetteMap();
+ void setDownloadCassetteMap(short map);
+
+ public:
+ short getNextCassetteSequenceNo();
+ int getPortCassetteSnSeed();
+ void setPortCassetteSnSeed(int seed);
+ void setIndex(unsigned int index);
+ unsigned int getIndex();
+ BOOL isEnable();
+ PortType getPortType();
+ PortMode getPortMode();
+ CassetteType getCessetteType();
+ TransferMode getTransferMode();
+ BOOL isAutoChange();
+ int getPortStatus();
+ int getCassetteSequenceNo();
+ std::string& getCassetteId();
+ // Simulation helper: allow setting CarrierID when no EFEM is connected.
+ void simulateSetCassetteId(const char* pszCarrierId);
+ int getLoadingCassetteType();
+ int getQTimeFlag();
+ int getCassetteMappingState();
+ int getCassetteStatus();
+ int testGenerateGlassList(MaterialsType type);
+ int generateGlassList(short map);
+ int testGenerateGlassListFromConfig(const SERVO::PortConfig& config);
+
+ public:
+ static std::string& getPortTypeDescription(PortType portType, std::string& strDescription);
+ static std::string& getPortModeDescription(PortMode portMode, std::string& strDescription);
+ static std::string& getPortCassetteTypeDescription(CassetteType casseteType, std::string& strDescription);
+ static std::string& getPortTransferModeDescription(TransferMode mode, std::string& strDescription);
+ static std::string& getEnableModeDescription(int mode, std::string& strDescription);
+ static std::string& getPortStatusDescription(int portStatus, std::string& strDescription);
+ static std::string& getLoadingCassetteTypeDescription(int type, std::string& strDescription);
+ static std::string& getQTimeFlagDescription(int flag, std::string& strDescription);
+ static std::string& getCassetteMappingStateDescription(int state, std::string& strDescription);
+ static std::string& getCassetteStatusDescription(int state, std::string& strDescription);
+
+ public:
int sendCassetteCtrlCmd(short cmd,
short* jobExistence,
int jobExistenceSize,
short slotProcess,
short jopCount,
- CJobDataB* pJobDataB);
+ CJobDataA* pJobDataA,
+ ONWRITED onWritedBlock);
CStep* getCassetteCtrlCmdStep();
+ void setCompareMapsBeforeProceeding(BOOL bCompare);
+ BOOL isCompareMapsBeforeProceeding() const;
+
+ private:
+ int decodePortStatusReport(CStep* pStep, const char* pszData, size_t size);
+
+ private:
+ unsigned int m_nIndex;
+ PortType m_portType;
+ PortMode m_portMode;
+ CassetteType m_cassetteType;
+ TransferMode m_transferMode;
+ BOOL m_bEnable;
+ BOOL m_bAutoChangeEnable;
+ CPortStatusReport m_portStatusReport;
+ int m_nNextCassetteSequenceNo;
+
+ // 鍦ㄥ紑濮嬪伐鑹哄墠鏄惁鍏堥渶瑕佸厛姣旇緝map
+ BOOL m_isCompareMapsBeforeProceeding;
+ short m_downloadCassetteMap;
};
}
-
--
Gitblit v1.9.3