From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
OPCClient/Commond.cs | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/OPCClient/Commond.cs b/OPCClient/Commond.cs
new file mode 100644
index 0000000..4d675aa
--- /dev/null
+++ b/OPCClient/Commond.cs
@@ -0,0 +1,37 @@
+锘縰sing LT.Utils.Json;
+using System.Collections.Generic;
+
+namespace OPCConnection
+{
+ internal class Commond
+ {
+ private const string Cmd_STX = "02h";
+ private const string Cmd_End = "\r\n";
+
+
+ /// <summary>
+ /// 鍒涘缓璇锋眰鍛戒护
+ /// </summary>
+ /// <param name="Code"></param>
+ /// <param name="Parameters"></param>
+ /// <returns></returns>
+ public static string BuildCmd(string Code, List<string> Parameters)
+ {
+ string str = "02h;" + Code + ";";
+ foreach (string str2 in Parameters)
+ {
+ str = str + str2 + ";";
+ }
+ return (str + "\r\n");
+ }
+
+ /// <summary>
+ /// 鍒涘缓璇锋眰鍛戒护
+ /// </summary>
+ /// <param name="_object"></param>
+ /// <returns></returns>
+ public static string BuildCmdScada(object _object) =>
+ JsonExtensions.ToJson(_object, false, false, false);
+ }
+
+}
--
Gitblit v1.9.1