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.
 
 
 
 
 
 

60 lines
1.5 KiB

  1. module CTdsIbopLedNotificationVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. logical :: IbopLed = .false.
  5. public
  6. type(VoidEventHandlerCollection) :: OnIbopLedChange
  7. private :: IbopLed
  8. contains
  9. subroutine Set_IbopLed(v)
  10. use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveIbopLed
  11. use CManifolds, Only: OpenTopDriveIBop, CloseTopDriveIBop
  12. !use CLatchLedNotification
  13. implicit none
  14. logical , intent(in) :: v
  15. #ifdef ExcludeExtraChanges
  16. if(IbopLed == v) return
  17. #endif
  18. IbopLed = v
  19. if(IbopLed) then
  20. TopDrivePanel%TopDriveIbopLed = 1
  21. call CloseTopDriveIBop()
  22. else
  23. TopDrivePanel%TopDriveIbopLed = 0
  24. call OpenTopDriveIBop()
  25. endif
  26. call OnIbopLedChange%RunAll()
  27. end subroutine
  28. logical function Get_IbopLed()
  29. implicit none
  30. Get_IbopLed = IbopLed
  31. end function
  32. subroutine Set_IbopLed_WN(v)
  33. !DEC$ ATTRIBUTES DLLEXPORT :: Set_IbopLed_WN
  34. !DEC$ ATTRIBUTES ALIAS: 'Set_IbopLed_WN' :: Set_IbopLed_WN
  35. implicit none
  36. logical , intent(in) :: v
  37. call Set_IbopLed(v)
  38. end subroutine
  39. logical function Get_IbopLed_WN()
  40. !DEC$ ATTRIBUTES DLLEXPORT :: Get_IbopLed_WN
  41. !DEC$ ATTRIBUTES ALIAS: 'Get_IbopLed_WN' :: Get_IbopLed_WN
  42. implicit none
  43. Get_IbopLed_WN = IbopLed
  44. end function
  45. end module CTdsIbopLedNotificationVariables