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.
 
 
 
 
 
 

86 lines
4.8 KiB

  1. module CStandPipeManifold
  2. use CStandPipeManifoldVariables
  3. use SimulationVariables
  4. implicit none
  5. public
  6. contains
  7. subroutine StandPipeManifoldFromJson(parent)
  8. type(json_value),pointer :: parent
  9. type(json_core) :: json
  10. type(json_value),pointer :: p,pval
  11. logical::is_found
  12. ! 1. get related root
  13. call json%get(parent,'StandPipeManifold',p)
  14. ! 2. get member of data type from node
  15. call json%get(p,'StandPipeManifoldValve1',pval)
  16. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve1)
  17. call json%get(p,'StandPipeManifoldValve2',pval)
  18. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve2)
  19. call json%get(p,'StandPipeManifoldValve3',pval)
  20. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve3)
  21. call json%get(p,'StandPipeManifoldValve4',pval)
  22. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve4)
  23. call json%get(p,'StandPipeManifoldValve5',pval)
  24. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve5)
  25. call json%get(p,'StandPipeManifoldValve6',pval)
  26. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve6)
  27. call json%get(p,'StandPipeManifoldValve7',pval)
  28. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve7)
  29. call json%get(p,'StandPipeManifoldValve8',pval)
  30. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve8)
  31. call json%get(p,'StandPipeManifoldValve9',pval)
  32. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve9)
  33. call json%get(p,'StandPipeManifoldValve10',pval)
  34. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve10)
  35. call json%get(p,'StandPipeManifoldValve11',pval)
  36. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve11)
  37. call json%get(p,'StandPipeManifoldValve12',pval)
  38. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve12)
  39. call json%get(p,'StandPipeManifoldValve13',pval)
  40. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve13)
  41. call json%get(p,'StandPipeManifoldValve14',pval)
  42. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve14)
  43. call json%get(p,'StandPipeManifoldValve15',pval)
  44. call json%get(pval,data%Equipments%StandPipeManifold%StandPipeManifoldValve15)
  45. ! call json%get(p,'StandPipeGauge1',pval)
  46. ! call json%get(pval,data%Equipments%StandPipeManifold%StandPipeGauge1)
  47. ! call json%get(p,'StandPipeGauge2',pval)
  48. ! call json%get(pval,data%Equipments%StandPipeManifold%StandPipeGauge2)
  49. end subroutine
  50. subroutine StandPipeManifoldToJson(parent)
  51. type(json_value),pointer :: parent
  52. type(json_core) :: json
  53. type(json_value),pointer :: p
  54. ! 1. create new node
  55. call json%create_object(p,'StandPipeManifold')
  56. ! call json%add(p,"StandPipeManifoldValve1",data%Equipments%StandPipeManifold%StandPipeManifoldValve1)
  57. ! call json%add(p,"StandPipeManifoldValve2",data%Equipments%StandPipeManifold%StandPipeManifoldValve2)
  58. ! call json%add(p,"StandPipeManifoldValve3",data%Equipments%StandPipeManifold%StandPipeManifoldValve3)
  59. ! call json%add(p,"StandPipeManifoldValve4",data%Equipments%StandPipeManifold%StandPipeManifoldValve4)
  60. ! call json%add(p,"StandPipeManifoldValve5",data%Equipments%StandPipeManifold%StandPipeManifoldValve5)
  61. ! call json%add(p,"StandPipeManifoldValve6",data%Equipments%StandPipeManifold%StandPipeManifoldValve6)
  62. ! call json%add(p,"StandPipeManifoldValve7",data%Equipments%StandPipeManifold%StandPipeManifoldValve7)
  63. ! call json%add(p,"StandPipeManifoldValve8",data%Equipments%StandPipeManifold%StandPipeManifoldValve8)
  64. ! call json%add(p,"StandPipeManifoldValve9",data%Equipments%StandPipeManifold%StandPipeManifoldValve9)
  65. ! call json%add(p,"StandPipeManifoldValve10",data%Equipments%StandPipeManifold%StandPipeManifoldValve10)
  66. ! call json%add(p,"StandPipeManifoldValve11",data%Equipments%StandPipeManifold%StandPipeManifoldValve11)
  67. ! call json%add(p,"StandPipeManifoldValve12",data%Equipments%StandPipeManifold%StandPipeManifoldValve12)
  68. ! call json%add(p,"StandPipeManifoldValve13",data%Equipments%StandPipeManifold%StandPipeManifoldValve13)
  69. ! call json%add(p,"StandPipeManifoldValve14",data%Equipments%StandPipeManifold%StandPipeManifoldValve14)
  70. ! call json%add(p,"StandPipeManifoldValve15",data%Equipments%StandPipeManifold%StandPipeManifoldValve15)
  71. call json%add(p,"StandPipeGauge1",data%Equipments%StandPipeManifold%StandPipeGauge1)
  72. call json%add(p,"StandPipeGauge2",data%Equipments%StandPipeManifold%StandPipeGauge2)
  73. call json%add(parent,p)
  74. end subroutine
  75. end module CStandPipeManifold