This commit is contained in:
13118993771@163.com
2022-07-27 14:46:20 +08:00
parent 5e9d0f1e2d
commit b593a243a5
260 changed files with 88819 additions and 102277 deletions

View File

@@ -167,6 +167,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
item.DATAID = EquipmentStatus.commandCount++;
item.OBJSPEC = "";
item.RCMD = "Slotlist_Request";
//todo:需要加空的list
Command.S2F49Command(item);
}
@@ -184,7 +185,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
public static void UploadFile(JObject body = null)
{
long fileId = long.Parse(body["fileId"].ToString());
DownLoadFileParam downLoadFileParam = new DownLoadFileParam(fileId, Constants.eapName + ".xml", "1");
DownLoadFileParam downLoadFileParam = new DownLoadFileParam(fileId, Configuration.conf.connectSetting.name + ".xml", "1");
string param = SECSUtil.ObjectToGetParam(downLoadFileParam);
HttpWebResponse response = HttpUtils.sentGET(Configuration.conf.httpConfiguration.fileDownloadUrl, param);
if(response.StatusCode != HttpStatusCode.OK)

View File

@@ -40,6 +40,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
MQMessage mQMessage = new MQMessage();
mQMessage.header.messageName = "MachineData";
MachineDataBody machineDataBody = new MachineDataBody();
machineDataBody.machineDataName = "MachineData1";
machineDataBody.spoolingFlag = EquipmentStatus.SpoolingFlag.ToString();
int index = 1;
foreach (var key in even.validVariables)

View File

@@ -8,6 +8,7 @@
// + 创建 HSMSConnectedHandler.cs 文件. by Michael @2019/11/8 0:08
// ********************************************************************************
using ARI.EAP.HOST;
using ARI.EAP.HOST.Common;
using ARI.EAP.HOST.MQ;
using ARI.EAP.HOST.MQ.body;
using ARI.EAP.HOST.SRD;
@@ -28,7 +29,7 @@ namespace Glorysoft.SECS.EQP.Handlers
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{
SimulatorInfo.Instance.IsConnected = true;
Global.MF.ConnectStatusSet(true);
EquipmentStatus.EqConnectState = ConnectState.connected;
Scenario scenario = SimulatorInfo.Instance.Scenarios.Scenarios.FirstOrDefault(sc => sc.Name == "Init");
scenario.CurrentStep = 0;
scenario.ExecuteNextStep();

View File

@@ -8,6 +8,7 @@
// + 创建 HSMSDisconnectedHandler.cs 文件. by Michael @2019/11/8 0:08
// ********************************************************************************
using ARI.EAP.HOST;
using ARI.EAP.HOST.Common;
using ARI.EAP.HOST.MQ;
using ARI.EAP.HOST.MQ.body;
using ARI.EAP.HOST.SRD;
@@ -23,7 +24,7 @@ namespace Glorysoft.SECS.EQP.Handlers
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{
SimulatorInfo.Instance.IsConnected = false;
Global.MF.ConnectStatusSet(false);
EquipmentStatus.EqConnectState = ConnectState.disconnected;
}
}
}

View File

@@ -10,6 +10,7 @@
using ARI.EAP.HOST;
using ARI.EAP.HOST.MQ;
using ARI.EAP.HOST.MQ.body;
using ARI.EAP.HOST.SRD;
using Glorysoft.SECS.EQP.Common;
using Glorysoft.SECS.EQP.Message;
using Glorysoft.SECS.EQP.Utilities;
@@ -28,26 +29,53 @@ namespace Glorysoft.SECS.EQP.Handlers
MQMessage mQMessage = new MQMessage();
mQMessage.header.messageName = "SVList";
SVListBody sVListBody = new SVListBody();
sVListBody.eventTimestamp = trans.Secondary.Root.Item(1).Value.ToString();
trans.Secondary.Root.Item(1).Name = nameof(sVListBody.eventTimestamp);
sVListBody.CommunicationState = trans.Secondary.Root.Item(2).Value.ToString();
trans.Secondary.Root.Item(2).Name = nameof(sVListBody.CommunicationState);
sVListBody.ControlState = trans.Secondary.Root.Item(3).Value.ToString();
trans.Secondary.Root.Item(3).Name = nameof(sVListBody.ControlState);
sVListBody.PreviousControlState = trans.Secondary.Root.Item(4).Value.ToString();
trans.Secondary.Root.Item(4).Name = nameof(sVListBody.PreviousControlState);
sVListBody.CurrentEquipmentState = trans.Secondary.Root.Item(5).Value.ToString();
trans.Secondary.Root.Item(5).Name = nameof(sVListBody.CurrentEquipmentState);
sVListBody.PreviousEquipmentState = trans.Secondary.Root.Item(6).Value.ToString();
trans.Secondary.Root.Item(6).Name = nameof(sVListBody.PreviousEquipmentState);
sVListBody.PPExecName = trans.Secondary.Root.Item(7).Value.ToString();
trans.Secondary.Root.Item(7).Name = nameof(sVListBody.PPExecName);
sVListBody.SpoolingState = trans.Secondary.Root.Item(8).Value.ToString();
trans.Secondary.Root.Item(8).Name = nameof(sVListBody.SpoolingState);
sVListBody.SpoolCountActual = trans.Secondary.Root.Item(9).Value.ToString();
trans.Secondary.Root.Item(9).Name = nameof(sVListBody.SpoolCountActual);
sVListBody.SpoolCountTotal = trans.Secondary.Root.Item(10).Value.ToString();
trans.Secondary.Root.Item(10).Name = nameof(sVListBody.SpoolCountTotal);
var content = Configuration.conf.commandContentCollection.findContent("S1F3").content;
for(int i = 0; i < content.Count; i++)
{
switch (content[i])
{
case "Clock":
sVListBody.eventTimestamp = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.eventTimestamp);
break;
case "CommunicationState":
trans.Secondary.Root.Item(i + 1).Name = nameof(sVListBody.CommunicationState);
sVListBody.ControlState = trans.Secondary.Root.Item(i + 1).Value.ToString();
break;
case "CurrentControlState":
sVListBody.ControlState = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.ControlState);
break;
case "PreviousControlState":
sVListBody.PreviousControlState = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.PreviousControlState);
break;
case "CurrentEquipmentState":
sVListBody.CurrentEquipmentState = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.CurrentEquipmentState);
break;
case "PreviousEquipmentState":
sVListBody.PreviousEquipmentState = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.PreviousEquipmentState);
break;
case "PPExecName":
sVListBody.PPExecName = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.PPExecName);
break;
case "SpoolingState":
sVListBody.SpoolingState = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.SpoolingState);
break;
case "SpoolCountActual":
sVListBody.SpoolCountActual = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.SpoolCountActual);
break;
case "SpoolCountTotal":
sVListBody.SpoolCountTotal = trans.Secondary.Root.Item(i+1).Value.ToString();
trans.Secondary.Root.Item(i+1).Name = nameof(sVListBody.SpoolCountTotal);
break;
}
}
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString());
LoggerService.SECSLogger.Info(trans.Secondary);