123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Runtime.Serialization;
- using Aitex.Core.Util;
- namespace Aitex.Core.Equipment.SusceptorDefine
- {
- [DataContract]
- public class Susceptor
- {
- [DataMember]
- public Guid Id { get; set; }
- [DataMember]
- public WaferStatus[] WaferStatusArray { get; set; }
- [DataMember]
- public WaferType[] WaferTypeArray { get; set; }
- [DataMember]
- public string Type { get; set; }
- [DataMember]
- public SusceptorConfig Config { get; set; }
- [DataMember]
- public SusceptorStatus Status { get; set; }
- [DataMember]
- public string RecipeName { get; set; }
- [DataMember]
- public string UserDefinedId { get; set; }
- [DataMember]
- public string Description { get; set; }
- [DataMember]
- public string ModuleProcessedIn { get; set; }
- [DataMember]
- public string ModuleBufferedIn { get; set; }
- [DataMember]
- public DateTime CreateTime { get; set; }
- [DataMember]
- public DateTime ProcessStartTime { get; set; }
- [DataMember]
- public DateTime ProcessEndTime { get; set; }
- [DataMember]
- public string TargetRecipe { get; set; }
- public Susceptor()
- {
- WaferStatusArray = new WaferStatus[150];
- WaferTypeArray = new WaferType[150];
- CreateTime = DateTime.Now;
- TargetRecipe = string.Empty;
- }
- public bool IsEmpty() { return Id == Guid.Empty; }
- public bool IsUnProcessed() { return (Id != Guid.Empty) && (Status == SusceptorStatus.Unprocessed); }
- /// <summary>
- ///
- /// Zone: 测量点旋转一周的轨迹
- /// Section:托盘上每一圈Pocket的轨迹
- ///
- /// 下面的辅助函数用于方便相互之间的转换
- ///
- /// </summary>
- public int[] GetZoneDisplayNumber(int zone)
- {
- if (zone >= GetZoneNameList().Length)
- return null;
- Section s = GetZoneSection(zone);
- if (s == null)
- return null;
- return GetSectionDisplayNumber(s.Name);
- }
- public Notch[] GetZoneNotch(int zone)
- {
- Section s = GetZoneSection(zone);
- if (s == null)
- return null;
- return GetSectionNotch(GetZoneSection(zone).Name);
- }
- Section GetZoneSection(int zone)
- {
- if (Config == null)
- return null;
- string[] ZoneName = GetZoneNameList();
- if (zone >= ZoneName.Length)
- return null;
- Zone z = Config.Zones.Find(x => x.Name == ZoneName[zone]);
- return Config.Sections.Find(x => x.Name == z.Section);
- }
- public string[] GetZoneNameList()
- {
- List<string> result = new List<string>();
- if (Config != null)
- foreach (var item in Config.Zones)
- result.Add(item.Name);
- return result.ToArray();
- }
- Notch[] GetSectionNotch(string section)
- {
- List<string> sectionName = new List<string>() { "A", "B", "C", "D" };
- int index = sectionName.FindIndex(x => x == section);
- int from = 0;
- for (int i = 0; i < index; i++)
- from += Config.Sections[i].NotchCount;
- return Config.Notches.GetRange(from, Config.Sections[index].NotchCount).ToArray();
- }
-
- int[] GetSectionDisplayNumber(string section)
- {
- Notch[] notches = GetSectionNotch(section);
- int[] result = new int[notches.Length];
- for (int i = 0; i < result.Length; i++)
- result[i] = notches[i].DisplayIndex;
- return result;
- }
- }
- }
|