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.
 
 
 
 
 
 

62 lines
1.5 KiB

  1. module CUnlatchLedNotificationVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. logical :: UnlatchLed = .false.
  5. public
  6. type(VoidEventHandlerCollection) :: OnUnlatchLedChange
  7. private :: UnlatchLed
  8. contains
  9. subroutine Set_UnlatchLed(v)
  10. use CDrillingConsoleVariables, only: UnlatchPipeLED
  11. !use CLatchLedNotification
  12. implicit none
  13. logical , intent(in) :: v
  14. #ifdef ExcludeExtraChanges
  15. if(UnlatchLed == v) return
  16. #endif
  17. UnlatchLed = v
  18. if(UnlatchLed) then
  19. UnlatchPipeLED = 1
  20. !call Set_LatchLed(.false.)
  21. else
  22. UnlatchPipeLED = 0
  23. endif
  24. call OnUnlatchLedChange%RunAll()
  25. end subroutine
  26. logical function Get_UnlatchLed()
  27. implicit none
  28. Get_UnlatchLed = UnlatchLed
  29. end function
  30. subroutine Set_UnlatchLed_WN(v)
  31. !DEC$ ATTRIBUTES DLLEXPORT :: Set_UnlatchLed_WN
  32. !DEC$ ATTRIBUTES ALIAS: 'Set_UnlatchLed_WN' :: Set_UnlatchLed_WN
  33. implicit none
  34. logical , intent(in) :: v
  35. call Set_UnlatchLed(v)
  36. end subroutine
  37. logical function Get_UnlatchLed_WN()
  38. !DEC$ ATTRIBUTES DLLEXPORT :: Get_UnlatchLed_WN
  39. !DEC$ ATTRIBUTES ALIAS: 'Get_UnlatchLed_WN' :: Get_UnlatchLed_WN
  40. implicit none
  41. Get_UnlatchLed_WN = UnlatchLed
  42. end function
  43. end module CUnlatchLedNotificationVariables