Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

58 Zeilen
2.1 KiB

  1. // ********************************************************************************
  2. // 文件名字: Command.S2F37
  3. // 文件描述: Command.S2F37
  4. // 开发人员: Michael
  5. // 创建时间: 2019/11/8 0:08
  6. //
  7. // 更新历史:
  8. // + 创建 Command.S2F37.cs 文件. by Michael @2019/11/8 0:08
  9. // ********************************************************************************
  10. using ARI.EAP.HOST;
  11. using ARI.EAP.HOST.Common;
  12. using ARI.EAP.HOST.SRD;
  13. using Glorysoft.SECS.EQP.Message;
  14. using Glorysoft.SECS.EQP.Utilities;
  15. using Glorysoft.SECSwell;
  16. using System;
  17. using System.Collections.Generic;
  18. namespace Glorysoft.SECS.EQP.Commands
  19. {
  20. public partial class Command
  21. {
  22. public static void S2F37Command(S2F37Item items, object tag = null)
  23. {
  24. try
  25. {
  26. if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
  27. {
  28. var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 37, "S2F37");
  29. trans.Primary.Root.Item(1).Value = items.CEED;
  30. var sc = tag as Scenario;
  31. if (!EquipmentStatus.initStatus)
  32. {
  33. foreach (var item in items.CEIDs)
  34. {
  35. trans.Primary.Root.Item(2).Add(SECSUtil.CreateSECSItem("CEID", eSECS_FORMAT.U4, item));
  36. }
  37. }
  38. else
  39. {
  40. foreach (var even in Configurations.conf.sRDConfiguration.events)
  41. {
  42. trans.Primary.Root.Item(2).Add(SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.U4, even.ceid));
  43. }
  44. }
  45. trans.Tag = tag;
  46. SimulatorInfo.Instance.Context.SendMessage(trans);
  47. Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
  48. LoggerService.SECSLogger.Info(trans.Primary);
  49. }
  50. }
  51. catch(Exception e) {
  52. LoggerService.SECSLogger.Error(e);
  53. }
  54. }
  55. }
  56. }