Prechádzať zdrojové kódy

1. 三菱PLC采集优化
2. 新增欧姆龙PLC FINS协议采集
3. 版本更新

Shun 2 rokov pred
rodič
commit
15b90b1921
36 zmenil súbory, kde vykonal 1711 pridanie a 282 odobranie
  1. 1 1
      src/YSAI.DAQ/YSAI.Beckhoff/YSAI.Beckhoff.csproj
  2. 1 1
      src/YSAI.DAQ/YSAI.Can/YSAI.Can.csproj
  3. 1 1
      src/YSAI.DAQ/YSAI.Core/YSAI.Core.csproj
  4. 28 0
      src/YSAI.DAQ/YSAI.Core/enum/AddressType.cs
  5. 41 105
      src/YSAI.DAQ/YSAI.Core/enum/Enums.cs
  6. 18 0
      src/YSAI.DAQ/YSAI.Core/enum/ParseType.cs
  7. 68 0
      src/YSAI.DAQ/YSAI.Core/enum/ResultType.cs
  8. 3 3
      src/YSAI.DAQ/YSAI.Core/interface/IOrAbstract.cs
  9. 1 1
      src/YSAI.DAQ/YSAI.Core/redis/RedisOperate.cs
  10. 5 5
      src/YSAI.DAQ/YSAI.Core/subscribe/SubscribeOperate.cs
  11. 21 0
      src/YSAI.DAQ/YSAI.DAQ.sln
  12. 1 1
      src/YSAI.DAQ/YSAI.DB/YSAI.DB.csproj
  13. 1 1
      src/YSAI.DAQ/YSAI.DaqManage/YSAI.DaqManage.csproj
  14. 1 1
      src/YSAI.DAQ/YSAI.Kafka/YSAI.Kafka.csproj
  15. 27 0
      src/YSAI.DAQ/YSAI.Mitsubishi.Pack/Program.cs
  16. 16 0
      src/YSAI.DAQ/YSAI.Mitsubishi.Pack/YSAI.Mitsubishi.Pack.csproj
  17. 16 76
      src/YSAI.DAQ/YSAI.Mitsubishi/MitsubishiData.cs
  18. 35 38
      src/YSAI.DAQ/YSAI.Mitsubishi/MitsubishiOperate.cs
  19. 13 0
      src/YSAI.DAQ/YSAI.Mitsubishi/Properties/PublishProfiles/FolderProfile.pubxml
  20. 1 1
      src/YSAI.DAQ/YSAI.Mitsubishi/YSAI.Mitsubishi.csproj
  21. 1 1
      src/YSAI.DAQ/YSAI.Modbus/YSAI.Modbus.csproj
  22. 1 1
      src/YSAI.DAQ/YSAI.Mqtt/YSAI.Mqtt.csproj
  23. 1 1
      src/YSAI.DAQ/YSAI.Netty/YSAI.Netty.csproj
  24. 27 0
      src/YSAI.DAQ/YSAI.Omron.Pack/Program.cs
  25. 16 0
      src/YSAI.DAQ/YSAI.Omron.Pack/YSAI.Omron.Pack.csproj
  26. 197 0
      src/YSAI.DAQ/YSAI.Omron/OmronData.cs
  27. 1083 0
      src/YSAI.DAQ/YSAI.Omron/OmronOperate.cs
  28. 13 0
      src/YSAI.DAQ/YSAI.Omron/Properties/PublishProfiles/FolderProfile.pubxml
  29. 19 0
      src/YSAI.DAQ/YSAI.Omron/YSAI.Omron.csproj
  30. 1 1
      src/YSAI.DAQ/YSAI.Opc/YSAI.Opc.csproj
  31. 1 1
      src/YSAI.DAQ/YSAI.RabbitMQ/YSAI.RabbitMQ.csproj
  32. 1 1
      src/YSAI.DAQ/YSAI.RelayManage/YSAI.RelayManage.csproj
  33. 1 1
      src/YSAI.DAQ/YSAI.S7/YSAI.S7.csproj
  34. 48 39
      src/YSAI.DAQ/YSAI.Test.All/Program.cs
  35. 1 0
      src/YSAI.DAQ/YSAI.Test.All/YSAI.Test.All.csproj
  36. 1 1
      src/YSAI.DAQ/YSAI.Test/YSAI.Test.csproj

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

@@ -14,7 +14,7 @@
 
 	<ItemGroup>
 		<PackageReference Include="Beckhoff.TwinCAT.Ads" Version="6.1.86" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
 	</ItemGroup>
 
 	<!--<ItemGroup>

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

@@ -17,7 +17,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
   <ItemGroup>

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

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
     <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-    <Version>1.0.0.80</Version>
+    <Version>1.0.0.81</Version>
     <Authors>Shun</Authors>
     <Company>YSAI</Company>
     <Product>SCADA</Product>

+ 28 - 0
src/YSAI.DAQ/YSAI.Core/enum/AddressType.cs

@@ -0,0 +1,28 @@
+using System.ComponentModel;
+
+namespace YSAI.Core.@enum
+{
+    /// <summary>
+    /// 地址类型
+    /// </summary>
+    public enum AddressType
+    {
+        /// <summary>
+        /// 实际地址
+        /// </summary>
+        [Description("实际地址")]
+        Reality,
+
+        /// <summary>
+        /// 虚拟地址(读取时执行数据转发)
+        /// </summary>
+        [Description("虚拟地址")]
+        Virtual,
+
+        /// <summary>
+        /// 虚拟动态地址(读取时执行数据转发)
+        /// </summary>
+        [Description("虚拟动态地址")]
+        VirtualDynamic
+    }
+}

+ 41 - 105
src/YSAI.DAQ/YSAI.Core/enum/Enums.cs

@@ -19,12 +19,6 @@ namespace YSAI.Core.@enum
         [Description("字符串")]
         String,
 
