You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.3 KiB
C#

1 year ago
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
namespace Mesnac.Basic
{
public class ModbusRTUInfo
{
private string _rtuaddr = "1";
private string _rtucom= "COM1";
private UInt32 _Baud = 9600;
private uint _databit = 8;
private uint _stopbit = 1;
private uint _checkbit=0;
private int _timeout = 300;
[Description("RTU<54><EFBFBD>ĵ<EFBFBD>ַ1-255"), Category("<22><EFBFBD><E8B1B8>ַ")]
public string RtuAddr
{
get
{
return _rtuaddr;
}
set
{
_rtuaddr = value;
}
}
[Description("<22><><EFBFBD>ںţ<DABA><C5A3><EFBFBD>COM1"), Category("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public string ComPort
{
get
{
return _rtucom;
}
set
{
_rtucom = value;
}
}
[Description("<22><><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>9600"), Category("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public UInt32 BaudRate
{
get
{
return _Baud;
}
set
{
_Baud = value;
}
}
[Description("<22><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>8"), Category("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public uint Databits
{
get
{
return _databit;
}
set
{
_databit = value;
}
}
[Description("ֹͣλ<D6B9><CEBB><EFBFBD><EFBFBD>1"), Category("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public uint Stopbit
{
get
{
return _stopbit;
}
set
{
_stopbit = value;
}
}
[Description("<22><>żУ<C5BC><D0A3>λ<EFBFBD><CEBB>0<EFBFBD><30>None<6E><65>1<EFBFBD><31>Odd<64><64>2<EFBFBD><32>Even"), Category("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public uint Parity
{
get
{
return _checkbit;
}
set
{
_checkbit = value;
}
}
[Description("ͨ<>ų<EFBFBD>ʱʱ<CAB1><EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD>㣬ms"), Category("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public int TimeOut
{
get
{
return _timeout;
}
set
{
_timeout = value;
}
}
}
}