大更新

This commit is contained in:
13118993771@163.com
2022-12-16 13:01:24 +08:00
parent b593a243a5
commit eb23e102b4
1279 changed files with 29652 additions and 1097632 deletions

View File

@@ -8,6 +8,9 @@
// + 创建 Command.S1F1.cs 文件. by Michael @2019/11/8 0:08
// ********************************************************************************
using ARI.EAP.HOST;
using Glorysoft.SECS.EQP.Utilities;
namespace Glorysoft.SECS.EQP.Commands
{
public static partial class Command
@@ -17,6 +20,8 @@ namespace Glorysoft.SECS.EQP.Commands
var trans = SimulatorInfo.Instance.Context.GetTransaction(1, 1, "S1F1");
trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}
}

View File

@@ -21,7 +21,7 @@ namespace Glorysoft.SECS.EQP.Commands
var trans = SimulatorInfo.Instance.Context?.GetTransaction(1, 13, "S1F13");
trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description,"=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -26,10 +26,10 @@ namespace Glorysoft.SECS.EQP.Commands
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
{
var trans = SimulatorInfo.Instance.Context.GetTransaction(1, 3, "S1F3");
var content = Configuration.conf.commandContentCollection.findContent("S1F3").content;
var content = Configurations.conf.commandContentCollection.findContent("S1F3").content;
foreach(string value in content)
{
var sv = Configuration.conf.sRDConfiguration.findSV(value);
var sv = Configurations.conf.sRDConfiguration.findSV(value);
if (sv != null)
{
trans.Primary.Root.Add(SECSUtil.CreateSECSItem(value, eSECS_FORMAT.U4, sv.svid));
@@ -37,7 +37,7 @@ namespace Glorysoft.SECS.EQP.Commands
}
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -24,12 +24,12 @@ namespace Glorysoft.SECS.EQP.Commands
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
{
var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 13, "S2F13");
foreach(var ec in Configuration.conf.sRDConfiguration.ecvs)
foreach(var ec in Configurations.conf.sRDConfiguration.ecvs)
{
trans.Primary.Root.Add(SECSUtil.CreateSECSItem(ec.name, eSECS_FORMAT.U4, ec.ecid));
}
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);

View File

@@ -35,17 +35,17 @@ namespace Glorysoft.SECS.EQP.Commands
ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECID), eSECS_FORMAT.U4, item.ECID));
ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECV), eSECS_FORMAT.U1, item.ECV));
trans.Primary.Root.Add(ec);
eCChangeBody.ECList.Add($"{item.ECID}({Configuration.conf.sRDConfiguration.findEC(item.ECID)})", item.ECV.ToString());
eCChangeBody.ECList.Add($"{item.ECID}({Configurations.conf.sRDConfiguration.findEC(item.ECID)})", item.ECV.ToString());
}
tag = eCChangeBody;
}
else
{
var content = Configuration.conf.commandContentCollection.findContent("S2F15_ControlState").content;
var content = Configurations.conf.commandContentCollection.findContent("S2F15_ControlState").content;
foreach (string value in content)
{
var ec = SECSUtil.CreateSECSItem(nameof(items.ECs), eSECS_FORMAT.LIST);
var ecv = Configuration.conf.sRDConfiguration.findEC(value);
var ecv = Configurations.conf.sRDConfiguration.findEC(value);
ec.Add(SECSUtil.CreateSECSItem(value, eSECS_FORMAT.U4, ecv.ecid));
trans.Primary.Root.Add(ec);
}
@@ -54,7 +54,7 @@ namespace Glorysoft.SECS.EQP.Commands
}
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -39,7 +39,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
catch (Exception e)

View File

@@ -45,14 +45,14 @@ namespace Glorysoft.SECS.EQP.Commands
}
else
{
foreach (var even in Configuration.conf.sRDConfiguration.events)
foreach (var even in Configurations.conf.sRDConfiguration.events)
{
var rpt = SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.LIST);
rpt.Add(SECSUtil.CreateSECSItem(nameof(even.reportid), eSECS_FORMAT.U4, even.reportid));
rpt.Add(SECSUtil.CreateSECSItem("SVList", eSECS_FORMAT.LIST));
foreach(var id in even.validVariables)
{
rpt.Item(2).Add(SECSUtil.CreateSECSItem(Configuration.conf.sRDConfiguration.tryGetSVOrDV(id), eSECS_FORMAT.U4, id));
rpt.Item(2).Add(SECSUtil.CreateSECSItem(Configurations.conf.sRDConfiguration.tryGetSVOrDV(id), eSECS_FORMAT.U4, id));
}
trans.Primary.Root.Item(2).Add(rpt);
}
@@ -61,9 +61,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans);
LoggerService.SECSLogger.Info(trans.Primary);
if (!EquipmentStatus.initStatus)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Delete Reports", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Delete Reports", 0);
else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Define Reports", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Define Reports", 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -44,7 +44,7 @@ namespace Glorysoft.SECS.EQP.Commands
}
else
{
foreach(var even in Configuration.conf.sRDConfiguration.events)
foreach(var even in Configurations.conf.sRDConfiguration.events)
{
var evt = SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.LIST);
evt.Add(SECSUtil.CreateSECSItem("CEID", eSECS_FORMAT.U4, even.ceid));
@@ -57,9 +57,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans);
if (!EquipmentStatus.initStatus)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Delete Link Report", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Delete Link Report", 0);
else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Define Link Report", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Define Link Report", 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -39,14 +39,14 @@ namespace Glorysoft.SECS.EQP.Commands
}
else
{
foreach (var even in Configuration.conf.sRDConfiguration.events)
foreach (var even in Configurations.conf.sRDConfiguration.events)
{
trans.Primary.Root.Item(2).Add(SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.U4, even.ceid));
}
}
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -41,9 +41,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans);
if (sc.CurrentStep == 10)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Reset Spooling", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Reset Spooling", 0);
else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Set Spooling", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Set Spooling", 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -34,9 +34,9 @@ namespace Glorysoft.SECS.EQP.Commands
param.Add(SECSUtil.CreateSECSItem(nameof(item.ParanName), eSECS_FORMAT.ASCII, item.ParanVal));
trans.Primary.Root.Item(4).Add(param);
}
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -29,9 +29,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans);
if (items.ALED == 0)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Alarm Disable", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Alarm Disable", 0);
else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Alarm Enable", "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, "Alarm Enable", 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -24,7 +24,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
catch(Exception e)

View File

@@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
}

View File

@@ -24,7 +24,7 @@ namespace Glorysoft.SECS.EQP.Commands
var trans = SimulatorInfo.Instance.Context.GetTransaction(7, 19, "S7F19");
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString());
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
}
catch(Exception e)