From 166fa1cb727d6fe6962bbd2b5c4a0c9da6088048 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 30 七月 2025 14:50:03 +0800
Subject: [PATCH] 1.获取配方后自动刷新列表; 2.HsmsAction序列化和反序列化,将来用于缓存上报的数据;
---
SourceCode/Bond/Servo/CMaster.h | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 2288d79..76d52eb 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -16,11 +16,12 @@
namespace SERVO {
- enum MASTERSTATE {
+ enum class MASTERSTATE {
READY = 0,
STARTING,
RUNNING,
- STOPPING
+ STOPPING,
+ MSERROR
};
typedef std::function<void(void* pMaster, MASTERSTATE state)> ONMASTERSTATECHANGED;
@@ -30,6 +31,7 @@
typedef std::function<void(void* pMaster, CEquipment* pEquipment, CVcrEventReport* pReport)> ONEQVCREVENTREPORT;
typedef std::function<void(void* pMaster, CEquipment* pEquipment, int code)> ONEQDATACHANGED;
typedef std::function<void(void* pMaster, CRobotTask* pTask, int code)> ONROBOTTASKEVENT;
+ typedef std::function<void(void* pMaster, CEquipment* pEquipment, short status, __int64 data)> ONLOADPORTSTATUSCHANGED;
typedef struct _MasterListener
{
ONMASTERSTATECHANGED onMasterStateChanged;
@@ -39,6 +41,7 @@
ONEQVCREVENTREPORT onEqVcrEventReport;
ONEQDATACHANGED onEqDataChanged;
ONROBOTTASKEVENT onRobotTaskEvent;
+ ONLOADPORTSTATUSCHANGED onLoadPortStatusChanged;
} MasterListener;
class CMaster
@@ -55,6 +58,7 @@
int term();
int start();
int stop();
+ void clearError();
ULONGLONG getRunTime();
MASTERSTATE getState();
unsigned DispatchProc();
@@ -64,6 +68,17 @@
CEquipment* getEquipment(int id);
void setCacheFilepath(const char* pszFilepath);
int abortCurrentTask();
+ int restoreCurrentTask();
+ int resendCurrentTask();
+ void setPortType(unsigned int index, BOOL enable, int type, int mode,
+ int cassetteType, int transferMode, BOOL autoChangeEnable);
+ void setPortCassetteType(unsigned int index, SERVO::CassetteType type);
+ void setPortEnable(unsigned int index, BOOL bEnable);
+ void setCompareMapsBeforeProceeding(BOOL bCompare);
+ void datetimeSync(SYSTEMTIME& time);
+ void enableEventReport(bool bEnable);
+ void enableAlarmReport(bool bEnable);
+ bool isAlarmReportEnable();
private:
inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -91,7 +106,7 @@
CRobotTask* createTransferTask_bonder_to_bakecooling(CEquipment* pSrcEq, CEquipment* pTarEq);
CRobotTask* createTransferTask_bake_to_cooling(CEquipment* pSrcEq);
CRobotTask* createTransferTask_bakecooling_to_measurement(CEquipment* pSrcEq, CEquipment* pTarEq);
- void transformPosAndSlot(int srcPos, int srcSlot, int& tarPos, int& tarSlot);
+ CRobotTask* createTransferTask_restore(CEquipment* pEqSrc, CLoadPort** pPorts);
private:
CRITICAL_SECTION m_criticalSection;
@@ -121,6 +136,16 @@
// 当前任务和已完成任务列表
CRobotTask* m_pActiveRobotTask;
std::list< CRobotTask* > m_listTask;
+
+ // 错误代码
+ int m_nLastError;
+ std::string m_strLastError;
+
+ // 在开始工艺前是否先需要先比较map
+ BOOL m_isCompareMapsBeforeProceeding;
+ private:
+ bool m_bEnableEventReport;
+ bool m_bEnableAlarmReport;
};
}
--
Gitblit v1.9.3