From e4a5ae95b07b9e13a81a5a814b052742e53ca890 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 04 三月 2025 14:52:50 +0800
Subject: [PATCH] 1.补允完Process Data的属性值列表。

---
 SourceCode/Bond/Servo/CAttribute.h       |    5 +++++
 SourceCode/Bond/Servo/CEqProcessStep.h   |    1 +
 SourceCode/Bond/Servo/CEqProcessStep.cpp |   26 ++++++++++++++++++++++++++
 SourceCode/Bond/Servo/CAttribute.cpp     |   15 +++++++++++++++
 4 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CAttribute.cpp b/SourceCode/Bond/Servo/CAttribute.cpp
index fbba186..468ebf2 100644
--- a/SourceCode/Bond/Servo/CAttribute.cpp
+++ b/SourceCode/Bond/Servo/CAttribute.cpp
@@ -18,4 +18,19 @@
 	{
 
 	}
+
+	std::string& CAttribute::getName()
+	{
+		return m_strName;
+	}
+
+	std::string& CAttribute::getValue()
+	{
+		return m_strValue;
+	}
+
+	std::string& CAttribute::getDescription()
+	{
+		return m_strDescription;
+	}
 }
diff --git a/SourceCode/Bond/Servo/CAttribute.h b/SourceCode/Bond/Servo/CAttribute.h
index b87c662..5c96b72 100644
--- a/SourceCode/Bond/Servo/CAttribute.h
+++ b/SourceCode/Bond/Servo/CAttribute.h
@@ -9,6 +9,11 @@
 		CAttribute(const char* pszName, const char* pszValue, const char* pszDescription);
 		~CAttribute();
 
+	public:
+		std::string& getName();
+		std::string& getValue();
+		std::string& getDescription();
+
 	private:
 		std::string m_strName;
 		std::string m_strValue;
diff --git a/SourceCode/Bond/Servo/CEqProcessStep.cpp b/SourceCode/Bond/Servo/CEqProcessStep.cpp
index 868554d..e64e92b 100644
--- a/SourceCode/Bond/Servo/CEqProcessStep.cpp
+++ b/SourceCode/Bond/Servo/CEqProcessStep.cpp
@@ -17,6 +17,32 @@
 
 	}
 
+	void CEqProcessStep::getAttributeVector(CAttributeVector& attrubutes)
+	{
+		CStep::getAttributeVector(attrubutes);
+
+		attrubutes.addAttribute(new CAttribute("Glass ID",
+			m_strGlassId.c_str(), ""));
+		attrubutes.addAttribute(new CAttribute("Start Time",
+			m_strStartTime.c_str(), ""));
+		attrubutes.addAttribute(new CAttribute("End Time",
+			m_strEndTime.c_str(), ""));
+		attrubutes.addAttribute(new CAttribute("Total Parameter",
+			std::to_string(m_nTotalParameter).c_str(), ""));
+		attrubutes.addAttribute(new CAttribute("Total Group",
+			std::to_string(m_nTotalGroup).c_str(), ""));
+		attrubutes.addAttribute(new CAttribute("Current Group",
+			std::to_string(m_nCurrentGroup).c_str(), ""));
+
+		char szName[256];
+		int index = 0;
+		for (auto item : m_params) {
+			sprintf_s(szName, 256, "Parameter %d", ++index);
+			attrubutes.addAttribute(new CAttribute(szName,
+				item.c_str(), ""));
+		}
+	}
+
 #define PROGRESS_BUF_SIZE		(1024 + 64)
 	int CEqProcessStep::onReadData()
 	{
diff --git a/SourceCode/Bond/Servo/CEqProcessStep.h b/SourceCode/Bond/Servo/CEqProcessStep.h
index 399d7f8..ac195cf 100644
--- a/SourceCode/Bond/Servo/CEqProcessStep.h
+++ b/SourceCode/Bond/Servo/CEqProcessStep.h
@@ -11,6 +11,7 @@
 		~CEqProcessStep();
 
 	public:
+		void getAttributeVector(CAttributeVector& attrubutes);
 		virtual int onReadData();
 		virtual int onComplete();
 		virtual int onTimeout();

--
Gitblit v1.9.3