using Aitex.Core.RT.Device; using Aitex.Core.Util; using EFEM.RT.Devices; using MECF.Framework.Common.Equipment; namespace EFEM.RT.Tasks { public class UserDefineTask : CheckImp, ITask { public UserDefineTask() { HasInfoMessage = false; } public bool Execute(out string result, params string[] args) { result = string.Empty; if (args.Length < 2) { result = PARAM_NG; return false; } if(args[0].StartsWith("LL")) { if(!LoadLockDevice.IsIdle) { result = "BUSY"; return false; } if(args[1] == "AtmDoor") { if(args[2] == "1") LoadLockDevice.OpenAtmDoor(out result); else LoadLockDevice.CloseAtmDoor(out result); } else if (args[1] == "VtmDoor") { if (args[2] == "1") LoadLockDevice.OpenVtmDoor(out result); else LoadLockDevice.CloseVtmDoor(out result); } } return true; } public bool? Monitor(out string result, params string[] args) { result = ""; if (args[0].StartsWith("LL")) { if(LoadLockDevice.IsIdle) { if (DeviceDefineManager.Instance.GetValue("LLDoorControlByStation") ?? false) { Singleton.Instance.SendSigStatEvent(ModuleName.LL1); } return true; } } else { return true; } return null; } } }