-        /// <summary>
-        /// 8 位无符号整数
-        /// </summary>
-        [Description("8 位无符号整数")]
-        Byte,
-
         /// <summary>
         /// 16 位 Unicode 字符
         /// </summary>
@@ -50,16 +44,10 @@ namespace YSAI.Core.@enum
         Float,
 
         /// <summary>
-        /// 32 位有符号整数类型
-        /// </summary>
-        [Description("32 位有符号整数类型")]
-        Int,
-
-        /// <summary>
-        /// 64 位有符号整数类型
+        /// 8 位无符号整数
         /// </summary>
-        [Description("64 位有符号整数类型")]
-        Long,
+        [Description("8 位无符号整数")]
+        Byte,
 
         /// <summary>
         /// 8 位有符号整数类型
@@ -68,10 +56,10 @@ namespace YSAI.Core.@enum
         Sbyte,
 
         /// <summary>
-        /// 16 位有符号整数类型
+        /// 32 位有符号整数类型
         /// </summary>
-        [Description("16 位有符号整数类型")]
-        Short,
+        [Description("32 位有符号整数类型")]
+        Int,
 
         /// <summary>
         /// 32 位无符号整数类型
@@ -79,12 +67,24 @@ namespace YSAI.Core.@enum
         [Description("32 位无符号整数类型")]
         Uint,
 
+        /// <summary>
+        /// 64 位有符号整数类型
+        /// </summary>
+        [Description("64 位有符号整数类型")]
+        Long,
+
         /// <summary>
         /// 64 位无符号整数类型
         /// </summary>
         [Description("64 位无符号整数类型")]
         Ulong,
 
+        /// <summary>
+        /// 16 位有符号整数类型
+        /// </summary>
+        [Description("16 位有符号整数类型")]
+        Short,
+
         /// <summary>
         /// 64 位无符号整数类型
         /// </summary>
@@ -107,112 +107,48 @@ namespace YSAI.Core.@enum
         /// 时间数据类型
         /// </summary>
         [Description("时间数据类型")]
-        Time
-    }
+        Time,
 
-    /// <summary>
-    /// 地址类型
-    /// </summary>
-    public enum AddressType
-    {
         /// <summary>
-        /// 实际地址
+        /// Int16 特殊使用
         /// </summary>
-        [Description("实际地址")]
-        Reality,
-
-        /// <summary>
-        /// 虚拟地址(读取时执行数据转发)
-        /// </summary>
-        [Description("虚拟地址")]
-        Virtual,
-
-        /// <summary>
-        /// 虚拟动态地址(读取时执行数据转发)
-        /// </summary>
-        [Description("虚拟动态地址")]
-        VirtualDynamic
-    }
-
-    /// <summary>
-    /// 解析类型
-    /// </summary>
-    public enum ParseType
-    {
-        /// <summary>
-        /// 代码中定义的具体方法解析[入参string][出参string]
-        /// </summary>
-        MethodAnalysis,
-
-        /// <summary>
-        /// 动态脚本解析[入参string][出参string]
-        /// </summary>
-        ScriptAnalysis
-    }
-
-    /// <summary>
-    /// 结果数据类型
-    /// </summary>
-    public enum ResultType
-    {
-        /// <summary>
-        /// 键值集合
-        /// </summary>
-        KeyValue,
-
-        /// <summary>
-        /// 键值集合数组
-        /// </summary>
-        KeyValueArray,
-
-        /// <summary>
-        /// Josn字符串数据(方便解析)
-        /// </summary>
-        Json,
-
-        /// <summary>
-        /// 字节数据
-        /// </summary>
-        Byte,
-
-        /// <summary>
-        /// 布尔数据
-        /// </summary>
-        Bool,
-
-        /// <summary>
-        /// 字符串数据
-        /// </summary>
-        String,
+        [Description("Int16 特殊使用")]
+        Int16,
 
         /// <summary>
-        /// 动态数据
+        /// UInt16 特殊使用
         /// </summary>
-        Dynamic,
+        [Description("UInt16 特殊使用")]
+        UInt16,
 
         /// <summary>
-        /// 对象数据
+        /// Int32 特殊使用
         /// </summary>
-        Object,
+        [Description("Int32 特殊使用")]
+        Int32,
 
         /// <summary>
-        /// 枚举数据
+        /// UInt32 特殊使用
         /// </summary>
-        Enum,
+        [Description("UInt32 特殊使用")]
+        UInt32,
 
         /// <summary>
-        /// 操作结果数据
+        /// Int64 特殊使用
         /// </summary>
-        OR,
+        [Description("Int64 特殊使用")]
+        Int64,
 
         /// <summary>
-        /// 事件结果数据
+        /// UInt64 特殊使用
         /// </summary>
-        ER,
+        [Description("UInt64 特殊使用")]
+        UInt64,
 
         /// <summary>
-        /// 无返回参数,或无关紧要的参数(特殊情况下使用)
+        /// 未定义
         /// </summary>
-        Null
+        [Description("未定义")]
+        None
     }
-}
+}

+ 18 - 0
src/YSAI.DAQ/YSAI.Core/enum/ParseType.cs

@@ -0,0 +1,18 @@
+namespace YSAI.Core.@enum
+{
+    /// <summary>
+    /// 解析类型
+    /// </summary>
+    public enum ParseType
+    {
+        /// <summary>
+        /// 代码中定义的具体方法解析[入参string][出参string]
+        /// </summary>
+        MethodAnalysis,
+
+        /// <summary>
+        /// 动态脚本解析[入参string][出参string]
+        /// </summary>
+        ScriptAnalysis
+    }
+}

+ 68 - 0
src/YSAI.DAQ/YSAI.Core/enum/ResultType.cs

