Преглед на файлове

1. 修改CORE的系统与Unility时间工具
2. 整体细节优化
3. 版本更新

Shun преди 2 години
родител
ревизия
f429fd390f
променени са 45 файла, в които са добавени 67 реда и са изтрити 117 реда
  1. 7 2
      README.md
  2. 1 9
      src/YSAI.DAQ/YSAI.Beckhoff/BeckhoffData.cs
  3. 2 8
      src/YSAI.DAQ/YSAI.Beckhoff/BeckhoffOperate.cs
  4. 2 2
      src/YSAI.DAQ/YSAI.Beckhoff/YSAI.Beckhoff.csproj
  5. 2 2
      src/YSAI.DAQ/YSAI.Can/YSAI.Can.csproj
  6. 1 3
      src/YSAI.DAQ/YSAI.Core/communication/net/tcp/client/TcpClientData.cs
  7. 1 3
      src/YSAI.DAQ/YSAI.Core/communication/net/udp/UdpData.cs
  8. 1 3
      src/YSAI.DAQ/YSAI.Core/communication/net/ws/client/WsClientData.cs
  9. 0 1
      src/YSAI.DAQ/YSAI.Core/communication/serial/SerialData.cs
  10. 0 1
      src/YSAI.DAQ/YSAI.Core/data/AddressParse.cs
  11. 0 1
      src/YSAI.DAQ/YSAI.Core/handler/RelayHandler.cs
  12. 0 1
      src/YSAI.DAQ/YSAI.Core/interface/IBaseAbstract.cs
  13. 1 2
      src/YSAI.DAQ/YSAI.Core/interface/IOrAbstract.cs
  14. 0 2
      src/YSAI.DAQ/YSAI.Core/redis/RedisOperate.cs
  15. 0 1
      src/YSAI.DAQ/YSAI.Core/script/ScriptData.cs
  16. 1 2
      src/YSAI.DAQ/YSAI.Core/subscribe/SubscribeOperate.cs
  17. 3 6
      src/YSAI.DAQ/YSAI.Core/subscribe/core/SubscribeService.cs
  18. 3 10
      src/YSAI.DAQ/YSAI.Core/subscribe/core/SubscribeSource.cs
  19. 0 1
      src/YSAI.DAQ/YSAI.Core/virtualAddress/VirtualAddressData.cs
  20. 1 1
      src/YSAI.DAQ/YSAI.DB/DBOperate.cs
  21. 3 3
      src/YSAI.DAQ/YSAI.DB/YSAI.DB.csproj
  22. 1 1
      src/YSAI.DAQ/YSAI.DaqManage/YSAI.DaqManage.csproj
  23. 3 3
      src/YSAI.DAQ/YSAI.Kafka/YSAI.Kafka.csproj
  24. 2 2
      src/YSAI.DAQ/YSAI.Manage/Controllers/InfoOperateController.cs
  25. 2 2
      src/YSAI.DAQ/YSAI.Modbus/YSAI.Modbus.csproj
  26. 2 2
      src/YSAI.DAQ/YSAI.Mqtt/YSAI.Mqtt.csproj
  27. 0 1
      src/YSAI.DAQ/YSAI.Mqtt/service/MqttServiceData.cs
  28. 0 1
      src/YSAI.DAQ/YSAI.Mqtt/service/websocket/MqttWebSocketServiceData.cs
  29. 1 1
      src/YSAI.DAQ/YSAI.Mvvm/YSAI.Mvvm.csproj
  30. 2 2
      src/YSAI.DAQ/YSAI.Netty/YSAI.Netty.csproj
  31. 1 6
      src/YSAI.DAQ/YSAI.Netty/client/NettyClientData.cs
  32. 3 3
      src/YSAI.DAQ/YSAI.Netty/client/NettyClientOperate.cs
  33. 1 6
      src/YSAI.DAQ/YSAI.Netty/service/NettyServiceData.cs
  34. 4 4
      src/YSAI.DAQ/YSAI.Netty/service/NettyServiceOperate.cs
  35. 2 2
      src/YSAI.DAQ/YSAI.Opc/YSAI.Opc.csproj
  36. 3 5
      src/YSAI.DAQ/YSAI.Opc/ua/client/OpcUaClientOperate.cs
  37. 0 1
      src/YSAI.DAQ/YSAI.Opc/ua/service/OpcUaServiceData.cs
  38. 1 1
      src/YSAI.DAQ/YSAI.Pack.Param/Program.cs
  39. 1 1
      src/YSAI.DAQ/YSAI.RabbitMQ/RabbitMQOperate.cs
  40. 2 2
      src/YSAI.DAQ/YSAI.RabbitMQ/YSAI.RabbitMQ.csproj
  41. 2 2
      src/YSAI.DAQ/YSAI.RelayManage/YSAI.RelayManage.csproj
  42. 2 2
      src/YSAI.DAQ/YSAI.S7/YSAI.S7.csproj
  43. 1 1
      src/YSAI.DAQ/YSAI.Test.All/Program.cs
  44. 1 1
      src/YSAI.DAQ/YSAI.Test.Console/Program.cs
  45. 1 1
      src/YSAI.DAQ/YSAI.Test/YSAI.Test.csproj

