CAN/LIN 导入和导出功能
This commit is contained in:
82
CapMachine.Wpf/CanDrive/ZlgCan/ZlgCanChannelOptions.cs
Normal file
82
CapMachine.Wpf/CanDrive/ZlgCan/ZlgCanChannelOptions.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
|
||||
namespace CapMachine.Wpf.CanDrive.ZlgCan
|
||||
{
|
||||
/// <summary>
|
||||
/// ZLG CANFD 通道初始化参数。
|
||||
/// </summary>
|
||||
public sealed class ZlgCanFdChannelOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// 仲裁域波特率(单位:bps)。例如 500000。
|
||||
/// </summary>
|
||||
public uint ArbitrationBaudRate { get; set; } = 500000;
|
||||
|
||||
/// <summary>
|
||||
/// 数据域波特率(单位:bps)。例如 2000000。
|
||||
/// </summary>
|
||||
public uint DataBaudRate { get; set; } = 2000000;
|
||||
|
||||
/// <summary>
|
||||
/// 终端电阻。
|
||||
/// </summary>
|
||||
public bool EnableInternalResistance { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 仅监听模式。
|
||||
/// </summary>
|
||||
public bool ListenOnly { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用总线利用率上报。
|
||||
/// </summary>
|
||||
public bool EnableBusUsage { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 总线利用率上报周期(单位:ms)。
|
||||
/// </summary>
|
||||
public int BusUsagePeriodMs { get; set; } = 500;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用设备层“合并接收”(ZCAN_ReceiveData)。
|
||||
/// </summary>
|
||||
public bool EnableMergeReceive { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 合并接收缓冲区最大帧数量。
|
||||
/// </summary>
|
||||
public int MergeReceiveBufferFrames { get; set; } = 100;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ZLG LIN 通道初始化参数。
|
||||
/// </summary>
|
||||
public sealed class ZlgLinChannelOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// LIN 模式:true=主节点,false=从节点。
|
||||
/// </summary>
|
||||
public bool IsMaster { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 校验模式。
|
||||
/// 1-经典校验,2-增强校验,3-自动。
|
||||
/// </summary>
|
||||
public byte ChecksumMode { get; set; } = 3;
|
||||
|
||||
/// <summary>
|
||||
/// 最大数据长度(8~64)。
|
||||
/// </summary>
|
||||
public byte MaxLength { get; set; } = 8;
|
||||
|
||||
/// <summary>
|
||||
/// 波特率(1000~20000)。
|
||||
/// </summary>
|
||||
public uint BaudRate { get; set; } = 19200;
|
||||
|
||||
/// <summary>
|
||||
/// LIN 接收轮询等待时间(ms)。
|
||||
/// </summary>
|
||||
public int ReceiveWaitMs { get; set; } = 10;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user