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.
 
 
 
 
 
 

64 lines
1.8 KiB

  1. module CElevatorConnectionEnumVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. integer :: ElevatorConnection = 0
  5. public
  6. type(VoidEventHandlerCollection) :: OnElevatorConnectionChange
  7. enum, bind(c)
  8. enumerator ELEVATOR_CONNECTION_NOTHING
  9. enumerator ELEVATOR_CONNECTION_STRING
  10. enumerator ELEVATOR_CONNECTION_STAND
  11. enumerator ELEVATOR_CONNECTION_SINGLE
  12. enumerator ELEVATOR_LATCH_STRING
  13. enumerator ELEVATOR_LATCH_SINGLE
  14. enumerator ELEVATOR_LATCH_STAND
  15. end enum
  16. private :: ElevatorConnection
  17. contains
  18. subroutine Set_ElevatorConnection(v)
  19. implicit none
  20. integer , intent(in) :: v
  21. #ifdef ExcludeExtraChanges
  22. if(ElevatorConnection == v) return
  23. #endif
  24. ElevatorConnection = v
  25. #ifdef deb
  26. print*, 'ElevatorConnection=', ElevatorConnection
  27. #endif
  28. call OnElevatorConnectionChange%RunAll()
  29. end subroutine
  30. integer function Get_ElevatorConnection()
  31. implicit none
  32. Get_ElevatorConnection = ElevatorConnection
  33. end function
  34. subroutine Set_ElevatorConnection_WN(v)
  35. !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorConnection_WN
  36. !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorConnection_WN' :: Set_ElevatorConnection_WN
  37. implicit none
  38. integer , intent(in) :: v
  39. call Set_ElevatorConnection(v)
  40. end subroutine
  41. integer function Get_ElevatorConnection_WN()
  42. !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorConnection_WN
  43. !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorConnection_WN' :: Get_ElevatorConnection_WN
  44. implicit none
  45. Get_ElevatorConnection_WN = ElevatorConnection
  46. end function
  47. end module CElevatorConnectionEnumVariables