Move Protocol property from implementations to base client
This commit is contained in:
@@ -52,7 +52,7 @@ namespace AMWD.Protocols.Modbus.Common.Contracts
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The default protocol used by the client should be initialized in the constructor.
|
/// The default protocol used by the client should be initialized in the constructor.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public abstract IModbusProtocol Protocol { get; set; }
|
public virtual IModbusProtocol Protocol { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads multiple <see cref="Coil"/>s.
|
/// Reads multiple <see cref="Coil"/>s.
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ namespace AMWD.Protocols.Modbus.Serial
|
|||||||
/// <inheritdoc cref="SerialPort.GetPortNames" />
|
/// <inheritdoc cref="SerialPort.GetPortNames" />
|
||||||
public static string[] AvailablePortNames => SerialPort.GetPortNames();
|
public static string[] AvailablePortNames => SerialPort.GetPortNames();
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public override IModbusProtocol Protocol { get; set; }
|
|
||||||
|
|
||||||
/// <inheritdoc cref="IModbusConnection.IdleTimeout"/>
|
/// <inheritdoc cref="IModbusConnection.IdleTimeout"/>
|
||||||
public TimeSpan IdleTimeout
|
public TimeSpan IdleTimeout
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ namespace AMWD.Protocols.Modbus.Tcp
|
|||||||
Protocol = new TcpProtocol();
|
Protocol = new TcpProtocol();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public override IModbusProtocol Protocol { get; set; }
|
|
||||||
|
|
||||||
/// <inheritdoc cref="IModbusConnection.IdleTimeout"/>
|
/// <inheritdoc cref="IModbusConnection.IdleTimeout"/>
|
||||||
public TimeSpan IdleTimeout
|
public TimeSpan IdleTimeout
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Renamed `ModbusSerialServer` to `ModbusRtuServer` so clearify the protocol, that is used.
|
- Renamed `ModbusSerialServer` to `ModbusRtuServer` so clearify the protocol, that is used.
|
||||||
|
- Made `Protocol` property of `ModbusClientBase` non-abstract.
|
||||||
|
|
||||||
|
|
||||||
## [v0.2.0] (2024-04-02)
|
## [v0.2.0] (2024-04-02)
|
||||||
|
|||||||
Reference in New Issue
Block a user