Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

633 lines
15 KiB

  1. module CUnityInputs
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. logical :: ElevatorConnectionPossible
  5. logical :: JointConnectionPossible
  6. logical :: IsKellyBushingSetInTable
  7. logical :: ElevatorPickup
  8. logical :: NearFloorPosition
  9. logical :: SingleSetInMouseHole
  10. !logical :: SwingCenter
  11. !logical :: MakeupTong
  12. !logical :: BreakupTong
  13. !logical :: SlipsSet
  14. !logical :: SlipsUnSet
  15. !logical :: Latch
  16. !logical :: Unlatch
  17. !logical :: OutOfMouseHole
  18. !real(8) :: NewHookHeight
  19. logical :: TdsConnectionPossible
  20. logical :: TdsStemIn
  21. private :: ElevatorConnectionPossible
  22. private :: JointConnectionPossible
  23. private :: IsKellyBushingSetInTable
  24. private :: ElevatorPickup
  25. private :: NearFloorPosition
  26. private :: singleSetInMouseHole
  27. !private :: SwingCenter
  28. !private :: MakeupTong
  29. !private :: BreakupTong
  30. !private :: SlipsSet
  31. !private :: SlipsUnSet
  32. !private :: Latch
  33. !private :: Unlatch
  34. !private :: OutOfMouseHole
  35. !private :: NewHookHeight
  36. private :: TdsConnectionPossible
  37. private :: TdsStemIn
  38. public
  39. type(VoidEventHandlerCollection) :: OnElevatorConnectionPossibleChange
  40. type(VoidEventHandlerCollection) :: OnJointConnectionPossibleChange
  41. type(VoidEventHandlerCollection) :: OnIsKellyBushingSetInTableChange
  42. type(VoidEventHandlerCollection) :: OnElevatorPickupChange
  43. type(VoidEventHandlerCollection) :: OnNearFloorPositionChange
  44. type(VoidEventHandlerCollection) :: OnSingleSetInMouseHoleChange
  45. !type(VoidEventHandlerCollection) :: OnSwingCenterChange
  46. !type(VoidEventHandlerCollection) :: OnNewHookHeightChange
  47. !type(VoidEventHandlerCollection) :: OnMakeupTongChange
  48. !type(VoidEventHandlerCollection) :: OnBreakupTongChange
  49. !type(VoidEventHandlerCollection) :: OnSlipsSetChange
  50. !type(VoidEventHandlerCollection) :: OnSlipsUnSetChange
  51. !type(VoidEventHandlerCollection) :: OnLatchChange
  52. !type(VoidEventHandlerCollection) :: OnUnlatchChange
  53. !type(VoidEventHandlerCollection) :: OnOutOfMouseHoleChange
  54. type(VoidEventHandlerCollection) :: OnTdsConnectionPossibleChange
  55. type(VoidEventHandlerCollection) :: OnTdsStemInChange
  56. contains
  57. ! Input routines
  58. subroutine Set_OutOfMouseHole(v)
  59. !DEC$ ATTRIBUTES DLLEXPORT :: Set_OutOfMouseHole
  60. !DEC$ ATTRIBUTES ALIAS: 'Set_OutOfMouseHole' :: Set_OutOfMouseHole
  61. implicit none
  62. logical, intent(in) :: v
  63. !#ifdef ExcludeExtraChanges
  64. ! if(OutOfMouseHole == v) return
  65. !#endif
  66. ! OutOfMouseHole = v
  67. ! call OnOutOfMouseHoleChange%RunAll()
  68. !#ifdef deb
  69. ! print*, 'OutOfMouseHole=', OutOfMouseHole
  70. !#endif
  71. end subroutine
  72. !logical function Get_OutOfMouseHole()
  73. ! implicit none
  74. ! Get_OutOfMouseHole = OutOfMouseHole
  75. !end function
  76. subroutine Set_Unlatch(v)
  77. !DEC$ ATTRIBUTES DLLEXPORT :: Set_Unlatch
  78. !DEC$ ATTRIBUTES ALIAS: 'Set_Unlatch' :: Set_Unlatch
  79. implicit none
  80. logical, intent(in) :: v
  81. !#ifdef ExcludeExtraChanges
  82. ! if(Unlatch == v) return
  83. !#endif
  84. ! Unlatch = v
  85. ! call OnUnlatchChange%RunAll()
  86. !#ifdef deb
  87. ! print*, 'Unlatch=', Unlatch
  88. !#endif
  89. end subroutine
  90. !logical function Get_Unlatch()
  91. ! implicit none
  92. ! Get_Unlatch = Unlatch
  93. !end function
  94. subroutine Set_Latch(v)
  95. !DEC$ ATTRIBUTES DLLEXPORT :: Set_Latch
  96. !DEC$ ATTRIBUTES ALIAS: 'Set_Latch' :: Set_Latch
  97. implicit none
  98. logical, intent(in) :: v
  99. !#ifdef ExcludeExtraChanges
  100. ! if(Latch == v) return
  101. !#endif
  102. ! Latch = v
  103. ! call OnLatchChange%RunAll()
  104. !#ifdef deb
  105. ! print*, 'Latch=', Latch
  106. !#endif
  107. end subroutine
  108. !logical function Get_Latch()
  109. ! implicit none
  110. ! Get_Latch = Latch
  111. !end function
  112. subroutine Set_SlipsUnSet(v)
  113. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsUnSet
  114. !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsUnSet' :: Set_SlipsUnSet
  115. implicit none
  116. logical, intent(in) :: v
  117. !#ifdef ExcludeExtraChanges
  118. ! if(SlipsUnSet == v) return
  119. !#endif
  120. ! SlipsUnSet = v
  121. ! call OnSlipsUnSetChange%RunAll()
  122. !#ifdef deb
  123. ! print*, 'SlipsUnSet=', SlipsUnSet
  124. !#endif
  125. end subroutine
  126. !logical function Get_SlipsUnSet()
  127. ! implicit none
  128. ! Get_SlipsUnSet = SlipsUnSet
  129. !end function
  130. subroutine Set_SlipsSet(v)
  131. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsSet
  132. !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsSet' :: Set_SlipsSet
  133. implicit none
  134. logical, intent(in) :: v
  135. !#ifdef ExcludeExtraChanges
  136. ! if(SlipsSet == v) return
  137. !#endif
  138. ! SlipsSet = v
  139. ! call OnSlipsSetChange%RunAll()
  140. !#ifdef deb
  141. ! print*, 'SlipsSet=', SlipsSet
  142. !#endif
  143. end subroutine
  144. !logical function Get_SlipsSet()
  145. ! implicit none
  146. ! Get_SlipsSet = SlipsSet
  147. !end function
  148. subroutine Set_BreakupTong(v)
  149. !DEC$ ATTRIBUTES DLLEXPORT :: Set_BreakupTong
  150. !DEC$ ATTRIBUTES ALIAS: 'Set_BreakupTong' :: Set_BreakupTong
  151. implicit none
  152. logical, intent(in) :: v
  153. !#ifdef ExcludeExtraChanges
  154. ! if(BreakupTong == v) return
  155. !#endif
  156. ! BreakupTong = v
  157. ! call OnBreakupTongChange%RunAll()
  158. !#ifdef deb
  159. ! print*, 'BreakupTong=', BreakupTong
  160. !#endif
  161. end subroutine
  162. !logical function Get_BreakupTong()
  163. ! implicit none
  164. ! Get_BreakupTong = BreakupTong
  165. !end function
  166. subroutine Set_MakeupTong(v)
  167. !DEC$ ATTRIBUTES DLLEXPORT :: Set_MakeupTong
  168. !DEC$ ATTRIBUTES ALIAS: 'Set_MakeupTong' :: Set_MakeupTong
  169. implicit none
  170. logical, intent(in) :: v
  171. !#ifdef ExcludeExtraChanges
  172. ! if(MakeupTong == v) return
  173. !#endif
  174. ! MakeupTong = v
  175. ! call OnMakeupTongChange%RunAll()
  176. !#ifdef deb
  177. ! print*, 'MakeupTong=', MakeupTong
  178. !#endif
  179. end subroutine
  180. !logical function Get_MakeupTong()
  181. ! implicit none
  182. ! Get_MakeupTong = MakeupTong
  183. !end function
  184. subroutine Set_NewHookHeight(v)
  185. !DEC$ ATTRIBUTES DLLEXPORT :: Set_NewHookHeight
  186. !DEC$ ATTRIBUTES ALIAS: 'Set_NewHookHeight' :: Set_NewHookHeight
  187. implicit none
  188. real(8), intent(in) :: v
  189. !#ifdef ExcludeExtraChanges
  190. ! if(NewHookHeight == v) return
  191. !#endif
  192. ! NewHookHeight = v
  193. ! call OnNewHookHeightChange%RunAll()
  194. !#ifdef deb
  195. ! print*, 'NewHookHeight=', NewHookHeight
  196. !#endif
  197. end subroutine
  198. !real(8) function Get_NewHookHeight()
  199. ! implicit none
  200. ! Get_NewHookHeight = NewHookHeight
  201. !end function
  202. subroutine Set_ElevatorConnectionPossible(v)
  203. !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorConnectionPossible
  204. !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorConnectionPossible' :: Set_ElevatorConnectionPossible
  205. implicit none
  206. logical, intent(in) :: v
  207. #ifdef ExcludeExtraChanges
  208. if(ElevatorConnectionPossible == v) return
  209. #endif
  210. ElevatorConnectionPossible = v
  211. call OnElevatorConnectionPossibleChange%RunAll()
  212. #ifdef deb
  213. print*, 'ElevatorConnectionPossible=', ElevatorConnectionPossible
  214. #endif
  215. end subroutine
  216. logical function Get_ElevatorConnectionPossible()
  217. implicit none
  218. Get_ElevatorConnectionPossible = ElevatorConnectionPossible
  219. end function
  220. logical function Get_ElevatorConnectionPossible_WN()
  221. !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorConnectionPossible_WN
  222. !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorConnectionPossible_WN' :: Get_ElevatorConnectionPossible_WN
  223. implicit none
  224. Get_ElevatorConnectionPossible_WN = ElevatorConnectionPossible
  225. !Get_ElevatorConnectionPossible_WN = .true.
  226. end function
  227. subroutine Set_JointConnectionPossible(v)
  228. !DEC$ ATTRIBUTES DLLEXPORT :: Set_JointConnectionPossible
  229. !DEC$ ATTRIBUTES ALIAS: 'Set_JointConnectionPossible' :: Set_JointConnectionPossible
  230. implicit none
  231. logical, intent(in) :: v
  232. #ifdef ExcludeExtraChanges
  233. if(JointConnectionPossible == v) return
  234. #endif
  235. JointConnectionPossible = v
  236. call OnJointConnectionPossibleChange%RunAll()
  237. #ifdef deb
  238. print*, 'JointConnectionPossible=', JointConnectionPossible
  239. #endif
  240. end subroutine
  241. logical function Get_JointConnectionPossible()
  242. implicit none
  243. Get_JointConnectionPossible = JointConnectionPossible
  244. end function
  245. logical function Get_JointConnectionPossible_WN()
  246. !DEC$ ATTRIBUTES DLLEXPORT :: Get_JointConnectionPossible_WN
  247. !DEC$ ATTRIBUTES ALIAS: 'Get_JointConnectionPossible_WN' :: Get_JointConnectionPossible_WN
  248. implicit none
  249. Get_JointConnectionPossible_WN = JointConnectionPossible
  250. end function
  251. subroutine Set_IsKellyBushingSetInTable(v)
  252. !DEC$ ATTRIBUTES DLLEXPORT :: Set_IsKellyBushingSetInTable
  253. !DEC$ ATTRIBUTES ALIAS: 'Set_IsKellyBushingSetInTable' :: Set_IsKellyBushingSetInTable
  254. implicit none
  255. logical, intent(in) :: v
  256. #ifdef ExcludeExtraChanges
  257. if(IsKellyBushingSetInTable == v) return
  258. #endif
  259. IsKellyBushingSetInTable = v
  260. call OnIsKellyBushingSetInTableChange%RunAll()
  261. #ifdef deb
  262. print*, 'IsKellyBushingSetInTable=', IsKellyBushingSetInTable
  263. #endif
  264. end subroutine
  265. logical function Get_IsKellyBushingSetInTable()
  266. implicit none
  267. Get_IsKellyBushingSetInTable = IsKellyBushingSetInTable
  268. end function
  269. logical function Get_IsKellyBushingSetInTable_WN()
  270. !DEC$ ATTRIBUTES DLLEXPORT :: Get_IsKellyBushingSetInTable_WN
  271. !DEC$ ATTRIBUTES ALIAS: 'Get_IsKellyBushingSetInTable_WN' :: Get_IsKellyBushingSetInTable_WN
  272. implicit none
  273. Get_IsKellyBushingSetInTable_WN = IsKellyBushingSetInTable
  274. end function
  275. subroutine Set_ElevatorPickup(v)
  276. !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorPickup
  277. !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorPickup' :: Set_ElevatorPickup
  278. implicit none
  279. logical, intent(in) :: v
  280. #ifdef ExcludeExtraChanges
  281. if(ElevatorPickup == v) return
  282. #endif
  283. ElevatorPickup = v
  284. call OnElevatorPickupChange%RunAll()
  285. #ifdef deb
  286. print*, 'ElevatorPickup =', ElevatorPickup
  287. #endif
  288. end subroutine
  289. logical function Get_ElevatorPickup()
  290. implicit none
  291. Get_ElevatorPickup = ElevatorPickup
  292. end function
  293. logical function Get_ElevatorPickup_WN()
  294. !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorPickup_WN
  295. !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorPickup_WN' :: Get_ElevatorPickup_WN
  296. implicit none
  297. Get_ElevatorPickup_WN = ElevatorPickup
  298. end function
  299. subroutine Set_NearFloorPosition(v)
  300. implicit none
  301. logical, intent(in) :: v
  302. #ifdef ExcludeExtraChanges
  303. if(NearFloorPosition == v) return
  304. #endif
  305. NearFloorPosition = v
  306. call OnNearFloorPositionChange%RunAll()
  307. #ifdef deb
  308. print*, 'NearFloorPosition =', NearFloorPosition
  309. #endif
  310. end subroutine
  311. subroutine Set_NearFloorPosition_WN(v)
  312. !DEC$ ATTRIBUTES DLLEXPORT :: Set_NearFloorPosition_WN
  313. !DEC$ ATTRIBUTES ALIAS: 'Set_NearFloorPosition_WN' :: Set_NearFloorPosition_WN
  314. implicit none
  315. logical, intent(in) :: v
  316. call Set_NearFloorPosition(v)
  317. end subroutine
  318. logical function Get_NearFloorPosition()
  319. implicit none
  320. Get_NearFloorPosition = NearFloorPosition
  321. end function
  322. logical function Get_NearFloorPosition_WN()
  323. !DEC$ ATTRIBUTES DLLEXPORT :: Get_NearFloorPosition_WN
  324. !DEC$ ATTRIBUTES ALIAS: 'Get_NearFloorPosition_WN' :: Get_NearFloorPosition_WN
  325. implicit none
  326. Get_NearFloorPosition_WN = NearFloorPosition
  327. end function
  328. subroutine Set_SingleSetInMouseHole(v)
  329. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SingleSetInMouseHole
  330. !DEC$ ATTRIBUTES ALIAS: 'Set_SingleSetInMouseHole' :: Set_SingleSetInMouseHole
  331. implicit none
  332. logical, intent(in) :: v
  333. #ifdef ExcludeExtraChanges
  334. if(SingleSetInMouseHole == v) return
  335. #endif
  336. SingleSetInMouseHole = v
  337. call OnSingleSetInMouseHoleChange%RunAll()
  338. #ifdef deb
  339. print*, 'singleSetInMouseHole=', SingleSetInMouseHole
  340. #endif
  341. end subroutine
  342. logical function Get_SingleSetInMouseHole()
  343. implicit none
  344. Get_SingleSetInMouseHole = SingleSetInMouseHole
  345. end function
  346. logical function Get_SingleSetInMouseHole_WN()
  347. !DEC$ ATTRIBUTES DLLEXPORT :: Get_SingleSetInMouseHole_WN
  348. !DEC$ ATTRIBUTES ALIAS: 'Get_SingleSetInMouseHole_WN' :: Get_SingleSetInMouseHole_WN
  349. implicit none
  350. Get_SingleSetInMouseHole_WN = SingleSetInMouseHole
  351. end function
  352. subroutine Set_SwingCenter(v)
  353. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingCenter
  354. !DEC$ ATTRIBUTES ALIAS: 'Set_SwingCenter' :: Set_SwingCenter
  355. !USE CSwingEnum
  356. implicit none
  357. logical, intent(in) :: v
  358. !#ifdef ExcludeExtraChanges
  359. ! if(SwingCenter == v) return
  360. !#endif
  361. ! SwingCenter = v
  362. ! call OnSwingCenterChange%RunAll()
  363. ! !if(SwingCenter .and. Get_Swing() /= SWING_WELL ) call Set_Swing(SWING_WELL)
  364. !#ifdef deb
  365. ! print*, 'SwingCenter=', SwingCenter
  366. !#endif
  367. end subroutine
  368. !logical function Get_SwingCenter()
  369. ! implicit none
  370. ! Get_SwingCenter = SwingCenter
  371. !end function
  372. !top drive
  373. subroutine Set_TdsConnectionPossible(v)
  374. !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsConnectionPossible
  375. !DEC$ ATTRIBUTES ALIAS: 'Set_TdsConnectionPossible' :: Set_TdsConnectionPossible
  376. implicit none
  377. logical, intent(in) :: v
  378. #ifdef ExcludeExtraChanges
  379. if(TdsConnectionPossible == v) return
  380. #endif
  381. TdsConnectionPossible = v
  382. call OnTdsConnectionPossibleChange%RunAll()
  383. #ifdef deb
  384. print*, 'TdsConnectionPossible=', TdsConnectionPossible
  385. #endif
  386. end subroutine
  387. logical function Get_TdsConnectionPossible()
  388. implicit none
  389. Get_TdsConnectionPossible = TdsConnectionPossible
  390. end function
  391. logical function Get_TdsConnectionPossible_WN()
  392. !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsConnectionPossible_WN
  393. !DEC$ ATTRIBUTES ALIAS: 'Get_TdsConnectionPossible_WN' :: Get_TdsConnectionPossible_WN
  394. implicit none
  395. Get_TdsConnectionPossible_WN = TdsConnectionPossible
  396. !Get_TdsConnectionPossible_WN = .true.
  397. end function
  398. subroutine Set_TdsStemIn(v)
  399. !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsStemIn
  400. !DEC$ ATTRIBUTES ALIAS: 'Set_TdsStemIn' :: Set_TdsStemIn
  401. implicit none
  402. logical, intent(in) :: v
  403. #ifdef ExcludeExtraChanges
  404. if(TdsStemIn == v) return
  405. #endif
  406. TdsStemIn = v
  407. call OnTdsStemInChange%RunAll()
  408. #ifdef deb
  409. print*, 'TdsStemIn=', TdsStemIn
  410. #endif
  411. end subroutine
  412. logical function Get_TdsStemIn()
  413. implicit none
  414. Get_TdsStemIn = TdsStemIn
  415. end function
  416. logical function Get_TdsStemIn_WN()
  417. !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsStemIn_WN
  418. !DEC$ ATTRIBUTES ALIAS: 'Get_TdsStemIn_WN' :: Get_TdsStemIn_WN
  419. implicit none
  420. Get_TdsStemIn_WN = TdsStemIn
  421. !Get_TdsStemIn_WN = .true.
  422. end function
  423. end module CUnityInputs