+ 7 - 2
README.md

@@ -331,5 +331,10 @@ while(true)
 
 #### 2023-10-24 ~ 2023-10-25
 1. 新增数据类型DataTime、Time、Date
-2. 新增倍福客户端,服务端正在开发
-3. 版本更新,细节优化
+2. 新增倍福客户端
+3. 版本更新,细节优化
+
+#### 2023-10-26
+1. 修改CORE的系统与Unility时间工具
+2. 整体细节优化
+3. 版本更新

+ 1 - 9
src/YSAI.DAQ/YSAI.Beckhoff/BeckhoffData.cs

@@ -1,12 +1,4 @@
-using Newtonsoft.Json.Converters;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Text.Json.Serialization;
-using System.Threading.Tasks;
-using YSAI.Core.subscription;
+using System.ComponentModel;
 using YSAI.Unility;
 
 namespace YSAI.Beckhoff

+ 2 - 8
src/YSAI.DAQ/YSAI.Beckhoff/BeckhoffOperate.cs

@@ -1,18 +1,12 @@
 using System.Collections.Concurrent;
-using System.Net;
-using System.Net.Sockets;
+using TwinCAT;
 using TwinCAT.Ads;
 using TwinCAT.PlcOpen;
+using TwinCAT.TypeSystem;
 using YSAI.Core.data;
 using YSAI.Core.@interface;
 using YSAI.Core.virtualAddress;
 using YSAI.Unility;
