module CTopDrivePanel use CTopDrivePanelVariables use SimulationVariables use CLog3 implicit none public contains subroutine TopDrivePanelToJson(parent) type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p,pform integer :: i ! 1. create new node call json%create_object(p,'TopDrivePanel') call json%add(pform,"TopDriveTdsPowerState",data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState) call json%add(pform,"TopDriveTorqueWrench",data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrench) call json%add(pform,"TopDriveDrillTorqueState",data%EquipmentControl%TopDrivePanel%TopDriveDrillTorqueState) call json%add(pform,"TopDriveLinkTiltState",data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltState) call json%add(pform,"TopDriveIbop",data%EquipmentControl%TopDrivePanel%TopDriveIbop) call json%add(pform,"TopDriveTorqueLimitKnob",data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob) call json%add(pform,"RpmKnob",data%EquipmentControl%TopDrivePanel%RpmKnob) call json%add(pform,"TopDriveOperationFaultLed",data%EquipmentControl%TopDrivePanel%TopDriveOperationFaultLed) call json%add(pform,"TopDriveTdsPowerLed",data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed) call json%add(pform,"TopDriveTorqueWrenchLed",data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrenchLed) call json%add(pform,"TopDriveLinkTiltLed",data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltLed) call json%add(pform,"TopDriveIbopLed",data%EquipmentControl%TopDrivePanel%TopDriveIbopLed) call json%add(pform,"TopDriveTorqueLimitGauge",data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitGauge) call json%add(pform,"TopDriveTorqueGauge",data%EquipmentControl%TopDrivePanel%TopDriveTorqueGauge) call json%add(pform,"TopDriveRpmGauge",data%EquipmentControl%TopDrivePanel%TopDriveRpmGauge) call json%add(parent,p) end subroutine end module CTopDrivePanel