From 944e8f3dea723404e21168e97116cca2c09c70cb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期二, 27 一月 2026 15:26:29 +0800
Subject: [PATCH] 1.扫码事件上报,之前只上报OK一种情况,现在有事种状态。 2.Port事件上报关联PortID, 统一修改为VID:PortID,之前分开很多种。
---
SourceCode/Bond/Servo/CVariable.cpp | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CVariable.cpp b/SourceCode/Bond/Servo/CVariable.cpp
index e9c5d83..e7b916c 100644
--- a/SourceCode/Bond/Servo/CVariable.cpp
+++ b/SourceCode/Bond/Servo/CVariable.cpp
@@ -43,6 +43,9 @@
if (_strcmpi("A20", pszFormat) == 0) {
return SVFromat::A20;
}
+ if (_strcmpi("L", pszFormat) == 0) {
+ return SVFromat::L;
+ }
return SVFromat::U1;
}
@@ -64,6 +67,9 @@
}
if (SVFromat::A20 == format) {
return "A20";
+ }
+ if (SVFromat::L == format) {
+ return "L";
}
return "U1";
@@ -113,6 +119,11 @@
m_strValue = strTemp;
}
+ void CVariable::setValue(std::vector<CVariable>& vars)
+ {
+ m_varsValue = vars;
+ }
+
std::string CVariable::getValue()
{
std::string strRet;
@@ -125,4 +136,18 @@
return strRet;
}
+
+ __int64 CVariable::getIntValue()
+ {
+ if (m_format == SVFromat::U1 || m_format == SVFromat::U2 || m_format == SVFromat::I2) {
+ return m_nValue;
+ }
+
+ return 0;
+ }
+
+ std::vector<CVariable>& CVariable::getVarsValue()
+ {
+ return m_varsValue;
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3