@@ -0,0 +1,68 @@
+namespace YSAI.Core.@enum
+{
+    /// <summary>
+    /// 结果数据类型
+    /// </summary>
+    public enum ResultType
+    {
+        /// <summary>
+        /// 键值集合
+        /// </summary>
+        KeyValue,
+
+        /// <summary>
+        /// 键值集合数组
+        /// </summary>
+        KeyValueArray,
+
+        /// <summary>
+        /// Josn字符串数据(方便解析)
+        /// </summary>
+        Json,
+
+        /// <summary>
+        /// 字节数据
+        /// </summary>
+        Byte,
+
+        /// <summary>
+        /// 布尔数据
+        /// </summary>
+        Bool,
+
+        /// <summary>
+        /// 字符串数据
+        /// </summary>
+        String,
+
+        /// <summary>
+        /// 动态数据
+        /// </summary>
+        Dynamic,
+
+        /// <summary>
+        /// 对象数据
+        /// </summary>
+        Object,
+
+        /// <summary>
+        /// 枚举数据
+        /// </summary>
+        Enum,
+
+        /// <summary>
+        /// 操作结果数据
+        /// </summary>
+        OR,
+
+        /// <summary>
+        /// 事件结果数据
+        /// </summary>
+        ER,
+
+        /// <summary>
+        /// 无返回参数,或无关紧要的参数(特殊情况下使用)
+        /// </summary>
+        Null
+    }
+}

+ 3 - 3
src/YSAI.DAQ/YSAI.Core/interface/IOrAbstract.cs

@@ -50,13 +50,13 @@ namespace YSAI.Core.@interface
         }
 
         /// <summary>
-        /// 异步统一返回
+        /// 统一返回
         /// </summary>
-        /// <param name="Name">方法名</param>
+        /// <param name="MethodName">方法名</param>
         /// <param name="State">状态</param>
         /// <param name="Message">消息</param>
         /// <param name="RData">结果值</param>
