using Aitex.Core.RT.Device; using Aitex.Core.RT.Device.Unit; using Aitex.Sorter.Common; using Efem; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.SubstrateTrackings; using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts; using System; namespace EFEM.RT.Tasks { public class QueryStateTask : CheckImp, ITask { public QueryStateTask() { } public bool Execute(out string result, params string[] args) { string device = DeviceName.System; if (!(args[0] == "VER" || args[0] == "TRACK")) { result = PARAM_NG; return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } ///todo return true; } public bool? Monitor(out string result, params string[] args) { result = string.Empty; if(args.Length < 1) { return false; } if(args[0] == "VER") { string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); DateTime now = DateTime.Now; result = string.Format("{0}({1}-{2}-{3})", version, now.Year, now.Month, now.Day); return true; } else if(args[0] == "TRACK") { //000/111 upperArmWafer, lowerArmWafer, alignerWafer coolingwafer result += (WaferManager.Instance.CheckHasWafer(ModuleName.Robot, 1) ? "1" : "0"); result += (WaferManager.Instance.CheckHasWafer(ModuleName.Robot, 0) ? "1" : "0"); result += (WaferManager.Instance.CheckHasWafer(ModuleName.Aligner1, 0) ? "1" : "0"); result += (WaferManager.Instance.CheckHasWafer(ModuleName.Aligner2, 0) ? "1" : "0"); result += (WaferManager.Instance.CheckHasWafer(ModuleName.CoolingBuffer1, 0) ? "1" : "0"); result += (WaferManager.Instance.CheckHasWafer(ModuleName.CoolingBuffer2, 0) ? "1" : "0"); return true; } return true; } } }