58 line
2.1 KiB
C#
58 line
2.1 KiB
C#
// ********************************************************************************
|
|
// 文件名字: Command.S2F37
|
|
// 文件描述: Command.S2F37
|
|
// 开发人员: Michael
|
|
// 创建时间: 2019/11/8 0:08
|
|
//
|
|
// 更新历史:
|
|
// + 创建 Command.S2F37.cs 文件. by Michael @2019/11/8 0:08
|
|
// ********************************************************************************
|
|
|
|
using ARI.EAP.HOST;
|
|
using ARI.EAP.HOST.Common;
|
|
using ARI.EAP.HOST.SRD;
|
|
using Glorysoft.SECS.EQP.Message;
|
|
using Glorysoft.SECS.EQP.Utilities;
|
|
using Glorysoft.SECSwell;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Glorysoft.SECS.EQP.Commands
|
|
{
|
|
public partial class Command
|
|
{
|
|
public static void S2F37Command(S2F37Item items, object tag = null)
|
|
{
|
|
try
|
|
{
|
|
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
|
|
{
|
|
var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 37, "S2F37");
|
|
trans.Primary.Root.Item(1).Value = items.CEED;
|
|
var sc = tag as Scenario;
|
|
if (!EquipmentStatus.initStatus)
|
|
{
|
|
foreach (var item in items.CEIDs)
|
|
{
|
|
trans.Primary.Root.Item(2).Add(SECSUtil.CreateSECSItem("CEID", eSECS_FORMAT.U4, item));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
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(trans, LoggerService.Send, trans.Primary.Description, 0);
|
|
LoggerService.SECSLogger.Info(trans.Primary);
|
|
}
|
|
}
|
|
catch(Exception e) {
|
|
LoggerService.SECSLogger.Error(e);
|
|
}
|
|
}
|
|
}
|
|
} |