CAN FD 调度表初步更改

This commit is contained in:
2026-01-14 17:55:45 +08:00
parent 427cdc5305
commit 4d16b474c6
19 changed files with 2130 additions and 186 deletions

View File

@@ -49,5 +49,11 @@ namespace CapMachine.Model.CANLIN
/// </summary>
[Column(Name = "DbcPath", IsNullable = false, StringLength = 500)]
public string? DbcPath { get; set; }
/// <summary>
/// 调度表是否启用
/// </summary>
[Column(Name = "SchEnable")]
public bool SchEnable { get; set; }
}
}

View File

@@ -0,0 +1,60 @@
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Model.CANLIN
{
/// <summary>
/// 调度表的配置
/// 其实这些调度表是在DBC中有的但是图莫斯的驱动没有读取到这些信息
/// 那么我们在系统层面进行操作和保存这些信息
/// </summary>
[Table(Name = "CANFdScheduleConfig")]
public class CANFdScheduleConfig
{
/// <summary>
/// 主键
/// </summary>
[Column(IsPrimary = true, IsIdentity = true)]
public long Id { get; set; }
/// <summary>
/// 消息名称
/// </summary>
[Column(Name = "MsgName")]
public string? MsgName { get; set; }
/// <summary>
/// 消息的周期
/// </summary>
[Column(Name = "Cycle")]
public int Cycle { get; set; }
/// <summary>
/// 发送方式
/// </summary>
[Column(Name = "OrderSend")]
public int OrderSend { get; set; }
/// <summary>
/// 调度表的Index
/// //约定每帧对应一个调度表预设5个调度表每个调度表对应一个帧
/// 0-4这个范围的设置Index
/// </summary>
[Column(Name = "SchTabIndex")]
public int SchTabIndex { get; set; }
/// <summary>
/// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
/// </summary>
public long CanLinConfigProId { get; set; }
public CanLinConfigPro? CanLinConfigPro { get; set; }
}
}

View File

@@ -50,6 +50,12 @@ namespace CapMachine.Model.CANLIN
///CAN 的调度表配置模式
public List<CANScheduleConfig>? CanScheduleConfigs { get; set; }
/// <summary>
/// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
/// </summary>
///CAN 的调度表配置模式
public List<CANFdScheduleConfig>? CanFdScheduleConfigs { get; set; }
/// <summary>
/// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
/// </summary>

View File

@@ -1,4 +1,5 @@
using FreeSql.DataAnnotations;
using System.ComponentModel;
namespace CapMachine.Model
{
@@ -6,7 +7,7 @@ namespace CapMachine.Model
/// 历史工况对应的文件信息
/// </summary>
[Table(Name = "HistoryWorkCondFile")]
public class HistoryWorkCondFile
public class HistoryWorkCondFile : INotifyPropertyChanged
{
/// <summary>
/// 主键
@@ -49,5 +50,23 @@ namespace CapMachine.Model
/// </summary>
public long HistoryExpId { get; set; }
public HistoryExp? HistoryExp { get; set; }
[Column(IsIgnore = true)]
public bool IsSelected
{
get { return _isSelected; }
set
{
if (_isSelected != value)
{
_isSelected = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsSelected)));
}
}
}
private bool _isSelected;
public event PropertyChangedEventHandler? PropertyChanged;
}
}