-using TwinCAT.TypeSystem;
-using System.Net.Http.Headers;
-using Newtonsoft.Json.Linq;
-using System.Reflection.Metadata;
-using TwinCAT.Ads.TypeSystem;
-using TwinCAT;
 
 namespace YSAI.Beckhoff
 {

+ 2 - 2
src/YSAI.DAQ/YSAI.Beckhoff/YSAI.Beckhoff.csproj

@@ -5,7 +5,7 @@
 		<ImplicitUsings>enable</ImplicitUsings>
 		<Nullable>enable</Nullable>
 		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-		<Version>1.0.0.1</Version>
+		<Version>1.0.0.2</Version>
 		<Authors>Shun</Authors>
 		<Company>YSAI</Company>
 		<Product>SCADA</Product>
@@ -14,7 +14,7 @@
 
 	<ItemGroup>
 		<PackageReference Include="Beckhoff.TwinCAT.Ads" Version="6.1.86" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
 	</ItemGroup>
 
 	<!--<ItemGroup>

+ 2 - 2
src/YSAI.DAQ/YSAI.Can/YSAI.Can.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.27</Version>
+	  <Version>1.0.0.28</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -17,7 +17,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
   <ItemGroup>

+ 1 - 3
src/YSAI.DAQ/YSAI.Core/communication/net/tcp/client/TcpClientData.cs

@@ -1,6 +1,4 @@
-using YSAI.Unility;
-
-namespace YSAI.Core.communication.net.tcp.client
+namespace YSAI.Core.communication.net.tcp.client
 {
     public class TcpClientData
     {

+ 1 - 3
src/YSAI.DAQ/YSAI.Core/communication/net/udp/UdpData.cs

@@ -1,6 +1,4 @@
-using YSAI.Unility;
-
-namespace YSAI.Core.communication.net.udp
+namespace YSAI.Core.communication.net.udp
 {
     public class UdpData
     {

+ 1 - 3
src/YSAI.DAQ/YSAI.Core/communication/net/ws/client/WsClientData.cs

@@ -1,6 +1,4 @@
-using YSAI.Unility;
-
-namespace YSAI.Core.communication.net.ws.client
+namespace YSAI.Core.communication.net.ws.client
 {
     public class WsClientData
     {

+ 0 - 1
src/YSAI.DAQ/YSAI.Core/communication/serial/SerialData.cs

@@ -1,7 +1,6 @@
 using Newtonsoft.Json.Converters;
 using System.IO.Ports;
 using System.Text.Json.Serialization;
-using YSAI.Unility;
 
 namespace YSAI.Core.communication.serial
 {

+ 0 - 1
src/YSAI.DAQ/YSAI.Core/data/AddressParse.cs

@@ -2,7 +2,6 @@
 using Newtonsoft.Json.Converters;
 using YSAI.Core.@enum;
 using YSAI.Core.script;
-using YSAI.Unility;
 
 namespace YSAI.Core.data
 {

+ 0 - 1
src/YSAI.DAQ/YSAI.Core/handler/RelayHandler.cs

@@ -1,5 +1,4 @@
 using YSAI.Core.data;
-using YSAI.Core.@interface;
 using YSAI.Core.reflection;
 
 namespace YSAI.Core.handler

+ 0 - 1
src/YSAI.DAQ/YSAI.Core/interface/IBaseAbstract.cs

@@ -1,5 +1,4 @@
 using YSAI.Core.data;
-using YSAI.Core.@interface;
 
 namespace YSAI.Core.@interface
 {

+ 1 - 2
src/YSAI.DAQ/YSAI.Core/interface/IOrAbstract.cs

@@ -2,7 +2,6 @@
 using YSAI.Core.@enum;
 using YSAI.Log;
 using YSAI.Unility;
-using static System.Net.Mime.MediaTypeNames;
 
 namespace YSAI.Core.@interface
 {
@@ -19,7 +18,7 @@ namespace YSAI.Core.@interface
         /// 实例数超过限制提示
         /// </summary>
         protected static readonly string ExceedMaxInstanceCountTips = $"当前实例数量超过最大限制数({MaxInstanceCount}),请检查您的代码是否合理的使用了单例模式";
-        
+
         /// <summary>
         /// 全局标识,用于统一返回
         /// </summary>

+ 0 - 2
src/YSAI.DAQ/YSAI.Core/redis/RedisOperate.cs

@@ -1,9 +1,7 @@
 using Newtonsoft.Json;
 using StackExchange.Redis;
-using System;
 using System.Runtime.Serialization.Formatters.Binary;
 using YSAI.Core.@interface;
-using YSAI.Log;
 using YSAI.Unility;
 
 namespace YSAI.Core.redis

+ 0 - 1
src/YSAI.DAQ/YSAI.Core/script/ScriptData.cs

@@ -1,6 +1,5 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
-using YSAI.Unility;
 
 namespace YSAI.Core.script
 {

+ 1 - 2
src/YSAI.DAQ/YSAI.Core/subscribe/SubscribeOperate.cs

@@ -1,5 +1,4 @@
 using System.Collections.Concurrent;
-using System.Runtime.CompilerServices;
 using YSAI.Core.data;
 using YSAI.Core.@enum;
 using YSAI.Core.@interface;
@@ -434,7 +433,7 @@ namespace YSAI.Core.subscription
                 }
             }, token.Token);
         }
-        
+
 
         /// <summary>
         /// 线程安全字典比对,是否一致

+ 3 - 6
src/YSAI.DAQ/YSAI.Core/subscribe/core/SubscribeService.cs

@@ -1,9 +1,6 @@
 using System.Collections.Concurrent;
 using YSAI.Core.data;
 using YSAI.Core.@interface;
-using YSAI.Core.reflection;
-using YSAI.Core.subscription;
-using YSAI.Log;
 
 namespace YSAI.Core.subscribe.core
 {
@@ -22,7 +19,7 @@ namespace YSAI.Core.subscribe.core
         /// <summary>
         /// 单例模式
         /// </summary>
-        private static SubscribeService<T>? ThisObjList; 
+        private static SubscribeService<T>? ThisObjList;
         /// <summary>
         /// 单例模式
         /// </summary>
@@ -85,9 +82,9 @@ namespace YSAI.Core.subscribe.core
             Depart("Get");
             if (Source.ContainsKey(SN))
             {
-               return Source[SN].Get();
+                return Source[SN].Get();
             }
-            return Break("Get", false,$"({SN}) Instance does not exist");
+            return Break("Get", false, $"({SN}) Instance does not exist");
         }
         /// <summary>
         /// 设置数据异步

+ 3 - 10
src/YSAI.DAQ/YSAI.Core/subscribe/core/SubscribeSource.cs

@@ -1,12 +1,5 @@
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using YSAI.Core.data;
+using YSAI.Core.data;
 using YSAI.Core.@interface;
-using YSAI.Core.reflection;
 using YSAI.Unility;
 
 namespace YSAI.Core.subscribe.core
@@ -14,7 +7,7 @@ namespace YSAI.Core.subscribe.core
     /// <summary>
     /// 订阅数据库
     /// </summary>
-    public class SubscribeSource<T>: IBaseAbstract, IDisposable
+    public class SubscribeSource<T> : IBaseAbstract, IDisposable
     {
         /// <summary>
         /// 构造函数传入SN
@@ -67,7 +60,7 @@ namespace YSAI.Core.subscribe.core
         /// <returns>统一结果</returns>
         public Task<OperateResult> SetAsync(T Data)
         {
-            return Task.Run(()=> Set(Data));
+            return Task.Run(() => Set(Data));
         }
 
 

+ 0 - 1
src/YSAI.DAQ/YSAI.Core/virtualAddress/VirtualAddressData.cs

@@ -1,7 +1,6 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
 using YSAI.Core.@enum;
-using YSAI.Unility;
 
 namespace YSAI.Core.virtualAddress
 {

+ 1 - 1
src/YSAI.DAQ/YSAI.DB/DBOperate.cs

@@ -46,7 +46,7 @@ namespace YSAI.DB
             {
                 lock (Lock)
                 {
-                    if (ThisObjList.Count(c =>  c.basics.Comparer(basics).result) > 0)
+                    if (ThisObjList.Count(c => c.basics.Comparer(basics).result) > 0)
                     {
                         return ThisObjList.First(c => c.basics.Comparer(basics).result);
                     }

+ 3 - 3
src/YSAI.DAQ/YSAI.DB/YSAI.DB.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.27</Version>
+	  <Version>1.0.0.28</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -14,11 +14,11 @@
 
 	<ItemGroup>
 		<PackageReference Include="Dapper" Version="2.1.15" />
-		<PackageReference Include="MySql.Data" Version="8.1.0" />
+		<PackageReference Include="MySql.Data" Version="8.2.0" />
 		<PackageReference Include="System.Data.OracleClient" Version="1.0.8" />
 		<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
 		<PackageReference Include="System.Data.SQLite" Version="1.0.118" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
 	</ItemGroup>
 	<!--<ItemGroup>
 		<ProjectReference Include="..\YSAI.Core\YSAI.Core.csproj" />

+ 1 - 1
src/YSAI.DAQ/YSAI.DaqManage/YSAI.DaqManage.csproj

@@ -7,7 +7,7 @@
   </PropertyGroup>
 	<ItemGroup>
 		<FrameworkReference Include="Microsoft.AspNetCore.App" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
 	</ItemGroup>
 
 	<!--<ItemGroup>

+ 3 - 3
src/YSAI.DAQ/YSAI.Kafka/YSAI.Kafka.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.28</Version>
+	  <Version>1.0.0.29</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -13,8 +13,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Confluent.Kafka" Version="2.2.0" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+    <PackageReference Include="Confluent.Kafka" Version="2.3.0" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 	
 	<!--<ItemGroup>

+ 2 - 2
src/YSAI.DAQ/YSAI.Manage/Controllers/InfoOperateController.cs

@@ -53,7 +53,7 @@ namespace YSAI.Manage.Controllers
             {
                 return FileTool.FileToString(path);
             }
-            return new OperateResult(false, $"{LType} 不存在", 0.8);
+            return new OperateResult(false, $"{LType} 不存在", 1);
         }
 
         /// <summary>
@@ -69,7 +69,7 @@ namespace YSAI.Manage.Controllers
             {
                 return FileTool.FileToString(path);
             }
-            return new OperateResult(false, $"{LType} 不存在", 0.8);
+            return new OperateResult(false, $"{LType} 不存在", 1);
         }
     }
 }

+ 2 - 2
src/YSAI.DAQ/YSAI.Modbus/YSAI.Modbus.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.27</Version>
+	  <Version>1.0.0.28</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -15,7 +15,7 @@
 	<ItemGroup>
     <PackageReference Include="NModbus" Version="3.0.80" />
     <PackageReference Include="NModbus.Serial" Version="3.0.80" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
 	<!--<ItemGroup>

+ 2 - 2
src/YSAI.DAQ/YSAI.Mqtt/YSAI.Mqtt.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.30</Version>
+	  <Version>1.0.0.31</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -15,7 +15,7 @@
   <ItemGroup>
     <PackageReference Include="MQTTnet" Version="4.3.1.873" />
     <PackageReference Include="MQTTnet.AspNetCore" Version="4.3.1.873" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
 	<!--<ItemGroup>

+ 0 - 1
src/YSAI.DAQ/YSAI.Mqtt/service/MqttServiceData.cs

@@ -1,5 +1,4 @@
 using System.ComponentModel;
-using YSAI.Unility;
 
 namespace YSAI.Mqtt.service
 {

+ 0 - 1
src/YSAI.DAQ/YSAI.Mqtt/service/websocket/MqttWebSocketServiceData.cs

@@ -1,5 +1,4 @@
 using YSAI.Core.@interface;
-using YSAI.Unility;
 
 namespace YSAI.Mqtt.service.websocket
 {

+ 1 - 1
src/YSAI.DAQ/YSAI.Mvvm/YSAI.Mvvm.csproj

@@ -6,6 +6,6 @@
     <UseWPF>true</UseWPF>
   </PropertyGroup>
 	<ItemGroup>
-		<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
+		<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.75" />
 	</ItemGroup>
 </Project>

+ 2 - 2
src/YSAI.DAQ/YSAI.Netty/YSAI.Netty.csproj

@@ -5,7 +5,7 @@
 		<ImplicitUsings>enable</ImplicitUsings>
 		<Nullable>enable</Nullable>
 		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-		<Version>1.0.0.2</Version>
+		<Version>1.0.0.3</Version>
 		<Authors>Shun</Authors>
 		<Company>YSAI</Company>
 		<Product>SCADA</Product>
@@ -14,6 +14,6 @@
 	<ItemGroup>
 		<PackageReference Include="DotNetty.Handlers" Version="0.7.5" />
 		<PackageReference Include="DotNetty.Transport" Version="0.7.5" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
 	</ItemGroup>
 </Project>

+ 1 - 6
src/YSAI.DAQ/YSAI.Netty/client/NettyClientData.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.ComponentModel;
 using YSAI.Unility;
 
 namespace YSAI.Netty.client

+ 3 - 3
src/YSAI.DAQ/YSAI.Netty/client/NettyClientOperate.cs

@@ -10,7 +10,6 @@ using System.Security.Cryptography.X509Certificates;
 using YSAI.Core.data;
 using YSAI.Core.@interface;
 using YSAI.Unility;
-using static YSAI.Netty.client.NettyClientOperate;
 
 namespace YSAI.Netty.client
 {
@@ -182,7 +181,7 @@ namespace YSAI.Netty.client
             /// <summary>
             /// 内容
             /// </summary>
-            public string C {  get; set; }
+            public string C { get; set; }
         }
 
         /// <summary>
@@ -345,7 +344,8 @@ namespace YSAI.Netty.client
                 .Group(Group)  //创建一个组
                 .Channel<TcpSocketChannel>()  //创建一个通道
                 .Option(ChannelOption.TcpNodelay, true)   //TCP节点布局
-                .Handler(new ActionChannelInitializer<ISocketChannel>(channel => { //处理
+                .Handler(new ActionChannelInitializer<ISocketChannel>(channel =>
+                { //处理
 
                     IChannelPipeline pipeline = channel.Pipeline;
                     if (Cert != null)

+ 1 - 6
src/YSAI.DAQ/YSAI.Netty/service/NettyServiceData.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.ComponentModel;
 using YSAI.Unility;
 
 namespace YSAI.Netty.service

+ 4 - 4
src/YSAI.DAQ/YSAI.Netty/service/NettyServiceOperate.cs

@@ -165,7 +165,7 @@ namespace YSAI.Netty.service
                 }
                 string ip = IpHandle(contex.Channel.RemoteAddress);
                 ClientIoc.AddOrUpdate(ip, contex.Channel, (k, v) => contex.Channel);
-                MessageEvent?.Invoke(this, new EventResult(true, $"{ip} 激活了通道",ip));
+                MessageEvent?.Invoke(this, new EventResult(true, $"{ip} 激活了通道", ip));
             }
 
             /// <summary>
@@ -226,8 +226,8 @@ namespace YSAI.Netty.service
                     {
                         if (IpPort != null)
                         {
-                            List<string> FailMessage=new List<string>();
-                            foreach (var ip in IpPort) 
+                            List<string> FailMessage = new List<string>();
+                            foreach (var ip in IpPort)
                             {
                                 if (ClientIoc.ContainsKey(ip))
                                 {
@@ -236,7 +236,7 @@ namespace YSAI.Netty.service
                                 else
                                 {
                                     FailMessage.Add($"{IpPort} 终端不存在");
-                                   
+
                                 }
                             }
                             if (FailMessage.Count > 0)

+ 2 - 2
src/YSAI.DAQ/YSAI.Opc/YSAI.Opc.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.37</Version>
+	  <Version>1.0.0.38</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -13,7 +13,7 @@
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="OPCFoundation.NetStandard.Opc.Ua" Version="1.4.372.56" />
-	<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+	<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
 

+ 3 - 5
src/YSAI.DAQ/YSAI.Opc/ua/client/OpcUaClientOperate.cs

@@ -2,7 +2,6 @@
 using Opc.Ua.Client;
 using Opc.Ua.Configuration;
 using System.Collections.Concurrent;
-using System.Reflection.Metadata;
 using System.Security.Cryptography.X509Certificates;
 using YSAI.Core.data;
 using YSAI.Core.@enum;
@@ -11,7 +10,6 @@ using YSAI.Core.virtualAddress;
 using YSAI.Log;
 using YSAI.Opc.ua.client.unility;
 using YSAI.Unility;
-using static Opc.Ua.Client.SessionReconnectHandler;
 using static YSAI.Opc.ua.client.OpcUaClientData;
 
 namespace YSAI.Opc.ua.client
@@ -948,7 +946,7 @@ namespace YSAI.Opc.ua.client
                         subscription.DisplayName = Tag;  //订阅的显示名称
                         subscription.TimestampsToReturn = TimestampsToReturn.Both;  //与通知消息一起返回的时间戳
                         subscription.StateChanged += delegate (Subscription subscription, SubscriptionStateChangedEventArgs e) { Subscription_StateChanged(subscription, e, Tag); };  //订阅状态
-                       
+
                         //监控项集合                                                                                                                                                    
                         List<MonitoredItem> monitoredItems = new List<MonitoredItem>();
 
@@ -1281,7 +1279,7 @@ namespace YSAI.Opc.ua.client
                         throw new Exception(string.Format("证书验证错误:{0},{1}", eventArgs.Error.Code, eventArgs.Error.AdditionalInfo));
                     }
                 };
-              
+
                 //用配置的当前状态更新验证器。
                 certificateValidator.Update(new SecurityConfiguration
                 {
@@ -1354,7 +1352,7 @@ namespace YSAI.Opc.ua.client
                 endpoint.Update(endpointDescription);
 
                 //通过调用CreateSession服务创建与服务器的新通信会话
-                clientSession = Session.Create(AC, endpoint, true, false,$"{AC.ApplicationName}.{Guid.NewGuid().ToNString()}", (uint)basics.Timeout, UserIdentity, new string[] { }).WaitAsync(new TimeSpan(0, 0, 0, 0, basics.Timeout)).Result;
+                clientSession = Session.Create(AC, endpoint, true, false, $"{AC.ApplicationName}.{Guid.NewGuid().ToNString()}", (uint)basics.Timeout, UserIdentity, new string[] { }).WaitAsync(new TimeSpan(0, 0, 0, 0, basics.Timeout)).Result;
 
                 //当会话关闭,则关闭订阅
                 clientSession.DeleteSubscriptionsOnClose = true;

+ 0 - 1
src/YSAI.DAQ/YSAI.Opc/ua/service/OpcUaServiceData.cs

@@ -1,5 +1,4 @@
 using System.ComponentModel;
-using YSAI.Unility;
 
 namespace YSAI.Opc.ua.service
 {

+ 1 - 1
src/YSAI.DAQ/YSAI.Pack.Param/Program.cs

@@ -43,7 +43,7 @@ namespace YSAI.Pack.Param
             BodyHandler body11 = new BodyHandler { Body = new NettyClientData.Basics(), FileName = "Netty.json", Namespace = "YSAI.Netty.client.NettyClientOperate" };
             BodyHandler body12 = new BodyHandler { Body = new BeckhoffData.Basics(), FileName = "Beckhoff.json", Namespace = "YSAI.Beckhoff.BeckhoffOperate" };
 
-            List<BodyHandler> bodys = new List<BodyHandler> { body1, body2, body3, body4, body5, body6, body7, body8, body9, body10,body11,body12 };
+            List<BodyHandler> bodys = new List<BodyHandler> { body1, body2, body3, body4, body5, body6, body7, body8, body9, body10, body11, body12 };
 
             foreach (var item in bodys)
             {

+ 1 - 1
src/YSAI.DAQ/YSAI.RabbitMQ/RabbitMQOperate.cs

@@ -146,7 +146,7 @@ namespace YSAI.RabbitMQ
                         Channels[basics.ExChangeName].QueueBind(Queue, basics.ExChangeName, RoutingKey);
                         //消息持久化
                         IBasicProperties basicProperties = Channels[basics.ExChangeName].CreateBasicProperties();
-                        basicProperties.Persistent = true;
+                        basicProperties.Persistent = Durable;
                         //添加消息头
                         QueueAndBasicProperties.TryAdd(Queue, (queueDeclareOk, basicProperties));
                     }

+ 2 - 2
src/YSAI.DAQ/YSAI.RabbitMQ/YSAI.RabbitMQ.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.29</Version>
+	  <Version>1.0.0.30</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -14,7 +14,7 @@
 
   <ItemGroup>
     <PackageReference Include="RabbitMQ.Client" Version="6.6.0" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
   <ItemGroup>

+ 2 - 2
src/YSAI.DAQ/YSAI.RelayManage/YSAI.RelayManage.csproj

@@ -8,8 +8,8 @@
 
 	<ItemGroup>
 		<PackageReference Include="RabbitMQ.Client" Version="6.6.0" />
-		<PackageReference Include="Confluent.Kafka" Version="2.2.0" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+		<PackageReference Include="Confluent.Kafka" Version="2.3.0" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
 		<FrameworkReference Include="Microsoft.AspNetCore.App" />
 	</ItemGroup>
 

+ 2 - 2
src/YSAI.DAQ/YSAI.S7/YSAI.S7.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
 	  <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-	  <Version>1.0.0.26</Version>
+	  <Version>1.0.0.27</Version>
 	  <Authors>Shun</Authors>
 	  <Company>YSAI</Company>
 	  <Product>SCADA</Product>
@@ -14,7 +14,7 @@
 
 	<ItemGroup>
     <PackageReference Include="S7netplus" Version="0.20.0" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
 	<!--<ItemGroup>

+ 1 - 1
src/YSAI.DAQ/YSAI.Test.All/Program.cs

@@ -6,7 +6,7 @@ using YSAI.Unility;
 /// <summary>
 /// 开关
 /// </summary>
-Stopwatch stopwatch=null;
+Stopwatch stopwatch = null;
 /// <summary>
 /// 开始记录
 /// </summary>

+ 1 - 1
src/YSAI.DAQ/YSAI.Test.Console/Program.cs

@@ -57,7 +57,7 @@ while (true)
     {
         keyValuePairs.TryAdd("Constants.bFPUSupport", false);
     }
-    
+
 
     operateResult = beckhoffClientOperate.Write(keyValuePairs);
     Console.WriteLine(operateResult.ToJson().JsonFormatting());

+ 1 - 1
src/YSAI.DAQ/YSAI.Test/YSAI.Test.csproj

@@ -17,7 +17,7 @@
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
-	<PackageReference Include="YSAI.Core" Version="1.0.0.63" />
+	<PackageReference Include="YSAI.Core" Version="1.0.0.64" />
   </ItemGroup>
 
   <ItemGroup>