using Aitex.Core.RT.Device; using Aitex.Sorter.Common; using athosRT.Devices.EFEM.ABS; using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts.LoadPortBase; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace athosRT.Devices.EFEM.Task { public class SetModeTask : CheckImp, ITask { public bool Execute(out string result, params string[] args) { string str = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty); IServerModule entity = this.GetEntity(str); if (entity == null || !(entity is LoadPortServerModule)) { result = "PARAM_NG"; return false; } return this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result) && this.Check(str, out result); } public bool? Monitor(out string result, params string[] args) { result = string.Empty; LoadPortBaseDevice device = DEVICE.GetDevice(this.Args2Unit(args.Length != 0 ? args[0] : string.Empty)); if (device.IsError) return new bool?(false); return !device.IsBusy && device.ClampState == FoupClampState.Close ? new bool?(true) : new bool?(); } } }