|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- module CElevatorEnumVariables
- use CVoidEventHandlerCollection
- implicit none
- integer :: Elevator = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnElevatorChange
-
- enum, bind(c)
- enumerator ELEVATOR_NEUTRAL
-
- enumerator ELEVATOR_LATCH_STRING_BEGIN
- enumerator ELEVATOR_LATCH_STRING_END
-
- enumerator ELEVATOR_UNLATCH_STRING_BEGIN
- enumerator ELEVATOR_UNLATCH_STRING_END
-
- enumerator ELEVATOR_LATCH_STAND_BEGIN
- enumerator ELEVATOR_LATCH_STAND_END
-
- enumerator ELEVATOR_UNLATCH_STAND_BEGIN
- enumerator ELEVATOR_UNLATCH_STAND_END
-
- enumerator ELEVATOR_LATCH_SINGLE_BEGIN
- enumerator ELEVATOR_LATCH_SINGLE_END
-
- enumerator ELEVATOR_UNLATCH_SINGLE_BEGIN
- enumerator ELEVATOR_UNLATCH_SINGLE_END
- end enum
-
- private :: Elevator
- contains
-
- subroutine Set_Elevator(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(Elevator == v) return
- #endif
- Elevator = v
- #ifdef deb
- print*, 'Elevator=', Elevator
- #endif
- call OnElevatorChange%RunAll()
- end subroutine
-
- integer function Get_Elevator()
- implicit none
- Get_Elevator = Elevator
- end function
-
-
- subroutine Set_Elevator_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_Elevator_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_Elevator_WN' :: Set_Elevator_WN
- implicit none
- integer , intent(in) :: v
- call Set_Elevator(v)
- end subroutine
-
- integer function Get_Elevator_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_Elevator_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_Elevator_WN' :: Get_Elevator_WN
- implicit none
- Get_Elevator_WN = Elevator
- end function
-
-
-
-
-
-
-
-
-
- subroutine ElevatorLatchStringEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: ElevatorLatchStringEnd
- !DEC$ ATTRIBUTES ALIAS: 'ElevatorLatchStringEnd' :: ElevatorLatchStringEnd
- implicit none
- #ifdef deb
- print*, 'ElevatorLatchStringEnd'
- #endif
- !if(Elevator /= ELEVATOR_LATCH_STRING_END) Elevator = ELEVATOR_LATCH_STRING_END
- call Set_Elevator(ELEVATOR_LATCH_STRING_END)
- end subroutine
-
-
- subroutine ElevatorUnLatchStringEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: ElevatorUnLatchStringEnd
- !DEC$ ATTRIBUTES ALIAS: 'ElevatorUnLatchStringEnd' :: ElevatorUnLatchStringEnd
- implicit none
- #ifdef deb
- print*, 'ElevatorUnLatchStringEnd'
- #endif
- !if(Elevator /= ELEVATOR_UNLATCH_STRING_END) Elevator = ELEVATOR_UNLATCH_STRING_END
- call Set_Elevator(ELEVATOR_UNLATCH_STRING_END)
- end subroutine
-
-
- subroutine ElevatorLatchStandEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: ElevatorLatchStandEnd
- !DEC$ ATTRIBUTES ALIAS: 'ElevatorLatchStandEnd' :: ElevatorLatchStandEnd
- !use CCommon, only: SetStandRack
- !use CStandRack
- implicit none
- #ifdef deb
- print*, 'ElevatorLatchStandEnd'
- #endif
- !if(Elevator /= ELEVATOR_LATCH_STAND_END) then
- ! Elevator = ELEVATOR_LATCH_STAND_END
- ! !call SetStandRack(Get_StandRack() - 1)
- !endif
- call Set_Elevator(ELEVATOR_LATCH_STAND_END)
- end subroutine
-
- subroutine ElevatorUnLatchStandEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: ElevatorUnLatchStandEnd
- !DEC$ ATTRIBUTES ALIAS: 'ElevatorUnLatchStandEnd' :: ElevatorUnLatchStandEnd
- !use CCommon, only: SetStandRack
- !use CStandRack
- implicit none
- #ifdef deb
- print*, 'ElevatorUnLatchStandEnd'
- #endif
- !if(Elevator /= ELEVATOR_UNLATCH_STAND_END) then
- ! Elevator = ELEVATOR_UNLATCH_STAND_END
- ! !call SetStandRack(Get_StandRack() + 1)
- !endif
- call Set_Elevator(ELEVATOR_UNLATCH_STAND_END)
- end subroutine
-
- subroutine ElevatorLatchSingleEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: ElevatorLatchSingleEnd
- !DEC$ ATTRIBUTES ALIAS: 'ElevatorLatchSingleEnd' :: ElevatorLatchSingleEnd
- implicit none
- #ifdef deb
- print*, 'ElevatorLatchSingleEnd'
- #endif
- !if(Elevator /= ELEVATOR_LATCH_SINGLE_END) Elevator = ELEVATOR_LATCH_SINGLE_END
- call Set_Elevator(ELEVATOR_LATCH_SINGLE_END)
- end subroutine
-
- subroutine ElevatorUnLatchSingleEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: ElevatorUnLatchSingleEnd
- !DEC$ ATTRIBUTES ALIAS: 'ElevatorUnLatchSingleEnd' :: ElevatorUnLatchSingleEnd
- implicit none
- #ifdef deb
- print*, 'ElevatorUnLatchSingleEnd'
- #endif
- !if(Elevator /= ELEVATOR_UNLATCH_SINGLE_END) Elevator = ELEVATOR_UNLATCH_SINGLE_END
- call Set_Elevator(ELEVATOR_UNLATCH_SINGLE_END)
- end subroutine
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- logical function Get_EvelatorLatchString()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorLatchString
- !DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorLatchString' :: Get_EvelatorLatchString
- implicit none
- Get_EvelatorLatchString = .false. ! Elevator == ELEVATOR_LATCH_STRING
- end function
-
- logical function Get_EvelatorLatchStand()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorLatchStand
- !DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorLatchStand' :: Get_EvelatorLatchStand
- implicit none
- Get_EvelatorLatchStand = .false. ! Elevator == ELEVATOR_LATCH_STAND
- end function
-
- logical function Get_EvelatorLatchSingle()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorLatchSingle
- !DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorLatchSingle' :: Get_EvelatorLatchSingle
- implicit none
- Get_EvelatorLatchSingle = .false. ! Elevator == ELEVATOR_LATCH_SINGLE
- end function
-
- logical function Get_EvelatorUnlatchString()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorUnlatchString
- !DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorUnlatchString' :: Get_EvelatorUnlatchString
- implicit none
- Get_EvelatorUnlatchString = .false. ! Elevator == ELEVATOR_UNLATCH_STRING
- end function
-
- logical function Get_EvelatorUnlatchStand()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorUnlatchStand
- !DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorUnlatchStand' :: Get_EvelatorUnlatchStand
- implicit none
- Get_EvelatorUnlatchStand = .false. ! Elevator == ELEVATOR_UNLATCH_STAND
- end function
-
- logical function Get_EvelatorUnlatchSingle()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorUnlatchSingle
- !DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorUnlatchSingle' :: Get_EvelatorUnlatchSingle
- implicit none
- Get_EvelatorUnlatchSingle = .false. ! Elevator == ELEVATOR_UNLATCH_SINGLE
- end function
-
- end module CElevatorEnumVariables
|