From bf55b2f3083cbfdeb83611b2fa2dd552bf5b0775 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 03 三月 2025 16:20:00 +0800
Subject: [PATCH] 1.开始处理Step属性值; 2.增加左侧master面板;
---
SourceCode/Bond/Servo/CStep.cpp | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CStep.cpp b/SourceCode/Bond/Servo/CStep.cpp
index 2e43de3..6690b0f 100644
--- a/SourceCode/Bond/Servo/CStep.cpp
+++ b/SourceCode/Bond/Servo/CStep.cpp
@@ -1,5 +1,6 @@
#include "stdafx.h"
#include "CStep.h"
+#include "Common.h"
namespace SERVO {
@@ -66,6 +67,19 @@
std::string& CStep::getName()
{
return m_strName;
+ }
+
+ void CStep::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ attrubutes.clear();
+ attrubutes.addAttribute(new CAttribute("Network",
+ std::to_string(m_station.nNetNo).c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Station",
+ std::to_string(m_station.nStNo).c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Current Step",
+ std::to_string(m_nCurStep).c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Signal Dev",
+ std::to_string(m_nWriteSignalDev).c_str(), ""));
}
void CStep::setWriteSignalDev(int dev)
@@ -205,5 +219,18 @@
m_nCurStep++;
Unlock();
}
+
+ void CStep::convertString(const char* pszBuffer, int size, std::string& strOut)
+ {
+ strOut.clear();
+ int nLength = 0;
+ for (int i = 0; i < size; i++) {
+ if (pszBuffer[i] == '\0') break;
+ nLength++;
+ }
+ if (nLength > 0) {
+ strOut = std::string(pszBuffer, nLength);
+ }
+ }
}
--
Gitblit v1.9.3