module CChokeControlPanel use CChokeControlPanelVariables use SimulationVariables implicit none public contains 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%EquipmentControl%ChokeControlPanel%ChokePanelPumpSelectorSwitch) call json%add(p,"ChokePanelStrokeResetSwitch",data%EquipmentControl%ChokeControlPanel%ChokePanelStrokeResetSwitch) call json%add(p,"ChokeSelectorSwitch",data%EquipmentControl%ChokeControlPanel%ChokeSelectorSwitch) call json%add(p,"ChokeRateControlKnob",data%EquipmentControl%ChokeControlPanel%ChokeRateControlKnob) call json%add(p,"ChokeControlLever",data%EquipmentControl%ChokeControlPanel%ChokeControlLever) call json%add(p,"ChokePanelRigAirSwitch",data%EquipmentControl%ChokeControlPanel%ChokePanelRigAirSwitch) call json%add(p,"EnableAutoChoke",data%EquipmentControl%ChokeControlPanel%EnableAutoChoke) call json%add(p,"StandPipePressure",data%EquipmentControl%ChokeControlPanel%StandPipePressure) call json%add(p,"CasingPressure",data%EquipmentControl%ChokeControlPanel%CasingPressure) call json%add(p,"ChokePosition",data%EquipmentControl%ChokeControlPanel%ChokePosition) call json%add(p,"ChokePanelSPMCounter",data%EquipmentControl%ChokeControlPanel%ChokePanelSPMCounter) call json%add(p,"ChokePanelTotalStrokeCounter",data%EquipmentControl%ChokeControlPanel%ChokePanelTotalStrokeCounter) call json%add(p,"Choke1LED",data%EquipmentControl%ChokeControlPanel%Choke1LED) call json%add(p,"Choke2LED",data%EquipmentControl%ChokeControlPanel%Choke2LED) call json%add(parent,p) end subroutine end module CChokeControlPanel