LIN 值更新和LIN接受优化数据

This commit is contained in:
2025-10-15 11:13:37 +08:00
parent ad1d3e081f
commit fb4bc6d9d7
6 changed files with 227 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
using CapMachine.Wpf.Dtos;
using CapMachine.Wpf.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -27,11 +27,29 @@ namespace CapMachine.Wpf.LinDrive
/// </summary>
public string? SignalName { get; set; }
/// <summary>
/// 指令数据改变Handler
/// 改变发送消息名称/帧名称
/// </summary>
public event EventHandler<string>? LinCmdDataChangedHandler;
private double _SignalCmdValue;
/// <summary>
/// 指令值
/// 没有的话,则给默认值
/// </summary>
public double SignalCmdValue { get; set; }
public double SignalCmdValue
{
get { return _SignalCmdValue; }
set
{
if (_SignalCmdValue != value)
{
_SignalCmdValue = value;
LinCmdDataChangedHandler?.Invoke(this, MsgName!);
}
}
}
///// <summary>
///// 逻辑规则Id