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 作为历史根节点
---
Plugin.DeviceDebug/Entity/DebugCommand.cs | 65 ++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/Plugin.DeviceDebug/Entity/DebugCommand.cs b/Plugin.DeviceDebug/Entity/DebugCommand.cs
new file mode 100644
index 0000000..55f7802
--- /dev/null
+++ b/Plugin.DeviceDebug/Entity/DebugCommand.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Plugin.DeviceDebug.Entity
+{
+ /// <summary>
+ /// 璋冭瘯鍛戒护鍩虹被
+ /// </summary>
+ public partial class DebugCommand : ObservableObject
+ {
+ public DebugCommand()
+ {
+ CommandId = Guid.NewGuid().ToString();
+ CreatedAt = DateTime.Now;
+ Parameters = new Dictionary<string, object>();
+ }
+
+ [ObservableProperty] private string _commandId = string.Empty;
+ [ObservableProperty] private string _commandType = string.Empty;
+ [ObservableProperty] private string _deviceId = string.Empty;
+ [ObservableProperty] private int _channel;
+ [ObservableProperty] private Dictionary<string, object> _parameters = new();
+ [ObservableProperty] private DateTime _createdAt = DateTime.Now;
+ }
+
+ /// <summary>
+ /// 鐢垫簮璁剧疆鍛戒护
+ /// </summary>
+ public class PowerSetCommand : DebugCommand
+ {
+ public PowerSetCommand() { CommandType = "PowerSet"; }
+ public double Voltage { get; set; }
+ public double CurrentLimit { get; set; }
+ public bool Output { get; set; }
+ }
+
+ /// <summary>
+ /// 鐢垫簮娴嬮噺鍛戒护
+ /// </summary>
+ public class PowerMeasureCommand : DebugCommand
+ {
+ public PowerMeasureCommand() { CommandType = "PowerMeasure"; }
+ }
+
+ /// <summary>
+ /// CAN鍙戦�佸懡浠�
+ /// </summary>
+ public class CanSendCommand : DebugCommand
+ {
+ public CanSendCommand() { CommandType = "CanSend"; }
+ public string Frame { get; set; } = string.Empty;
+ public byte[] Data { get; set; } = Array.Empty<byte>();
+ }
+
+ /// <summary>
+ /// PLC鍐欏叆鍛戒护
+ /// </summary>
+ public class PlcWriteCommand : DebugCommand
+ {
+ public PlcWriteCommand() { CommandType = "PlcWrite"; }
+ public string IoAddress { get; set; } = string.Empty;
+ public bool Value { get; set; }
+ }
+}
--
Gitblit v1.9.1