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.

CIrIBopLedNotificationVariables.f90 1.6 KiB

1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. module CIrIBopLedNotificationVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. logical :: IrIBopLed = .false.
  5. public
  6. type(VoidEventHandlerCollection) :: OnIrIBopLedChange
  7. private :: IrIBopLed
  8. contains
  9. subroutine Set_IrIBopLed(v)
  10. use CDrillingConsoleVariables!, only: IRIBopLedHw => IRIBopLed
  11. use CManifolds, only: InstallIBop, RemoveIBop
  12. use CIbopEnumVariables, only: Set_Ibop_Install, Set_Ibop_Remove
  13. implicit none
  14. logical , intent(in) :: v
  15. #ifdef ExcludeExtraChanges
  16. if(IrIBopLed == v) return
  17. #endif
  18. IrIBopLed = v
  19. if(IrIBopLed) then
  20. DrillingConsole%IRIBopLed = 1
  21. call InstallIBop()
  22. call Set_Ibop_Install()
  23. else
  24. DrillingConsole%IRIBopLed = 0
  25. call RemoveIBop()
  26. call Set_Ibop_Remove()
  27. endif
  28. call OnIrIBopLedChange%RunAll()
  29. end subroutine
  30. logical function Get_IrIBopLed()
  31. implicit none
  32. Get_IrIBopLed = IrIBopLed
  33. end function
  34. subroutine Set_IrIBopLed_WN(v)
  35. !DEC$ ATTRIBUTES DLLEXPORT :: Set_IrIBopLed_WN
  36. !DEC$ ATTRIBUTES ALIAS: 'Set_IrIBopLed_WN' :: Set_IrIBopLed_WN
  37. implicit none
  38. logical , intent(in) :: v
  39. call Set_IrIBopLed(v)
  40. end subroutine
  41. logical function Get_IrIBopLed_WN()
  42. !DEC$ ATTRIBUTES DLLEXPORT :: Get_IrIBopLed_WN
  43. !DEC$ ATTRIBUTES ALIAS: 'Get_IrIBopLed_WN' :: Get_IrIBopLed_WN
  44. implicit none
  45. Get_IrIBopLed_WN = IrIBopLed
  46. end function
  47. end module CIrIBopLedNotificationVariables