Page tree

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

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Sets user-defined datatype conversion callback function

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5P_SET_TYPE_CONV_CB ( plist, func, op_data)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">herr_t H5Pset_type_conv_cb(
            hid_t plist,
            H5T_conv_except_func_t func,
            void *op_data)

  </code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">NONE</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t plistIN: Dataset transfer property list identifier
H5T_conv_except_func_t func    IN: User-defined type conversion callback function
void *op_dataIN: User-defined input data for the callback function

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5PsetH5P_typeSET_convTYPE_cbCONV_CB sets the user-defined datatype conversion callback function func in the dataset transfer property list plist.

The parameter op_data is a pointer to user-defined input data for the callback function and will be passed through to the callback function.

The callback function func defines the actions an application is to take when there is an exception during datatype conversion. The function prototype is as follows:

typedef H5T_conv_ret_t (H5T_conv_except_func_t) ( H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *op_data)

where except_type indicates what kind of exception has happened, src_id and dst_id are the source and destination datatype identifiers, src_buf and dst_buf are the source and destination data buffer, and op_data is the required input data for this callback function.

Valid values for except_type are as follows:

H5T_CONV_EXCEPT_RANGE_HI  Source value is positive and is too big to the destination. Overflow happens.

H5T_CONV_EXCEPT_RANGE_LOW Source value is negative and its magnitude is too big to the destination. Overflow happens.

H5T_CONV_EXCEPT_TRUNCATE Source is floating-point type and destination is integer. The floating-point number has fractional part.

H5T_CONV_EXCEPT_PRECISION Source is integer and destination is floating-point type. The mantissa of floating-point type is not big enough to hold all the digits of the integer.

H5T_CONV_EXCEPT_PINF Source is floating-point type and the value is positive infinity.

H5T_CONV_EXCEPT_NINF Source is floating-point type and the value is negative infinity.

H5T_CONV_EXCEPT_NAN Source is floating-point type and the value is NaN (not a number, including QNaN and SNaN).

Valid callback function return values are H5T_CONV_ABORT, H5T_CONV_UNHANDLED and H5T_CONV_HANDLED.

Programming Note for C++ Developers Using C Functions:
HTML Wrap
classhdf-rm-section

If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.

Examples of this kind of routine include callbacks such as H5P_SET_ELINK_CB and H5P_SET_TYPE_CONV_CB and functions such as H5T_CONVERT and H5E_WALK2.

Exiting the routine in its normal fashion allows the HDF5 C library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

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

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming Soon!

Comment (Hide)
Example:
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section