module CDownHoleTypes
    implicit none    
    public 
    
    !enums
    enum, bind(c)
        enumerator STRING_BIT         !0
        enumerator STRING_STABILIZER  !1
        enumerator STRING_COLLAR      !2
        enumerator STRING_DRILLPIPE   !3
        enumerator STRING_HEAVYWEIGHT !4
    end enum
    
    enum, bind(c)
        enumerator FLUID_NORMAL_MUD !0
        enumerator FLUID_GAS_KICK   !1
        enumerator FLUID_WATER_KICK !2
        enumerator FLUID_OIL_KICK   !3
        enumerator FLUID_NO_MUD     !4
    end enum
    
    ! new types
    type, bind(c), public :: CFluid
        real(8) :: StartMd
        real(8) :: EndMd
        real(8) :: Density
        integer :: MudType
    end type CFluid
    
    type, bind(c), public :: CStringComponents
        real(8) :: Length
        real(8) :: TopDepth
        real(8) :: DownDepth
        real(8) :: Od
        real(8) :: Id
        integer :: ComponentType
    end type CStringComponents
    
    type, bind(c), public :: CStringComponent
        real(8) :: StartMd
        real(8) :: EndMd
        integer :: ComponentType
    end type CStringComponent
    
    type, bind(c), public :: CBopElement
        integer :: ElementType
        real :: ElementStart
        real :: ElementEnd
    end type CBopElement
    
    contains     
end module CDownHoleTypes