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.

50 Zeilen
1.4 KiB

  1. using Glorysoft.SECS.EQP.Commands;
  2. using Glorysoft.SECS.EQP.Utilities;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Timers;
  9. namespace ARI.EAP.HOST.Common
  10. {
  11. public class S1F1HeartBit
  12. {
  13. public Timer timer1;
  14. public Timer timer2;
  15. public S1F1HeartBit()
  16. {
  17. timer1 = new Timer(60000);
  18. timer1.Elapsed += new ElapsedEventHandler(Method);
  19. timer1.AutoReset = true;
  20. timer1.Enabled = true;
  21. timer2 = new Timer(30000);
  22. timer2.Elapsed += new ElapsedEventHandler(Method1);
  23. timer2.AutoReset = false;
  24. timer2.Enabled = false;
  25. }
  26. public void Method(object source, ElapsedEventArgs e)
  27. {
  28. if (EquipmentStatus.S1F1FuntionStatus)
  29. {
  30. if (EquipmentStatus.EqConnectState.Equals(ConnectState.connected))
  31. {
  32. Command.S1F1Command(null);
  33. timer2.Stop();
  34. timer2.Start();
  35. }
  36. }
  37. }
  38. public void Method1(object source, ElapsedEventArgs e)
  39. {
  40. LoggerService.SYSLogger.Debug("未收到S1F2回复,判断设备与EAP已断连,开始重连...");
  41. EquipmentStatus.EqConnectState = ConnectState.connecting;
  42. Global.MF.pushBotton("Connect");
  43. }
  44. }
  45. }