WaferInfo.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Runtime.Serialization;
  6. using System.Text;
  7. using MECF.Framework.Common.CommonData;
  8. using MECF.Framework.Common.Jobs;
  9. namespace Aitex.Core.Common
  10. {
  11. public enum WaferSize
  12. {
  13. WS0, //undefine, initialize status
  14. WS3,
  15. WS4,
  16. WS6,
  17. WS150, //150mm
  18. WS159, //150mm with tray
  19. WS8,
  20. WS12,
  21. }
  22. public enum WaferStatus
  23. {
  24. Empty = 0,
  25. Normal = 1,
  26. Crossed = 3,
  27. Double = 7,
  28. Unknown = 8,
  29. Dummy = 4
  30. }
  31. public enum EnumWaferProcessStatus
  32. {
  33. Idle = 0,
  34. InProcess,
  35. Completed,
  36. Failed,
  37. Wait,
  38. }
  39. public enum EnumWaferProcessResult
  40. {
  41. Unprocessed = 0,
  42. Warning,
  43. Alarm,
  44. Aborted,
  45. }
  46. [Obsolete("Do not use this enum, using EnumWaferProcessStatus instead")]
  47. public enum ProcessStatus
  48. {
  49. Idle = 0,
  50. Wait = 1,
  51. Busy = 2,
  52. Completed = 3,
  53. Failed = 4,
  54. }
  55. [Serializable]
  56. [DataContract]
  57. public class WaferInfo : NotifiableItem
  58. {
  59. public bool IsEmpty
  60. {
  61. get { return Status == WaferStatus.Empty; }
  62. }
  63. private string waferID;
  64. [DataMember]
  65. public string WaferID
  66. {
  67. get
  68. {
  69. return waferID;
  70. }
  71. set
  72. {
  73. waferID = value;
  74. InvokePropertyChanged("WaferID");
  75. }
  76. }
  77. private string _waferOrigin;
  78. [DataMember]
  79. public string WaferOrigin
  80. {
  81. get
  82. {
  83. return _waferOrigin;
  84. }
  85. set
  86. {
  87. _waferOrigin = value;
  88. InvokePropertyChanged("WaferOrigin");
  89. }
  90. }
  91. private string laserMarker;
  92. [DataMember]
  93. public string LaserMarker
  94. {
  95. get
  96. {
  97. return laserMarker;
  98. }
  99. set
  100. {
  101. laserMarker = value;
  102. InvokePropertyChanged("LaserMarker");
  103. }
  104. }
  105. private string t7Code;
  106. [DataMember]
  107. public string T7Code
  108. {
  109. get
  110. {
  111. return t7Code;
  112. }
  113. set
  114. {
  115. t7Code = value;
  116. InvokePropertyChanged("T7Code");
  117. }
  118. }
  119. [DataMember]
  120. public string LotId { get; set; }
  121. [DataMember]
  122. public string TransFlag { get; set; }
  123. private WaferStatus status;
  124. [DataMember]
  125. public WaferStatus Status
  126. {
  127. get
  128. {
  129. return status;
  130. }
  131. set
  132. {
  133. status = value;
  134. InvokePropertyChanged("Status");
  135. }
  136. }
  137. [DataMember]
  138. public int Station
  139. {
  140. get;
  141. set;
  142. }
  143. [DataMember]
  144. public int Slot
  145. {
  146. get;
  147. set;
  148. }
  149. [DataMember]
  150. public int OriginStation
  151. {
  152. get;
  153. set;
  154. }
  155. [DataMember]
  156. public int OriginSlot
  157. {
  158. get;
  159. set;
  160. }
  161. [DataMember]
  162. public string OriginCarrierID
  163. {
  164. get;
  165. set;
  166. }
  167. [DataMember]
  168. public int SourceStation
  169. {
  170. get;
  171. set;
  172. }
  173. [DataMember]
  174. public int SourceSlot
  175. {
  176. get;
  177. set;
  178. }
  179. [DataMember]
  180. public int DestinationStation
  181. {
  182. get;
  183. set;
  184. }
  185. [DataMember]
  186. public int DestinationSlot
  187. {
  188. get;
  189. set;
  190. }
  191. [DataMember]
  192. public int Notch
  193. {
  194. get;
  195. set;
  196. }
  197. [DataMember]
  198. public WaferSize Size
  199. {
  200. get;
  201. set;
  202. }
  203. [DataMember]
  204. public string SequenceName
  205. {
  206. get;
  207. set;
  208. }
  209. private EnumWaferProcessStatus processState;
  210. [DataMember]
  211. public EnumWaferProcessStatus ProcessState
  212. {
  213. get
  214. {
  215. return processState;
  216. }
  217. set
  218. {
  219. processState = value;
  220. InvokePropertyChanged("ProcessStatus");
  221. }
  222. }
  223. private bool isSource;
  224. [DataMember]
  225. public bool IsSource
  226. {
  227. get
  228. {
  229. return isSource;
  230. }
  231. set
  232. {
  233. isSource = value;
  234. InvokePropertyChanged("IsSource");
  235. }
  236. }
  237. private bool isDestination;
  238. [DataMember]
  239. public bool IsDestination
  240. {
  241. get
  242. {
  243. return isDestination;
  244. }
  245. set
  246. {
  247. isDestination = value;
  248. InvokePropertyChanged("IsDestination");
  249. }
  250. }
  251. [DataMember]
  252. public Guid InnerId { get; set; }
  253. [DataMember]
  254. public ProcessJobInfo ProcessJob { get; set; }
  255. [DataMember]
  256. public int NextSequenceStep { get; set; }
  257. public WaferInfo()
  258. {
  259. InnerId = Guid.Empty;
  260. }
  261. public WaferInfo(string waferID, WaferStatus status = WaferStatus.Empty) : this()
  262. {
  263. this.WaferID = waferID;
  264. this.Status = status;
  265. }
  266. public void Update(WaferInfo source)
  267. {
  268. InnerId = source.InnerId;
  269. WaferID = source.waferID;
  270. WaferOrigin = source.WaferOrigin;
  271. LaserMarker = source.LaserMarker;
  272. T7Code = source.T7Code;
  273. Status = source.Status;
  274. ProcessState = source.ProcessState;
  275. IsSource = source.IsSource;
  276. IsDestination = source.IsDestination;
  277. Station = source.Station;
  278. Slot = source.Slot;
  279. OriginStation = source.OriginStation;
  280. OriginSlot = source.OriginSlot;
  281. if(source.OriginCarrierID!=null) OriginCarrierID = source.OriginCarrierID;
  282. SourceStation = source.SourceStation;
  283. SourceSlot = source.SourceSlot;
  284. DestinationStation = source.DestinationStation;
  285. DestinationSlot = source.DestinationSlot;
  286. Notch = source.Notch;
  287. Size = source.Size;
  288. TransFlag = source.TransFlag;
  289. LotId = source.LotId;
  290. ProcessJob = source.ProcessJob;
  291. NextSequenceStep = source.NextSequenceStep;
  292. }
  293. public void SetEmpty()
  294. {
  295. this.InnerId = Guid.Empty;
  296. this.WaferID = string.Empty;
  297. this.WaferOrigin = string.Empty;
  298. this.LaserMarker = string.Empty;
  299. this.T7Code = string.Empty;
  300. this.Status = (int)WaferStatus.Empty;
  301. this.ProcessState = EnumWaferProcessStatus.Idle;
  302. this.IsSource = false;
  303. this.IsDestination = false;
  304. this.Station = 0;
  305. this.Slot = 0;
  306. this.OriginStation = 0;
  307. this.OriginSlot = 0;
  308. this.SourceStation = 0;
  309. this.SourceSlot = 0;
  310. this.DestinationStation = 0;
  311. this.DestinationSlot = 0;
  312. this.Notch = 0;
  313. //this.Size = WaferSize.WS0; //wafersize 保留最后的一次的记录
  314. this.TransFlag = string.Empty;
  315. this.LotId = string.Empty;
  316. this.ProcessJob = null;
  317. this.NextSequenceStep = 0;
  318. }
  319. }
  320. }