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 SetModeTask : CheckImp, ITask { public SetModeTask() { } 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) && !(entity is SystemServerModule))) { result = PARAM_NG; return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(device, out result)) { return false; } if (!Check(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(device); if (_device.Error) { return false; } return true; } } public class QueryModeTask : CheckImp, ITask { public QueryModeTask() { } public bool Execute(out string result, params string[] args) { string device = DeviceName.System; if (!Check(device, out result)) { return false; } return true; } public bool? Monitor(out string result, params string[] args) { result = string.Empty; result = "AUTO"; return true; } } }