diff --git a/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2 b/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2
index a450895..9aafe37 100644
Binary files a/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2 and b/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/.vs/IoTGateway/v17/.futdcache.v1 b/.vs/IoTGateway/v17/.futdcache.v1
index 60dbb8c..0a3723c 100644
Binary files a/.vs/IoTGateway/v17/.futdcache.v1 and b/.vs/IoTGateway/v17/.futdcache.v1 differ
diff --git a/.vs/IoTGateway/v17/.suo b/.vs/IoTGateway/v17/.suo
index 8a3dfd9..2a92701 100644
Binary files a/.vs/IoTGateway/v17/.suo and b/.vs/IoTGateway/v17/.suo differ
diff --git a/.vs/IoTGateway/v17/fileList.bin b/.vs/IoTGateway/v17/fileList.bin
index 69751f8..5f4e96c 100644
Binary files a/.vs/IoTGateway/v17/fileList.bin and b/.vs/IoTGateway/v17/fileList.bin differ
diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs
index ef3b146..e8e121c 100644
--- a/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs
+++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs
@@ -12,7 +12,7 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVMs
public class CopyVM : BaseVM
{
public string 设备名称 { get; set; }
- public uint 复制数量 { get; set; } = 20;
+ public uint 复制数量 { get; set; } = 1;
public string 复制结果 { get; set; }
public void Copy()
diff --git a/IoTGateway/Quickstarts.ReferenceClient.Config.xml b/IoTGateway/Quickstarts.ReferenceClient.Config.xml
deleted file mode 100644
index bbf98d0..0000000
--- a/IoTGateway/Quickstarts.ReferenceClient.Config.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
- Quickstart Console Reference Client
- urn:localhost:UA:Quickstarts:ReferenceClient
- uri:opcfoundation.org:Quickstarts:ReferenceClient
- Client_1
-
-
-
-
-
- Directory
- %LocalApplicationData%/OPC Foundation/pki/own
- CN=Console Reference Client, C=US, S=Arizona, O=OPC Foundation, DC=localhost
-
-
-
-
- Directory
- %LocalApplicationData%/OPC Foundation/pki/issuer
-
-
-
-
- Directory
- %LocalApplicationData%/OPC Foundation/pki/trusted
-
-
-
-
- Directory
- %LocalApplicationData%/OPC Foundation/pki/rejected
-
-
-
- false
-
-
-
-
-
-
- 600000
- 1048576
- 1048576
- 65535
- 4194304
- 65535
- 300000
- 3600000
-
-
-
- 60000
-
- opc.tcp://{0}:4840
- http://{0}:52601/UADiscovery
- http://{0}/UADiscovery/Default.svc
-
-
- 10000
-
-
-
-
-
-
- %LocalApplicationData%/OPC Foundation/Logs/Quickstarts.ReferenceClient.log.txt
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/IoTGateway/Startup.cs b/IoTGateway/Startup.cs
index 4ca1a61..af19d44 100644
--- a/IoTGateway/Startup.cs
+++ b/IoTGateway/Startup.cs
@@ -1,12 +1,16 @@
using System;
using System.Collections.Generic;
+using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Razor;
+using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options;
using MQTTnet.AspNetCore;
using MQTTnet.AspNetCore.Extensions;
@@ -84,8 +88,29 @@ namespace IoTGateway
{
IconFontsHelper.GenerateIconFont();
+ var pvd = new StaticFileOptions
+ {
+ FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot")),
+ RequestPath = new PathString(""),
+ //设置不限制content-type 该设置可以下载所有类型的文件,但是不建议这么设置,因为不安全
+ //下面设置可以下载apk和nupkg类型的文件
+ ContentTypeProvider = new FileExtensionContentTypeProvider(new Dictionary
+ {
+ { ".html", "text/html" },
+ { ".glb", "model/gltf-binary" },
+ { ".js", "application/javascript" },
+ { ".css", "text/css" },
+ { ".wasm", "application/wasm" },
+ { ".png", "image/png" },
+ { ".woff", "application/font-woff" },
+ { ".woff2", "application/font-woff" },
+ { ".ico", "image/x-icon" },
+ })
+ };
+
+
app.UseExceptionHandler(configs.CurrentValue.ErrorHandler);
- app.UseStaticFiles();
+ app.UseStaticFiles(pvd);
app.UseWtmStaticFiles();
app.UseRouting();
app.UseWtmMultiLanguages();
diff --git a/IoTGateway/iotgateway.db b/IoTGateway/iotgateway.db
index d63865c..9238dc0 100644
Binary files a/IoTGateway/iotgateway.db and b/IoTGateway/iotgateway.db differ
diff --git a/Plugins/Plugin/DeviceThread.cs b/Plugins/Plugin/DeviceThread.cs
index f374e92..8b559ff 100644
--- a/Plugins/Plugin/DeviceThread.cs
+++ b/Plugins/Plugin/DeviceThread.cs
@@ -88,7 +88,7 @@ namespace Plugin
{
try
{
- ret.CookedValue = interpreter.Eval(DealMysqlStr(item.Expressions).Replace("raw", ret.Value.ToString()));
+ ret.CookedValue = interpreter.Eval(DealMysqlStr(item.Expressions).Replace("raw", ret.Value?.ToString()));
}
catch (Exception)
{
diff --git a/Plugins/Plugin/MyMqttClient.cs b/Plugins/Plugin/MyMqttClient.cs
index d140ded..3ef6c01 100644
--- a/Plugins/Plugin/MyMqttClient.cs
+++ b/Plugins/Plugin/MyMqttClient.cs
@@ -79,10 +79,10 @@ namespace Plugin
{
foreach (var kv in payload.Values)
{
- _mqttClient.PublishAsync($"{TopicBase}/{device.DeviceName}/{kv.Key}", kv.Value.ToString());
+ _mqttClient.PublishAsync($"{TopicBase}/{device.DeviceName}/{kv.Key}", kv.Value?.ToString());
//更新到UAService
- _uaNodeManager.UpdateNode($"{device.Parent.DeviceName}_{device.DeviceName}_{kv.Key}", kv.Value);
+ _uaNodeManager.UpdateNode($"{device.Parent.DeviceName}.{device.DeviceName}.{kv.Key}", kv.Value);
}
}
}
diff --git a/Plugins/Plugin/UA.Server/ReferenceNodeManager.cs b/Plugins/Plugin/UA.Server/ReferenceNodeManager.cs
index d821ff3..c3a3b08 100644
--- a/Plugins/Plugin/UA.Server/ReferenceNodeManager.cs
+++ b/Plugins/Plugin/UA.Server/ReferenceNodeManager.cs
@@ -2788,7 +2788,7 @@ namespace Quickstarts.ReferenceServer
{
//先把变量加进去,都用float有瑕疵,属性先不做,
- CreateIoTGatewayVariable(staticFolder, $"{group.DeviceName}_{device.DeviceName}_{variable.Name}", $"{variable.Name}", DataTypeIds.Float, ValueRanks.Scalar);
+ CreateIoTGatewayVariable(staticFolder, $"{group.DeviceName}.{device.DeviceName}.{variable.Name}", $"{variable.Name}", DataTypeIds.Float, ValueRanks.Scalar);
}
}
}
diff --git a/drivers/net5.0/DriverModbusMaster.dll b/drivers/net5.0/DriverModbusMaster.dll
index ac6c033..ae7a28b 100644
Binary files a/drivers/net5.0/DriverModbusMaster.dll and b/drivers/net5.0/DriverModbusMaster.dll differ
diff --git a/drivers/net5.0/DriverModbusMaster.pdb b/drivers/net5.0/DriverModbusMaster.pdb
index 5de12cf..4c9b74b 100644
Binary files a/drivers/net5.0/DriverModbusMaster.pdb and b/drivers/net5.0/DriverModbusMaster.pdb differ
diff --git a/drivers/net5.0/DriverOPCUaClient.dll b/drivers/net5.0/DriverOPCUaClient.dll
index fdf14d2..21096dc 100644
Binary files a/drivers/net5.0/DriverOPCUaClient.dll and b/drivers/net5.0/DriverOPCUaClient.dll differ
diff --git a/drivers/net5.0/DriverOPCUaClient.pdb b/drivers/net5.0/DriverOPCUaClient.pdb
index b523b7b..e231bbd 100644
Binary files a/drivers/net5.0/DriverOPCUaClient.pdb and b/drivers/net5.0/DriverOPCUaClient.pdb differ
diff --git a/drivers/net5.0/DriverSiemensS7.dll b/drivers/net5.0/DriverSiemensS7.dll
index ca3eb59..3693f75 100644
Binary files a/drivers/net5.0/DriverSiemensS7.dll and b/drivers/net5.0/DriverSiemensS7.dll differ
diff --git a/drivers/net5.0/DriverSiemensS7.pdb b/drivers/net5.0/DriverSiemensS7.pdb
index 4d16c5a..f1edb20 100644
Binary files a/drivers/net5.0/DriverSiemensS7.pdb and b/drivers/net5.0/DriverSiemensS7.pdb differ
diff --git a/drivers/net5.0/PluginInterface.dll b/drivers/net5.0/PluginInterface.dll
index e073547..18d9e33 100644
Binary files a/drivers/net5.0/PluginInterface.dll and b/drivers/net5.0/PluginInterface.dll differ
diff --git a/drivers/net5.0/PluginInterface.pdb b/drivers/net5.0/PluginInterface.pdb
index 78af26b..2578aec 100644
Binary files a/drivers/net5.0/PluginInterface.pdb and b/drivers/net5.0/PluginInterface.pdb differ
diff --git a/drivers/net5.0/ref/DriverModbusMaster.dll b/drivers/net5.0/ref/DriverModbusMaster.dll
index 5a47474..ef6793c 100644
Binary files a/drivers/net5.0/ref/DriverModbusMaster.dll and b/drivers/net5.0/ref/DriverModbusMaster.dll differ
diff --git a/drivers/net5.0/ref/DriverOPCUaClient.dll b/drivers/net5.0/ref/DriverOPCUaClient.dll
index 0b28687..d5414f3 100644
Binary files a/drivers/net5.0/ref/DriverOPCUaClient.dll and b/drivers/net5.0/ref/DriverOPCUaClient.dll differ
diff --git a/drivers/net5.0/ref/DriverSiemensS7.dll b/drivers/net5.0/ref/DriverSiemensS7.dll
index 4382e3b..019ffbc 100644
Binary files a/drivers/net5.0/ref/DriverSiemensS7.dll and b/drivers/net5.0/ref/DriverSiemensS7.dll differ
diff --git a/iotgateway.db b/iotgateway.db
index d63865c..9238dc0 100644
Binary files a/iotgateway.db and b/iotgateway.db differ