Files
CapMachine/CapMachine.Wpf/CanDrive/CanDbcModel.cs
2025-01-07 10:09:42 +08:00

91 lines
2.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.CanDrive
{
/// <summary>
/// Dbc 信息
/// </summary>
public class CanDbcModel : BindableBase
{
/// <summary>
/// 消息Id
/// </summary>
public string? MsgId { get; set; }
/// <summary>
/// 配置的中文名称:速度,转速限制,使能等常用的信息数据
/// 但不是所有的SignalName都会配置一个Name只是需要时才会配置名称
/// 但是CanDbcModel集合会包括所有的SignalName名称的
/// </summary>
public string? Name { get; set; }
/// <summary>
/// 消息名称
/// </summary>
public string? MsgName { get; set; }
/// <summary>
/// 信号名称
/// </summary>
public string? SignalName { get; set; }
/// <summary>
/// 信号描述
/// </summary>
public string? SignalDesc { get; set; }
/// <summary>
/// 信号单位
/// </summary>
public string? SignalUnit { get; set; }
private string? _SignalRtValue = "--";
/// <summary>
/// 信号实时值
/// </summary>
public string? SignalRtValue
{
get { return _SignalRtValue; }
set
{
if (_SignalRtValue != value)
{
_SignalRtValue = value;
RaisePropertyChanged();
}
}
}
private StringBuilder _SignalRtValueSb = new StringBuilder(10);
/// <summary>
/// 信号实时值 StringBuilder
/// </summary>
public StringBuilder SignalRtValueSb
{
get { return _SignalRtValueSb; }
set
{
//if (_SignalRtValueSb != value)
//{
SignalRtValue = value.ToString();
_SignalRtValueSb = value;
//}
}
}
/// <summary>
/// 发布者
/// </summary>
public string? Publisher { get; set; }
}
}