module CStringConfigurationVariables
    ! !@use ConfigurationVariables, only: Configuration
    implicit none   
    public
    !constants
    integer :: Bit_ComponentType = 0
    integer :: Stabilizer_ComponentType = 1
    integer :: Collar_ComponentType = 2
    integer :: DrillPipe_ComponentType = 3
    integer :: Heavyweight_ComponentType = 4
    
    integer :: Cone_BitType = 0
    integer :: PDC_BitType = 1
    integer :: Rock_BitType = 2
    
    
    
    ! types
    ! Pipe Items in String Array
    type, bind(c), public :: CStringItem
        integer :: ComponentType
        real(8) :: NumberOfJoint
        real(8) :: LengthPerJoint
        real(8) :: NominalOd
        real(8) :: NominalId
        real(8) :: WeightPerLength
        real(8) :: ComponentLength
        real(8) :: NominalToolJointOd
        character(1) :: Grade
    end type CStringItem
    
    ! types
    ! Pipe Items in String Array
    type, bind(c), public :: CBitInfo
        integer :: BitType
        real(8) :: BitSize
        integer :: BitCodeHundreds
        integer :: BitCodeTens
        integer :: BitCodeOnes
        real(8) :: BitNozzleSize
        real(8) :: BitLength
        real(8) :: BitWeightPerLength
        integer :: BitNozzleNo
        logical :: FloatValve
    end type CBitInfo
    
    Type :: StringConfigurationType
        integer :: StringConfigurationCount = 0
        type(CStringItem), allocatable :: StringConfigurations(:)    
        type(CBitInfo) :: BitDefinition
    End type StringConfigurationType
    contains    
end module CStringConfigurationVariables