周立功开发过程1

This commit is contained in:
2026-02-02 21:22:01 +08:00
parent 4d16b474c6
commit 2e8ad1cffa
42 changed files with 11571 additions and 122 deletions

View 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;
}
}