51 řádky
2.0 KiB
C#
51 řádky
2.0 KiB
C#
// ********************************************************************************
|
|
// 文件名字: Command.S6F23
|
|
// 文件描述: Command.S6F23
|
|
// 开发人员: Hupe
|
|
// 创建时间: 2021/4/14 16:12
|
|
//
|
|
// 更新历史:
|
|
// + 创建 Command.S6F23.cs 文件. by Hupe @2021/4/14 16:12
|
|
// ********************************************************************************
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using ARI.EAP.HOST;
|
|
using Glorysoft.SECS.EQP.Message;
|
|
using Glorysoft.SECS.EQP.Utilities;
|
|
using Glorysoft.SECSwell;
|
|
|
|
namespace Glorysoft.SECS.EQP.Commands
|
|
{
|
|
public static partial class Command
|
|
{
|
|
public static void S2F43Command(S2F43Item items, object tag = null)
|
|
{
|
|
|
|
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
|
|
{
|
|
var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 43, "S2F43");
|
|
var sc = tag as Scenario;
|
|
foreach (var item in items.Events)
|
|
{
|
|
var evt = SECSUtil.CreateSECSItem("", eSECS_FORMAT.LIST);
|
|
evt.Add(SECSUtil.CreateSECSItem(nameof(item.STRID), eSECS_FORMAT.U1, item.STRID));
|
|
evt.Add(SECSUtil.CreateSECSItem("", eSECS_FORMAT.LIST));
|
|
foreach (var evtid in item.EVENTIDs)
|
|
{
|
|
evt.Item(2).Add(SECSUtil.CreateSECSItem("", eSECS_FORMAT.U1, evtid));
|
|
}
|
|
trans.Primary.Root.Add(evt);
|
|
}
|
|
|
|
trans.Tag = tag;
|
|
SimulatorInfo.Instance.Context.SendMessage(trans);
|
|
|
|
if (sc.CurrentStep == 10)
|
|
Global.MF.addlog(trans, LoggerService.Send, "Reset Spooling", 0);
|
|
else
|
|
Global.MF.addlog(trans, LoggerService.Send, "Set Spooling", 0);
|
|
LoggerService.SECSLogger.Info(trans.Primary);
|
|
}
|
|
}
|
|
}
|
|
} |