Page tree

The license could not be verified: License Certificate has expired!

 

JAVA

FORTRAN

C++

C

 

Link

H5LT_READ_BITFIELD_VALUE

Retrieves the values of quality flags for each element to the application provided buffer.

Procedure:

H5LT_READ_BITFIELD_VALUE(dset_id, num_values, offsets, lengths, space, buf)

Signature:

herr_t H5LTread_bitfield_value( hid_t dset_id, int num_values, const unsigned *offsets, const unsigned *lengths, hid_t space, int *buf )

SUBROUTINE H5LTread_bitfield_value_f(dset_id, num_values, offset, &
     lengths, space, buf, dims, error)

  IMPLICIT NONE
  INTEGER(hid_t), INTENT(IN) :: dset_id        ! Identifier of the dataset with bit-field values 
  INTEGER, INTENT(IN) :: num_values            ! Number of the values to be extracted 
  INTEGER, DIMENSION(*), INTENT(IN) :: offset  ! Array of staring bits to be extracted from the element
                                               !  valid values: 1 through 8
  INTEGER, DIMENSION(*), INTENT(IN) :: lengths ! Array of the number of bits to be extracted for each value 
  INTEGER, DIMENSION(:), INTENT(IN) :: dims    ! Dimension of the reading buffer, buf
  INTEGER(hid_t), INTENT(IN) :: space          ! Dataspace identifier, describing the elements to be read from the dataset 
                                               !  with bit-field values 
  INTEGER, DIMENSION(*), INTENT(OUT) :: buf    ! Buffer to read the values in, buf has dimensions dims
  INTEGER, INTENT(OUT) :: error                ! Error code:
                                               !  0 on success and -1 on failure
END SUBROUTINE H5LTread_bitfield_value_f

Parameters:
hid_t dset_idIN: Identifier of the dataset with bit-field values
int num_valuesIN: Number of the values to be extracted
const unsigned *offsetsIN: Array of staring bits to be extracted from the element
Valid values: 0 (zero) through 7
const unsigned *lengthsIN: Array of the number of bits to be extracted for each value
hid_t spaceIN: Dataspace identifier, describing the elements to be read from the dataset with bit-field values
int *buf OUT: Buffer to read the values in

Description:

H5LTread_bitfield_value reads selected elements from a dataset specified by its identifier dset_id, and unpacks the bit-field values to a buffer buf.

The parameter space is a space identifier that indicates which elements of the dataset should be read.

The parameter offsets is an array of length num_values; the ith element of the array holds the value of the starting bit of the ith bit-field value. The parameter lengths is an array of length num_flags; the ith element of the array holds the number of bits to be extracted for the ith bit-field value. Extracted bits will be interpreted as a base-2 integer value. Each value will be converted to the base-10 integer value and stored in the application buffer. Buffer buf is allocated by the application and should be big enough to hold num_sel_elem * num_values elements of the specified type, where num_sel_elem is a number of the elements to be read from the dataset. Data in the buffer is organized as num_values values for the first element, followed by the num_values values for the second element, ... , followed by the num_values values for the num_selected_elemth element.

Returns:

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

Example:

Coming Soon!

History:
Release    Change
1.0C function introduced in this release.
1.1Fortran wrapper introduced in this release.

--- Last Modified: December 04, 2017 | 07:27 AM