Simulation Core
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

84 行
4.0 KiB

  1. # 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90"
  2. module CTopDrivePanel
  3. use CTopDrivePanelVariables
  4. use SimulationVariables
  5. use CLog3
  6. implicit none
  7. public
  8. contains
  9. subroutine TopDrivePanelFromJson(parent)
  10. type(json_value),pointer :: parent
  11. type(json_core) :: json
  12. type(json_value),pointer :: p,pval
  13. logical::is_found
  14. ! 1. get related root
  15. call json%get(parent,'TopDrivePanel',p)
  16. ! 2. get member of data type from node
  17. call json%get(p,'TopDriveTdsPowerState',pval)
  18. call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTdsPowerState)
  19. call json%get(p,'TopDriveTorqueWrench',pval)
  20. call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueWrench)
  21. call json%get(p,'TopDriveDrillTorqueState',pval)
  22. call json%get(pval,data%Equipments%TopDrivePanel%TopDriveDrillTorqueState)
  23. call json%get(p,'TopDriveLinkTiltState',pval)
  24. call json%get(pval,data%Equipments%TopDrivePanel%TopDriveLinkTiltState)
  25. call json%get(p,'TopDriveIbop',pval)
  26. call json%get(pval,data%Equipments%TopDrivePanel%TopDriveIbop)
  27. call json%get(p,'TopDriveTorqueLimitKnob',pval)
  28. call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueLimitKnob)
  29. call json%get(p,'RpmKnob',pval)
  30. call json%get(pval,data%Equipments%TopDrivePanel%RpmKnob)
  31. ! call json%get(p,'TopDriveOperationFaultLed',pval)
  32. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveOperationFaultLed)
  33. ! call json%get(p,'TopDriveTdsPowerLed',pval)
  34. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTdsPowerLed)
  35. ! call json%get(p,'TopDriveTorqueWrenchLed',pval)
  36. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueWrenchLed)
  37. ! call json%get(p,'TopDriveLinkTiltLed',pval)
  38. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveLinkTiltLed)
  39. ! call json%get(p,'TopDriveIbopLed',pval)
  40. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveIbopLed)
  41. ! call json%get(p,'TopDriveTorqueLimitGauge',pval)
  42. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueLimitGauge)
  43. ! call json%get(p,'TopDriveTorqueGauge',pval)
  44. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueGauge)
  45. ! call json%get(p,'TopDriveRpmGauge',pval)
  46. ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveRpmGauge)
  47. end subroutine
  48. subroutine TopDrivePanelToJson(parent)
  49. type(json_value),pointer :: parent
  50. type(json_core) :: json
  51. type(json_value),pointer :: p,pform
  52. ! 1. create new node
  53. call json%create_object(p,'TopDrivePanel')
  54. ! call json%add(pform,"TopDriveTdsPowerState",data%Equipments%TopDrivePanel%TopDriveTdsPowerState)
  55. ! call json%add(pform,"TopDriveTorqueWrench",data%Equipments%TopDrivePanel%TopDriveTorqueWrench)
  56. ! call json%add(pform,"TopDriveDrillTorqueState",data%Equipments%TopDrivePanel%TopDriveDrillTorqueState)
  57. ! call json%add(pform,"TopDriveLinkTiltState",data%Equipments%TopDrivePanel%TopDriveLinkTiltState)
  58. ! call json%add(pform,"TopDriveIbop",data%Equipments%TopDrivePanel%TopDriveIbop)
  59. ! call json%add(pform,"TopDriveTorqueLimitKnob",data%Equipments%TopDrivePanel%TopDriveTorqueLimitKnob)
  60. ! call json%add(pform,"RpmKnob",data%Equipments%TopDrivePanel%RpmKnob)
  61. call json%add(pform,"TopDriveOperationFaultLed",data%Equipments%TopDrivePanel%TopDriveOperationFaultLed)
  62. call json%add(pform,"TopDriveTdsPowerLed",data%Equipments%TopDrivePanel%TopDriveTdsPowerLed)
  63. call json%add(pform,"TopDriveTorqueWrenchLed",data%Equipments%TopDrivePanel%TopDriveTorqueWrenchLed)
  64. call json%add(pform,"TopDriveLinkTiltLed",data%Equipments%TopDrivePanel%TopDriveLinkTiltLed)
  65. call json%add(pform,"TopDriveIbopLed",data%Equipments%TopDrivePanel%TopDriveIbopLed)
  66. call json%add(pform,"TopDriveTorqueLimitGauge",data%Equipments%TopDrivePanel%TopDriveTorqueLimitGauge)
  67. call json%add(pform,"TopDriveTorqueGauge",data%Equipments%TopDrivePanel%TopDriveTorqueGauge)
  68. call json%add(pform,"TopDriveRpmGauge",data%Equipments%TopDrivePanel%TopDriveRpmGauge)
  69. call json%add(parent,p)
  70. end subroutine
  71. end module CTopDrivePanel