DataDefine.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Aitex.Core.Common;
  7. using Aitex.Sorter.Common;
  8. using MECF.Framework.Common.Equipment;
  9. namespace JetVirgoPM.Devices
  10. {
  11. public enum CommunicationType { Analogue, RS232, Ethernet }
  12. //public enum BusyFlag { Idle, Busy, Error }
  13. public enum OnlineFlag { Offline, Online }
  14. public enum AutoFlag { Manual, Auto }
  15. public enum ActionStatus
  16. {
  17. Unknown, Pending, SendCmd, RecACK, RecINF, Completed, PartialDone, AllCompleted, Timeout, Error, Cancel
  18. }
  19. public enum LightType
  20. {
  21. RED, BLUE, GREEN, YELLOW, WHITE, BUZZER1
  22. }
  23. public enum LightStatus
  24. {
  25. OFF, ON, BLINK
  26. }
  27. public class Position
  28. {
  29. public ModuleName Module { get; set; }
  30. public byte Slot { get; set; }
  31. }
  32. public enum ExtendPos
  33. {
  34. //GetReady, GetTarget, GetBack, PutReady, PutTarget, PutBack
  35. G1, GB, G4, P1, PB, P4
  36. }
  37. /// <summary>
  38. /// Wafer transferring argument
  39. /// </summary>
  40. class MoveParam
  41. {
  42. public Position SrcPos { get; } = new Position();
  43. public Position DestPos { get; } = new Position();
  44. public ModuleName SrcModule => SrcPos.Module;
  45. public byte SrcSlot => SrcPos.Slot;
  46. public ModuleName DestModule => DestPos.Module;
  47. public byte DestSlot => DestPos.Slot;
  48. public WaferSize WaferSize { get; set; }
  49. public Hand Arm { get; }
  50. public MoveParam(Position src, Position dest)
  51. {
  52. this.SrcPos = src; this.DestPos = dest;
  53. }
  54. public MoveParam(ModuleName srcMod, byte srcSlot, ModuleName destMod, byte destSlot, Hand arm, WaferSize ws)
  55. {
  56. SrcPos.Module = srcMod;
  57. SrcPos.Slot = srcSlot;
  58. DestPos.Module = destMod;
  59. DestPos.Slot = destSlot;
  60. Arm = arm;
  61. WaferSize = ws;
  62. }
  63. public MoveParam(int p0, int p1, int p2, int p3, int arm, int ws)
  64. {
  65. SrcPos.Module = (ModuleName)p0;
  66. SrcPos.Slot = (byte)p1;
  67. SrcPos.Module = (ModuleName)p2;
  68. SrcPos.Slot = (byte)p3;
  69. Arm = (Hand)arm;
  70. WaferSize = (WaferSize)ws;
  71. }
  72. }
  73. class SwapParam
  74. {
  75. public Position SrcPos { get; } = new Position();
  76. public Position DestPos { get; } = new Position();
  77. public ModuleName SrcModule => SrcPos.Module;
  78. public byte SrcSlot => SrcPos.Slot;
  79. public ModuleName DestModule => DestPos.Module;
  80. public byte DestSlot => DestPos.Slot;
  81. public WaferSize WaferSize { get; set; }
  82. public Hand Arm { get; }
  83. public SwapParam(Position src, Position dest)
  84. {
  85. this.SrcPos = src; this.DestPos = dest;
  86. }
  87. public SwapParam(ModuleName srcMod, byte srcSlot, ModuleName destMod, byte destSlot, Hand arm, WaferSize ws)
  88. {
  89. SrcPos.Module = srcMod;
  90. SrcPos.Slot = srcSlot;
  91. DestPos.Module = destMod;
  92. DestPos.Slot = destSlot;
  93. Arm = arm;
  94. WaferSize = ws;
  95. }
  96. public SwapParam(int p0, int p1, int p2, int p3, int arm, int ws)
  97. {
  98. SrcPos.Module = (ModuleName)p0;
  99. SrcPos.Slot = (byte)p1;
  100. SrcPos.Module = (ModuleName)p2;
  101. SrcPos.Slot = (byte)p3;
  102. Arm = (Hand)arm;
  103. WaferSize = (WaferSize)ws;
  104. }
  105. }
  106. class ExtendParam
  107. {
  108. public ModuleName Module { get; set; }
  109. public ExtendPos Pos { get; set; }
  110. public Hand Arm { get; set; } = Hand.Blade1;
  111. }
  112. static class Extension
  113. {
  114. public static MovePath Path(this MoveParam mp)
  115. {
  116. return MovePath.LPToPM;
  117. }
  118. }
  119. enum MovePath
  120. {
  121. LPToPM,
  122. PMToLP
  123. }
  124. interface IHardwareMessage
  125. {
  126. string RawString { get; set; }
  127. }
  128. public enum GeneratorMFG
  129. {
  130. AdTec = 1,
  131. Comet = 2
  132. }
  133. public enum MatchMFG
  134. {
  135. AdTec = 1,
  136. MKS = 2,
  137. RevTec = 3,
  138. }
  139. public enum ChillerMFG
  140. {
  141. SMC = 1,
  142. AIRSYS = 2,
  143. }
  144. public enum ChillerSetupOp
  145. {
  146. NoShareSingleChiller,
  147. ShareSingleChiller,
  148. }
  149. public enum DryPumpMFG
  150. {
  151. SKY = 1,
  152. Edwards = 2
  153. }
  154. public enum MsgDirection
  155. {
  156. Unknown, To, From
  157. }
  158. }