Skip Navigation Links.

H5T..::..getNativeType Method (H5DataTypeId, H5T..::..Direction)

Returns the native datatype of a specified datatype. http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetNativeType

Namespace:  HDF5DotNet
Assembly:  HDF5DotNet (in HDF5DotNet.dll)

Syntax

Visual Basic
Public Shared Function getNativeType ( _
	typeId As H5DataTypeId, _
	direction As H5T..::..Direction _
) As H5DataTypeId
C#
public static H5DataTypeId getNativeType(
	H5DataTypeId typeId,
	H5T..::..Direction direction
)
Visual C++
public:
static H5DataTypeId^ getNativeType(
	H5DataTypeId^ typeId, 
	H5T..::..Direction direction
)
JavaScript
HDF5DotNet.H5T.getNativeType = function(typeId, direction);

Parameters

typeId
Type: HDF5DotNet..::..H5DataTypeId
Datatype identifier for the dataset datatype.
direction
Type: HDF5DotNet..::..H5T..::..Direction
Direction of search.

Remarks

H5Tget_native_type returns the equivalent native datatype for the datatype specified in type_id.

H5Tget_native_type is a high-level function designed primarily to facilitate use of the H5Dread function, for which users otherwise must undertake a multi-step process to determine the native datatype of a dataset prior to reading it into memory. It can be used not only to determine the native datatype for atomic datatypes, but also to determine the native datatypes of the individual components of a compound datatype, an enumerated datatype, an array datatype, or a variable-length datatype.

H5Tget_native_type selects the matching native datatype from the following list:

  • H5T_NATIVE_CHAR
  • H5T_NATIVE_SHORT
  • H5T_NATIVE_INT
  • H5T_NATIVE_LONG
  • H5T_NATIVE_LLONG
  • H5T_NATIVE_UCHAR
  • H5T_NATIVE_USHORT
  • H5T_NATIVE_UINT
  • H5T_NATIVE_ULONG
  • H5T_NATIVE_ULLONG
  • H5T_NATIVE_FLOAT
  • H5T_NATIVE_DOUBLE
  • H5T_NATIVE_LDOUBLE

The direction parameter indicates the order in which the library searches for a native datatype match. Valid values for direction are as follows:

  • H5T_DIR_ASCEND searches the above list in ascending size of the datatype, i.e., from top to bottom. (Default)
  • H5T_DIR_DESCEND searches the above list in descending size of the datatype, i.e., from bottom to top.

H5Tget_native_type is designed primarily for use with intenger and floating point datatypes. Time, bifield, opaque, and reference datatypes are returned as a copy of type_id.

The identifier returned by H5Tget_native_type should eventually be closed by calling H5Tclose to release resources.

Exceptions

ExceptionCondition
HDF5DotNet..::..H5TgetNativeTypeException throws H5TgetNativeTypeException on failure.

See Also