mirror of
https://github.com/evopro-ag/Sharp7Reactive.git
synced 2025-12-16 19:52:53 +00:00
Fixed rack number and nullable logger
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Sharp7.Rx
|
|||||||
this.ipAddress = settings.IpAddress;
|
this.ipAddress = settings.IpAddress;
|
||||||
this.cpuSlotNr = settings.CpuMpiAddress;
|
this.cpuSlotNr = settings.CpuMpiAddress;
|
||||||
this.port = settings.Port;
|
this.port = settings.Port;
|
||||||
this.rackNr = settings.Port;
|
this.rackNr = settings.RackNumber;
|
||||||
|
|
||||||
ReconnectDelay = TimeSpan.FromSeconds(5);
|
ReconnectDelay = TimeSpan.FromSeconds(5);
|
||||||
}
|
}
|
||||||
@@ -179,7 +179,7 @@ namespace Sharp7.Rx
|
|||||||
throw new InvalidOperationException(StringResources.StrErrorS7DriverNotInitialized);
|
throw new InvalidOperationException(StringResources.StrErrorS7DriverNotInitialized);
|
||||||
|
|
||||||
var errorText = sharp7.ErrorText(errorCode);
|
var errorText = sharp7.ErrorText(errorCode);
|
||||||
Logger.LogError($"Error Code {errorCode} {errorText}");
|
Logger?.LogError($"Error Code {errorCode} {errorText}");
|
||||||
await SetConnectionLostState();
|
await SetConnectionLostState();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user