Page tree









Gets information about a table


H5TB_GET_FIELD_INFO ( loc_id, table_name, field_names, field_sizes, field_offsets, type_size )


 herr_t H5TBget_field_info ( hid_t loc_id, const char *table_name, char *field_names[], 
                size_t *field_sizes, size_t *field_offsets, size_t *type_size  )

subroutine h5tbget_field_info_f(loc_id, dset_name, nfields, field_names, & 
                                field_sizes, field_offsets, type_size, & 
                                errcode, maxlen_out)
  implicit none
  integer(HID_T), intent(IN) :: loc_id         ! file or group identifier 
  character(LEN=*), intent(IN) :: dset_name    ! name of the dataset 
  integer(HSIZE_T), intent(IN):: nfields       ! nfields 
  character(LEN=*), dimension(nfields), intent(INOUT) :: field_names    
                                               ! field names
  integer(SIZE_T), dimension(nfields), intent(INOUT) :: field_sizes    
                                               ! field sizes
  integer(SIZE_T), dimension(nfields), intent(INOUT) :: field_offsets  
                                               ! field offsets
  integer(SIZE_T), intent(INOUT):: type_size   ! type size 
  integer :: errcode                           ! error code
  integer, optional :: maxlen_out              ! returns maximum character 
                                               ! length of field_names
end subroutine h5tbget_field_info_f

hid_t loc_idIN: Identifier of the file or group to read the table within
const char *table_nameIN: The name of the dataset to read
char *field_names[]OUT: An array containing the names of the fields
size_t *field_sizesOUT: An array containing the size of the fields
size_t *field_offsetsOUT: An array containing the offsets of the fields
size_t *type_size

OUT: The size of the HDF5 datatype associated with the table

(More specifically, the size in bytes of the HDF5 compound datatype used to define a row, or record, in the table)


H5TB_GET_FIELD_INFO gets information about a dataset named table_name attached to the object specified by the identifier loc_id


Returns a non-negative value if successful; otherwise returns a negative value.


hl / test / test_table.c [1627:1636]
 1.10/master  HDFFV/hdf5  Copy
    /* alocate */
    names_out = (char**) HDmalloc( sizeof(char*) * (size_t)NFIELDS );
    for ( i = 0; i < NFIELDS; i++)
        names_out[i] = (char*) HDmalloc( sizeof(char) * 255 );

    /* Get field info */
    if ( H5TBget_field_info(fid, "table1", names_out, sizes_out, offset_out, &size_out ) < 0 )
        goto out;

hl / fortran / test / tsttable.F90 [502:504]
 1.10/master  HDFFV/hdf5  Copy
  CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,&
       field_offsetr, type_sizeout, errcode, maxlen )

--- Last Modified: January 08, 2020 | 03:51 PM