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

55 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#region << >>
/*----------------------------------------------------------------
* 创建者Hupe
* 创建时间2021/10/14 20:04:50
* 版本V1.0.0
* 描述:
*
* ----------------------------------------------------------------
* 修改人:
* 时间:
* 修改说明:
*
* 版本V1.0.1
*----------------------------------------------------------------*/
#endregion << >>
using ARI.EAP.HOST.Common;
using ARI.EAP.HOST.SRD;
using Glorysoft.SECS.EQP;
using Glorysoft.SECS.EQP.Common;
using Glorysoft.SECS.EQP.Utilities;
using Glorysoft.SECSwell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ARI.EAP.HOST.Handlers.EventHandlers
{
public class SpoolingDeactivatedHandler : IEventHandler
{
public void Execute(SECSTransaction trans, EVENT even)
{
try
{
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString());
LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString());
LoggerService.SECSLogger.Info(trans.Secondary);
Scenario scenario = SimulatorInfo.Instance.Scenarios.Scenarios.FirstOrDefault(sc => sc.Name == "Init");
if (scenario.CurrentStep == 8)
{
scenario.ExecuteNextStep();
}
EquipmentStatus.SpoolingFlag = 0;
}
catch(Exception e)
{
LoggerService.SECSLogger.Error(e);
}
}
}
}