You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
889 B
48 lines
889 B
3 years ago
|
namespace EC.Utils.SerialPortHelper
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 串口参数类
|
||
|
/// </summary>
|
||
|
public class SerialCustomer
|
||
|
{
|
||
|
public SerialCustomer()
|
||
|
{
|
||
|
BaudRate = 9600;
|
||
|
Parity = 0;
|
||
|
DataBits = 8;
|
||
|
StopBits = 1;
|
||
|
ReceivedBytesThreshold = 64;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 串口名称
|
||
|
/// </summary>
|
||
|
public string ComName { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
///波特率
|
||
|
/// </summary>
|
||
|
public int BaudRate { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 奇偶校验0-4=no,odd,even,mark,space
|
||
|
/// </summary>
|
||
|
public int Parity { get; set; }
|
||
|
|
||
|
///// <summary>
|
||
|
///// 校验位对应值
|
||
|
///// </summary>
|
||
|
//public int ParityValue { get; set; }//
|
||
|
/// <summary>
|
||
|
///数据位 默认
|
||
|
/// </summary>
|
||
|
public int DataBits { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 停止位
|
||
|
/// </summary>
|
||
|
public int StopBits { get; set; }
|
||
|
|
||
|
public int ReceivedBytesThreshold { get; set; }
|
||
|
}
|
||
|
}
|