36 lignes
1.4 KiB
C#
36 lignes
1.4 KiB
C#
|
// ********************************************************************************
|
|||
|
// 文件名字: Command.S2F15
|
|||
|
// 文件描述: Command.S2F15
|
|||
|
// 开发人员: Michael
|
|||
|
// 创建时间: 2019/11/8 0:08
|
|||
|
//
|
|||
|
// 更新历史:
|
|||
|
// + 创建 Command.S2F15.cs 文件. by Michael @2019/11/8 0:08
|
|||
|
// ********************************************************************************
|
|||
|
|
|||
|
using Glorysoft.SECS.EQP.Message;
|
|||
|
using Glorysoft.SECS.EQP.Utilities;
|
|||
|
using Glorysoft.SECSwell;
|
|||
|
|
|||
|
namespace Glorysoft.SECS.EQP.Commands
|
|||
|
{
|
|||
|
public partial class Command
|
|||
|
{
|
|||
|
public static void S2F15CommandRcp(S2F15Item items, object tag = null)
|
|||
|
{
|
|||
|
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
|
|||
|
{
|
|||
|
var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 15, "S2F15");
|
|||
|
foreach (var item in items.ECs)
|
|||
|
{
|
|||
|
var ec = SECSUtil.CreateSECSItem(nameof(items.ECs), eSECS_FORMAT.LIST);
|
|||
|
ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECID), eSECS_FORMAT.U2, item.ECID));
|
|||
|
ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECV), item.ECV.GetSECS_FORMAT(), item.ECV));
|
|||
|
trans.Primary.Root.Add(ec);
|
|||
|
}
|
|||
|
trans.Tag = tag;
|
|||
|
SimulatorInfo.Instance.Context.SendMessage(trans);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|