CarrierInfo.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. using System;
  2. using System.Runtime.Serialization;
  3. using Aitex.Core.Common;
  4. using Aitex.Core.Util;
  5. using MECF.Framework.Common.CommonData;
  6. namespace MECF.Framework.Common.SubstrateTrackings
  7. {
  8. public enum ProcessJobStateEnum
  9. {
  10. pjCREATED = -1,
  11. pjQUEUED = 0,
  12. pjSETTING_UP = 1,
  13. pjWAITING_FOR_START = 2,
  14. pjPROCESSING = 3,
  15. pjPROCESS_COMPLETED = 4,
  16. pjRESERVED5 = 5,
  17. pjPAUSING = 6,
  18. pjPAUSED = 7,
  19. pjSTOPPING = 8,
  20. pjABORTING = 9,
  21. pjSTOPPED = 10,
  22. pjABORTED = 11,
  23. pjPROCESSJOB_COMPLETED = 12,
  24. }
  25. public enum CarrierStatus
  26. {
  27. Empty = 0,
  28. Normal = 1,
  29. }
  30. [Serializable]
  31. [DataContract]
  32. public class CarrierInfo:NotifiableItem
  33. {
  34. public bool IsEmpty
  35. {
  36. get { return Status == CarrierStatus.Empty; }
  37. }
  38. private CarrierStatus status;
  39. [DataMember]
  40. public CarrierStatus Status
  41. {
  42. get
  43. {
  44. return status;
  45. }
  46. set
  47. {
  48. status = value;
  49. InvokePropertyChanged(nameof(Status));
  50. }
  51. }
  52. [DataMember]
  53. public Guid InnerId { get; set; }
  54. [DataMember]
  55. public string Name { get; set; }
  56. public object ProcessJob;
  57. [DataMember]
  58. public string CarrierId { get; set; }
  59. [DataMember]
  60. public string Rfid { get; set; }
  61. [DataMember]
  62. public string LotId { get; set; }
  63. [DataMember]
  64. public string ProductCategory { get; set; }
  65. [DataMember]
  66. public WaferInfo[] Wafers { get; set; }
  67. [DataMember]
  68. public SerializableDictionary<string, bool> ProcessStatus { get; set; }
  69. [DataMember]
  70. public SerializableDictionary<string, string> Attributes { get; set; }
  71. [DataMember]
  72. public bool IsStart { get; set; }
  73. [DataMember]
  74. public DateTime LoadTime { get; set; }
  75. [DataMember]
  76. public string JobSelectedRecipeName { get; set; }
  77. [DataMember]
  78. public int Priority { get; set; }
  79. public T GetProcessJob<T>()
  80. {
  81. return (T)ProcessJob;
  82. }
  83. public bool IsProcessed(string module)
  84. {
  85. return ProcessStatus.ContainsKey(module) && ProcessStatus[module];
  86. }
  87. public bool IsProcessed( )
  88. {
  89. return false;
  90. }
  91. public void Clear()
  92. {
  93. this.Status = CarrierStatus.Empty;
  94. this.InnerId = Guid.Empty;
  95. this.ProcessJob = null;
  96. this.Name = "";
  97. this.IsStart = false;
  98. this.CarrierId = "";
  99. this.Rfid = "";
  100. this.JobSelectedRecipeName = "";
  101. this.LotId = "";
  102. this.ProductCategory = "";
  103. this.ProcessStatus = new SerializableDictionary<string, bool>();
  104. this.Attributes = new SerializableDictionary<string, string>();
  105. this.Priority = 0;
  106. }
  107. public CarrierInfo(int capacity)
  108. {
  109. Wafers = new WaferInfo[capacity];
  110. InnerId = Guid.Empty;
  111. Status = CarrierStatus.Empty;
  112. ProcessStatus = new SerializableDictionary<string, bool>();
  113. Attributes = new SerializableDictionary<string, string>();
  114. }
  115. public void CopyInfo(CarrierInfo source)
  116. {
  117. this.CarrierId = source.CarrierId;
  118. this.InnerId = source.InnerId;
  119. this.Attributes = source.Attributes;
  120. this.CarrierId = source.CarrierId;
  121. this.Rfid = source.Rfid;
  122. this.IsStart = source.IsStart;
  123. this.JobSelectedRecipeName = source.JobSelectedRecipeName;
  124. this.LoadTime = source.LoadTime;
  125. this.LotId = source.LotId;
  126. this.Name = source.Name;
  127. this.ProcessStatus = source.ProcessStatus;
  128. this.Status = source.status;
  129. this.ProductCategory = source.ProductCategory;
  130. this.Wafers = source.Wafers;
  131. this.ProcessJob = source.ProcessJob;
  132. this.Priority = source.Priority;
  133. }
  134. }
  135. }