123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- using Aitex.Core.RT.Device;
- using Aitex.Sorter.Common;
- using Aitex.Sorter.RT.EFEMs.Servers;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts;
- namespace Aitex.Sorter.RT.EFEMs.Tasks
- {
- public class SetTransferTask : CheckImp, ITask
- {
- public SetTransferTask()
- {
- }
- public bool Execute(out string result, params string[] args)
- {
- string device = Args2Unit(args.Length > 0 ?args[0]:string.Empty);
- IServerModule entity = GetEntity(device);
- if (entity == null || !(entity is LoadPortServerModule))
- {
- result = PARAM_NG;
- return false;
- }
- if (!Check<NoReadyPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<BusyPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<RemovePolicy>(device, out result))
- {
- return false;
- }
- if (!Check<MaintenancePolicy>(device, out result))
- {
- return false;
- }
- if (!Check<LinkPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<NoFuncPolicy>(device, out result))
- {
- return false;
- }
-
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- string device = Args2Unit(args.Length > 0 ?args[0]:string.Empty);
- LoadPort _device = DEVICE.GetDevice<LoadPort>(device);
- if (_device.Error)
- {
- flag3 = ErrorCheckList3.INTERNAL;
- return CheckError(device, out result);
- }
- if (!_device.IsBusy && _device.ClampState == FoupClampState.Close)
- return true;
- return null;
- }
- }
- public class QueryTransferTask : CheckImp, ITask
- {
- public QueryTransferTask()
- {
- }
- public bool Execute(out string result, params string[] args)
- {
- string device = DeviceName.System;
- //EfemEventType type;
- //if (!Enum.TryParse(args[0], out type))
- //{
- // result = PARAM_NG;
- // return false;
- //}
- //EfemEventValue value;
- //if (!Enum.TryParse(args[1], out value))
- //{
- // result = PARAM_NG;
- // return false;
- //}
- if (!Check<NoReadyPolicy>(device, out result))
- {
- return false;
- }
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- result = "LOAD";
- //EfemEventType type;
- //Enum.TryParse(args[0], out type);
- //SystemEntity entity = (SystemEntity)GetEntity(DeviceName.System);
- //if (entity.QueryEvent(type))
- // result = string.Format("ON");
- //else
- // result = string.Format("OFF");
- return true;
- }
- }
- }
|