Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

89 řádky
4.7 KiB

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