Implemented Modbus Serial Client
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace AMWD.Protocols.Modbus.Tcp.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the coil written event arguments.
|
||||
/// </summary>
|
||||
public class CoilWrittenEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unit id.
|
||||
/// </summary>
|
||||
public byte UnitId { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the coil address.
|
||||
/// </summary>
|
||||
public ushort Address { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the coil value.
|
||||
/// </summary>
|
||||
public bool Value { get; internal set; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace AMWD.Protocols.Modbus.Tcp.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the register written event arguments.
|
||||
/// </summary>
|
||||
public class RegisterWrittenEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unit id.
|
||||
/// </summary>
|
||||
public byte UnitId { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the address of the register.
|
||||
/// </summary>
|
||||
public ushort Address { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the register.
|
||||
/// </summary>
|
||||
public ushort Value { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the high byte of the register.
|
||||
/// </summary>
|
||||
public byte HighByte { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the low byte of the register.
|
||||
/// </summary>
|
||||
public byte LowByte { get; internal set; }
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AMWD.Protocols.Modbus.Common;
|
||||
using AMWD.Protocols.Modbus.Common.Events;
|
||||
using AMWD.Protocols.Modbus.Common.Models;
|
||||
using AMWD.Protocols.Modbus.Common.Protocols;
|
||||
using AMWD.Protocols.Modbus.Tcp.Events;
|
||||
|
||||
namespace AMWD.Protocols.Modbus.Tcp
|
||||
{
|
||||
@@ -45,8 +45,6 @@ namespace AMWD.Protocols.Modbus.Tcp
|
||||
/// </summary>
|
||||
/// <param name="listenAddress">An <see cref="IPAddress"/> to listen on (Default: <see cref="IPAddress.Loopback"/>).</param>
|
||||
/// <param name="listenPort">A port to listen on (Default: 502).</param>
|
||||
/// <exception cref="ArgumentOutOfRangeException"></exception>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public ModbusTcpServer(IPAddress listenAddress = null, int listenPort = 502)
|
||||
{
|
||||
ListenAddress = listenAddress ?? IPAddress.Loopback;
|
||||
|
||||
Reference in New Issue
Block a user