51 righe
1.7 KiB
C#
51 righe
1.7 KiB
C#
// ********************************************************************************
|
|
// 文件名字: S6F11Handler
|
|
// 文件描述: S6F11Handler
|
|
// 开发人员: Michael
|
|
// 创建时间: 2019/11/8 0:08
|
|
//
|
|
// 更新历史:
|
|
// + 创建 S6F11Handler.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;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using ARI.EAP.HOST;
|
|
using ARI.EAP.HOST.MQ;
|
|
using ARI.EAP.HOST.MQ.body;
|
|
using ARI.EAP.HOST.Common;
|
|
using System.Threading.Tasks;
|
|
using ARI.EAP.HOST.SRD;
|
|
|
|
namespace Glorysoft.SECS.EQP.Handlers
|
|
{
|
|
public class S6F11Handler : ISECSMessageHandler
|
|
{
|
|
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
|
|
{
|
|
try
|
|
{
|
|
SECSMessage primary = trans.Primary;
|
|
context.ReplyMessage(trans);
|
|
//int CEID = (int)primary.Root.Item(2).Value;
|
|
uint CEID = (uint)primary.Root.Item(2).Value;
|
|
var even = Configurations.conf.sRDConfiguration.findEvent(CEID);
|
|
string eventName = even.name;
|
|
var handlerName = $"{eventName}Handler";
|
|
if (EquipmentStatus.EventHandlers.ContainsKey(handlerName))
|
|
{
|
|
EquipmentStatus.EventHandlers[handlerName].Execute(trans, even);
|
|
}
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
LoggerService.SECSLogger.Error(e);
|
|
}
|
|
}
|
|
}
|
|
} |