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.
 
 
 
 
 
 

54 lines
1.2 KiB

  1. module CSlackOff
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. logical :: SlackOff = .false.
  5. public
  6. type(VoidEventHandlerCollection) :: OnSlackOffChange
  7. private :: SlackOff
  8. contains
  9. subroutine Set_SlackOff(v)
  10. implicit none
  11. logical , intent(in) :: v
  12. #ifdef ExcludeExtraChanges
  13. if(SlackOff == v) return
  14. #endif
  15. SlackOff = v
  16. #ifdef deb
  17. print*, 'SlackOff=', SlackOff
  18. #endif
  19. call OnSlackOffChange%RunAll()
  20. end subroutine
  21. logical function Get_SlackOff()
  22. implicit none
  23. Get_SlackOff = SlackOff
  24. end function
  25. subroutine Set_SlackOff_WN(v)
  26. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlackOff_WN
  27. !DEC$ ATTRIBUTES ALIAS: 'Set_SlackOff_WN' :: Set_SlackOff_WN
  28. implicit none
  29. logical , intent(in) :: v
  30. call Set_SlackOff(v)
  31. end subroutine
  32. logical function Get_SlackOff_WN()
  33. !DEC$ ATTRIBUTES DLLEXPORT :: Get_SlackOff_WN
  34. !DEC$ ATTRIBUTES ALIAS: 'Get_SlackOff_WN' :: Get_SlackOff_WN
  35. implicit none
  36. Get_SlackOff_WN = SlackOff
  37. end function
  38. subroutine Subscribe_SlackOff()
  39. implicit none
  40. end subroutine
  41. end module CSlackOff