12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- 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<NoReadyPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<MaintenancePolicy>(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;
- }
- }
- }
|