Fixed wrong 'following bytes' information in TCP proxy

This commit is contained in:
2025-01-21 19:26:13 +01:00
parent 96b5ee21c8
commit ec0ba31b86
7 changed files with 58 additions and 28 deletions

View File

@@ -107,9 +107,7 @@ namespace AMWD.Protocols.Modbus.Serial
set => _serialPort.PortName = value;
}
/// <summary>
/// Gets or sets the serial baud rate.
/// </summary>
/// <inheritdoc cref="SerialPort.BaudRate" />
public virtual BaudRate BaudRate
{
get => (BaudRate)_serialPort.BaudRate;
@@ -118,7 +116,11 @@ namespace AMWD.Protocols.Modbus.Serial
/// <inheritdoc cref="SerialPort.DataBits" />
/// <remarks>
/// Should be 7 for ASCII mode and 8 for RTU mode.
/// From the Specs:
/// <br/>
/// On <see cref="AsciiProtocol"/> it can be 7 or 8.
/// <br/>
/// On <see cref="RtuProtocol"/> it has to be 8.
/// </remarks>
public virtual int DataBits
{
@@ -159,9 +161,9 @@ namespace AMWD.Protocols.Modbus.Serial
/// <remarks>
/// From the Specs:
/// <br/>
/// Should be <see cref="StopBits.One"/> for <see cref="Parity.Even"/> or <see cref="Parity.Odd"/> and
/// Should be <see cref="StopBits.One"/> for <see cref="Parity.Even"/> or <see cref="Parity.Odd"/>.
/// <br/>
/// should be <see cref="StopBits.Two"/> for <see cref="Parity.None"/>.
/// Should be <see cref="StopBits.Two"/> for <see cref="Parity.None"/>.
/// </remarks>
public virtual StopBits StopBits
{
@@ -188,7 +190,6 @@ namespace AMWD.Protocols.Modbus.Serial
try
{
_processingTask.Wait();
_processingTask.Dispose();
}
catch