build: 10.9.22

This commit is contained in:
Diego
2025-07-07 15:10:06 +08:00
parent 2258f08555
commit 32fa833736
9 changed files with 19 additions and 10 deletions

View File

@@ -1,10 +1,11 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<PluginVersion>10.9.19</PluginVersion> <PluginVersion>10.9.22</PluginVersion>
<ProPluginVersion>10.9.19</ProPluginVersion> <ProPluginVersion>10.9.22</ProPluginVersion>
<AuthenticationVersion>2.9.9</AuthenticationVersion> <DefaultVersion>10.9.22</DefaultVersion>
<SourceGeneratorVersion>10.9.9</SourceGeneratorVersion> <AuthenticationVersion>2.9.12</AuthenticationVersion>
<SourceGeneratorVersion>10.9.12</SourceGeneratorVersion>
<NET8Version>8.0.17</NET8Version> <NET8Version>8.0.17</NET8Version>
<NET9Version>9.0.6</NET9Version> <NET9Version>9.0.6</NET9Version>
<SatelliteResourceLanguages>zh-Hans;en-US</SatelliteResourceLanguages> <SatelliteResourceLanguages>zh-Hans;en-US</SatelliteResourceLanguages>

View File

@@ -20,7 +20,7 @@ public class TaskSchedulerLoop
task.Start(); task.Start();
} }
} }
public bool Stoped => Tasks.All(a => !a.Enable);
public void Stop() public void Stop()
{ {
foreach (var task in Tasks) foreach (var task in Tasks)

View File

@@ -78,6 +78,7 @@ public abstract class BusinessBaseWithCacheAlarm : BusinessBaseWithCache
{ {
if (CurrentDevice?.Pause != false) if (CurrentDevice?.Pause != false)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (AlarmModelEnable) return; if (AlarmModelEnable) return;
// 如果业务属性的缓存为间隔上传,则不执行后续操作 // 如果业务属性的缓存为间隔上传,则不执行后续操作

View File

@@ -248,6 +248,7 @@ public abstract class BusinessBaseWithCacheInterval : BusinessBaseWithCache
{ {
if (CurrentDevice?.Pause != false) if (CurrentDevice?.Pause != false)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (!AlarmModelEnable) return; if (!AlarmModelEnable) return;
// 如果业务属性的缓存为间隔上传,则不执行后续操作 // 如果业务属性的缓存为间隔上传,则不执行后续操作
@@ -304,6 +305,7 @@ public abstract class BusinessBaseWithCacheInterval : BusinessBaseWithCache
{ {
if (CurrentDevice?.Pause != false) if (CurrentDevice?.Pause != false)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (!DevModelEnable) return; if (!DevModelEnable) return;
// 如果业务属性的缓存为间隔上传,则不执行后续操作 // 如果业务属性的缓存为间隔上传,则不执行后续操作
//if (_businessPropertyWithCacheInterval?.IsInterval != true) //if (_businessPropertyWithCacheInterval?.IsInterval != true)
@@ -324,6 +326,8 @@ public abstract class BusinessBaseWithCacheInterval : BusinessBaseWithCache
if (CurrentDevice?.Pause != false) if (CurrentDevice?.Pause != false)
return; return;
if (!VarModelEnable) return; if (!VarModelEnable) return;
if (TaskSchedulerLoop.Stoped) return;
// 如果业务属性的缓存为间隔上传,则不执行后续操作 // 如果业务属性的缓存为间隔上传,则不执行后续操作
//if (_businessPropertyWithCacheInterval?.IsInterval != true) //if (_businessPropertyWithCacheInterval?.IsInterval != true)
{ {

View File

@@ -248,6 +248,7 @@ public class ModbusSlave : BusinessBase
{ {
if (CurrentDevice?.Pause != false) if (CurrentDevice?.Pause != false)
return; return;
if (TaskSchedulerLoop.Stoped) return;
var address = variableRuntime.GetPropertyValue(DeviceId, nameof(_variablePropertys.ServiceAddress)); var address = variableRuntime.GetPropertyValue(DeviceId, nameof(_variablePropertys.ServiceAddress));
if (address != null && variableRuntime.Value != null) if (address != null && variableRuntime.Value != null)
{ {

View File

@@ -219,6 +219,7 @@ public class OpcDaMaster : CollectBase
{ {
if (CurrentDevice.Pause) if (CurrentDevice.Pause)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (DisposedValue) if (DisposedValue)
return; return;
LogMessage?.Trace($"{ToString()} Change:{Environment.NewLine} {values?.ToSystemTextJsonString()}"); LogMessage?.Trace($"{ToString()} Change:{Environment.NewLine} {values?.ToSystemTextJsonString()}");
@@ -227,6 +228,7 @@ public class OpcDaMaster : CollectBase
{ {
if (CurrentDevice.Pause) if (CurrentDevice.Pause)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (DisposedValue) if (DisposedValue)
return; return;
var type = data.Value.GetType(); var type = data.Value.GetType();
@@ -240,6 +242,7 @@ public class OpcDaMaster : CollectBase
{ {
if (CurrentDevice.Pause) if (CurrentDevice.Pause)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (DisposedValue) if (DisposedValue)
return; return;
var value = data.Value; var value = data.Value;

View File

@@ -363,12 +363,9 @@ public class OpcUaMaster : CollectBase
return; return;
if (DisposedValue) if (DisposedValue)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (CurrentDevice.Pause)
{
return;
}
LogMessage?.Trace($"Change: {Environment.NewLine} {data.monitoredItem.StartNodeId} : {data.jToken?.ToString()}"); LogMessage?.Trace($"Change: {Environment.NewLine} {data.monitoredItem.StartNodeId} : {data.jToken?.ToString()}");
@@ -390,6 +387,7 @@ public class OpcUaMaster : CollectBase
return; return;
if (DisposedValue) if (DisposedValue)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (isGood) if (isGood)
{ {

View File

@@ -397,6 +397,7 @@ public partial class OpcUaServer : BusinessBase
{ {
if (CurrentDevice.Pause) if (CurrentDevice.Pause)
return; return;
if (TaskSchedulerLoop.Stoped) return;
if (DisposedValue) return; if (DisposedValue) return;
if (IdVariableRuntimes.ContainsKey(variableData.Id)) if (IdVariableRuntimes.ContainsKey(variableData.Id))
CollectVariableRuntimes.AddOrUpdate(variableData.Id, id => variableData, (id, addValue) => variableData); CollectVariableRuntimes.AddOrUpdate(variableData.Id, id => variableData, (id, addValue) => variableData);

View File

@@ -1,6 +1,6 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>10.9.19</Version> <Version>$(DefaultVersion)</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>