Implemented Modbus Serial Client
This commit is contained in:
@@ -31,12 +31,12 @@ namespace AMWD.Protocols.Modbus.Common.Contracts
|
||||
TimeSpan ConnectTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the receive time out value of the connection.
|
||||
/// Gets or sets the <see cref="TimeSpan"/> before a time-out occurs when a read/receive operation does not finish.
|
||||
/// </summary>
|
||||
TimeSpan ReadTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the send time out value of the connection.
|
||||
/// Gets or sets the <see cref="TimeSpan"/> before a time-out occurs when a write/send operation does not finish.
|
||||
/// </summary>
|
||||
TimeSpan WriteTimeout { get; set; }
|
||||
|
||||
|
||||
26
AMWD.Protocols.Modbus.Common/Events/CoilWrittenEventArgs.cs
Normal file
26
AMWD.Protocols.Modbus.Common/Events/CoilWrittenEventArgs.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace AMWD.Protocols.Modbus.Common.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the coil written event arguments.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
|
||||
public class CoilWrittenEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unit id.
|
||||
/// </summary>
|
||||
public byte UnitId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the coil address.
|
||||
/// </summary>
|
||||
public ushort Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the coil value.
|
||||
/// </summary>
|
||||
public bool Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
|
||||
namespace AMWD.Protocols.Modbus.Common.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the register written event arguments.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
|
||||
public class RegisterWrittenEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unit id.
|
||||
/// </summary>
|
||||
public byte UnitId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the address of the register.
|
||||
/// </summary>
|
||||
public ushort Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the register.
|
||||
/// </summary>
|
||||
public ushort Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the high byte of the register.
|
||||
/// </summary>
|
||||
public byte HighByte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the low byte of the register.
|
||||
/// </summary>
|
||||
public byte LowByte { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user