|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CChokeControlPanel.f90"
- module CChokeControlPanel
- use CChokeControlPanelVariables
- use SimulationVariables
- implicit none
- public
- contains
-
- subroutine ChokeControlPanelFromJson(parent)
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p,pval
- ! 1. get related root
- call json%get(parent,'ChokeControl',p)
-
- ! 2. get member of data type from node
- call json%get(p,'ChokePanelPumpSelectorSwitch',pval)
- call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
- call json%get(p,'ChokePanelStrokeResetSwitch',pval)
- call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch)
- call json%get(p,'ChokeSelectorSwitch',pval)
- call json%get(pval,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
- call json%get(p,'ChokeRateControlKnob',pval)
- call json%get(pval,data%Equipments%ChokeControlPanel%ChokeRateControlKnob)
- call json%get(p,'ChokeControlLever',pval)
- call json%get(pval,data%Equipments%ChokeControlPanel%ChokeControlLever)
- call json%get(p,'ChokePanelRigAirSwitch',pval)
- call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
- ! call json%get(p,'EnableAutoChoke',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%EnableAutoChoke)
- ! call json%get(p,'StandPipePressure',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%StandPipePressure)
- ! call json%get(p,'CasingPressure',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%CasingPressure)
- ! call json%get(p,'ChokePosition',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%ChokePosition)
- ! call json%get(p,'ChokePanelSPMCounter',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelSPMCounter)
- ! call json%get(p,'ChokePanelTotalStrokeCounter',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelTotalStrokeCounter)
- ! call json%get(p,'Choke1LED',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%Choke1LED)
- ! call json%get(p,'Choke2LED',pval)
- ! call json%get(pval,data%Equipments%ChokeControlPanel%Choke2LED)
- end subroutine
-
- subroutine ChokeControlPanelToJson(parent)
-
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p
-
- ! 1. create new node
- call json%create_object(p,'ChokeControl')
- ! call json%add(p,"ChokePanelPumpSelectorSwitch",data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
- ! call json%add(p,"ChokePanelStrokeResetSwitch",data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch)
- ! call json%add(p,"ChokeSelectorSwitch",data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
- ! call json%add(p,"ChokeRateControlKnob",data%Equipments%ChokeControlPanel%ChokeRateControlKnob)
- ! call json%add(p,"ChokeControlLever",data%Equipments%ChokeControlPanel%ChokeControlLever)
- ! call json%add(p,"ChokePanelRigAirSwitch",data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
- ! call json%add(p,"EnableAutoChoke",data%Equipments%ChokeControlPanel%EnableAutoChoke)
- call json%add(p,"StandPipePressure",data%Equipments%ChokeControlPanel%StandPipePressure)
- call json%add(p,"CasingPressure",data%Equipments%ChokeControlPanel%CasingPressure)
- call json%add(p,"ChokePosition",data%Equipments%ChokeControlPanel%ChokePosition)
- call json%add(p,"ChokePanelSPMCounter",data%Equipments%ChokeControlPanel%ChokePanelSPMCounter)
- call json%add(p,"ChokePanelTotalStrokeCounter",data%Equipments%ChokeControlPanel%ChokePanelTotalStrokeCounter)
- call json%add(p,"Choke1LED",data%Equipments%ChokeControlPanel%Choke1LED)
- call json%add(p,"Choke2LED",data%Equipments%ChokeControlPanel%Choke2LED)
-
-
- call json%add(parent,p)
- end subroutine
-
- end module CChokeControlPanel
|