using MV485.helper; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MV485.model { //485参数配置 public class RS485Config { //public string DeviceType { get; set; } //public string DeviceSn { get; set; } // 波特率设定值对应表 public byte BaudRateType {get; set; } public int BaudRateName => Tools.GetBaudRate(BaudRateType); // 校验方式 (40244, F3H) // 0 - 无校验 // 1 - 奇校验 // 2 - 偶校验 (默认) // 3 - 校验位为 1 // 4 - 校验位为 0 public byte ParityCheckType { get; set; } public string ParityCheckName { get { return Tools.GetParityCheck(ParityCheckType); } } // 停止位设定 (40245, F4H) // 0 - 1 个停止位 (默认) // 1 - 2 个停止位 public byte StopBitsType { get; set; } public string StopBitsName => Tools.GetStopBits(StopBitsType); } }