SigStatTask.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Aitex.Core.Util;
  2. using athosRT.Devices.EFEM.ABS;
  3. using athosRT.Modules.EFEMs;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace athosRT.Devices.EFEM.Task
  10. {
  11. public class SigStatTask : CheckImp, ITask
  12. {
  13. public bool Execute(out string result, params string[] args)
  14. {
  15. string device = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty);
  16. if (device == null)
  17. {
  18. result = "PARAM_NG";
  19. return false;
  20. }
  21. if (!this.CheckIsPort(device) && device != "System")
  22. {
  23. result = "PARAM_NG";
  24. return false;
  25. }
  26. return this.Check<NoReadyPolicy>(device, out result) && this.Check<MaintenancePolicy>(device, out result) && this.Check<RemovePolicy>(device, out result);
  27. }
  28. public bool? Monitor(out string result, params string[] args)
  29. {
  30. result = string.Empty;
  31. string device = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty);
  32. if (args.Length != 0)
  33. {
  34. uint sigStatData1 = Singleton<EfemEntity>.Instance.GetSigStatData1(device);
  35. result = sigStatData1.ToString("X8");
  36. uint sigStatData2 = Singleton<EfemEntity>.Instance.GetSigStatData2(device);
  37. result = result + "/" + sigStatData2.ToString("X8");
  38. }
  39. return new bool?(true);
  40. }
  41. }
  42. }