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.

CSwingLedNotificationVariables.f90 1.3 KiB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module CSwingLedNotificationVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. logical :: SwingLed = .false.
  5. public
  6. type(VoidEventHandlerCollection) :: OnSwingLedChange
  7. private :: SwingLed
  8. contains
  9. subroutine Set_SwingLed(v)
  10. use CDrillingConsoleVariables, only: SwingLedHw => SwingLed
  11. implicit none
  12. logical , intent(in) :: v
  13. #ifdef ExcludeExtraChanges
  14. if(SwingLed == v) return
  15. #endif
  16. SwingLed = v
  17. if(SwingLed) then
  18. SwingLedHw = 1
  19. else
  20. SwingLedHw = 0
  21. endif
  22. call OnSwingLedChange%RunAll()
  23. end subroutine
  24. logical function Get_SwingLed()
  25. implicit none
  26. Get_SwingLed = SwingLed
  27. end function
  28. subroutine Set_SwingLed_WN(v)
  29. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingLed_WN
  30. !DEC$ ATTRIBUTES ALIAS: 'Set_SwingLed_WN' :: Set_SwingLed_WN
  31. implicit none
  32. logical , intent(in) :: v
  33. call Set_SwingLed(v)
  34. end subroutine
  35. logical function Get_SwingLed_WN()
  36. !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingLed_WN
  37. !DEC$ ATTRIBUTES ALIAS: 'Get_SwingLed_WN' :: Get_SwingLed_WN
  38. implicit none
  39. Get_SwingLed_WN = SwingLed
  40. end function
  41. end module CSwingLedNotificationVariables