SetEvent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 SetEventTask : CheckImp, ITask
  10. {
  11. public SetEventTask() => this.HasInfoMessage = false;
  12. public bool Execute(out string result, params string[] args)
  13. {
  14. string str = "System";
  15. EfemEventType result1;
  16. if (!Enum.TryParse<EfemEventType>(args[0], out result1))
  17. {
  18. result = "PARAM_NG";
  19. return false;
  20. }
  21. EfemEventValue result2;
  22. if (!Enum.TryParse<EfemEventValue>(args[1], out result2))
  23. {
  24. result = "PARAM_NG";
  25. return false;
  26. }
  27. if (!this.Check<NoReadyPolicy>(str, out result) || !this.Check<MaintenancePolicy>(str, out result))
  28. return false;
  29. ((SystemServerModule)this.GetEntity(str)).SetEvent(result1, result2);
  30. return true;
  31. }
  32. public bool? Monitor(out string result, params string[] args)
  33. {
  34. result = string.Empty;
  35. return new bool?(true);
  36. }
  37. }
  38. }