Make .TriggerConnection void and extend xml docs

This commit is contained in:
Peter Butzhammer
2024-07-30 12:15:09 +02:00
parent a2b6d84862
commit af2df01617
2 changed files with 58 additions and 69 deletions

View File

@@ -116,12 +116,11 @@ internal class Sharp7Connector : IDisposable
return buffers.ToDictionary(arg => arg.VariableName, arg => arg.Buffer);
}
public Task InitializeAsync()
public void InitializeAsync()
{
try
{
sharp7 = new S7Client();
sharp7.PLCPort = port;
sharp7 = new S7Client {PLCPort = port};
var subscription =
ConnectionState
@@ -138,8 +137,6 @@ internal class Sharp7Connector : IDisposable
{
Logger?.LogError(ex, "S7 driver for {Connection} could not be initialized", ConnectionIdentifier);
}
return Task.FromResult(true);
}
public async Task<byte[]> ReadBytes(Operand operand, ushort startByteAddress, ushort bytesToRead, ushort dbNo, CancellationToken token)