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.
 
 
 
 
 
 

108 lines
7.9 KiB

  1. module CDrillingConsole
  2. use CDrillingConsoleVariables
  3. use SimulationVariables
  4. use SimulationVariables
  5. ! use CSimulationVariables
  6. use CLog4
  7. use CLog3
  8. implicit none
  9. public
  10. contains
  11. subroutine DrillingConsoleToJson(parent)
  12. type(json_value),pointer :: parent
  13. type(json_core) :: json
  14. type(json_value),pointer :: p
  15. ! 1. create new node
  16. call json%create_object(p,'Drilling')
  17. call json%add(p,"AssignmentSwitch",data%EquipmentControl%DrillingConsole%AssignmentSwitch)
  18. call json%add(p,"EmergencySwitch",data%EquipmentControl%DrillingConsole%EmergencySwitch)
  19. call json%add(p,"RTTorqueLimitKnob",data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob)
  20. call json%add(p,"MP1CPSwitchI",data%EquipmentControl%DrillingConsole%MP1CPSwitchI)
  21. call json%add(p,"MP1CPSwitchT",data%EquipmentControl%DrillingConsole%MP1CPSwitchT)
  22. call json%add(p,"MP1CPSwitch",data%EquipmentControl%DrillingConsole%MP1CPSwitch)
  23. call json%add(p,"MP1ThrottleUpdate",data%EquipmentControl%DrillingConsole%MP1ThrottleUpdate)
  24. call json%add(p,"MP1Throttle",data%EquipmentControl%DrillingConsole%MP1Throttle)
  25. call json%add(p,"MP2SwitchI",data%EquipmentControl%DrillingConsole%MP2SwitchI)
  26. call json%add(p,"MP2SwitchT",data%EquipmentControl%DrillingConsole%MP2SwitchT)
  27. call json%add(p,"MP2Switch",data%EquipmentControl%DrillingConsole%MP2Switch)
  28. call json%add(p,"MP2ThrottleUpdate",data%EquipmentControl%DrillingConsole%MP2ThrottleUpdate)
  29. call json%add(p,"MP2Throttle",data%EquipmentControl%DrillingConsole%MP2Throttle)
  30. call json%add(p,"DWSwitch",data%EquipmentControl%DrillingConsole%DWSwitch)
  31. call json%add(p,"DWThrottle",data%EquipmentControl%DrillingConsole%DWThrottle)
  32. call json%add(p,"RTSwitch",data%EquipmentControl%DrillingConsole%RTSwitch)
  33. call json%add(p,"RTThrottle",data%EquipmentControl%DrillingConsole%RTThrottle)
  34. call json%add(p,"DWBreak",data%EquipmentControl%DrillingConsole%DWBreak)
  35. call json%add(p,"PreviousDWBreak",data%EquipmentControl%DrillingConsole%PreviousDWBreak)
  36. call json%add(p,"ForceBreak",data%EquipmentControl%DrillingConsole%ForceBreak)
  37. call json%add(p,"DWAcceleretor",data%EquipmentControl%DrillingConsole%DWAcceleretor)
  38. call json%add(p,"DWTransmisionLever",data%EquipmentControl%DrillingConsole%DWTransmisionLever)
  39. call json%add(p,"DWPowerLever",data%EquipmentControl%DrillingConsole%DWPowerLever)
  40. call json%add(p,"TongLever",data%EquipmentControl%DrillingConsole%TongLever)
  41. call json%add(p,"RTTransmissionLever",data%EquipmentControl%DrillingConsole%RTTransmissionLever)
  42. call json%add(p,"DWClutchLever",data%EquipmentControl%DrillingConsole%DWClutchLever)
  43. call json%add(p,"EddyBreakLever",data%EquipmentControl%DrillingConsole%EddyBreakLever)
  44. call json%add(p,"AutoDW",data%EquipmentControl%DrillingConsole%AutoDW)
  45. call json%add(p,"GEN1",data%EquipmentControl%DrillingConsole%GEN1)
  46. call json%add(p,"GEN2",data%EquipmentControl%DrillingConsole%GEN2)
  47. call json%add(p,"GEN3",data%EquipmentControl%DrillingConsole%GEN3)
  48. call json%add(p,"GEN4",data%EquipmentControl%DrillingConsole%GEN4)
  49. call json%add(p,"Permission_OpenKellyCock",data%EquipmentControl%DrillingConsole%Permission_OpenKellyCock)
  50. call json%add(p,"OpenKellyCock",data%EquipmentControl%DrillingConsole%OpenKellyCock)
  51. call json%add(p,"Permission_CloseKellyCock",data%EquipmentControl%DrillingConsole%Permission_CloseKellyCock)
  52. call json%add(p,"CloseKellyCock",data%EquipmentControl%DrillingConsole%CloseKellyCock)
  53. call json%add(p,"Permission_OpenSafetyValve",data%EquipmentControl%DrillingConsole%Permission_OpenSafetyValve)
  54. call json%add(p,"OpenSafetyValve",data%EquipmentControl%DrillingConsole%OpenSafetyValve)
  55. call json%add(p,"Permission_CloseSafetyValve",data%EquipmentControl%DrillingConsole%Permission_CloseSafetyValve)
  56. call json%add(p,"CloseSafetyValve",data%EquipmentControl%DrillingConsole%CloseSafetyValve)
  57. call json%add(p,"Permission_IRSafetyValve",data%EquipmentControl%DrillingConsole%Permission_IRSafetyValve)
  58. call json%add(p,"IRSafetyValve",data%EquipmentControl%DrillingConsole%IRSafetyValve)
  59. call json%add(p,"Permission_IRIBop",data%EquipmentControl%DrillingConsole%Permission_IRIBop)
  60. call json%add(p,"IRIBop",data%EquipmentControl%DrillingConsole%IRIBop)
  61. call json%add(p,"LatchPipe",data%EquipmentControl%DrillingConsole%LatchPipe)
  62. call json%add(p,"UnlatchPipe",data%EquipmentControl%DrillingConsole%UnlatchPipe)
  63. call json%add(p,"Swing",data%EquipmentControl%DrillingConsole%Swing)
  64. call json%add(p,"FillMouseHole",data%EquipmentControl%DrillingConsole%FillMouseHole)
  65. call json%add(p,"Slips",data%EquipmentControl%DrillingConsole%Slips)
  66. call json%add(p,"BrakeLeverCoefficient",data%EquipmentControl%DrillingConsole%BrakeLeverCoefficient)
  67. call json%add(p,"HideDrillingBrake",data%EquipmentControl%DrillingConsole%HideDrillingBrake)
  68. call json%add(p,"ParkingBrakeBtn",data%EquipmentControl%DrillingConsole%ParkingBrakeBtn)
  69. call json%add(p,"ParkingBrakeLed",data%EquipmentControl%DrillingConsole%ParkingBrakeLed)
  70. call json%add(p,"GEN1LED",data%EquipmentControl%DrillingConsole%GEN1LED)
  71. call json%add(p,"GEN2LED",data%EquipmentControl%DrillingConsole%GEN2LED)
  72. call json%add(p,"GEN3LED",data%EquipmentControl%DrillingConsole%GEN3LED)
  73. call json%add(p,"GEN4LED",data%EquipmentControl%DrillingConsole%GEN4LED)
  74. call json%add(p,"SCR1LED",data%EquipmentControl%DrillingConsole%SCR1LED)
  75. call json%add(p,"SCR2LED",data%EquipmentControl%DrillingConsole%SCR2LED)
  76. call json%add(p,"SCR3LED",data%EquipmentControl%DrillingConsole%SCR3LED)
  77. call json%add(p,"SCR4LED",data%EquipmentControl%DrillingConsole%SCR4LED)
  78. call json%add(p,"MP1BLWR",data%EquipmentControl%DrillingConsole%MP1BLWR)
  79. call json%add(p,"MP2BLWR",data%EquipmentControl%DrillingConsole%MP2BLWR)
  80. call json%add(p,"DWBLWR",data%EquipmentControl%DrillingConsole%DWBLWR)
  81. call json%add(p,"RTBLWR",data%EquipmentControl%DrillingConsole%RTBLWR)
  82. call json%add(p,"PWRLIM",data%EquipmentControl%DrillingConsole%PWRLIM)
  83. call json%add(p,"PWRLIMMTR",data%EquipmentControl%DrillingConsole%PWRLIMMTR)
  84. call json%add(p,"RTTorqueLimitGauge",data%EquipmentControl%DrillingConsole%RTTorqueLimitGauge)
  85. call json%add(p,"AutoDWLED",data%EquipmentControl%DrillingConsole%AutoDWLED)
  86. call json%add(p,"GEN1BTNLED",data%EquipmentControl%DrillingConsole%GEN1BTNLED)
  87. call json%add(p,"GEN2BTNLED",data%EquipmentControl%DrillingConsole%GEN2BTNLED)
  88. call json%add(p,"GEN3BTNLED",data%EquipmentControl%DrillingConsole%GEN3BTNLED)
  89. call json%add(p,"GEN4BTNLED",data%EquipmentControl%DrillingConsole%GEN4BTNLED)
  90. call json%add(p,"OpenKellyCockLed",data%EquipmentControl%DrillingConsole%OpenKellyCockLed)
  91. call json%add(p,"CloseKellyCockLed",data%EquipmentControl%DrillingConsole%CloseKellyCockLed)
  92. call json%add(p,"OpenSafetyValveLed",data%EquipmentControl%DrillingConsole%OpenSafetyValveLed)
  93. call json%add(p,"CloseSafetyValveLed",data%EquipmentControl%DrillingConsole%CloseSafetyValveLed)
  94. call json%add(p,"IRSafetyValveLed",data%EquipmentControl%DrillingConsole%IRSafetyValveLed)
  95. call json%add(p,"IRIBopLed",data%EquipmentControl%DrillingConsole%IRIBopLed)
  96. call json%add(p,"LatchPipeLED",data%EquipmentControl%DrillingConsole%LatchPipeLED)
  97. call json%add(p,"UnlatchPipeLED",data%EquipmentControl%DrillingConsole%UnlatchPipeLED)
  98. call json%add(p,"SwingLed",data%EquipmentControl%DrillingConsole%SwingLed)
  99. call json%add(p,"FillMouseHoleLed",data%EquipmentControl%DrillingConsole%FillMouseHoleLed)
  100. call json%add(parent,p)
  101. end subroutine
  102. end module CDrillingConsole