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.

CLatchLedNotificationVariables.f90 1.4 KiB

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