Remove IS7Connector interface

This commit is contained in:
Peter Butzhammer
2024-04-26 15:19:58 +02:00
parent 57ff276489
commit c3ccdad31c
2 changed files with 1 additions and 22 deletions

View File

@@ -1,21 +0,0 @@
using JetBrains.Annotations;
using Sharp7.Rx.Enums;
namespace Sharp7.Rx.Interfaces;
[NoReorder]
internal interface IS7Connector : IDisposable
{
IObservable<ConnectionState> ConnectionState { get; }
Task InitializeAsync();
Task<bool> Connect();
Task Disconnect();
Task<byte[]> ReadBytes(Operand operand, ushort startByteAddress, ushort bytesToRead, ushort dbNo, CancellationToken token);
Task WriteBit(Operand operand, ushort startByteAddress, byte bitAdress, bool value, ushort dbNo, CancellationToken token);
Task WriteBytes(Operand operand, ushort startByteAddress, byte[] data, ushort dbNo, CancellationToken token);
Task<IReadOnlyDictionary<string, byte[]>> ExecuteMultiVarRequest(IReadOnlyList<string> variableNames);
}

View File

@@ -10,7 +10,7 @@ using Sharp7.Rx.Settings;
namespace Sharp7.Rx;
internal class Sharp7Connector : IS7Connector
internal class Sharp7Connector: IDisposable
{
private readonly BehaviorSubject<ConnectionState> connectionStateSubject = new(Enums.ConnectionState.Initial);
private readonly int cpuSlotNr;