From d38d98d99e873d0a48e75aa9f8472cff4574c132 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 30 四月 2025 17:46:50 +0800
Subject: [PATCH] 1.添加CEqReadStep, 以后大部分读数据可能要使用这个类,可以简单程序。 2.文档;

---
 SourceCode/Bond/Servo/CEquipment.cpp |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index d18f1d8..aaf7662 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -132,6 +132,7 @@
 	void CEquipment::init()
 	{
 		initPins();
+		initSteps();
 		for (auto item : m_mapStep) {
 			item.second->init();
 		}
@@ -142,6 +143,11 @@
 		for (auto item : m_mapStep) {
 			item.second->term();
 		}
+	}
+
+	void CEquipment::initSteps()
+	{
+
 	}
 
 	void CEquipment::setID(int nID)
@@ -394,6 +400,9 @@
 
 		// EQ mode change cmd reply
 		CHECK_WRITE_STEP_SIGNAL(STEP_ID_EQMODE_CHANGE_CMD_REPLY, pszData, size);
+
+		// EQ Master recipe request cmd reply
+		CHECK_WRITE_STEP_SIGNAL(STEP_ID_MASTER_RECIPE_LIST_CMD_REPLY, pszData, size);
 
 		// CIM Message Confirm
 		CHECK_READ_STEP_SIGNAL(STEP_ID_CIM_MSG_CONFIRM_REPORT, pszData, size);
@@ -869,4 +878,25 @@
 
 		return pStep->setDateTime(year, month, day, hour, minute, second);
 	}
+
+	int CEquipment::masterRecipeListRequest(short unitNo)
+	{
+		SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(STEP_EQ_MASTER_RECIPE_LIST_REQ);
+		if (pStep == nullptr) {
+			return -1;
+		}
+
+		LOGI("<CEquipment-%s>正在请求单元<%d>主配方列表", m_strName.c_str(), unitNo);
+		pStep->writeShort(unitNo, [&](int code) -> int {
+			if (code == WOK) {
+				LOGI("<CEquipment-%s>请求单元<%d>主配方列表成功,正在等待数据.", m_strName.c_str(), unitNo);
+			}
+			else {
+				LOGI("<CEquipment-%s>请求单元<%d>主配方列表失败,code:%d", m_strName.c_str(), unitNo, code);
+			}
+
+			return 0;
+		});
+		return 0;
+	}
 }
\ No newline at end of file

--
Gitblit v1.9.3