You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 line
2.0 KiB

  1. // ********************************************************************************
  2. // 文件名字: Command.S6F23
  3. // 文件描述: Command.S6F23
  4. // 开发人员: Hupe
  5. // 创建时间: 2021/4/14 16:12
  6. //
  7. // 更新历史:
  8. // + 创建 Command.S6F23.cs 文件. by Hupe @2021/4/14 16:12
  9. // ********************************************************************************
  10. using System;
  11. using System.Collections.Generic;
  12. using ARI.EAP.HOST;
  13. using Glorysoft.SECS.EQP.Message;
  14. using Glorysoft.SECS.EQP.Utilities;
  15. using Glorysoft.SECSwell;
  16. namespace Glorysoft.SECS.EQP.Commands
  17. {
  18. public static partial class Command
  19. {
  20. public static void S2F43Command(S2F43Item items, object tag = null)
  21. {
  22. if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
  23. {
  24. var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 43, "S2F43");
  25. var sc = tag as Scenario;
  26. foreach (var item in items.Events)
  27. {
  28. var evt = SECSUtil.CreateSECSItem("", eSECS_FORMAT.LIST);
  29. evt.Add(SECSUtil.CreateSECSItem(nameof(item.STRID), eSECS_FORMAT.U1, item.STRID));
  30. evt.Add(SECSUtil.CreateSECSItem("", eSECS_FORMAT.LIST));
  31. foreach (var evtid in item.EVENTIDs)
  32. {
  33. evt.Item(2).Add(SECSUtil.CreateSECSItem("", eSECS_FORMAT.U1, evtid));
  34. }
  35. trans.Primary.Root.Add(evt);
  36. }
  37. trans.Tag = tag;
  38. SimulatorInfo.Instance.Context.SendMessage(trans);
  39. if (sc.CurrentStep == 10)
  40. Global.MF.addlog(trans, LoggerService.Send, "Reset Spooling", 0);
  41. else
  42. Global.MF.addlog(trans, LoggerService.Send, "Set Spooling", 0);
  43. LoggerService.SECSLogger.Info(trans.Primary);
  44. }
  45. }
  46. }
  47. }