优化数据传输
This commit is contained in:
parent
c261efcb07
commit
c4d5c8a41c
@ -7,6 +7,8 @@
|
|||||||
<SatelliteResourceLanguages>zh-Hans,en</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>zh-Hans,en</SatelliteResourceLanguages>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
<ServerGarbageCollection>false</ServerGarbageCollection>
|
||||||
|
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
||||||
<!--<PlatformTarget>x86</PlatformTarget>-->
|
<!--<PlatformTarget>x86</PlatformTarget>-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ namespace Plugin
|
|||||||
if (Device.AutoStart)
|
if (Device.AutoStart)
|
||||||
{
|
{
|
||||||
_logger.LogInformation($"线程已启动:{Device.DeviceName}");
|
_logger.LogInformation($"线程已启动:{Device.DeviceName}");
|
||||||
|
Task.Delay(8000);
|
||||||
|
|
||||||
if (Device.DeviceVariables != null)
|
if (Device.DeviceVariables != null)
|
||||||
{
|
{
|
||||||
@ -79,7 +80,7 @@ namespace Plugin
|
|||||||
{
|
{
|
||||||
foreach (var item in Device.DeviceVariables.OrderBy(x => x.Index))
|
foreach (var item in Device.DeviceVariables.OrderBy(x => x.Index))
|
||||||
{
|
{
|
||||||
Thread.Sleep((int)Device.CmdPeriod);
|
Task.Delay((int)Device.CmdPeriod);
|
||||||
|
|
||||||
var ret = new DriverReturnValueModel();
|
var ret = new DriverReturnValueModel();
|
||||||
var ioarg = new DriverAddressIoArgModel
|
var ioarg = new DriverAddressIoArgModel
|
||||||
@ -188,7 +189,7 @@ namespace Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Thread.Sleep((int)Driver.MinPeriod);
|
Task.Delay((int)Driver.MinPeriod);
|
||||||
}
|
}
|
||||||
}, TaskCreationOptions.LongRunning);
|
}, TaskCreationOptions.LongRunning);
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
<ServerGarbageCollection>false</ServerGarbageCollection>
|
||||||
|
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DynamicExpresso.Core" Version="2.13.0" />
|
<PackageReference Include="DynamicExpresso.Core" Version="2.13.0" />
|
||||||
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
|
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
|
||||||
<PackageReference Include="MQTTnet" Version="4.1.1.318" />
|
<PackageReference Include="MQTTnet" Version="4.1.1.318" />
|
||||||
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="1.4.370.12" />
|
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="1.4.370.12" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\IoTGateway.DataAccess\IoTGateway.DataAccess.csproj" />
|
<ProjectReference Include="..\..\IoTGateway.DataAccess\IoTGateway.DataAccess.csproj" />
|
||||||
<ProjectReference Include="..\..\IoTGateway.Model\IoTGateway.Model.csproj" />
|
<ProjectReference Include="..\..\IoTGateway.Model\IoTGateway.Model.csproj" />
|
||||||
<ProjectReference Include="..\Drivers\DriverModbusMaster\DriverModbusMaster.csproj" />
|
<ProjectReference Include="..\Drivers\DriverModbusMaster\DriverModbusMaster.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user