Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add my assigned Doxygen documentation. #407

Merged
merged 3 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions doxygen/examples/H5Pget_metadata_read_attempts.1.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* Get a copy of file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);

/* Retrieve the # of read attempts from the file access property list */
H5Pget_metadata_read_attempts(fapl, &attempts);

/*
* The value returned in "attempts" will be 1 (default for non-SWMR access).
*/

/* Set the # of read attempts to 20 */
H5Pset_metadata_read_attempts(fapl, 20);

/* Retrieve the # of read attempts from the file access property list */
H5Pget_metadata_read_attempts(fapl, &attempts);

/*
* The value returned in "attempts" will be 20 as set.
*/

/* Close the property list */
H5Pclose(fapl);
44 changes: 44 additions & 0 deletions doxygen/examples/H5Pget_metadata_read_attempts.2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Open the file with SWMR access and default file access property list */
fid = H5Fopen(FILE, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), H5P_DEFAULT);

/* Get the file's file access roperty list */
file_fapl = H5Fget_access_plist(fid);

/* Retrieve the # of read attempts from the file's file access property list */
H5Pget_metadata_read_attempts(file_fapl, &attempts);

/*
* The value returned in "attempts" will be 100 (default for SWMR access).
*/

/* Close the property list */
H5Pclose(file_fapl);

/* Close the file */
H5Fclose(fid);

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

/* Set the # of read attempts */
H5Pset_metadata_read_attempts(fapl, 20);

/* Open the file with SWMR access and the non-default file access property list */
fid = H5Fopen(FILE, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl);

/* Get the file's file access roperty list */
file_fapl = H5Fget_access_plist(fid);

/* Retrieve the # of read attempts from the file's file access property list */
H5Pget_metadata_read_attempts(file_fapl, &attempts);

/*
* The value returned in "attempts" will be 20.
*/

/* Close the property lists */
H5Pclose(file_fapl);
H5Pclose(fapl);

/* Close the file */
H5Fclose(fid);
44 changes: 44 additions & 0 deletions doxygen/examples/H5Pget_metadata_read_attempts.3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Open the file with non-SWMR access and default file access property list */
fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);

/* Get the file's file access roperty list */
file_fapl = H5Fget_access_plist(fid);

/* Retrieve the # of read attempts from the file's file access property list */
H5Pget_metadata_read_attempts(file_fapl, &attempts);

/*
* The value returned in "attempts" will be 1 (default for non-SWMR access).
*/

/* Close the property list */
H5Pclose(file_fapl);

/* Close the file */
H5Fclose(fid);

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

/* Set the # of read attempts */
H5Pset_metadata_read_attempts(fapl, 20);

/* Open the file with non-SWMR access and the non-default file access property list */
fid = H5Fopen(FILE, H5F_ACC_RDONLY, fapl);

/* Get the file's file access roperty list */
file_fapl = H5Fget_access_plist(fid);

/* Retrieve the # of read attempts from the file's file access property list */
H5Pget_metadata_read_attempts(file_fapl, &attempts);

/*
* The value returned in "attempts" will be 1 (default for non-SWMR access).
*/

/* Close the property lists */
H5Pclose(file_fapl);
H5Pclose(fapl);

/* Close the file */
H5Fclose(fid);
41 changes: 41 additions & 0 deletions doxygen/examples/H5Pget_object_flush_cb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
hid_t fapl_id;
unsigned counter;
H5F_object_flush_t *ret_cb;
unsigned * ret_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);

/* Get the file access property list for the file */
fapl = H5Fget_access_plist(file_id);

/* Retrieve the object flush property values for the file */
H5Pget_object_flush_cb(fapl, &ret_cb, &ret_counter);
/* ret_cb will point to flush_cb() */
/* ret_counter will point to counter */

/*
.
.
.
.
.
.
*/

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