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.
 
 
 
 
 
 

57 lines
1.5 KiB

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