44 行
1.8 KiB
C#
44 行
1.8 KiB
C#
// ********************************************************************************
|
|
// 文件名字: Command.S2F49
|
|
// 文件描述: Command.S2F49
|
|
// 开发人员: Hupe
|
|
// 创建时间: 2021/4/14 16:12
|
|
//
|
|
// 更新历史:
|
|
// + 创建 Command.S2F49.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 S2F49Command(S2F49Item items, object tag = null)
|
|
{
|
|
|
|
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
|
|
{
|
|
var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 49, "S2F49");
|
|
trans.Primary.Root.Item(1).SetValue(eSECS_FORMAT.U4, items.DATAID);
|
|
trans.Primary.Root.Item(2).SetValue(eSECS_FORMAT.ASCII, items.OBJSPEC);
|
|
trans.Primary.Root.Item(3).SetValue(eSECS_FORMAT.ASCII, items.RCMD);
|
|
foreach (var item in items.PARAMS)
|
|
{
|
|
var param = SECSUtil.CreateSECSItem("", eSECS_FORMAT.LIST);
|
|
param.Add(SECSUtil.CreateSECSItem(nameof(item.ParanName), eSECS_FORMAT.ASCII, item.ParanName));
|
|
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(trans, LoggerService.Send, trans.Primary.Description, 0);
|
|
LoggerService.SECSLogger.Info(trans.Primary);
|
|
}
|
|
}
|
|
}
|
|
} |