其他程序的CAN CANFD LIN的移植

This commit is contained in:
2025-09-07 22:08:21 +08:00
parent 566a3d2ca6
commit e2e28935d1
55 changed files with 9087 additions and 677 deletions

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace CapMachine.Wpf.Dtos
{
public class CANConfigExdDto:BindableBase
public class CANConfigExdDto : BindableBase
{
/// <summary>
/// 主键
@@ -43,5 +43,15 @@ namespace CapMachine.Wpf.Dtos
get { return _DbcPath; }
set { _DbcPath = value; RaisePropertyChanged(); }
}
private bool _SchEnable;
/// <summary>
/// 调度表是否启用
/// </summary>
public bool SchEnable
{
get { return _SchEnable; }
set { _SchEnable = value; RaisePropertyChanged(); }
}
}
}

View File

@@ -0,0 +1,77 @@
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Dtos
{
public class CANFdConfigExdDto : BindableBase
{
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
private int _DataBaudRate;
/// <summary>
/// 数据波特率
/// </summary>
public int DataBaudRate
{
get { return _DataBaudRate; }
set { _DataBaudRate = value; RaisePropertyChanged(); }
}
private int _ArbBaudRate;
/// <summary>
/// 仲裁波特率
/// </summary>
public int ArbBaudRate
{
get { return _ArbBaudRate; }
set { _ArbBaudRate = value; RaisePropertyChanged(); }
}
private bool _ISOEnable;
/// <summary>
/// ISO 使能
/// </summary>
public bool ISOEnable
{
get { return _ISOEnable; }
set { _ISOEnable = value; RaisePropertyChanged(); }
}
private bool _ResEnable;
/// <summary>
/// 终端电阻使能
/// </summary>
public bool ResEnable
{
get { return _ResEnable; }
set { _ResEnable = value; RaisePropertyChanged(); }
}
private int _Cycle;
/// <summary>
/// 周期
/// </summary>
public int Cycle
{
get { return _Cycle; }
set { _Cycle = value; RaisePropertyChanged(); }
}
private string? _DbcPath;
/// <summary>
/// Dbc文件路径
/// </summary>
public string? DbcPath
{
get { return _DbcPath; }
set { _DbcPath = value; RaisePropertyChanged(); }
}
}
}

View File

@@ -0,0 +1,83 @@
using CapMachine.Model.CANLIN;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Dtos
{
/// <summary>
/// CANScheduleConfigDto
/// </summary>
public class CANScheduleConfigDto : BindableBase
{
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
private string? _MsgName;
/// <summary>
/// 消息名称/帧名称
/// </summary>
public string? MsgName
{
get { return _MsgName; }
set { _MsgName = value; RaisePropertyChanged(); }
}
private int _Cycle;
/// <summary>
/// 周期
/// </summary>
public int Cycle
{
get { return _Cycle; }
set { _Cycle = value; RaisePropertyChanged(); }
}
private int _OrderSend;
/// <summary>
/// 发送方式
/// </summary>
public int OrderSend
{
get { return _OrderSend; }
set { _OrderSend = value; RaisePropertyChanged(); }
}
private int _SchTabIndex;
/// <summary>
/// 调度表的Index序列
/// </summary>
public int SchTabIndex
{
get { return _SchTabIndex; }
set { _SchTabIndex = value; RaisePropertyChanged(); }
}
/// <summary>
/// 在更新调度表数据时,我们有一个整体的帧数据指令集合,但是这些帧数据集合,分属于不同的调度表,
/// 这个在开始时生成整体的帧数据指令集合才会把这个MsgIndex分配上这个不需要保存到数据库中对接使用
/// </summary>
public int MsgIndex { get; set; }
/// <summary>
/// 程序的ID
/// </summary>
public long CanLinConfigProId { get; set; }
private CanLinConfigPro _CanLinConfigPro;
/// <summary>
/// 所属的程序
/// </summary>
public CanLinConfigPro CanLinConfigPro
{
get { return _CanLinConfigPro; }
set { _CanLinConfigPro = value; RaisePropertyChanged(); }
}
}
}

