build: 10.4.16
This commit is contained in:
@@ -76,7 +76,7 @@ docker pull registry.cn-shenzhen.aliyuncs.com/thingsgateway/thingsgateway_arm64
|
||||
## License
|
||||
|
||||
|
||||
[Apache-2.0](https://gitee.com/diego2098/ThingsGateway/blob/master/LICENSE)
|
||||
[License](https://thingsgateway.cn/docs/1)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ docker pull registry.cn-shenzhen.aliyuncs.com/thingsgateway/thingsgateway_arm64
|
||||
|
||||
## 协议
|
||||
|
||||
[Apache-2.0](https://gitee.com/diego2098/ThingsGateway/blob/master/LICENSE)
|
||||
[版权声明](https://thingsgateway.cn/docs/1)
|
||||
|
||||
|
||||
## 赞助
|
||||
|
||||
@@ -22,11 +22,11 @@ public class TextFileLog : Logger, IDisposable
|
||||
/// <summary>日志文件格式。默认{0:yyyy_MM_dd}.log</summary>
|
||||
public String FileFormat { get; set; }
|
||||
|
||||
/// <summary>日志文件上限。超过上限后拆分新日志文件,默认10MB,0表示不限制大小</summary>
|
||||
public Int32 MaxBytes { get; set; } = 10;
|
||||
/// <summary>日志文件上限。超过上限后拆分新日志文件,默认5MB,0表示不限制大小</summary>
|
||||
public Int32 MaxBytes { get; set; } = 5;
|
||||
|
||||
/// <summary>日志文件备份。超过备份数后,最旧的文件将被删除,默认100,0表示不限制个数</summary>
|
||||
public Int32 Backups { get; set; } = 100;
|
||||
public Int32 Backups { get; set; } = 50;
|
||||
|
||||
private readonly Boolean _isFile = false;
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@ public class Setting
|
||||
[Description("文件日志目录。默认Log子目录")]
|
||||
public String LogPath { get; set; } = "Logs/XLog";
|
||||
|
||||
/// <summary>日志文件上限。超过上限后拆分新日志文件,默认10MB,0表示不限制大小</summary>
|
||||
[Description("日志文件上限。超过上限后拆分新日志文件,默认10MB,0表示不限制大小")]
|
||||
public Int32 LogFileMaxBytes { get; set; } = 10;
|
||||
/// <summary>日志文件上限。超过上限后拆分新日志文件,默认5MB,0表示不限制大小</summary>
|
||||
[Description("日志文件上限。超过上限后拆分新日志文件,默认5MB,0表示不限制大小")]
|
||||
public Int32 LogFileMaxBytes { get; set; } = 5;
|
||||
|
||||
/// <summary>日志文件备份。超过备份数后,最旧的文件将被删除,网络安全法要求至少保存6个月日志,默认200,0表示不限制个数</summary>
|
||||
[Description("日志文件备份。超过备份数后,最旧的文件将被删除,网络安全法要求至少保存6个月日志,默认200,0表示不限制个数")]
|
||||
public Int32 LogFileBackups { get; set; } = 200;
|
||||
[Description("日志文件备份。超过备份数后,最旧的文件将被删除,网络安全法要求至少保存6个月日志,默认50,0表示不限制个数")]
|
||||
public Int32 LogFileBackups { get; set; } = 50;
|
||||
|
||||
/// <summary>日志文件格式。默认{0:yyyy_MM_dd}.log,支持日志等级如 {1}_{0:yyyy_MM_dd}.log</summary>
|
||||
[Description("日志文件格式。默认{0:yyyy_MM_dd}.log,支持日志等级如 {1}_{0:yyyy_MM_dd}.log")]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.4.15</PluginVersion>
|
||||
<ProPluginVersion>10.4.15</ProPluginVersion>
|
||||
<PluginVersion>10.4.16</PluginVersion>
|
||||
<ProPluginVersion>10.4.16</ProPluginVersion>
|
||||
<AuthenticationVersion>2.1.7</AuthenticationVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -84,7 +84,10 @@ public class SerialPortChannel : SerialPortClient, IClientChannel
|
||||
if (Online)
|
||||
{
|
||||
await base.CloseAsync(msg).ConfigureAwait(false);
|
||||
|
||||
if (!Online)
|
||||
{
|
||||
await this.OnChannelEvent(Stoped).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -104,9 +107,13 @@ public class SerialPortChannel : SerialPortClient, IClientChannel
|
||||
//await _connectLock.WaitAsync(token).ConfigureAwait(false);
|
||||
if (!Online)
|
||||
{
|
||||
//await SetupAsync(Config.Clone()).ConfigureAwait(false);
|
||||
if (token.IsCancellationRequested) return;
|
||||
await base.ConnectAsync(millisecondsTimeout, token).ConfigureAwait(false);
|
||||
|
||||
if (Online)
|
||||
{
|
||||
if (token.IsCancellationRequested) return;
|
||||
await this.OnChannelEvent(Started).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -144,7 +151,6 @@ public class SerialPortChannel : SerialPortClient, IClientChannel
|
||||
|
||||
protected override async Task OnSerialClosed(ClosedEventArgs e)
|
||||
{
|
||||
await this.OnChannelEvent(Stoped).ConfigureAwait(false);
|
||||
Logger?.Info($"{ToString()} Closed{(e.Message.IsNullOrEmpty() ? string.Empty : $" -{e.Message}")}");
|
||||
|
||||
await base.OnSerialClosed(e).ConfigureAwait(false);
|
||||
@@ -153,7 +159,7 @@ public class SerialPortChannel : SerialPortClient, IClientChannel
|
||||
protected override async Task OnSerialClosing(ClosingEventArgs e)
|
||||
{
|
||||
await this.OnChannelEvent(Stoping).ConfigureAwait(false);
|
||||
Logger?.Info($"{ToString()} Closing{(e.Message.IsNullOrEmpty() ? string.Empty : $" -{e.Message}")}");
|
||||
Logger?.Trace($"{ToString()} Closing{(e.Message.IsNullOrEmpty() ? string.Empty : $" -{e.Message}")}");
|
||||
await base.OnSerialClosing(e).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -167,7 +173,6 @@ public class SerialPortChannel : SerialPortClient, IClientChannel
|
||||
protected override async Task OnSerialConnected(ConnectedEventArgs e)
|
||||
{
|
||||
Logger?.Debug($"{ToString()} Connected");
|
||||
await this.OnChannelEvent(Started).ConfigureAwait(false);
|
||||
await base.OnSerialConnected(e).ConfigureAwait(false);
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -82,6 +82,10 @@ public class TcpClientChannel : TcpClient, IClientChannel
|
||||
if (Online)
|
||||
{
|
||||
await base.CloseAsync(msg).ConfigureAwait(false);
|
||||
if (!Online)
|
||||
{
|
||||
await this.OnChannelEvent(Stoped).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -101,7 +105,14 @@ public class TcpClientChannel : TcpClient, IClientChannel
|
||||
//await _connectLock.WaitAsync(token).ConfigureAwait(false);
|
||||
if (!Online)
|
||||
{
|
||||
if (token.IsCancellationRequested) return;
|
||||
await base.ConnectAsync(millisecondsTimeout, token).ConfigureAwait(false);
|
||||
if (Online)
|
||||
{
|
||||
if (token.IsCancellationRequested) return;
|
||||
await this.OnChannelEvent(Started).ConfigureAwait(false);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -130,8 +141,6 @@ public class TcpClientChannel : TcpClient, IClientChannel
|
||||
|
||||
Logger?.Info($"{ToString()} Closed{(e.Message.IsNullOrEmpty() ? string.Empty : $" -{e.Message}")}");
|
||||
|
||||
await this.OnChannelEvent(Stoped).ConfigureAwait(false);
|
||||
|
||||
await base.OnTcpClosed(e).ConfigureAwait(false);
|
||||
|
||||
}
|
||||
@@ -139,7 +148,7 @@ public class TcpClientChannel : TcpClient, IClientChannel
|
||||
protected override async Task OnTcpClosing(ClosingEventArgs e)
|
||||
{
|
||||
await this.OnChannelEvent(Stoping).ConfigureAwait(false);
|
||||
Logger?.Info($"{ToString()} Closing{(e.Message.IsNullOrEmpty() ? string.Empty : $" -{e.Message}")}");
|
||||
Logger?.Trace($"{ToString()} Closing{(e.Message.IsNullOrEmpty() ? string.Empty : $" -{e.Message}")}");
|
||||
|
||||
await base.OnTcpClosing(e).ConfigureAwait(false);
|
||||
}
|
||||
@@ -155,7 +164,6 @@ public class TcpClientChannel : TcpClient, IClientChannel
|
||||
protected override async Task OnTcpConnected(ConnectedEventArgs e)
|
||||
{
|
||||
Logger?.Info($"{ToString()} Connected");
|
||||
await this.OnChannelEvent(Started).ConfigureAwait(false);
|
||||
|
||||
await base.OnTcpConnected(e).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public abstract class TcpServiceChannelBase<TClient> : TcpService<TClient>, ITcp
|
||||
/// <inheritdoc/>
|
||||
protected override Task OnTcpClosing(TClient socketClient, ClosingEventArgs e)
|
||||
{
|
||||
Logger?.Info($"{socketClient} Closing{(e.Message.IsNullOrEmpty() ? string.Empty : $"-{e.Message}")}");
|
||||
Logger?.Trace($"{socketClient} Closing{(e.Message.IsNullOrEmpty() ? string.Empty : $"-{e.Message}")}");
|
||||
return base.OnTcpClosing(socketClient, e);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="9.0.4" />
|
||||
<PackageReference Include="TouchSocket" Version="3.0.24" />
|
||||
<PackageReference Include="TouchSocket.SerialPorts" Version="3.0.24" />
|
||||
<PackageReference Include="TouchSocket" Version="3.0.25" />
|
||||
<PackageReference Include="TouchSocket.SerialPorts" Version="3.0.25" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -79,6 +79,7 @@ public abstract class CollectFoundationBase : CollectBase
|
||||
Exception exception = null;
|
||||
try
|
||||
{
|
||||
await Task.Delay(1000, cancellationToken).ConfigureAwait(false);
|
||||
if (!cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
await FoundationDevice.Channel.ConnectAsync(FoundationDevice.Channel.ChannelOptions.ConnectTimeout, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
|
||||
<PackageReference Include="SqlSugar.TDengineCore" Version="4.18.6" />
|
||||
<PackageReference Include="Rougamo.Fody" Version="5.0.0" />
|
||||
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.24" />
|
||||
<PackageReference Include="TouchSocket.WebApi.Swagger" Version="3.0.24" />
|
||||
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.25" />
|
||||
<PackageReference Include="TouchSocket.WebApi.Swagger" Version="3.0.25" />
|
||||
<PackageReference Include="ThingsGateway.Authentication" Version="$(AuthenticationVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.device{
|
||||
min-height: 500px;
|
||||
}
|
||||
.device ::deep .tabs-body-content {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
@@ -406,6 +406,7 @@ public partial class SiemensS7Master : DeviceBase
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException) { }
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger?.LogWarning(SiemensS7Resource.Localizer["HandshakeError1", channel.ToString(), ex.Message]);
|
||||
@@ -414,7 +415,7 @@ public partial class SiemensS7Master : DeviceBase
|
||||
}
|
||||
try
|
||||
{
|
||||
var result2 = await SendThenReturnAsync(new S7Send(S7_PN)).ConfigureAwait(false);
|
||||
var result2 = await GetResponsedDataAsync(new S7Send(S7_PN),channel,Timeout).ConfigureAwait(false);
|
||||
if (!result2.IsSuccess)
|
||||
{
|
||||
Logger?.LogWarning(SiemensS7Resource.Localizer["HandshakeError2", channel.ToString(), result2.ErrorMessage]);
|
||||
@@ -425,6 +426,7 @@ public partial class SiemensS7Master : DeviceBase
|
||||
Logger?.LogInformation($"PduLength:{PduLength}");
|
||||
PduLength = PduLength < 200 ? 200 : PduLength;
|
||||
}
|
||||
catch (OperationCanceledException) { }
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger?.LogWarning(SiemensS7Resource.Localizer["HandshakeError2", channel.ToString(), ex.Message]);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.24" />
|
||||
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.25" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>10.4.15</Version>
|
||||
<Version>10.4.16</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user