|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CDrillingConsole.f90"
- module CDrillingConsole
- use CDrillingConsoleVariables
- use SimulationVariables
- use SimulationVariables
- ! use CSimulationVariables
- use CLog4
- use CLog3
- implicit none
- public
- contains
-
-
- subroutine DrillingConsoleFromJson(parent)
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p,pval
-
- ! 1. get related root
- call json%get(parent,'Drilling',p)
-
- ! 2. get member of data type from node
- call json%get(p,'AssignmentSwitch',pval)
- call json%get(pval,data%Equipments%DrillingConsole%AssignmentSwitch)
- call json%get(p,'EmergencySwitch',pval)
- call json%get(pval,data%Equipments%DrillingConsole%EmergencySwitch)
- call json%get(p,'RTTorqueLimitKnob',pval)
- call json%get(pval,data%Equipments%DrillingConsole%RTTorqueLimitKnob)
- call json%get(p,'MP1CPSwitchI',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitchI)
- call json%get(p,'MP1CPSwitchT',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitchT)
- call json%get(p,'MP1CPSwitch',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitch)
- call json%get(p,'MP1ThrottleUpdate',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP1ThrottleUpdate)
- call json%get(p,'MP1Throttle',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP1Throttle)
- call json%get(p,'MP2SwitchI',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP2SwitchI)
- call json%get(p,'MP2SwitchT',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP2SwitchT)
- call json%get(p,'MP2Switch',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP2Switch)
- call json%get(p,'MP2ThrottleUpdate',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP2ThrottleUpdate)
- call json%get(p,'MP2Throttle',pval)
- call json%get(pval,data%Equipments%DrillingConsole%MP2Throttle)
- call json%get(p,'DWSwitch',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWSwitch)
- call json%get(p,'DWThrottle',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWThrottle)
- call json%get(p,'RTSwitch',pval)
- call json%get(pval,data%Equipments%DrillingConsole%RTSwitch)
- call json%get(p,'RTThrottle',pval)
- call json%get(pval,data%Equipments%DrillingConsole%RTThrottle)
- call json%get(p,'DWBreak',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWBreak)
- call json%get(p,'PreviousDWBreak',pval)
- call json%get(pval,data%Equipments%DrillingConsole%PreviousDWBreak)
- call json%get(p,'ForceBreak',pval)
- call json%get(pval,data%Equipments%DrillingConsole%ForceBreak)
- call json%get(p,'DWAcceleretor',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWAcceleretor)
- call json%get(p,'DWTransmisionLever',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWTransmisionLever)
- call json%get(p,'DWPowerLever',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWPowerLever)
- call json%get(p,'TongLever',pval)
- call json%get(pval,data%Equipments%DrillingConsole%TongLever)
- call json%get(p,'RTTransmissionLever',pval)
- call json%get(pval,data%Equipments%DrillingConsole%RTTransmissionLever)
- call json%get(p,'DWClutchLever',pval)
- call json%get(pval,data%Equipments%DrillingConsole%DWClutchLever)
- call json%get(p,'EddyBreakLever',pval)
- call json%get(pval,data%Equipments%DrillingConsole%EddyBreakLever)
- call json%get(p,'AutoDW',pval)
- call json%get(pval,data%Equipments%DrillingConsole%AutoDW)
- call json%get(p,'GEN1',pval)
- call json%get(pval,data%Equipments%DrillingConsole%GEN1)
- call json%get(p,'GEN2',pval)
- call json%get(pval,data%Equipments%DrillingConsole%GEN2)
- call json%get(p,'GEN3',pval)
- call json%get(pval,data%Equipments%DrillingConsole%GEN3)
- call json%get(p,'GEN4',pval)
- call json%get(pval,data%Equipments%DrillingConsole%GEN4)
- call json%get(p,'Permission_OpenKellyCock',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Permission_OpenKellyCock)
- call json%get(p,'OpenKellyCock',pval)
- call json%get(pval,data%Equipments%DrillingConsole%OpenKellyCock)
- call json%get(p,'Permission_CloseKellyCock',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Permission_CloseKellyCock)
- call json%get(p,'CloseKellyCock',pval)
- call json%get(pval,data%Equipments%DrillingConsole%CloseKellyCock)
- call json%get(p,'Permission_OpenSafetyValve',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Permission_OpenSafetyValve)
- call json%get(p,'OpenSafetyValve',pval)
- call json%get(pval,data%Equipments%DrillingConsole%OpenSafetyValve)
- call json%get(p,'Permission_CloseSafetyValve',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Permission_CloseSafetyValve)
- call json%get(p,'CloseSafetyValve',pval)
- call json%get(pval,data%Equipments%DrillingConsole%CloseSafetyValve)
- call json%get(p,'Permission_IRSafetyValve',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Permission_IRSafetyValve)
- call json%get(p,'IRSafetyValve',pval)
- call json%get(pval,data%Equipments%DrillingConsole%IRSafetyValve)
- call json%get(p,'Permission_IRIBop',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Permission_IRIBop)
- call json%get(p,'IRIBop',pval)
- call json%get(pval,data%Equipments%DrillingConsole%IRIBop)
- call json%get(p,'LatchPipe',pval)
- call json%get(pval,data%Equipments%DrillingConsole%LatchPipe)
- call json%get(p,'UnlatchPipe',pval)
- call json%get(pval,data%Equipments%DrillingConsole%UnlatchPipe)
- call json%get(p,'Swing',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Swing)
- call json%get(p,'FillMouseHole',pval)
- call json%get(pval,data%Equipments%DrillingConsole%FillMouseHole)
- call json%get(p,'Slips',pval)
- call json%get(pval,data%Equipments%DrillingConsole%Slips)
- call json%get(p,'BrakeLeverCoefficient',pval)
- call json%get(pval,data%Equipments%DrillingConsole%BrakeLeverCoefficient)
- call json%get(p,'HideDrillingBrake',pval)
- call json%get(pval,data%Equipments%DrillingConsole%HideDrillingBrake)
- call json%get(p,'ParkingBrakeBtn',pval)
- call json%get(pval,data%Equipments%DrillingConsole%ParkingBrakeBtn)
-
- ! call json%get(p,'ParkingBrakeLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%ParkingBrakeLed)
- ! call json%get(p,'GEN1LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN1LED)
- ! call json%get(p,'GEN2LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN2LED)
- ! call json%get(p,'GEN3LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN3LED)
- ! call json%get(p,'GEN4LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN4LED)
- ! call json%get(p,'SCR1LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%SCR1LED)
- ! call json%get(p,'SCR2LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%SCR2LED)
- ! call json%get(p,'SCR3LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%SCR3LED)
- ! call json%get(p,'SCR4LED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%SCR4LED)
- ! call json%get(p,'MP1BLWR',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%MP1BLWR)
- ! call json%get(p,'MP2BLWR',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%MP2BLWR)
- ! call json%get(p,'DWBLWR',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%DWBLWR)
- ! call json%get(p,'RTBLWR',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%RTBLWR)
- ! call json%get(p,'PWRLIM',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%PWRLIM)
- ! call json%get(p,'PWRLIMMTR',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%PWRLIMMTR)
- ! call json%get(p,'RTTorqueLimitGauge',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%RTTorqueLimitGauge)
- ! call json%get(p,'AutoDWLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%AutoDWLED)
- ! call json%get(p,'GEN1BTNLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN1BTNLED)
- ! call json%get(p,'GEN2BTNLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN2BTNLED)
- ! call json%get(p,'GEN3BTNLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN3BTNLED)
- ! call json%get(p,'GEN4BTNLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%GEN4BTNLED)
- ! call json%get(p,'OpenKellyCockLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%OpenKellyCockLed)
- ! call json%get(p,'CloseKellyCockLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%CloseKellyCockLed)
- ! call json%get(p,'OpenSafetyValveLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%OpenSafetyValveLed)
- ! call json%get(p,'CloseSafetyValveLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%CloseSafetyValveLed)
- ! call json%get(p,'IRSafetyValveLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%IRSafetyValveLed)
- ! call json%get(p,'IRIBopLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%IRIBopLed)
- ! call json%get(p,'LatchPipeLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%LatchPipeLED)
- ! call json%get(p,'UnlatchPipeLED',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%UnlatchPipeLED)
- ! call json%get(p,'SwingLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%SwingLed)
- ! call json%get(p,'FillMouseHoleLed',pval)
- ! call json%get(pval,data%Equipments%DrillingConsole%FillMouseHoleLed)
- end subroutine
-
- subroutine DrillingConsoleToJson(parent)
-
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p
-
- ! 1. create new node
- call json%create_object(p,'Drilling')
- ! call json%add(p,"AssignmentSwitch",data%Equipments%DrillingConsole%AssignmentSwitch)
- ! call json%add(p,"EmergencySwitch",data%Equipments%DrillingConsole%EmergencySwitch)
- ! call json%add(p,"RTTorqueLimitKnob",data%Equipments%DrillingConsole%RTTorqueLimitKnob)
- ! call json%add(p,"MP1CPSwitchI",data%Equipments%DrillingConsole%MP1CPSwitchI)
- ! call json%add(p,"MP1CPSwitchT",data%Equipments%DrillingConsole%MP1CPSwitchT)
- ! call json%add(p,"MP1CPSwitch",data%Equipments%DrillingConsole%MP1CPSwitch)
- ! call json%add(p,"MP1ThrottleUpdate",data%Equipments%DrillingConsole%MP1ThrottleUpdate)
- ! call json%add(p,"MP1Throttle",data%Equipments%DrillingConsole%MP1Throttle)
- ! call json%add(p,"MP2SwitchI",data%Equipments%DrillingConsole%MP2SwitchI)
- ! call json%add(p,"MP2SwitchT",data%Equipments%DrillingConsole%MP2SwitchT)
- ! call json%add(p,"MP2Switch",data%Equipments%DrillingConsole%MP2Switch)
- ! call json%add(p,"MP2ThrottleUpdate",data%Equipments%DrillingConsole%MP2ThrottleUpdate)
- ! call json%add(p,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle)
- ! call json%add(p,"DWSwitch",data%Equipments%DrillingConsole%DWSwitch)
- ! call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle)
- ! call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)
- ! call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle)
- ! call json%add(p,"DWBreak",data%Equipments%DrillingConsole%DWBreak)
- ! call json%add(p,"PreviousDWBreak",data%Equipments%DrillingConsole%PreviousDWBreak)
- ! call json%add(p,"ForceBreak",data%Equipments%DrillingConsole%ForceBreak)
- ! call json%add(p,"DWAcceleretor",data%Equipments%DrillingConsole%DWAcceleretor)
- ! call json%add(p,"DWTransmisionLever",data%Equipments%DrillingConsole%DWTransmisionLever)
- ! call json%add(p,"DWPowerLever",data%Equipments%DrillingConsole%DWPowerLever)
- ! call json%add(p,"TongLever",data%Equipments%DrillingConsole%TongLever)
- ! call json%add(p,"RTTransmissionLever",data%Equipments%DrillingConsole%RTTransmissionLever)
- ! call json%add(p,"DWClutchLever",data%Equipments%DrillingConsole%DWClutchLever)
- ! call json%add(p,"EddyBreakLever",data%Equipments%DrillingConsole%EddyBreakLever)
- ! call json%add(p,"AutoDW",data%Equipments%DrillingConsole%AutoDW)
- ! call json%add(p,"GEN1",data%Equipments%DrillingConsole%GEN1)
- ! call json%add(p,"GEN2",data%Equipments%DrillingConsole%GEN2)
- ! call json%add(p,"GEN3",data%Equipments%DrillingConsole%GEN3)
- ! call json%add(p,"GEN4",data%Equipments%DrillingConsole%GEN4)
- ! call json%add(p,"Permission_OpenKellyCock",data%Equipments%DrillingConsole%Permission_OpenKellyCock)
- ! call json%add(p,"OpenKellyCock",data%Equipments%DrillingConsole%OpenKellyCock)
- ! call json%add(p,"Permission_CloseKellyCock",data%Equipments%DrillingConsole%Permission_CloseKellyCock)
- ! call json%add(p,"CloseKellyCock",data%Equipments%DrillingConsole%CloseKellyCock)
- ! call json%add(p,"Permission_OpenSafetyValve",data%Equipments%DrillingConsole%Permission_OpenSafetyValve)
- ! call json%add(p,"OpenSafetyValve",data%Equipments%DrillingConsole%OpenSafetyValve)
- ! call json%add(p,"Permission_CloseSafetyValve",data%Equipments%DrillingConsole%Permission_CloseSafetyValve)
- ! call json%add(p,"CloseSafetyValve",data%Equipments%DrillingConsole%CloseSafetyValve)
- ! call json%add(p,"Permission_IRSafetyValve",data%Equipments%DrillingConsole%Permission_IRSafetyValve)
- ! call json%add(p,"IRSafetyValve",data%Equipments%DrillingConsole%IRSafetyValve)
- ! call json%add(p,"Permission_IRIBop",data%Equipments%DrillingConsole%Permission_IRIBop)
- ! call json%add(p,"IRIBop",data%Equipments%DrillingConsole%IRIBop)
- ! call json%add(p,"LatchPipe",data%Equipments%DrillingConsole%LatchPipe)
- ! call json%add(p,"UnlatchPipe",data%Equipments%DrillingConsole%UnlatchPipe)
- ! call json%add(p,"Swing",data%Equipments%DrillingConsole%Swing)
- ! call json%add(p,"FillMouseHole",data%Equipments%DrillingConsole%FillMouseHole)
- ! call json%add(p,"Slips",data%Equipments%DrillingConsole%Slips)
- ! call json%add(p,"BrakeLeverCoefficient",data%Equipments%DrillingConsole%BrakeLeverCoefficient)
- ! call json%add(p,"HideDrillingBrake",data%Equipments%DrillingConsole%HideDrillingBrake)
- ! call json%add(p,"ParkingBrakeBtn",data%Equipments%DrillingConsole%ParkingBrakeBtn)
-
-
-
- call json%add(p,"ParkingBrakeLed",data%Equipments%DrillingConsole%ParkingBrakeLed)
- call json%add(p,"GEN1LED",data%Equipments%DrillingConsole%GEN1LED)
- call json%add(p,"GEN2LED",data%Equipments%DrillingConsole%GEN2LED)
- call json%add(p,"GEN3LED",data%Equipments%DrillingConsole%GEN3LED)
- call json%add(p,"GEN4LED",data%Equipments%DrillingConsole%GEN4LED)
- call json%add(p,"SCR1LED",data%Equipments%DrillingConsole%SCR1LED)
- call json%add(p,"SCR2LED",data%Equipments%DrillingConsole%SCR2LED)
- call json%add(p,"SCR3LED",data%Equipments%DrillingConsole%SCR3LED)
- call json%add(p,"SCR4LED",data%Equipments%DrillingConsole%SCR4LED)
- call json%add(p,"MP1BLWR",data%Equipments%DrillingConsole%MP1BLWR)
- call json%add(p,"MP2BLWR",data%Equipments%DrillingConsole%MP2BLWR)
- call json%add(p,"DWBLWR",data%Equipments%DrillingConsole%DWBLWR)
- call json%add(p,"RTBLWR",data%Equipments%DrillingConsole%RTBLWR)
- call json%add(p,"PWRLIM",data%Equipments%DrillingConsole%PWRLIM)
- call json%add(p,"PWRLIMMTR",data%Equipments%DrillingConsole%PWRLIMMTR)
- call json%add(p,"RTTorqueLimitGauge",data%Equipments%DrillingConsole%RTTorqueLimitGauge)
- call json%add(p,"AutoDWLED",data%Equipments%DrillingConsole%AutoDWLED)
- call json%add(p,"GEN1BTNLED",data%Equipments%DrillingConsole%GEN1BTNLED)
- call json%add(p,"GEN2BTNLED",data%Equipments%DrillingConsole%GEN2BTNLED)
- call json%add(p,"GEN3BTNLED",data%Equipments%DrillingConsole%GEN3BTNLED)
- call json%add(p,"GEN4BTNLED",data%Equipments%DrillingConsole%GEN4BTNLED)
- call json%add(p,"OpenKellyCockLed",data%Equipments%DrillingConsole%OpenKellyCockLed)
- call json%add(p,"CloseKellyCockLed",data%Equipments%DrillingConsole%CloseKellyCockLed)
- call json%add(p,"OpenSafetyValveLed",data%Equipments%DrillingConsole%OpenSafetyValveLed)
- call json%add(p,"CloseSafetyValveLed",data%Equipments%DrillingConsole%CloseSafetyValveLed)
- call json%add(p,"IRSafetyValveLed",data%Equipments%DrillingConsole%IRSafetyValveLed)
- call json%add(p,"IRIBopLed",data%Equipments%DrillingConsole%IRIBopLed)
- call json%add(p,"LatchPipeLED",data%Equipments%DrillingConsole%LatchPipeLED)
- call json%add(p,"UnlatchPipeLED",data%Equipments%DrillingConsole%UnlatchPipeLED)
- call json%add(p,"SwingLed",data%Equipments%DrillingConsole%SwingLed)
- call json%add(p,"FillMouseHoleLed",data%Equipments%DrillingConsole%FillMouseHoleLed)
-
- call json%add(parent,p)
- end subroutine
-
- end module CDrillingConsole
|