From 334b16b4abb4cbe3d1d4e4f211efd6f4468ae09f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 19 九月 2025 15:12:52 +0800
Subject: [PATCH] 1.ControlJob和ProcessJob的中断操作,强制结批增加字符串描述原因,方便生产跟踪。
---
SourceCode/Bond/Servo/CEquipment.h | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index c2e93cd..ff16693 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -35,6 +35,8 @@
#include "CProcessData.h"
#include "CPortStatusReport.h"
#include "CSlot.h"
+#include "CParam.h"
+#include "CSVData.h"
namespace SERVO {
@@ -56,6 +58,7 @@
typedef std::function<void(void* pEiuipment, PROCESS_STATE state)> ONPROCESSSTATE;
typedef std::function<void(void* pEiuipment, short scanMap, short downMap)> ONMAPMISMATCH;
typedef std::function<void(void* pEiuipment, short status, __int64 data)> ONPORTSTATUSCHANGED;
+
typedef struct _EquipmentListener
{
ONALIVE onAlive;
@@ -68,7 +71,8 @@
ONPROCESSSTATE onProcessStateChanged;
ONMAPMISMATCH onMapMismatch;
ONPORTSTATUSCHANGED onPortStatusChanged;
-
+ ONVCREVENTREPORT onSVDataReport;
+ ONVCREVENTREPORT onPanelDataReport;
} EquipmentListener;
@@ -122,6 +126,8 @@
std::vector<CPin*>& CEquipment::getInputPins();
std::vector<CPin*>& CEquipment::getOutputPins();
CRecipeList* getRecipeList(int unitNo);
+ bool saveRecipeList(int unitNo, std::string& strFilepath);
+ bool readRecipeList(int unitNo, std::string& strFilepath);
virtual int recvIntent(CPin* pPin, CIntent* pIntent);
virtual int fetchedOutJob(int port, CJobDataB* pJobDataB);
virtual int storedJob(int port, CJobDataB* pJobDataB, short putSlot);
@@ -155,7 +161,7 @@
int setDispatchingMode(DISPATCHING_MODE mode, ONWRITED onWritedBlock = nullptr);
int indexerOperationModeChange(IDNEXER_OPERATION_MODE mode, ONWRITEDRET onWritedRetBlock);
void printDebugString001();
-
+ std::vector<SERVO::CSVData>& getSVDatas();
// 请求主配方列表
// unitNo: 0:local; Others:unit No
@@ -165,10 +171,17 @@
// masterRecipeId: 主配方id
// localRecipeId: 本地配方id
// unitNo: 0:local; Others:unit No
- int recipeParameterRequest(short masterRecipeId, short localRecipeId, short unitNo);
+ int recipeParameterRequest(short masterRecipeId, short localRecipeId, short unitNo, ONSYNCINGSTATECHANGED block);
+
+ // 解析配方参数列表
+ virtual int parsingParams(const char* pszData, size_t size, std::vector<CParam>& params) { return 0; };
+ virtual int parsingParams(const char* pszData, size_t size, std::string& strOut);
+ virtual int parsingProcessData(const char* pszData, size_t size, std::vector<CParam>& params) { return 0; };
+ virtual int parsingSVData(const char* pszData, size_t size, std::vector<CParam>& params) { return 0; };
// 获取指定的Slot
CSlot* getSlot(int index);
+ CSlot* getSlotWithNo(int slotNo);
// 获取一个可用的槽位
CSlot* getAvailableSlot();
@@ -195,6 +208,7 @@
CGlass* getGlassWithCassette(int cassetteSequenceNo, int jobSequenceNo);
CGlass* getAnyGlass();
CGlass* getGlass(const char* pszGlassId);
+ int getAllGlass(std::vector<CGlass*>& glasses);
CJobDataS* getJobDataSWithCassette(int cassetteSequenceNo, int jobSequenceNo);
// 验证玻璃和槽是否匹配
@@ -202,6 +216,7 @@
// 是否有玻璃
BOOL hasGlass();
+ BOOL slotHasGlass(int slotIndex = 0);
// 指定槽位是否可以放置玻璃
BOOL canPlaceGlassInSlot(const short slotIndex);
@@ -253,6 +268,12 @@
int decodeJobProcessEndReport(CStep* pStep, const char* pszData, size_t size);
BOOL compareJobData(CJobDataB* pJobDataB, CJobDataS* pJobDataS);
void setProcessState(PROCESS_STATE state);
+ float toFloat(const char* pszAddr);
+
+ protected:
+ // 部分优化/简化代码、暂实现部分,到时平铺开
+ void addFacDataReportStep(int dataDev, int writeSignalDev, int port);
+
protected:
BOOL m_bEnable;
@@ -287,6 +308,7 @@
CRecipesManager m_recipesManager;
CSlot m_slot[SLOT_MAX];
PROCESS_STATE m_processState;
+ std::vector<SERVO::CSVData> m_svDatas;
private:
CEquipment* m_pArm;
--
Gitblit v1.9.3