CAN功能移植兼容
This commit is contained in:
33
UIShare/UIViewModel/AutoDBCLoadItemVM.cs
Normal file
33
UIShare/UIViewModel/AutoDBCLoadItemVM.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
namespace UIShare.UIViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN 通道枚举(对应 ZLGCANFD 通道选择)
|
||||
/// </summary>
|
||||
public enum APP_CHANNEL
|
||||
{
|
||||
CH0 = 0,
|
||||
CH1 = 1,
|
||||
CH2 = 2,
|
||||
CH3 = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DBC 自动加载配置项
|
||||
/// </summary>
|
||||
public class AutoDBCLoadItem : BindableBase
|
||||
{
|
||||
private int _dbcChannel;
|
||||
public int DBCChannel
|
||||
{
|
||||
get => _dbcChannel;
|
||||
set => SetProperty(ref _dbcChannel, value);
|
||||
}
|
||||
|
||||
private string _dbcFilePath;
|
||||
public string DBCFilePath
|
||||
{
|
||||
get => _dbcFilePath;
|
||||
set => SetProperty(ref _dbcFilePath, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
UIShare/UIViewModel/CANSignalConfigVM.cs
Normal file
14
UIShare/UIViewModel/CANSignalConfigVM.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace UIShare.UIViewModel
|
||||
{
|
||||
public class CANSignalConfig
|
||||
{
|
||||
public int Channel { get; set; }
|
||||
public int MessageID { get; set; }
|
||||
public string MessageName { get; set; }
|
||||
public string SignalName { get; set; }
|
||||
public int CollectionInterval { get; set; }
|
||||
public Guid CollectionID { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,9 @@
|
||||
// 字段声明
|
||||
private byte _通道;
|
||||
private int _报文ID;
|
||||
private ulong _时间戳;
|
||||
private double _时间戳;
|
||||
private byte _长度;
|
||||
private bool _fd;
|
||||
private bool _isTx;
|
||||
private byte[] _bytes = new byte[64];
|
||||
private string _报文;
|
||||
|
||||
|
||||
// 通道属性
|
||||
public byte 通道
|
||||
@@ -27,7 +24,7 @@
|
||||
}
|
||||
|
||||
// 时间戳属性
|
||||
public ulong 时间戳
|
||||
public double 时间戳
|
||||
{
|
||||
get { return _时间戳; }
|
||||
set { SetProperty(ref _时间戳, value); }
|
||||
@@ -40,32 +37,6 @@
|
||||
set { SetProperty(ref _长度, value); }
|
||||
}
|
||||
|
||||
// FD属性
|
||||
public bool FD
|
||||
{
|
||||
get { return _fd; }
|
||||
set { SetProperty(ref _fd, value); }
|
||||
}
|
||||
|
||||
// IsTx属性
|
||||
public bool IsTx
|
||||
{
|
||||
get { return _isTx; }
|
||||
set { SetProperty(ref _isTx, value); }
|
||||
}
|
||||
|
||||
// Bytes属性
|
||||
public byte[] Bytes
|
||||
{
|
||||
get { return _bytes; }
|
||||
set { SetProperty(ref _bytes, value); }
|
||||
}
|
||||
|
||||
// 报文属性
|
||||
public string 报文
|
||||
{
|
||||
get { return _报文; }
|
||||
set { SetProperty(ref _报文, value); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user