|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- # 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CChokeControlPanel.f90"
- module CChokeControlPanel
- use CChokeControlPanelVariables
- use SimulationVariables
- implicit none
- public
- contains
-
- subroutine ChokeControlPanelFromJson(jsonfile)
- type(json_file)::jsonfile
- logical::found
-
- call jsonfile%get('Equipments.ChokeControl.ChokePanelPumpSelectorSwitch',data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch,found)
- if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelPumpSelectorSwitch")
- call jsonfile%get('Equipments.ChokeControl.ChokePanelStrokeResetSwitch',data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch,found)
- if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelStrokeResetSwitch")
- call jsonfile%get('Equipments.ChokeControl.ChokeSelectorSwitch',data%Equipments%ChokeControlPanel%ChokeSelectorSwitch,found)
- if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeSelectorSwitch")
- call jsonfile%get('Equipments.ChokeControl.ChokeRateControlKnob',data%Equipments%ChokeControlPanel%ChokeRateControlKnob,found)
- if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeRateControlKnob")
- call jsonfile%get('Equipments.ChokeControl.ChokeControlLever',data%Equipments%ChokeControlPanel%ChokeControlLever,found)
- if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeControlLever")
- call jsonfile%get('Equipments.ChokeControl.ChokePanelRigAirSwitch',data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch,found)
- if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelRigAirSwitch")
- ! print *,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch
- 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
|