|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- # 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90"
- module CTopDrivePanel
- use CTopDrivePanelVariables
- use SimulationVariables
- use CLog3
- implicit none
- public
- contains
-
- subroutine TopDrivePanelFromJson(parent)
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p,pval
- logical::is_found
-
- ! 1. get related root
- call json%get(parent,'TopDrivePanel',p)
-
- ! 2. get member of data type from node
- call json%get(p,'TopDriveTdsPowerState',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTdsPowerState)
- call json%get(p,'TopDriveTorqueWrench',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueWrench)
- call json%get(p,'TopDriveDrillTorqueState',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%TopDriveDrillTorqueState)
- call json%get(p,'TopDriveLinkTiltState',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%TopDriveLinkTiltState)
- call json%get(p,'TopDriveIbop',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%TopDriveIbop)
- call json%get(p,'TopDriveTorqueLimitKnob',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueLimitKnob)
- call json%get(p,'RpmKnob',pval)
- call json%get(pval,data%Equipments%TopDrivePanel%RpmKnob)
-
- ! call json%get(p,'TopDriveOperationFaultLed',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveOperationFaultLed)
- ! call json%get(p,'TopDriveTdsPowerLed',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTdsPowerLed)
- ! call json%get(p,'TopDriveTorqueWrenchLed',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueWrenchLed)
- ! call json%get(p,'TopDriveLinkTiltLed',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveLinkTiltLed)
- ! call json%get(p,'TopDriveIbopLed',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveIbopLed)
- ! call json%get(p,'TopDriveTorqueLimitGauge',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueLimitGauge)
- ! call json%get(p,'TopDriveTorqueGauge',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveTorqueGauge)
- ! call json%get(p,'TopDriveRpmGauge',pval)
- ! call json%get(pval,data%Equipments%TopDrivePanel%TopDriveRpmGauge)
- end subroutine
-
- subroutine TopDrivePanelToJson(parent)
-
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p,pform
-
- ! 1. create new node
- call json%create_object(p,'TopDrivePanel')
-
- ! call json%add(pform,"TopDriveTdsPowerState",data%Equipments%TopDrivePanel%TopDriveTdsPowerState)
- ! call json%add(pform,"TopDriveTorqueWrench",data%Equipments%TopDrivePanel%TopDriveTorqueWrench)
- ! call json%add(pform,"TopDriveDrillTorqueState",data%Equipments%TopDrivePanel%TopDriveDrillTorqueState)
- ! call json%add(pform,"TopDriveLinkTiltState",data%Equipments%TopDrivePanel%TopDriveLinkTiltState)
- ! call json%add(pform,"TopDriveIbop",data%Equipments%TopDrivePanel%TopDriveIbop)
- ! call json%add(pform,"TopDriveTorqueLimitKnob",data%Equipments%TopDrivePanel%TopDriveTorqueLimitKnob)
- ! call json%add(pform,"RpmKnob",data%Equipments%TopDrivePanel%RpmKnob)
-
- call json%add(pform,"TopDriveOperationFaultLed",data%Equipments%TopDrivePanel%TopDriveOperationFaultLed)
- call json%add(pform,"TopDriveTdsPowerLed",data%Equipments%TopDrivePanel%TopDriveTdsPowerLed)
- call json%add(pform,"TopDriveTorqueWrenchLed",data%Equipments%TopDrivePanel%TopDriveTorqueWrenchLed)
- call json%add(pform,"TopDriveLinkTiltLed",data%Equipments%TopDrivePanel%TopDriveLinkTiltLed)
- call json%add(pform,"TopDriveIbopLed",data%Equipments%TopDrivePanel%TopDriveIbopLed)
- call json%add(pform,"TopDriveTorqueLimitGauge",data%Equipments%TopDrivePanel%TopDriveTorqueLimitGauge)
- call json%add(pform,"TopDriveTorqueGauge",data%Equipments%TopDrivePanel%TopDriveTorqueGauge)
- call json%add(pform,"TopDriveRpmGauge",data%Equipments%TopDrivePanel%TopDriveRpmGauge)
-
-
- call json%add(parent,p)
- end subroutine
-
- end module CTopDrivePanel
|