dc/Handlers/S2F34Handler.cs
13118993771@163.com eb23e102b4 大更新
2022-12-16 13:01:24 +08:00

45 regels
1.5 KiB
C#

// ********************************************************************************
// 文件名字: S2F34Handler
// 文件描述: S2F34Handler
// 开发人员: Michael
// 创建时间: 2019/11/8 0:08
//
// 更新历史:
// + 创建 S2F34Handler.cs 文件. by Michael @2019/11/8 0:08
// ********************************************************************************
using Glorysoft.SECS.EQP.Common;
using Glorysoft.SECS.EQP.Message;
using Glorysoft.SECS.EQP.Utilities;
using Glorysoft.SECSwell;
using System.Linq;
using System.Threading;
using System;
using ARI.EAP.HOST;
using ARI.EAP.HOST.Common;
namespace Glorysoft.SECS.EQP.Handlers
{
public class S2F34Handler : ISECSMessageHandler
{
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{
var sc = trans.Tag as Scenario;
if(!EquipmentStatus.initStatus)
Global.MF.addlog(trans, LoggerService.Receive, "Delete Report", 1);
else
Global.MF.addlog(trans, LoggerService.Receive, "Define Report", 1);
LoggerService.SECSLogger.Info(trans.Secondary);
EquipmentStatus.initStatus = true;
SECSMessage reply = trans.Secondary;
S2F34Item item = new S2F34Item();
item.DRACK = reply.Root.Value.To<byte[]>().FirstOrDefault();
if (trans.Tag != null)
{
var scenario = trans.Tag as Scenario;
Thread.Sleep(500);
scenario.ExecuteNextStep();
}
}
}
}