dc/Handlers/S5F1Handler.cs
13118993771@163.com 5e9d0f1e2d EAP
2022-04-01 17:03:54 +08:00

37 rindas
1.4 KiB
C#

using Glorysoft.SECS.EQP.Common;
using Glorysoft.SECS.EQP.Message;
using Glorysoft.SECS.EQP.Utilities;
using Glorysoft.SECSwell;
using System;
using System.Collections.Generic;
namespace Glorysoft.SECS.EQP.Handlers
{
public class S5F1Handler : ISECSMessageHandler
{
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{
try
{
SECSMessage primary = trans.Primary;
var trans5 = context.GetTransaction(5, 1, "S5F1");
trans5.Secondary = primary;
context.ReplyMessage(trans);
//EQPController.Current.SendS1f3Param(context.Name);
//var trans13 = context.GetTransaction(1, 3, "S1F3");
//var s1f3item = new S1F3Item() { SVIDs = new List<ushort> { 1, 2, 3 } };
//foreach (var k in s1f3item.SVIDs)
//{
// trans13.Primary.Root.Add(SECSUtil.CreateSECSItem("SVID", eSECS_FORMAT.U2, k));
//}
//context.SendMessage(trans13);
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}=>回复EQP S5F1[{context.Name}]并发送S1f3");
}
catch (Exception ex)
{
LoggerService.SECSLogger.Error(ex.Message);
}
}
}
}