Mag7RobotHandlerFactory.cs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. using Aitex.Core.RT.SCCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Aitex.Sorter.Common;
  8. using MECF.Framework.Common.Equipment;
  9. using Aitex.Core.RT.Device;
  10. using Aitex.Core.Common;
  11. namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot.MAG7
  12. {
  13. public class Mag7RobotHandlerFactory : IRobotHandlerFactory
  14. {
  15. private TokenGenerator _tokener;
  16. private IDevice _device = null;
  17. public Mag7RobotHandlerFactory(IDevice device)
  18. {
  19. _device = device;
  20. if (SC.ContainsItem($"{device.Name}.RobotCommunicationToken"))
  21. _tokener = new TokenGenerator($"{device.Name}.RobotCommunicationToken");
  22. else
  23. {
  24. _tokener = new TokenGenerator($"Robot.RobotCommunicationToken");
  25. }
  26. }
  27. public IHandler Init()
  28. {
  29. throw new NotImplementedException();
  30. }
  31. public IHandler Home()
  32. {
  33. return new Mag7RobotHandlerBase<RbHomeHandler>(_device, ref _tokener);
  34. }
  35. public IHandler ArmHome()
  36. {
  37. throw new NotImplementedException();
  38. }
  39. public IHandler Event()
  40. {
  41. return new Mag7RobotHandlerBase<RbEventHandler>(_device, ref _tokener, true);
  42. }
  43. public IHandler QueryState()
  44. {
  45. return new Mag7RobotHandlerBase<RBQueryStateHandler>(_device, ref _tokener);
  46. }
  47. public IHandler QueryPosition()
  48. {
  49. return new Mag7RobotHandlerBase<RBQueryPositionHandler>(_device, ref _tokener);
  50. }
  51. public IHandler Stop()
  52. {
  53. return new Mag7RobotHandlerBase<RbStopHandler>(_device, ref _tokener);
  54. }
  55. public IHandler SetSpeed(int speed)
  56. {
  57. return new Mag7RobotHandlerBase<RbSetSpeedHandler>(_device, ref _tokener, speed);
  58. }
  59. public IHandler Goto(ModuleName chamber, int slot, Motion next, Hand hand, int x, int y, int z)
  60. {
  61. return new Mag7RobotHandlerBase<GotoHandler>(_device, ref _tokener, chamber, slot, next, hand, x, y , z);
  62. }
  63. public IHandler Pick(ModuleName chamber, int slot, Hand hand)
  64. {
  65. return new Mag7RobotHandlerBase<PickHandler>(_device, ref _tokener, chamber, slot, hand);
  66. }
  67. public IHandler PickExtend(ModuleName chamber, int slot, Hand hand)
  68. {
  69. return new Mag7RobotHandlerBase<PickExtendHandler>(_device, ref _tokener, chamber, slot, hand);
  70. }
  71. public IHandler PickRetract(ModuleName chamber, int slot, Hand hand)
  72. {
  73. return new Mag7RobotHandlerBase<PickRetractHandler>(_device, ref _tokener, chamber, slot, hand);
  74. }
  75. public IHandler PickReadyPosition(ModuleName chamber, int slot, Hand hand)
  76. {
  77. throw new NotImplementedException();
  78. }
  79. public IHandler Place(ModuleName chamber, int slot, Hand hand)
  80. {
  81. return new Mag7RobotHandlerBase<PlaceHandler>(_device, ref _tokener, chamber, slot, hand);
  82. }
  83. public IHandler PlaceExtend(ModuleName chamber, int slot, Hand hand)
  84. {
  85. return new Mag7RobotHandlerBase<PlaceExtendHandler>(_device, ref _tokener, chamber, slot, hand);
  86. }
  87. public IHandler PlaceRetract(ModuleName chamber, int slot, Hand hand)
  88. {
  89. return new Mag7RobotHandlerBase<PlaceRetractHandler>(_device, ref _tokener, chamber, slot, hand);
  90. }
  91. public IHandler PlaceReadyPosition(ModuleName chamber, int slot, Hand hand)
  92. {
  93. throw new NotImplementedException();
  94. }
  95. public IHandler Exchange(ModuleName chamber, int slot, Hand hand)
  96. {
  97. return new Mag7RobotHandlerBase<ExchangHandler>(_device, ref _tokener, chamber, slot, hand);
  98. }
  99. public IHandler PickEx(ModuleName chamber, int slot, Hand hand, int x, int y, int z)
  100. {
  101. return new Mag7RobotHandlerBase<PickHandler>(_device, ref _tokener, chamber, slot, hand, x, y, z);
  102. }
  103. public IHandler PlaceEx(ModuleName chamber, int slot, Hand hand, int x, int y, int z)
  104. {
  105. return new Mag7RobotHandlerBase<PlaceHandler>(_device, ref _tokener, chamber, slot, hand, x, y, z);
  106. }
  107. public IHandler Grip(Hand hand)
  108. {
  109. throw new NotImplementedException();
  110. }
  111. public IHandler Release(Hand hand)
  112. {
  113. throw new NotImplementedException();
  114. }
  115. public IHandler Clear()
  116. {
  117. throw new NotImplementedException();
  118. }
  119. public IHandler WaferMapping(ModuleName loadport)
  120. {
  121. throw new NotImplementedException();
  122. }
  123. public IHandler QueryWaferMap(ModuleName loadport)
  124. {
  125. throw new NotImplementedException();
  126. }
  127. public IHandler SetCommunication( )
  128. {
  129. return new Mag7RobotHandlerBase<RbSetCommunicationHandler>(_device, ref _tokener);
  130. }
  131. public IHandler SetLoad(Hand hand)
  132. {
  133. return new Mag7RobotHandlerBase<RbSetLoadHandler>(_device, ref _tokener, hand);
  134. }
  135. public IHandler CheckLoad(ModuleName chamber, int slot)
  136. {
  137. return new Mag7RobotHandlerBase<RbCheckLoadHandler>(_device, ref _tokener, chamber, slot);
  138. }
  139. public IHandler RequestWaferPresent( )
  140. {
  141. return new Mag7RobotHandlerBase<RbRequestWaferPresentHandler>(_device, ref _tokener);
  142. }
  143. public IHandler RequestAWCData()
  144. {
  145. return new Mag7RobotHandlerBase<RRequestAWCDataHandler>(_device, ref _tokener);
  146. }
  147. public IHandler Extend(ModuleName chamber, int slot, Hand hand)
  148. {
  149. return new Mag7RobotHandlerBase<ExtendHandler>(_device, ref _tokener, chamber, slot, hand);
  150. }
  151. public IHandler Retract(ModuleName chamber, int slot, Hand hand)
  152. {
  153. return new Mag7RobotHandlerBase<RetractHandler>(_device, ref _tokener, chamber, slot, hand);
  154. }
  155. public IHandler Stop(bool isEmergency)
  156. {
  157. throw new NotImplementedException();
  158. }
  159. public IHandler Resume()
  160. {
  161. throw new NotImplementedException();
  162. }
  163. public IHandler MoveTo(ModuleName chamber, int slot, Hand hand, bool isPick, int x, int y, int z)
  164. {
  165. throw new NotImplementedException();
  166. }
  167. public IHandler ExchangeEx(ModuleName chamber, int slot, Hand hand, int x, int y, int z)
  168. {
  169. throw new NotImplementedException();
  170. }
  171. public IHandler ExchangeReadyPosition(ModuleName chamber, int slot, Hand pickHand, Hand placeHand)
  172. {
  173. throw new NotImplementedException();
  174. }
  175. public IHandler ExchangePickExtend(ModuleName chamber, int slot, Hand pickHand, Hand placeHand)
  176. {
  177. throw new NotImplementedException();
  178. }
  179. public IHandler ExchangePlaceExtend(ModuleName chamber, int slot, Hand pickHand, Hand placeHand)
  180. {
  181. throw new NotImplementedException();
  182. }
  183. public IHandler ExchangePlaceRetract(ModuleName chamber, int slot, Hand pickHand, Hand placeHand)
  184. {
  185. throw new NotImplementedException();
  186. }
  187. public IHandler SetWaferSize(int size)
  188. {
  189. throw new NotImplementedException();
  190. }
  191. public IHandler QueryWaferSize()
  192. {
  193. throw new NotImplementedException();
  194. }
  195. public IHandler ExchangeReadyExtend(ModuleName chamber, int slot, Hand pickHand, Hand placeHand)
  196. {
  197. throw new NotImplementedException();
  198. }
  199. public IHandler ExchangeAfterReadyExtend(ModuleName chamber, int slot, Hand pickHand, Hand placeHand)
  200. {
  201. throw new NotImplementedException();
  202. }
  203. public IHandler PositionAdjustment(Axis axis, Hand hand, int value)
  204. {
  205. throw new NotImplementedException();
  206. }
  207. public IHandler SetWaferSize(int cmd, WaferSize size)
  208. {
  209. throw new NotImplementedException();
  210. }
  211. public IHandler QueryParameter(int parameter, string parameterType)
  212. {
  213. throw new NotImplementedException();
  214. }
  215. public IHandler SetServoOnOff(bool trueForOnFalseForOff)
  216. {
  217. throw new NotImplementedException();
  218. }
  219. }
  220. }