From 8d55ed4a167d9b09d65e4a26ece287c6e37a9c84 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 12 九月 2025 10:58:58 +0800
Subject: [PATCH] 1. 修复SG精度检编辑框修改覆盖问题(界面频繁刷新导致)

---
 SourceCode/Bond/Servo/CEquipment.h |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index c2e93cd..bf1808b 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,7 @@
 		ONPROCESSSTATE		onProcessStateChanged;
 		ONMAPMISMATCH		onMapMismatch;
 		ONPORTSTATUSCHANGED	onPortStatusChanged;
-
+		ONVCREVENTREPORT	onSVDataReport;
 	} EquipmentListener;
 
 
@@ -122,6 +125,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 +160,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,7 +170,13 @@
 		// 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);
@@ -195,6 +206,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 +214,7 @@
 
 		// 是否有玻璃
 		BOOL hasGlass();
+		BOOL slotHasGlass(int slotIndex = 0);
 
 		// 指定槽位是否可以放置玻璃
 		BOOL canPlaceGlassInSlot(const short slotIndex);
@@ -253,6 +266,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 +306,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