dc/Commands/Command.S5F3.cs

39 lines
1.4 KiB
C#
Raw Permalink Normal View History

2022-04-01 17:03:54 +08:00
// ********************************************************************************
// 文件名字: Command.S5F3
// 文件描述: Command.S5F3
// 开发人员: Michael
// 创建时间: 2019/11/8 0:08
//
// 更新历史:
// + 创建 Command.S5F3.cs 文件. by Michael @2019/11/8 0:08
// ********************************************************************************
using ARI.EAP.HOST;
using Glorysoft.SECS.EQP.Message;
using Glorysoft.SECS.EQP.Utilities;
using Glorysoft.SECSwell;
using System;
namespace Glorysoft.SECS.EQP.Commands
{
public partial class Command
{
public static void S5F3Command(S5F3Item items, object tag = null)
{
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
{
var trans = SimulatorInfo.Instance.Context.GetTransaction(5, 3, "S5F3");
trans.Primary.Root.Item(1).SetValue(eSECS_FORMAT.BINARY, items.ALED);
trans.Primary.Root.Item(2).SetValue(eSECS_FORMAT.U4,items.ALID);
trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans);
if (items.ALED == 0)
2022-12-16 13:01:24 +08:00
Global.MF.addlog(trans, LoggerService.Send, "Alarm Disable", 0);
2022-04-01 17:03:54 +08:00
else
2022-12-16 13:01:24 +08:00
Global.MF.addlog(trans, LoggerService.Send, "Alarm Enable", 0);
2022-04-01 17:03:54 +08:00
LoggerService.SECSLogger.Info(trans.Primary);
}
}
}
}