Пример #1
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="ip">ip地址</param>
 /// <param name="port">端口</param>
 /// <param name="slaveAddress">从站号</param>
 /// <param name="masterAddress">主站号</param>
 public ModbusTcpProtocal(string ip, int port, byte slaveAddress, byte masterAddress)
     : base(slaveAddress, masterAddress)
 {
     ProtocalLinker = new ModbusTcpProtocalLinker(ip, port);
 }
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="ip">ip地址</param>
 /// <param name="port">端口</param>
 /// <param name="slaveAddress">从站号</param>
 /// <param name="masterAddress">主站号</param>
 /// <param name="endian">端格式</param>
 public ModbusAsciiInTcpProtocal(string ip, int port, byte slaveAddress, byte masterAddress, Endian endian)
     : base(slaveAddress, masterAddress, endian)
 {
     ProtocalLinker = new ModbusTcpProtocalLinker(ip, port);
 }
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="ip">ip地址</param>
 /// <param name="slaveAddress">从站号</param>
 /// <param name="masterAddress">主站号</param>
 public ModbusRtuInTcpProtocal(string ip, byte slaveAddress, byte masterAddress)
     : base(slaveAddress, masterAddress)
 {
     ProtocalLinker = new ModbusTcpProtocalLinker(ip);
 }
Пример #4
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="ip">ip地址</param>
 /// <param name="slaveAddress">从站号</param>
 /// <param name="masterAddress">主站号</param>
 /// <param name="endian">端格式</param>
 public ModbusTcpProtocal(string ip, byte slaveAddress, byte masterAddress, Endian endian)
     : base(slaveAddress, masterAddress, endian)
 {
     ProtocalLinker = new ModbusTcpProtocalLinker(ip);
 }