-        /// <param name="exception">异常对象</param>
+        /// <param name="Exception">异常对象</param>
         /// <returns>统一结果</returns>
         protected Task<OperateResult> BreakAsync(string MethodName, bool State, string? Message = null, object? RData = null, ResultType RType = ResultType.Null, Exception? Exception = null)
         {

+ 1 - 1
src/YSAI.DAQ/YSAI.Core/redis/RedisOperate.cs

@@ -53,7 +53,7 @@ namespace YSAI.Core.redis
         /// <summary>
         /// 构造函数
         /// </summary>
-        /// <param name="param">参数</param>
+        /// <param name="basics">参数</param>
         public RedisOperate(RedisData.Basics basics)
         {
             this.basics = basics;

+ 5 - 5
src/YSAI.DAQ/YSAI.Core/subscribe/SubscribeOperate.cs

@@ -321,7 +321,7 @@ namespace YSAI.Core.subscription
                                                 {
                                                     if (basics.ChangeOut)
                                                     {
-                                                        if (!ConcurrentDictionaryEquals(DataCachePool, resultData))
+                                                        if (!CDE(DataCachePool, resultData))
                                                         {
                                                             if (basics.AllOut)
                                                             {
@@ -354,7 +354,7 @@ namespace YSAI.Core.subscription
                                                 {
                                                     if (basics.ChangeOut)
                                                     {
-                                                        if (!ConcurrentDictionaryEquals(DataCachePoolArray, resultDataArray))
+                                                        if (!CDE(DataCachePoolArray, resultDataArray))
                                                         {
                                                             //抛出差异数据
                                                             OnEventHandler(this, new EventResult(true, "存在变化数据", resultDataArray, ResultType.KeyValueArray));
@@ -445,7 +445,7 @@ namespace YSAI.Core.subscription
         /// <param name="Param1"></param>
         /// <param name="Param2"></param>
         /// <returns></returns>
-        private bool ConcurrentDictionaryEquals(ConcurrentDictionary<string, AddressValue> Param1, ConcurrentDictionary<string, AddressValue> Param2)
+        private bool CDE(ConcurrentDictionary<string, AddressValue> Param1, ConcurrentDictionary<string, AddressValue> Param2)
         {
             bool equal = false;
             if (Param1.Count == Param2.Count)
@@ -478,11 +478,11 @@ namespace YSAI.Core.subscription
         /// <param name="Param1"></param>
         /// <param name="Param2"></param>
         /// <returns></returns>
-        private bool ConcurrentDictionaryEquals(List<ConcurrentDictionary<string, AddressValue>> Param1, List<ConcurrentDictionary<string, AddressValue>> Param2)
+        private bool CDE(List<ConcurrentDictionary<string, AddressValue>> Param1, List<ConcurrentDictionary<string, AddressValue>> Param2)
         {
             foreach (ConcurrentDictionary<string, AddressValue> a in Param2)
             {
-                if (!Param1.Exists(b => ConcurrentDictionaryEquals(a, b)))
+                if (!Param1.Exists(b => CDE(a, b)))
                 {
                     return false;
                 }

+ 21 - 0
src/YSAI.DAQ/YSAI.DAQ.sln

@@ -101,6 +101,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Mitsubishi", "YSAI.Mit
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Beckhoff.Pack", "YSAI.Beckhoff.Pack\YSAI.Beckhoff.Pack.csproj", "{BDFA0BDC-5645-4A7F-B063-0E162EABB7EF}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Omron", "YSAI.Omron\YSAI.Omron.csproj", "{0C46F8C9-A44A-4AAD-A0B7-D0FB387A0B00}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YSAI.Omron.Pack", "YSAI.Omron.Pack\YSAI.Omron.Pack.csproj", "{5EB13A98-97E5-4848-A5F3-D90974AA76A8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YSAI.Mitsubishi.Pack", "YSAI.Mitsubishi.Pack\YSAI.Mitsubishi.Pack.csproj", "{3573D496-3EE5-48B2-9060-E5306B5E3A94}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -267,6 +273,18 @@ Global
 		{BDFA0BDC-5645-4A7F-B063-0E162EABB7EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{BDFA0BDC-5645-4A7F-B063-0E162EABB7EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{BDFA0BDC-5645-4A7F-B063-0E162EABB7EF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0C46F8C9-A44A-4AAD-A0B7-D0FB387A0B00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0C46F8C9-A44A-4AAD-A0B7-D0FB387A0B00}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0C46F8C9-A44A-4AAD-A0B7-D0FB387A0B00}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0C46F8C9-A44A-4AAD-A0B7-D0FB387A0B00}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5EB13A98-97E5-4848-A5F3-D90974AA76A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5EB13A98-97E5-4848-A5F3-D90974AA76A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5EB13A98-97E5-4848-A5F3-D90974AA76A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5EB13A98-97E5-4848-A5F3-D90974AA76A8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3573D496-3EE5-48B2-9060-E5306B5E3A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3573D496-3EE5-48B2-9060-E5306B5E3A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3573D496-3EE5-48B2-9060-E5306B5E3A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3573D496-3EE5-48B2-9060-E5306B5E3A94}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -316,6 +334,9 @@ Global
 		{B4932E85-54ED-4F1D-8773-184E3A0ADD62} = {0A264424-1AD7-49FA-B813-D96498066479}
 		{DA9765D1-568D-48CE-A723-D7F10534FA22} = {0A264424-1AD7-49FA-B813-D96498066479}
 		{BDFA0BDC-5645-4A7F-B063-0E162EABB7EF} = {1EBA4FD7-DF52-49A0-8AA4-9E61ABC614F5}
+		{0C46F8C9-A44A-4AAD-A0B7-D0FB387A0B00} = {0A264424-1AD7-49FA-B813-D96498066479}
+		{5EB13A98-97E5-4848-A5F3-D90974AA76A8} = {1EBA4FD7-DF52-49A0-8AA4-9E61ABC614F5}
+		{3573D496-3EE5-48B2-9060-E5306B5E3A94} = {1EBA4FD7-DF52-49A0-8AA4-9E61ABC614F5}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {5D5D3927-6714-40C0-84EA-44C5BA4C5E87}

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

@@ -18,7 +18,7 @@
 		<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.80" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
 	</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.80" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
 	</ItemGroup>
 
 	<!--<ItemGroup>

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

@@ -14,7 +14,7 @@
 
   <ItemGroup>
     <PackageReference Include="Confluent.Kafka" Version="2.3.0" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 	
 	<!--<ItemGroup>

+ 27 - 0
src/YSAI.DAQ/YSAI.Mitsubishi.Pack/Program.cs

@@ -0,0 +1,27 @@
+using YSAI.Unility;
+
+namespace YSAI.Mitsubishi.Pack
+{
+    internal class Program
+    {
+        static void Main(string[] args)
+        {
+            string FileDirectory = string.Empty;
+            string[] paths = AppDomain.CurrentDomain.BaseDirectory.Split('\\');
+            for (int i = 0; i < paths.Length - 5; i++)
+            {
+                FileDirectory += $"{paths[i]}//";
+            }
+            FileDirectory += "YSAI.Manage//param";
+            string Name = "YSAI.Mitsubishi";
+            string ParamFile = $"{FileDirectory}//{Name}.Param.json";
+            string ParamDetailsFile = $"{FileDirectory}//{Name}.ParamDetails.json";
+            if (!Directory.Exists(FileDirectory))
+            {
+                Directory.CreateDirectory(FileDirectory);
+            }
+            FileTool.StringToFile(ParamFile, new MitsubishiData.Basics().ToJson().JsonFormatting());
+            FileTool.StringToFile(ParamDetailsFile, ReflexTool.GetClassAllPropertyData<MitsubishiData.Basics>().ToJson().JsonFormatting());
+        }
+    }
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 16 - 0
src/YSAI.DAQ/YSAI.Mitsubishi.Pack/YSAI.Mitsubishi.Pack.csproj


+ 16 - 76
src/YSAI.DAQ/YSAI.Mitsubishi/MitsubishiData.cs

@@ -2,6 +2,7 @@
 using Newtonsoft.Json.Converters;
 using System.ComponentModel;
 using YSAI.Core.attribute;
+using YSAI.Core.@enum;
 using YSAI.Core.subscription;
 using YSAI.Unility;
 
@@ -26,14 +27,14 @@ namespace YSAI.Mitsubishi
             [Description("IP")]
             [Verify(@"^(25[0-4]|2[0-4]\\d]|[01]?\\d{2}|[1-9])\\.(25[0-5]|2[0-4]\\d]|[01]?\\d?\\d)\\.(25[0-5]|2[0-4]\\d]|[01]?\\d?\\d)\\.(25[0-4]|2[0-4]\\d]|[01]?\\d{2}|[1-9])$", "输入有误")]
             [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
-            public string? Ip { get; set; }
+            public string? Ip { get; set; } = "127.0.0.1";
 
             /// <summary>
             /// 端口
             /// </summary>
             [Description("端口")]
             [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
-            public int Port { get; set; }
+            public int Port { get; set; } = 6688;
 
             /// <summary>
             /// 是否需要断开重新连接
@@ -59,95 +60,34 @@ namespace YSAI.Mitsubishi
             public int Timeout { get; set; } = 1000;
 
             /// <summary>
-            /// 设备类型
+            /// 协议类型
             /// </summary>
-            [Description("设备类型")]
+            [Description("协议类型")]
             [JsonConverter(typeof(StringEnumConverter))]
             [Display(true, true, true, Core.data.ParamStructure.dataCate.select)]
-            public DevType DType { get; set; }
+            public pType PType { get; set; } = pType.A1E;
         }
 
         /// <summary>
-        /// 设备类型
+        /// 协议类型
         /// </summary>
-        public enum DevType
+        public enum pType
         {
-            [Description("三菱MC.A1E帧")]
-            A1E,
-            [Description("三菱MC.QNA3E帧")]
-            QNA3E
-        }
-
-        /// <summary>
-        /// 数据类型
-        /// </summary>
-        public enum McDT
-        {
-            /// <summary>
-            /// 未定义
-            /// </summary>
-            [Description("未定义")]
-            None = 0,
-            /// <summary>
-            /// Bool
-            /// </summary>
-            [Description("Bool")]
-            Bool = 1,
-            /// <summary>
-            /// Byte
-            /// </summary>
-            [Description("Byte")]
-            Byte = 2,
-            /// <summary>
-            /// Int16
-            /// </summary>
-            [Description("Int16")]
-            Int16 = 3,
             /// <summary>
-            /// UInt16
+            /// 三菱MC.A1E帧
             /// </summary>
-            [Description("UInt16")]
-            UInt16 = 4,
-            /// <summary>
-            /// Int32
-            /// </summary>
-            [Description("Int32")]
-            Int32 = 5,
-            /// <summary>
-            /// UInt32
-            /// </summary>
-            [Description("UInt32")]
-            UInt32 = 6,
-            /// <summary>
-            /// Int64
-            /// </summary>
-            [Description("Int64")]
-            Int64 = 7,
-            /// <summary>
-            /// UInt64
-            /// </summary>
-            [Description("UInt64")]
-            UInt64 = 8,
-            /// <summary>
-            /// Float
-            /// </summary>
-            [Description("Float")]
-            Float = 9,
-            /// <summary>
-            /// Double
-            /// </summary>
-            [Description("Double")]
-            Double = 10,
+            [Description("三菱MC.A1E帧")]
+            A1E,
             /// <summary>
-            /// String
+            /// 三菱MC.QNA3E帧
             /// </summary>
-            [Description("String")]
-            String = 11,
+            [Description("三菱MC.QNA3E帧")]
+            QNA3E
         }
         /// <summary>
         /// 三菱解析后的地址信息
         /// </summary>
-        public class McAddressDetails
+        public class ADetails
         {
             /// <summary>
             /// 开始地址
@@ -177,7 +117,7 @@ namespace YSAI.Mitsubishi
             /// <summary>
             /// 数据类型
             /// </summary>
-            public McDT DataType { get; set; }
+            public DataType DataType { get; set; }
         }
 
         /// <summary>

+ 35 - 38
src/YSAI.DAQ/YSAI.Mitsubishi/MitsubishiOperate.cs

@@ -4,6 +4,7 @@ using System.Text;
 using YSAI.Core.attribute;
 using YSAI.Core.communication.net.tcp.client;
 using YSAI.Core.data;
+using YSAI.Core.@enum;
 using YSAI.Core.@interface;
 using YSAI.Core.subscription;
 using YSAI.Core.virtualAddress;
@@ -92,10 +93,10 @@ namespace YSAI.Mitsubishi
         /// <param name="address">地址名</param>
         /// <param name="toUpper">转换成大写</param>
         /// <returns></returns>
-        private McAddressDetails ParseQNA3E(string address, McDT dataType = McDT.None, bool toUpper = true)
+        private ADetails ParseQNA3E(string address, DataType dataType = DataType.None, bool toUpper = true)
         {
             if (toUpper) address = address.ToUpper();
-            var addressInfo = new McAddressDetails()
+            var addressInfo = new ADetails()
             {
                 DataType = dataType
             };
@@ -325,10 +326,10 @@ namespace YSAI.Mitsubishi
         /// <param name="address">地址名</param>
         /// <param name="toUpper">转换成大写</param>
         /// <returns></returns>
-        private McAddressDetails ParseA1E(string address, bool toUpper = true)
+        private ADetails ParseA1E(string address, bool toUpper = true)
         {
             if (toUpper) address = address.ToUpper();
-            var addressInfo = new McAddressDetails();
+            var addressInfo = new ADetails();
             switch (address[0])
             {
                 case 'X'://X输入寄存器
@@ -533,26 +534,26 @@ namespace YSAI.Mitsubishi
         private byte[] R(string address, ushort length, bool isBit = false)
         {
             //地址详情
-            McAddressDetails details = null;
+            ADetails details = null;
             //命令字节
             byte[]? command = null;
             //类型判断
-            switch (basics.DType)
+            switch (basics.PType)
             {
-                case DevType.A1E:
+                case pType.A1E:
                     details = ParseA1E(address);
                     command = ReadCommand_A1E(details.BeginAddress, details.TypeCode, (ushort)length, isBit);
                     break;
-                case DevType.QNA3E:
+                case pType.QNA3E:
                     details = ParseQNA3E(address);
                     command = ReadCommand_QNA3E(details.BeginAddress, details.TypeCode, (ushort)length, isBit);
                     break;
             }
             //发送等待结果
             OperateResult operateResult = null;
-            switch (basics.DType)
+            switch (basics.PType)
             {
-                case DevType.A1E:
+                case pType.A1E:
                     var lenght = command[10] + command[11] * 256;
                     if (isBit)
                     {
@@ -563,7 +564,7 @@ namespace YSAI.Mitsubishi
                         operateResult = tcpClientOperate.SendWait(command);
                     }
                     break;
-                case DevType.QNA3E:
+                case pType.QNA3E:
                     operateResult = tcpClientOperate.SendWait(command);
                     break;
             }
@@ -582,13 +583,13 @@ namespace YSAI.Mitsubishi
 
             int len = length;
             byte[] RValue = null;
-            switch (basics.DType)
+            switch (basics.PType)
             {
-                case DevType.A1E:
-                    RValue= new byte[bytes.Length - 2];
+                case pType.A1E:
+                    RValue = new byte[bytes.Length - 2];
                     Array.Copy(bytes, 2, RValue, 0, RValue.Length);
                     break;
-                case DevType.QNA3E:
+                case pType.QNA3E:
                     if (isBit)
                     {
                         len = (ushort)Math.Ceiling(len * 0.5);
@@ -617,17 +618,17 @@ namespace YSAI.Mitsubishi
             //数据反转
             Array.Reverse(data);
             //地址详情
-            McAddressDetails details = null;
+            ADetails details = null;
             //命令字节
             byte[]? command = null;
             //类型判断
-            switch (basics.DType)
+            switch (basics.PType)
             {
-                case DevType.A1E:
+                case pType.A1E:
                     details = ParseA1E(address);
                     command = WriteCommand_A1E(details.BeginAddress, details.TypeCode, data, isBit);
                     break;
-                case DevType.QNA3E:
+                case pType.QNA3E:
                     details = ParseQNA3E(address);
                     command = WriteCommand_QNA3E(details.BeginAddress, details.TypeCode, data, isBit);
                     break;
@@ -769,37 +770,35 @@ namespace YSAI.Mitsubishi
                         {
                             addressData.addressName = item.AddressName;
                         }
-                        ////如果是string 类型  (地址,长度)
-                        //if (item.AddressDataType == Core.@enum.DataType.String)
-                        //{
-                        //    byte[] strByte = R(addressData.addressName, (ushort)addressData.count);
-                        //    Value = BitConverter.ToString(strByte).ToString();
-                        //}
-                        //else
-                        //{
                         if (addressData.count.Equals(0))
                         {
                             switch (item.AddressDataType)
                             {
                                 case Core.@enum.DataType.Short:
+                                case Core.@enum.DataType.Int16:
                                     Value = BitConverter.ToInt16(R(addressData.addressName, 2), 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Bool:
                                     Value = ((R(addressData.addressName, 1)[0] & 0b00010000) != 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Ushort:
+                                case Core.@enum.DataType.UInt16:
                                     Value = BitConverter.ToUInt16(R(addressData.addressName, 2), 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Int:
+                                case Core.@enum.DataType.Int32:
                                     Value = BitConverter.ToInt32(R(addressData.addressName, 4), 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Uint:
+                                case Core.@enum.DataType.UInt32:
                                     Value = BitConverter.ToUInt32(R(addressData.addressName, 4), 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Long:
+                                case Core.@enum.DataType.Int64:
                                     Value = BitConverter.ToInt64(R(addressData.addressName, 8), 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Ulong:
+                                case Core.@enum.DataType.UInt64:
                                     Value = BitConverter.ToUInt64(R(addressData.addressName, 8), 0).ToString();
                                     break;
                                 case Core.@enum.DataType.Double:
@@ -869,7 +868,6 @@ namespace YSAI.Mitsubishi
                                     Value = $"不支持{item.AddressDataType}类型批量读取";
                                     break;
                             }
-                            //}
                         }
                     }
                     //数据处理
@@ -903,6 +901,15 @@ namespace YSAI.Mitsubishi
         /// 实现订阅功能
         /// </summary>
         private SubscribeOperate subscribeOperate;
+        /// <summary>
+        /// 事件抛出
+        /// </summary>
+        /// <param name="sender">自定义订阅对象</param>
+        /// <param name="e">返回的参数</param>
+        private void SubscribeOperate_OnEvent(object? sender, EventResult e)
+        {
+            OnEventHandler(this, e);
+        }
         public OperateResult Subscribe(Address address)
         {
             string SN = Depart("Subscribe");
@@ -937,16 +944,6 @@ namespace YSAI.Mitsubishi
             }
         }
 
-        /// <summary>
-        /// 事件抛出
-        /// </summary>
-        /// <param name="sender">自定义订阅对象</param>
-        /// <param name="e">返回的参数</param>
-        private void SubscribeOperate_OnEvent(object? sender, EventResult e)
-        {
-            OnEventHandler(this, e);
-        }
-
         public Task<OperateResult> SubscribeAsync(Address address)
         {
             return Task.Run(() => Subscribe(address));

+ 13 - 0
src/YSAI.DAQ/YSAI.Mitsubishi/Properties/PublishProfiles/FolderProfile.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project>
+  <PropertyGroup>
+    <Configuration>Release</Configuration>
+    <Platform>Any CPU</Platform>
+    <PublishDir>..\YSAI.Publish\Release\net6.0\</PublishDir>
+    <PublishProtocol>FileSystem</PublishProtocol>
+    <_TargetId>Folder</_TargetId>
+  </PropertyGroup>
+</Project>

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

@@ -13,7 +13,7 @@
 	</PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
 </Project>

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

@@ -15,7 +15,7 @@
 	<ItemGroup>
     <PackageReference Include="NModbus" Version="3.0.81" />
     <PackageReference Include="NModbus.Serial" Version="3.0.81" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
 	<!--<ItemGroup>

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

@@ -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.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
 	<!--<ItemGroup>

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

@@ -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.80" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
 	</ItemGroup>
 </Project>

+ 27 - 0
src/YSAI.DAQ/YSAI.Omron.Pack/Program.cs

@@ -0,0 +1,27 @@
+using YSAI.Unility;
+
+namespace YSAI.Omron.Pack
+{
+    internal class Program
+    {
+        static void Main(string[] args)
+        {
+            string FileDirectory = string.Empty;
+            string[] paths = AppDomain.CurrentDomain.BaseDirectory.Split('\\');
+            for (int i = 0; i < paths.Length - 5; i++)
+            {
+                FileDirectory += $"{paths[i]}//";
+            }
+            FileDirectory += "YSAI.Manage//param";
+            string Name = "YSAI.Omron";
+            string ParamFile = $"{FileDirectory}//{Name}.Param.json";
+            string ParamDetailsFile = $"{FileDirectory}//{Name}.ParamDetails.json";
+            if (!Directory.Exists(FileDirectory))
+            {
+                Directory.CreateDirectory(FileDirectory);
+            }
+            FileTool.StringToFile(ParamFile, new OmronData.Basics().ToJson().JsonFormatting());
+            FileTool.StringToFile(ParamDetailsFile, ReflexTool.GetClassAllPropertyData<OmronData.Basics>().ToJson().JsonFormatting());
+        }
+    }
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 16 - 0
src/YSAI.DAQ/YSAI.Omron.Pack/YSAI.Omron.Pack.csproj


+ 197 - 0
src/YSAI.DAQ/YSAI.Omron/OmronData.cs

@@ -0,0 +1,197 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel;
+using YSAI.Core.attribute;
+using YSAI.Core.@enum;
+using YSAI.Core.subscription;
+using YSAI.Unility;
+
+namespace YSAI.Omron
+{
+    /// <summary>
+    /// 欧姆龙PLC数据
+    /// </summary>
+    public class OmronData
+    {
+        /// <summary>
+        /// 基础数据
+        /// </summary>
+        public class Basics : SubscribeData.SCData
+        {
+            /// <summary>
+            /// 唯一标识符
+            /// </summary>
+            [Description("唯一标识符")]
+            public string? SN { get; set; } = Guid.NewGuid().ToUpperNString();
+
+            /// <summary>
+            /// ip地址
+            /// </summary>
+            [Description("IP")]
+            [Verify(@"^(25[0-4]|2[0-4]\\d]|[01]?\\d{2}|[1-9])\\.(25[0-5]|2[0-4]\\d]|[01]?\\d?\\d)\\.(25[0-5]|2[0-4]\\d]|[01]?\\d?\\d)\\.(25[0-4]|2[0-4]\\d]|[01]?\\d{2}|[1-9])$", "输入有误")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            public string? Ip { get; set; } = "127.0.0.1";
+
+            /// <summary>
+            /// 端口
+            /// </summary>
+            [Description("端口")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            public int Port { get; set; } = 6688;
+
+            /// <summary>
+            /// 是否需要断开重新连接
+            /// </summary>
+            [Description("是否需要断开重新连接")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.radio)]
+            public bool InterruptReconnection { get; set; } = true;
+
+            /// <summary>
+            /// 重连间隔(毫秒)
+            /// </summary>
+            [Description("重连间隔")]
+            [Unit("ms")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            public int ReconnectionInterval { get; set; } = 2000;
+
+            /// <summary>
+            /// 超时时间
+            /// </summary>
+            [Description("超时时间")]
+            [Unit("ms")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            public int Timeout { get; set; } = 1000;
+
+            /// <summary>
+            /// DA2(即Destination unit address,目标单元地址)
+            /// 0x00:PC(CPU),
+            /// 0xFE:SYSMAC NET Link Unit or SYSMAC LINK Unit connected to network,
+            /// 0x10~0x1F:CPU总线单元 ,其值等于10 + 单元号(前端面板中配置的单元号)
+            /// </summary>
+            [Description("目标单元地址")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            public byte UnitAddress { get; set; } = 0x00;
+
+            /// <summary>
+            /// SA1客户端节点编号,
+            /// SA1源节点编号,取值及含义同DA1字段
+            /// </summary>
+            [Description("SA1客户端节点编号")]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            public byte SA1 { get; set; } = 0x0B;
+
+            /// <summary>
+            /// 协议类型
+            /// </summary>
+            [Description("协议类型")]
+            [JsonConverter(typeof(StringEnumConverter))]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.select)]
+            public pType PType { get; set; } = pType.Fins;
+
+            /// <summary>
+            /// 数据大小端
+            /// </summary>
+            [Description("数据大小端")]
+            [JsonConverter(typeof(StringEnumConverter))]
+            [Display(true, true, true, Core.data.ParamStructure.dataCate.select)]
+            public eFormat EFormat { get; set; } = eFormat.CDAB;
+
+        }
+
+        /// <summary>
+        /// 大小端
+        /// </summary>
+        public enum eFormat
+        {
+            /// <summary>
+            /// Big-Endian
+            /// 大端序 ABCD
+            /// </summary>
+            [Description("大端序ABCD")]
+            ABCD = 0,
+            /// <summary>
+            /// Big-endian byte swap(大端Byte swap)
+            /// 中端序 BADC, PDP-11 风格
+            /// </summary>
+            [Description("中端序BADC")]
+            BADC = 1,
+            /// <summary>
+            /// Little-endian byte swap(小端Byte swap)
+            /// 中端序 CDAB, Honeywell 316 风格
+            /// </summary>
+            [Description("中端序CDAB")]
+            CDAB = 2,
+            /// <summary>
+            /// Little-Endian
+            /// 小端序 DCBA
+            /// </summary>
+            [Description("小端序DCBA")]
+            DCBA = 3,
+        }
+
+        /// <summary>
+        /// 协议类型
+        /// </summary>
+        public enum pType
+        {
+            /// <summary>
+            /// 欧姆龙FINS
+            /// </summary>
+            [Description("欧姆龙FINS")]
+            Fins
+        }
+
+        /// <summary>
+        /// Omron解析后的地址信息
+        /// </summary>
+        public class ADetails
+        {
+            /// <summary>
+            /// 开始地址
+            /// </summary>
+            public int BeginAddress { get; set; }
+
+            /// <summary>
+            /// 类型的代号
+            /// </summary>
+            public string TypeChar { get; set; }
+
+            /// <summary>
+            /// 位操作
+            /// </summary>
+            public byte BitCode { get; set; }
+
+            /// <summary>
+            /// 字操作
+            /// </summary>
+            public byte WordCode { get; set; }
+
+            /// <summary>
+            /// 位操作 解析地址
+            /// </summary>
+            public byte[] BitAddress { get; set; }
+
+            /// <summary>
+            /// 是否是bit
+            /// </summary>
+            public bool IsBit { set; get; }
+            /// <summary>
+            /// 数据类型
+            /// </summary>
+            public DataType DataType { get; set; }
+        }
+
+        /// <summary>
+        /// 只用于连续读取的返回参数
+        /// </summary>
+        public class RetValue
+        {
+            /// <summary>
+            /// 地址
+            /// </summary>
+            public string? Address { get; set; }
+
+            public string? Value { get; set; }
+        }
+    }
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1083 - 0
src/YSAI.DAQ/YSAI.Omron/OmronOperate.cs


+ 13 - 0
src/YSAI.DAQ/YSAI.Omron/Properties/PublishProfiles/FolderProfile.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project>
+  <PropertyGroup>
+    <Configuration>Release</Configuration>
+    <Platform>Any CPU</Platform>
+    <PublishDir>..\YSAI.Publish\Release\net6.0\</PublishDir>
+    <PublishProtocol>FileSystem</PublishProtocol>
+    <_TargetId>Folder</_TargetId>
+  </PropertyGroup>
+</Project>

+ 19 - 0
src/YSAI.DAQ/YSAI.Omron/YSAI.Omron.csproj

@@ -0,0 +1,19 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+	<PropertyGroup>
+		<TargetFramework>net6.0</TargetFramework>
+		<ImplicitUsings>enable</ImplicitUsings>
+		<Nullable>enable</Nullable>
+		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
+		<Version>1.0.0.1</Version>
+		<Authors>Shun</Authors>
+		<Company>YSAI</Company>
+		<Product>SCADA</Product>
+		<GenerateDocumentationFile>True</GenerateDocumentationFile>
+	</PropertyGroup>
+
+	<ItemGroup>
+		<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
+	</ItemGroup>
+
+</Project>

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

@@ -13,7 +13,7 @@
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="OPCFoundation.NetStandard.Opc.Ua" Version="1.4.372.76" />
-	<PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+	<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
 

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

@@ -14,7 +14,7 @@
 
   <ItemGroup>
     <PackageReference Include="RabbitMQ.Client" Version="6.6.0" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
   <ItemGroup>

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

@@ -9,7 +9,7 @@
 	<ItemGroup>
 		<PackageReference Include="RabbitMQ.Client" Version="6.6.0" />
 		<PackageReference Include="Confluent.Kafka" Version="2.3.0" />
-		<PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+		<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
 		<FrameworkReference Include="Microsoft.AspNetCore.App" />
 	</ItemGroup>
 

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

@@ -14,7 +14,7 @@
 
 	<ItemGroup>
     <PackageReference Include="S7netplus" Version="0.20.0" />
-    <PackageReference Include="YSAI.Core" Version="1.0.0.80" />
+    <PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
 	<!--<ItemGroup>

+ 48 - 39
src/YSAI.DAQ/YSAI.Test.All/Program.cs

@@ -1,42 +1,51 @@
-using System.Collections.Concurrent;
-using YSAI.Core.data;
-using YSAI.Log;
-using YSAI.Mitsubishi;
-using YSAI.Unility;
-
-MitsubishiOperate mitsubishiOperate = MitsubishiOperate.Instance(new MitsubishiData.Basics
-{
-    Ip = "127.0.0.1",
-    Port = 1111,
-    DType = MitsubishiData.DevType.A1E
-});
-LogHelper.Debug(mitsubishiOperate.On().Message);
-
-while (true)
-{
-    double value = new Random().NextDouble();
-    LogHelper.Debug(value.ToString());
-    LogHelper.Debug(mitsubishiOperate.Write(new System.Collections.Concurrent.ConcurrentDictionary<string, string> 
-    {
-        ["M100"] = "aaaaaaaaaaaaaaaaaaaaaa",
-    }).State.ToString());
-
-
-    LogHelper.Debug(mitsubishiOperate.Read(new YSAI.Core.data.Address 
-    {
-        AddressArray=new List<YSAI.Core.data.AddressDetails> 
-        {
-            new YSAI.Core.data.AddressDetails
-            {
-                AddressName="M100,100",
-                AddressDataType=YSAI.Core.@enum.DataType.String
-            }
-        }
-    }).RData.ToJson());
-
-
-    Console.ReadLine();
-}
+
+
+
+using YSAI.Omron;
+
+OmronOperate omronOperate = OmronOperate.Instance(new OmronData.Basics { Ip = "127.0.0.1", Port = 1111 });
+omronOperate.On();
+
+
+//using System.Collections.Concurrent;
+//using YSAI.Core.data;
+//using YSAI.Log;
+//using YSAI.Mitsubishi;
+//using YSAI.Unility;
+
+//MitsubishiOperate mitsubishiOperate = MitsubishiOperate.Instance(new MitsubishiData.Basics
+//{
+//    Ip = "127.0.0.1",
+//    Port = 1111,
+//    PType = MitsubishiData.pType.A1E
+//});
+//LogHelper.Debug(mitsubishiOperate.On().Message);
+
+//while (true)
+//{
+//    double value = new Random().NextDouble();
+//    LogHelper.Debug(value.ToString());
+//    LogHelper.Debug(mitsubishiOperate.Write(new System.Collections.Concurrent.ConcurrentDictionary<string, string> 
+//    {
+//        ["M100"] = "aaaaaaaaaaaaaaaaaaaaaa",
+//    }).State.ToString());
+
+
+//    LogHelper.Debug(mitsubishiOperate.Read(new YSAI.Core.data.Address 
+//    {
+//        AddressArray=new List<YSAI.Core.data.AddressDetails> 
+//        {
+//            new YSAI.Core.data.AddressDetails
+//            {
+//                AddressName="M100,100",
+//                AddressDataType=YSAI.Core.@enum.DataType.String
+//            }
+//        }
+//    }).RData.ToJson());
+
+
+//    Console.ReadLine();
+//}
 
 
 

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

@@ -15,6 +15,7 @@
   <ItemGroup>
     <ProjectReference Include="..\YSAI.Beckhoff\YSAI.Beckhoff.csproj" />
     <ProjectReference Include="..\YSAI.Mitsubishi\YSAI.Mitsubishi.csproj" />
+    <ProjectReference Include="..\YSAI.Omron\YSAI.Omron.csproj" />
   </ItemGroup>
 
 

+ 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.80" />
+	<PackageReference Include="YSAI.Core" Version="1.0.0.81" />
   </ItemGroup>
 
   <ItemGroup>