using Aitex.Core.Common; using Aitex.Core.UI.MVVM; using Aitex.Core.Util; using Aitex.Sorter.Common; using MECF.Framework.Common.OperationCenter; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; using MECF.Framework.Common.Equipment; namespace Aitex.Sorter.UI.Controls { public class EFEMBase : ViewModelControl { [Subscription(ParamName.CassetteState, DeviceName.LP1)] public LoadportCassetteState LPACassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP1)] public FoupDoorState LPADoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP2)] public LoadportCassetteState LPBCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP2)] public FoupDoorState LPBDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP3)] public LoadportCassetteState LPCCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP3)] public FoupDoorState LPCDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP4)] public LoadportCassetteState LPDCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP4)] public FoupDoorState LPDDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP5)] public LoadportCassetteState LPECassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP5)] public FoupDoorState LPEDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP6)] public LoadportCassetteState LPFCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP6)] public FoupDoorState LPFDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP7)] public LoadportCassetteState LPGCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP7)] public FoupDoorState LPGDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP8)] public LoadportCassetteState LPHCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP8)] public FoupDoorState LPHDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP9)] public LoadportCassetteState LPICassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP9)] public FoupDoorState LPIDoorState { get; set; } [Subscription(ParamName.CassetteState, DeviceName.LP10)] public LoadportCassetteState LPJCassetteState { get; set; } [Subscription(ParamName.FoupDoorState, DeviceName.LP10)] public FoupDoorState LPJDoorState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP1)] public bool LP1IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP2)] public bool LP2IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP3)] public bool LP3IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP4)] public bool LP4IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP5)] public bool LP5IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP6)] public bool LP6IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP7)] public bool LP7IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP8)] public bool LP8IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP9)] public bool LP9IsDockState { get; set; } [Subscription(ParamName.IsDocked, DeviceName.LP10)] public bool LP10IsDockState { get; set; } [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer)] public WaferInfo[] BufferWafers { get; set; } public WaferInfo BufferWafer { get { if (BufferWafers != null) { return BufferWafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer1)] public WaferInfo[] Buffer1Wafers { get; set; } public WaferInfo Buffer1Wafer { get { if (Buffer1Wafers != null) { return Buffer1Wafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.Aligner)] public WaferInfo[] AlignerWafers { get; set; } [Subscription(ParamName.ModuleWaferList, DeviceName.Aligner2)] public WaferInfo[] Aligner2Wafers { get; set; } public WaferInfo AlignerWafer { get { if (AlignerWafers != null) { return AlignerWafers[0]; } else { return null; } } } public WaferInfo Aligner2Wafer { get { if (Aligner2Wafers != null) { return Aligner2Wafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.LL1)] public WaferInfo[] LL1Wafers { get; set; } public WaferInfo Loadlock1Wafer { get { if (LL1Wafers != null) { return LL1Wafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.LL2)] public WaferInfo[] LL2Wafers { get; set; } public WaferInfo Loadlock2Wafer { get { if (LL2Wafers != null) { return LL2Wafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.LL3)] public WaferInfo[] LL3Wafers { get; set; } public WaferInfo Loadlock3Wafer { get { if (LL3Wafers != null) { return LL3Wafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.LL4)] public WaferInfo[] LL4Wafers { get; set; } public WaferInfo Loadlock4Wafer { get { if (LL4Wafers != null) { return LL4Wafers[0]; } else { return null; } } } [Subscription(ParamName.ModuleWaferList, DeviceName.TurnOverStation)] public WaferInfo[] TurnOverStationWafers { get; set; } public WaferInfo TurnOverStationWafer { get { if (TurnOverStationWafers != null) { return TurnOverStationWafers[0]; } else { return null; } } } public ICommand DeviceOperationCommand { get; private set; } public ICommand WaferTransferOptionCommand { get; set; } private WaferInfo[] robotWafers; [Subscription(ParamName.ModuleWaferList, DeviceName.Robot)] public WaferInfo[] RobotWafers { get { return robotWafers; } set { robotWafers = value; RobotWafer1 = value[0]; RobotWafer2 = value[1]; } } public WaferInfo RobotWafer1 { get; set; } public WaferInfo RobotWafer2 { get; set; } [Subscription(ParamName.RobotBlade1Traget, DeviceName.Robot)] public ModuleName RobotBladeTarget { get; set; } [Subscription(ParamName.RobotBlade2Traget, DeviceName.Robot)] public ModuleName RobotBlade2Target { get; set; } public virtual Dictionary StationPosition { get; } public EFEMBase() { DeviceOperationCommand = new DelegateCommand(DeviceOperation); WaferTransferOptionCommand = new DelegateCommand(DoWaferTransferOption); } protected virtual void DoWaferTransferOption(WaferTransferOption obj) { } void DeviceOperation(object param) { InvokeClient.Instance.Service.DoOperation(OperationName.DeviceOperation.ToString(), (object[])param); } } }