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 a callback function to invoke when an object flush occurs in the file

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

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

H5P_SET_OBJECT_FLUSH_CB  ( fapl_id, func, user_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_object_flush_cb (
              hid_t fapl_id,  
              H5F_flush_cb_t func, 
              void *user_data
        )</code></pre>

Comment (Hide)
HTML Wrap
class

hdf-

togglebox hdf-fortran hdf-togglebox-hidden
HTML Add Class
hdf-togglebutton-visiblehdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran
HTML
<pre><code class="language-fortran">Replace this text with the Fortran function signature</code></pre>
HTML Wrap
classhdf-togglebox hdf-cxx hdf-togglebox-hidden
HTML Add Class
hdf-togglebutton-visiblehdf-togglebutton-visible
selector.hdf-togglebutton.hdf-cxx
HTML
<pre><code class="language-cpp">Replace this text with the C++ Function Signature</code></pre>
HTML Wrap
classhdf-togglebox hdf-java hdf-togglebox-hidden
HTML Add Class
hdf-togglebutton-visiblehdf-togglebutton-visible
selector.hdf-togglebutton.hdf-java
HTML
<pre><code class="language-java">Replace this text with the JAVA Function Signature</code></pre>

hdf-rm-anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t fapl_idIN: Identifier for a file access property list
H5F_flush_cb_t func   IN: The user-defined callback function
void *user_dataIN: The user-defined input data for the callback function

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5Pset_object_flush_cb sets the callback function to invoke in the file access property list fapl_id whenever an object flush occurs in the file. Library objects are group, dataset, and committed datatype.

The callback function func must conform to the prototype defined below:

  • typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *user_data)

The parameters of the callback function, per the above prototyps, are defined as follows:

  • object_id is the identifier of the object which has just been flushed.
  • user_data is the user-defined input data for the callback function.

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
Usage
:
HTML Wrap
classhdf-rm-section

The example below illustrates the usage of this routine to set the callback function to invoke when an object flush occurs.

hid_t file_id, fapl_id;
hid_t dataset_id, dapl_id;
unsigned counter;

/* Create a copy of the file access property list *
fapl_id = H5Pcreate(H5P_FILE_ACCESS);

/* Set up the object flush property values */
/* flush_cb: callback function to invoke when an object flushes (see below) */
/* counter: user data to pass along to the callback function */
H5Pset_object_flush_cb(fapl_id, flush_cb, &counter);

/* Open the file */
file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);

/* Create a group */
gid = H5Gcreate2(fid, “group”, H5P_DEFAULT, H5P_DEFAULT_H5P_DEFAULT);

/* Open a dataset */ 
dataset_id = H5Dopen2(file_id, DATASET, H5P_DEFAULT);

/* The flush will invoke flush_cb() with counter */
H5Dflush(dataset_id);
/* counter will be equal to 1 */
:
:
:
/* The flush will invoke flush_cb() with counter */
H5Gflush(gid);
/* counter will be equal to 2 */
:
:
:

/* The callback function for object flush property */
static herr_t
flush_cb(hid_t obj_id, void *_udata)
{
    unsigned *flush_ct = (unsigned*)_udata;
    ++(*flush_ct);
    return 0;
}
Comment (Hide)
HTML Wrap
class

hdf-rm-

section
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

HTML Wrap
classhdf-togglebox hdf-cxx hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathc++/examples/create.cpp
showLineNumberstrue
lineStart33
progLangcpp
lineEnd43
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-java hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathjava/examples/datasets/H5Ex_D_Chunk.java
showLineNumberstrue
lineStart32
progLangjava
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

hdf-rm-anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.10.0C function introduced with this release.