module CStandPipeManifold
    use CStandPipeManifoldVariables
    use SimulationVariables
    use CManifolds
    implicit none    
    public    
    contains    
    
    ! Input routines
    subroutine SetStandPipeManifoldValve1(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve1
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve1' :: SetStandPipeManifoldValve1
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve1 = v
        call ChangeValve(13, v)
#ifdef deb
        print*, 'StandPipeManifoldValve1=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve1
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve2(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve2
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve2' :: SetStandPipeManifoldValve2
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve2 = v
        call ChangeValve(14, v)
#ifdef deb
        print*, 'StandPipeManifoldValve2=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve2
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve3(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve3
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve3' :: SetStandPipeManifoldValve3
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve3 = v
        call ChangeValve(15, v)
#ifdef deb
        print*, 'StandPipeManifoldValve3=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve3
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve4(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve4
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve4' :: SetStandPipeManifoldValve4
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve4 = v
        call ChangeValve(11, v)
#ifdef deb
        print*, 'StandPipeManifoldValve4=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve4
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve5(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve5
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve5' :: SetStandPipeManifoldValve5
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve5 = v
        call ChangeValve(12, v)
#ifdef deb
        print*, 'StandPipeManifoldValve5=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve5
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve6(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve6
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve6' :: SetStandPipeManifoldValve6
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve6 = v
        call ChangeValve(9, v)
#ifdef deb
        print*, 'StandPipeManifoldValve6=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve6
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve7(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve7
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve7' :: SetStandPipeManifoldValve7
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve7 = v
        call ChangeValve(10, v)
#ifdef deb
        print*, 'StandPipeManifoldValve7=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve7
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve8(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve8
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve8' :: SetStandPipeManifoldValve8
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve8 = v
        call ChangeValve(6, v)
#ifdef deb
        print*, 'StandPipeManifoldValve8=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve8
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve9(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve9
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve9' :: SetStandPipeManifoldValve9
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve9 = v
        call ChangeValve(7, v)
#ifdef deb
        print*, 'StandPipeManifoldValve9=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve9
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve10(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve10
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve10' :: SetStandPipeManifoldValve10
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve10 = v
        call ChangeValve(8, v)
#ifdef deb
        print*, 'StandPipeManifoldValve10=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve10
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve11(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve11
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve11' :: SetStandPipeManifoldValve11
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve11 = v
        call ChangeValve(1, v)
#ifdef deb
        print*, 'StandPipeManifoldValve11=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve11
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve12(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve12
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve12' :: SetStandPipeManifoldValve12
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve12 = v
        call ChangeValve(2, v)
#ifdef deb
        print*, 'StandPipeManifoldValve12=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve12
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve13(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve13
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve13' :: SetStandPipeManifoldValve13
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve13 = v
        call ChangeValve(3, v)
#ifdef deb
        print*, 'StandPipeManifoldValve13=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve13
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve14(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve14
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve14' :: SetStandPipeManifoldValve14
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve14 = v
        call ChangeValve(4, v)
#ifdef deb
        print*, 'StandPipeManifoldValve14=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve14
#endif
    end subroutine

    subroutine SetStandPipeManifoldValve15(v)
    !DEC$ ATTRIBUTES DLLEXPORT :: SetStandPipeManifoldValve15
    !DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve15' :: SetStandPipeManifoldValve15
	    implicit none
	    logical, intent(in) :: v
	    data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve15 = v
        call ChangeValve(5, v)
#ifdef deb
        print*, 'StandPipeManifoldValve15=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve15
#endif
    end subroutine

    ! Output routines
    real(8) function GetStandPipeGauge1()
    !DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipeGauge1
    !DEC$ ATTRIBUTES ALIAS: 'GetStandPipeGauge1' :: GetStandPipeGauge1
	    implicit none
        GetStandPipeGauge1 = data%EquipmentControl%StandPipeManifold%StandPipeGauge1
	    !GetStandPipeGauge1 = 567.4
    end function

    real(8) function GetStandPipeGauge2()
    !DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipeGauge2
    !DEC$ ATTRIBUTES ALIAS: 'GetStandPipeGauge2' :: GetStandPipeGauge2
	    implicit none
	    GetStandPipeGauge2 = data%EquipmentControl%StandPipeManifold%StandPipeGauge2
	    !GetStandPipeGauge2 = 1564.0
    end function

end module CStandPipeManifold