View File

@@ -47,7 +47,7 @@ namespace CapMachine.Wpf.Dtos
set { _MsgFrameName = value; RaisePropertyChanged(); }
}
private string? _SignalName;
/// <summary>
/// 配置项值
@@ -70,7 +70,12 @@ namespace CapMachine.Wpf.Dtos
set { _DefautValue = value; RaisePropertyChanged(); }
}
public long LogicRuleId { get; set; }
/// <summary>
/// CanLinConfig的逻辑转换规则
/// 比如速度下发的数据SV是4000但是下发到CAN的值是40可能是其他的逻辑转换规则这里就是保存其中的逻辑规则
/// </summary>
public LogicRuleDto? LogicRuleDto { get; set; }
}
}

View File

@@ -0,0 +1,82 @@
using CapMachine.Model.CANLIN;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Dtos
{
public class LINScheduleConfigDto : BindableBase
{
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
private string? _MsgName;
/// <summary>
/// 消息名称/帧名称
/// </summary>
public string? MsgName
{
get { return _MsgName; }
set { _MsgName = value; RaisePropertyChanged(); }
}
private int _Cycle;
/// <summary>
/// 周期
/// </summary>
public int Cycle
{
get { return _Cycle; }
set { _Cycle = value; RaisePropertyChanged(); }
}
private int _SchTabIndex;
/// <summary>
/// 调度表的Index序列
/// </summary>
public int SchTabIndex
{
get { return _SchTabIndex; }
set { _SchTabIndex = value; RaisePropertyChanged(); }
}
private string? _SchTabName;
/// <summary>
/// 调度表的名称
/// </summary>
public string? SchTabName
{
get { return _SchTabName; }
set { _SchTabName = value; RaisePropertyChanged(); }
}
/// <summary>
/// 在更新调度表数据时,我们有一个整体的帧数据指令集合,但是这些帧数据集合,分属于不同的调度表,
/// 这个在开始时生成整体的帧数据指令集合才会把这个MsgIndex分配上这个不需要保存到数据库中对接使用
/// </summary>
public int MsgIndex { get; set; }
/// <summary>
/// 程序的ID
/// </summary>
public long CanLinConfigProId { get; set; }
private CanLinConfigPro _CanLinConfigPro;
/// <summary>
/// 所属的程序
/// </summary>
public CanLinConfigPro CanLinConfigPro
{
get { return _CanLinConfigPro; }
set { _CanLinConfigPro = value; RaisePropertyChanged(); }
}
}
}

View File

@@ -0,0 +1,73 @@
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Dtos
{
/// <summary>
/// 逻辑转换规则模型
/// </summary>
public class LogicRuleDto : BindableBase
{
/// <summary>
/// 主键ID
/// </summary>
public int Id { get; set; }
private string _name = string.Empty;
/// <summary>
/// 规则名称
/// </summary>
public string Name
{
get { return _name; }
set { SetProperty(ref _name, value); }
}
private string _description = string.Empty;
/// <summary>
/// 规则描述
/// </summary>
public string Description
{
get { return _description; }
set { SetProperty(ref _description, value); }
}
private string _expression = string.Empty;
/// <summary>
/// 规则表达式
/// </summary>
public string Expression
{
get { return _expression; }
set { _expression = value; RaisePropertyChanged(); }
}
private string _parameterType = string.Empty;
/// <summary>
/// 适用的参数类型(如:转速、功率等)
/// </summary>
public string ParameterType
{
get { return _parameterType; }
set { SetProperty(ref _parameterType, value); }
}
private DateTime _CreateTime;
/// <summary>
/// 适用的参数类型(如:转速、功率等)
/// </summary>
public DateTime CreateTime
{
get { return _CreateTime; }
set { _CreateTime = value; RaisePropertyChanged(); }
}
}
}