ClearErrorTask.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Aitex.Core.RT.Device;
  2. using athosRT.Devices.EFEM.ABS;
  3. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts.LoadPortBase;
  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 ClearErrorTask : CheckImp, ITask
  12. {
  13. public ClearErrorTask() => this.HasInfoMessage = false;
  14. public bool Execute(out string result, params string[] args)
  15. {
  16. string str = "System";
  17. if (!string.Equals(args[0], "CLEAR"))
  18. {
  19. result = "PARAM_NG";
  20. return false;
  21. }
  22. if (!this.Check<NoReadyPolicy>(str, out result) || !this.Check<MaintenancePolicy>(str, out result))
  23. return false;
  24. ((SystemServerModule)this.GetEntity(str)).ClearError();
  25. return true;
  26. }
  27. public bool? Monitor(out string result, params string[] args)
  28. {
  29. result = string.Empty;
  30. string str = "System";
  31. LoadPortBaseDevice device = DEVICE.GetDevice<LoadPortBaseDevice>(str);
  32. if (device != null && device.IsError)
  33. {
  34. this.flag3 = ErrorCheckList3.HARDWARE | ErrorCheckList3.INTERNAL;
  35. return new bool?(this.CheckError(str, out result));
  36. }
  37. return device == null || !device.IsBusy ? new bool?(true) : new bool?();
  38. }
  39. }
  40. }