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.
 
 
 
 
 
 

97 lines
2.6 KiB

  1. module CTdsSwingEnumVariables
  2. use CVoidEventHandlerCollection
  3. use CLog4
  4. implicit none
  5. integer :: TdsSwing = 0
  6. public
  7. type(VoidEventHandlerCollection) :: OnTdsSwingChange
  8. enum, bind(c)
  9. enumerator TDS_SWING_NEUTRAL
  10. enumerator TDS_SWING_OFF_BEGIN
  11. enumerator TDS_SWING_OFF_END
  12. enumerator TDS_SWING_DRILL_BEGIN
  13. enumerator TDS_SWING_DRILL_END
  14. enumerator TDS_SWING_TILT_BEGIN
  15. enumerator TDS_SWING_TILT_END
  16. end enum
  17. private :: TdsSwing
  18. contains
  19. subroutine Set_TdsSwing(v)
  20. implicit none
  21. integer , intent(in) :: v
  22. #ifdef ExcludeExtraChanges
  23. if(TdsSwing == v) return
  24. #endif
  25. TdsSwing = v
  26. #ifdef deb
  27. print*, 'TdsSwing=', TdsSwing
  28. #endif
  29. call OnTdsSwingChange%RunAll()
  30. end subroutine
  31. integer function Get_TdsSwing()
  32. implicit none
  33. Get_TdsSwing = TdsSwing
  34. end function
  35. subroutine Set_TdsSwing_WN(v)
  36. !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsSwing_WN
  37. !DEC$ ATTRIBUTES ALIAS: 'Set_TdsSwing_WN' :: Set_TdsSwing_WN
  38. implicit none
  39. integer , intent(in) :: v
  40. call Set_TdsSwing(v)
  41. end subroutine
  42. integer function Get_TdsSwing_WN()
  43. !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsSwing_WN
  44. !DEC$ ATTRIBUTES ALIAS: 'Get_TdsSwing_WN' :: Get_TdsSwing_WN
  45. implicit none
  46. Get_TdsSwing_WN = TdsSwing
  47. end function
  48. subroutine TdsSwingOffEnd()
  49. !DEC$ ATTRIBUTES DLLEXPORT :: TdsSwingOffEnd
  50. !DEC$ ATTRIBUTES ALIAS: 'TdsSwingOffEnd' :: TdsSwingOffEnd
  51. implicit none
  52. !if(TdsSwing /= TDS_SWING_OFF_END) TdsSwing = TDS_SWING_OFF_END
  53. call Set_TdsSwing(TDS_SWING_OFF_END)
  54. #ifdef deb
  55. print*, 'TDS_SWING_OFF_END'
  56. #endif
  57. end subroutine
  58. subroutine TdsSwingDrillEnd()
  59. !DEC$ ATTRIBUTES DLLEXPORT :: TdsSwingDrillEnd
  60. !DEC$ ATTRIBUTES ALIAS: 'TdsSwingDrillEnd' :: TdsSwingDrillEnd
  61. implicit none
  62. !if(TdsSwing /= TDS_SWING_DRILL_END) TdsSwing = TDS_SWING_DRILL_END
  63. call Set_TdsSwing(TDS_SWING_DRILL_END)
  64. #ifdef deb
  65. print*, 'TDS_SWING_DRILL_END'
  66. #endif
  67. end subroutine
  68. subroutine TdsSwingTiltEnd()
  69. !DEC$ ATTRIBUTES DLLEXPORT :: TdsSwingTiltEnd
  70. !DEC$ ATTRIBUTES ALIAS: 'TdsSwingTiltEnd' :: TdsSwingTiltEnd
  71. implicit none
  72. !if(TdsSwing /= TDS_SWING_TILT_END) TdsSwing = TDS_SWING_TILT_END
  73. call Set_TdsSwing(TDS_SWING_TILT_END)
  74. #ifdef deb
  75. print*, 'TDS_SWING_TILT_END'
  76. #endif
  77. end subroutine
  78. end module CTdsSwingEnumVariables