QueryEventTask.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using athosRT.Devices.EFEM.ABS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace athosRT.Devices.EFEM.Task
  8. {
  9. public class QueryEventTask : CheckImp, ITask
  10. {
  11. public bool Execute(out string result, params string[] args)
  12. {
  13. string device = "System";
  14. if (!Enum.TryParse<EfemEventType>(args[0], out EfemEventType _))
  15. {
  16. result = "PARAM_NG";
  17. return false;
  18. }
  19. if (!Enum.TryParse<EfemEventValue>(args[1], out EfemEventValue _))
  20. {
  21. result = "PARAM_NG";
  22. return false;
  23. }
  24. return this.Check<NoReadyPolicy>(device, out result);
  25. }
  26. public bool? Monitor(out string result, params string[] args)
  27. {
  28. result = "ON";
  29. EfemEventType result1;
  30. Enum.TryParse<EfemEventType>(args[0], out result1);
  31. result = !((SystemServerModule)this.GetEntity("System")).IsEventEnabled(result1) ? string.Format("OFF") : string.Format("ON");
  32. return new bool?(true);
  33. }
  34. }
  35. }