|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- module CBopControlPanel
- ! use CBopControlPanel
- use SimulationVariables
- implicit none
- public
- contains
-
- subroutine BopControlPanelFromJson(parent)
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p,pval
-
- ! 1. get related root
- call json%get(parent,'BopControl',p)
- call json%get(p,'AirMasterValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%AirMasterValve)
- call json%get(p,'ByePassValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%ByePassValve)
- call json%get(p,'AnnularValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%AnnularValve)
- call json%get(p,'UpperRamsValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%UpperRamsValve)
- call json%get(p,'MiddleRamsValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsValve)
- call json%get(p,'KillLineValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%KillLineValve)
- call json%get(p,'ChokeLineValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%ChokeLineValve)
- call json%get(p,'LowerRamsValve',pval)
- call json%get(pval,data%Equipments%BopControlPanel%LowerRamsValve)
- ! call json%get(p,'ManifoldPressureGauge',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%ManifoldPressureGauge)
- ! call json%get(p,'AirSupplyPressureGauge',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%AirSupplyPressureGauge)
- ! call json%get(p,'AccumulatorPressureGauge',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%AccumulatorPressureGauge)
- ! call json%get(p,'AnnularPressureGauge',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%AnnularPressureGauge)
- ! call json%get(p,'AnnularOpenLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%AnnularOpenLED)
- ! call json%get(p,'AnnularCloseLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%AnnularCloseLED)
- ! call json%get(p,'UpperRamsOpenLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%UpperRamsOpenLED)
- ! call json%get(p,'UpperRamsCloseLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%UpperRamsCloseLED)
- ! call json%get(p,'MiddleRamsOpenLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsOpenLED)
- ! call json%get(p,'MiddleRamsCloseLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsCloseLED)
- ! call json%get(p,'KillLineOpenLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%KillLineOpenLED)
- ! call json%get(p,'KillLineCloseLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%KillLineCloseLED)
- ! call json%get(p,'ChokeLineOpenLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%ChokeLineOpenLED)
- ! call json%get(p,'ChokeLineCloseLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%ChokeLineCloseLED)
- ! call json%get(p,'LowerRamsOpenLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsOpenLED)
- ! call json%get(p,'LowerRamsCloseLED',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsCloseLED)
- ! call json%get(p,'AnnularStatus',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%AnnularStatus)
- ! call json%get(p,'UpperRamsStatus',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%UpperRamsStatus)
- ! call json%get(p,'MiddleRamsStatus',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsStatus)
- ! call json%get(p,'LowerRamsStatus',pval)
- ! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsStatus)
- call json%get(p,'AnnularRegulatorSetControl',pval)
- call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
- ! 2. get member of data type from node
- end subroutine
-
- subroutine BopControlPanelToJson(parent)
-
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p
-
- ! 1. create new node
- call json%create_object(p,'BopControl')
-
- ! call json%add(p,"AnnularRegulatorSetControl",data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
- call json%add(p,"AirMasterValve",data%Equipments%BopControlPanel%AirMasterValve)
- call json%add(p,"ByePassValve",data%Equipments%BopControlPanel%ByePassValve)
- ! call json%add(p,"AnnularValve",data%Equipments%BopControlPanel%AnnularValve)
- ! call json%add(p,"UpperRamsValve",data%Equipments%BopControlPanel%UpperRamsValve)
- ! call json%add(p,"MiddleRamsValve",data%Equipments%BopControlPanel%MiddleRamsValve)
- ! call json%add(p,"KillLineValve",data%Equipments%BopControlPanel%KillLineValve)
- ! call json%add(p,"ChokeLineValve",data%Equipments%BopControlPanel%ChokeLineValve)
- ! call json%add(p,"LowerRamsValve",data%Equipments%BopControlPanel%LowerRamsValve)
- call json%add(p,"ManifoldPressureGauge",data%Equipments%BopControlPanel%ManifoldPressureGauge)
- call json%add(p,"AirSupplyPressureGauge",data%Equipments%BopControlPanel%AirSupplyPressureGauge)
- call json%add(p,"AccumulatorPressureGauge",data%Equipments%BopControlPanel%AccumulatorPressureGauge)
- call json%add(p,"AnnularPressureGauge",data%Equipments%BopControlPanel%AnnularPressureGauge)
- call json%add(p,"AnnularOpenLED",data%Equipments%BopControlPanel%AnnularOpenLED)
- call json%add(p,"AnnularCloseLED",data%Equipments%BopControlPanel%AnnularCloseLED)
- call json%add(p,"UpperRamsOpenLED",data%Equipments%BopControlPanel%UpperRamsOpenLED)
- call json%add(p,"UpperRamsCloseLED",data%Equipments%BopControlPanel%UpperRamsCloseLED)
- call json%add(p,"MiddleRamsOpenLED",data%Equipments%BopControlPanel%MiddleRamsOpenLED)
- call json%add(p,"MiddleRamsCloseLED",data%Equipments%BopControlPanel%MiddleRamsCloseLED)
- call json%add(p,"KillLineOpenLED",data%Equipments%BopControlPanel%KillLineOpenLED)
- call json%add(p,"KillLineCloseLED",data%Equipments%BopControlPanel%KillLineCloseLED)
- call json%add(p,"ChokeLineOpenLED",data%Equipments%BopControlPanel%ChokeLineOpenLED)
- call json%add(p,"ChokeLineCloseLED",data%Equipments%BopControlPanel%ChokeLineCloseLED)
- call json%add(p,"LowerRamsOpenLED",data%Equipments%BopControlPanel%LowerRamsOpenLED)
- call json%add(p,"LowerRamsCloseLED",data%Equipments%BopControlPanel%LowerRamsCloseLED)
- call json%add(p,"AnnularStatus",data%Equipments%BopControlPanel%AnnularStatus)
- call json%add(p,"UpperRamsStatus",data%Equipments%BopControlPanel%UpperRamsStatus)
- call json%add(p,"MiddleRamsStatus",data%Equipments%BopControlPanel%MiddleRamsStatus)
- call json%add(p,"LowerRamsStatus",data%Equipments%BopControlPanel%LowerRamsStatus)
-
- call json%add(parent,p)
- end subroutine
-
-
-
- subroutine OpenAnnular()
- use CManifolds
- implicit none
- call ChangeValve(52, .true.)
- end subroutine
-
- subroutine CloseAnnular()
- use CManifolds
- implicit none
- call ChangeValve(52, .false.)
- end subroutine
-
- subroutine OpenUpperRams()
- use CManifolds
- implicit none
- call ChangeValve(51, .true.)
- end subroutine
-
- subroutine CloseUpperRams()
- use CManifolds
- implicit none
- call ChangeValve(51, .false.)
- end subroutine
-
- subroutine OpenMiddleRams()
- use CManifolds
- implicit none
- call ToggleMiddleRams(.true.)
- end subroutine
-
- subroutine CloseMiddleRams()
- use CManifolds
- implicit none
- call ToggleMiddleRams(.false.)
- end subroutine
-
- subroutine OpenKillLine()
- use CManifolds
- implicit none
- call ChangeValve(46, .true.)
- end subroutine
-
- subroutine CloseKillLine()
- use CManifolds
- implicit none
- call ChangeValve(46, .false.)
- end subroutine
-
- subroutine OpenChokeLine()
- use CManifolds
- implicit none
- call ChangeValve(47, .true.)
- !WRITE (*,*) ' valve 47 true '
- end subroutine
-
- subroutine CloseChokeLine()
- use CManifolds
- implicit none
- call ChangeValve(47, .false.)
- !WRITE (*,*) ' valve 47 false '
- end subroutine
-
- subroutine OpenLowerRams()
- use CManifolds
- implicit none
- call ChangeValve(49, .true.)
- !WRITE (*,*) ' valve 49 true '
- end subroutine
-
- subroutine CloseLowerRams()
- use CManifolds
- implicit none
- call ChangeValve(49, .false.)
- !WRITE (*,*) ' valve 49 false '
- end subroutine
-
- end module CBopControlPanel
|