添加Keys文件夹
This commit is contained in:
@@ -19,7 +19,7 @@ public static class SchemeHelper
|
||||
|
||||
public static string GetOrCreate()
|
||||
{
|
||||
var path = "SchemeKey";
|
||||
var path = "Keys/SchemeKey.txt";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
var data = File.ReadAllText(path);
|
||||
@@ -28,6 +28,7 @@ public static class SchemeHelper
|
||||
else
|
||||
{
|
||||
var data = DateTime.UtcNow.ToDefaultDateTimeFormat();
|
||||
Directory.CreateDirectory("Keys");
|
||||
File.WriteAllText(path, data);
|
||||
return data;
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ public abstract class BusinessBaseWithCacheAlarm : BusinessBaseWithCache
|
||||
{
|
||||
if (CurrentDevice?.Pause != false)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
|
||||
if (AlarmModelEnable) return;
|
||||
// 如果业务属性的缓存为间隔上传,则不执行后续操作
|
||||
|
@@ -248,7 +248,7 @@ public abstract class BusinessBaseWithCacheInterval : BusinessBaseWithCache
|
||||
{
|
||||
if (CurrentDevice?.Pause != false)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
|
||||
if (!AlarmModelEnable) return;
|
||||
// 如果业务属性的缓存为间隔上传,则不执行后续操作
|
||||
@@ -305,7 +305,7 @@ public abstract class BusinessBaseWithCacheInterval : BusinessBaseWithCache
|
||||
{
|
||||
if (CurrentDevice?.Pause != false)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
if (!DevModelEnable) return;
|
||||
// 如果业务属性的缓存为间隔上传,则不执行后续操作
|
||||
//if (_businessPropertyWithCacheInterval?.IsInterval != true)
|
||||
@@ -326,7 +326,7 @@ public abstract class BusinessBaseWithCacheInterval : BusinessBaseWithCache
|
||||
if (CurrentDevice?.Pause != false)
|
||||
return;
|
||||
if (!VarModelEnable) return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
|
||||
// 如果业务属性的缓存为间隔上传,则不执行后续操作
|
||||
//if (_businessPropertyWithCacheInterval?.IsInterval != true)
|
||||
|
@@ -49,11 +49,10 @@ public class SiemensS7Test
|
||||
}
|
||||
|
||||
});
|
||||
await Task.Delay(100);
|
||||
bytes[12] = (byte)(((IClientChannel)(siemensS7Master.Channel)).WaitHandlePool.GetValue("m_currentSign").ToInt() - 1);
|
||||
var task2 = Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(100).ConfigureAwait(false);
|
||||
bytes[12] = (byte)(((IClientChannel)(siemensS7Master.Channel)).WaitHandlePool.GetValue("m_currentSign").ToInt() - 1);
|
||||
foreach (var item in bytes)
|
||||
{
|
||||
var data = new ByteBlock([item]);
|
||||
|
@@ -248,7 +248,7 @@ public class ModbusSlave : BusinessBase
|
||||
{
|
||||
if (CurrentDevice?.Pause != false)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
var address = variableRuntime.GetPropertyValue(DeviceId, nameof(_variablePropertys.ServiceAddress));
|
||||
if (address != null && variableRuntime.Value != null)
|
||||
{
|
||||
|
@@ -219,7 +219,7 @@ public class OpcDaMaster : CollectBase
|
||||
{
|
||||
if (CurrentDevice.Pause)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
if (DisposedValue)
|
||||
return;
|
||||
LogMessage?.Trace($"{ToString()} Change:{Environment.NewLine} {values?.ToSystemTextJsonString()}");
|
||||
@@ -228,7 +228,7 @@ public class OpcDaMaster : CollectBase
|
||||
{
|
||||
if (CurrentDevice.Pause)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
if (DisposedValue)
|
||||
return;
|
||||
var type = data.Value.GetType();
|
||||
@@ -242,7 +242,7 @@ public class OpcDaMaster : CollectBase
|
||||
{
|
||||
if (CurrentDevice.Pause)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
if (DisposedValue)
|
||||
return;
|
||||
var value = data.Value;
|
||||
|
@@ -363,7 +363,7 @@ public class OpcUaMaster : CollectBase
|
||||
return;
|
||||
if (DisposedValue)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ public class OpcUaMaster : CollectBase
|
||||
return;
|
||||
if (DisposedValue)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
|
||||
if (isGood)
|
||||
{
|
||||
|
@@ -397,7 +397,7 @@ public partial class OpcUaServer : BusinessBase
|
||||
{
|
||||
if (CurrentDevice.Pause)
|
||||
return;
|
||||
if (TaskSchedulerLoop?.Stoped==true) return;
|
||||
if (TaskSchedulerLoop?.Stoped == true) return;
|
||||
if (DisposedValue) return;
|
||||
if (IdVariableRuntimes.ContainsKey(variableData.Id))
|
||||
CollectVariableRuntimes.AddOrUpdate(variableData.Id, id => variableData, (id, addValue) => variableData);
|
||||
|
Reference in New Issue
Block a user