MISR Toolkit  1.5.1
H5Fpublic.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * This file contains public declarations for the H5F module.
16  */
17 #ifndef _H5Fpublic_H
18 #define _H5Fpublic_H
19 
20 /* Public header files needed by this file */
21 #include "H5public.h"
22 #include "H5ACpublic.h"
23 #include "H5Ipublic.h"
24 
25 /* When this header is included from a private header, don't make calls to H5check() */
26 #undef H5CHECK
27 #ifndef _H5private_H
28 #define H5CHECK H5check(),
29 #else /* _H5private_H */
30 #define H5CHECK
31 #endif /* _H5private_H */
32 
33 /*
34  * These are the bits that can be passed to the `flags' argument of
35  * H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine
36  * them as needed. As a side effect, they call H5check_version() to make sure
37  * that the application is compiled with a version of the hdf5 header files
38  * which are compatible with the library to which the application is linked.
39  * We're assuming that these constants are used rather early in the hdf5
40  * session.
41  *
42  * H5F_ACC_DEBUG no longer has any prints any special debug info. The symbol is
43  * being retained and will be listed as deprecated in HDF5 1.10.0.
44  */
45 #define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */
46 #define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */
47 #define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */
48 #define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists */
49 #define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (no longer used) */
50 #define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */
51 
52 /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
53  * parent file. */
54 #define H5F_ACC_DEFAULT (H5CHECK 0xffffu) /*ignore setting on lapl */
55 
56 /* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
57 #define H5F_OBJ_FILE (0x0001u) /* File objects */
58 #define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */
59 #define H5F_OBJ_GROUP (0x0004u) /* Group objects */
60 #define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */
61 #define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */
62 #define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR)
63 #define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */
64  /* (as opposed to objects opened through any file ID accessing this file) */
65 
66 #define H5F_FAMILY_DEFAULT (hsize_t)0
67 
68 #ifdef H5_HAVE_PARALLEL
69 /*
70  * Use this constant string as the MPI_Info key to set H5Fmpio debug flags.
71  * To turn on H5Fmpio debug flags, set the MPI_Info value with this key to
72  * have the value of a string consisting of the characters that turn on the
73  * desired flags.
74  */
75 #define H5F_MPIO_DEBUG_KEY "H5F_mpio_debug_key"
76 #endif /* H5_HAVE_PARALLEL */
77 
78 /* The difference between a single file and a set of mounted files */
79 typedef enum H5F_scope_t {
80  H5F_SCOPE_LOCAL = 0, /*specified file handle only */
81  H5F_SCOPE_GLOBAL = 1 /*entire virtual file */
82 } H5F_scope_t;
83 
84 /* Unlimited file size for H5Pset_external() */
85 #define H5F_UNLIMITED ((hsize_t)(-1L))
86 
87 /* How does file close behave?
88  * H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL
89  * H5F_CLOSE_WEAK - file closes only after all opened objects are closed
90  * H5F_CLOSE_SEMI - if no opened objects, file is close; otherwise, file
91  close fails
92  * H5F_CLOSE_STRONG - if there are opened objects, close them first, then
93  close file
94  */
95 typedef enum H5F_close_degree_t {
101 
102 /* Current "global" information about file */
103 /* (just size info currently) */
104 typedef struct H5F_info_t {
105  hsize_t super_ext_size; /* Superblock extension size */
106  struct {
107  hsize_t hdr_size; /* Shared object header message header size */
108  H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
109  } sohm;
110 } H5F_info_t;
111 
112 /*
113  * Types of allocation requests. The values larger than H5FD_MEM_DEFAULT
114  * should not change other than adding new types to the end. These numbers
115  * might appear in files.
116  *
117  * Note: please change the log VFD flavors array if you change this
118  * enumeration.
119  */
120 typedef enum H5F_mem_t {
121  H5FD_MEM_NOLIST = -1, /* Data should not appear in the free list.
122  * Must be negative.
123  */
124  H5FD_MEM_DEFAULT = 0, /* Value not yet set. Can also be the
125  * datatype set in a larger allocation
126  * that will be suballocated by the library.
127  * Must be zero.
128  */
129  H5FD_MEM_SUPER = 1, /* Superblock data */
130  H5FD_MEM_BTREE = 2, /* B-tree data */
131  H5FD_MEM_DRAW = 3, /* Raw data (content of datasets, etc.) */
132  H5FD_MEM_GHEAP = 4, /* Global heap data */
133  H5FD_MEM_LHEAP = 5, /* Local heap data */
134  H5FD_MEM_OHDR = 6, /* Object header data */
135 
136  H5FD_MEM_NTYPES /* Sentinel value - must be last */
137 } H5F_mem_t;
138 
139 /* Library's file format versions */
140 typedef enum H5F_libver_t {
141  H5F_LIBVER_EARLIEST, /* Use the earliest possible format for storing objects */
142  H5F_LIBVER_LATEST /* Use the latest possible format available for storing objects*/
143 } H5F_libver_t;
144 
145 /* Define file format version for 1.8 to prepare for 1.10 release.
146  * (Not used anywhere now)*/
147 #define H5F_LIBVER_18 H5F_LIBVER_LATEST
148 
149 #ifdef __cplusplus
150 extern "C" {
151 #endif
152 
153 /* Functions in H5F.c */
154 H5_DLL htri_t H5Fis_hdf5(const char *filename);
155 H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags,
156  hid_t create_plist, hid_t access_plist);
157 H5_DLL hid_t H5Fopen(const char *filename, unsigned flags,
158  hid_t access_plist);
159 H5_DLL hid_t H5Freopen(hid_t file_id);
160 H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope);
161 H5_DLL herr_t H5Fclose(hid_t file_id);
164 H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned * intent);
165 H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types);
166 H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list);
167 H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle);
168 H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist);
169 H5_DLL herr_t H5Funmount(hid_t loc, const char *name);
172 H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len);
174  H5AC_cache_config_t * config_ptr);
176  H5AC_cache_config_t * config_ptr);
177 H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr);
179  size_t * max_size_ptr,
180  size_t * min_clean_size_ptr,
181  size_t * cur_size_ptr,
182  int * cur_num_entries_ptr);
184 H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
185 H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info);
187 #ifdef H5_HAVE_PARALLEL
188 H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag);
189 H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
190 #endif /* H5_HAVE_PARALLEL */
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 #endif /* _H5Fpublic_H */
196 
H5_DLL hid_t H5Fget_create_plist(hid_t file_id)
H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)
H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr, size_t *cur_size_ptr, int *cur_num_entries_ptr)
H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size)
unsigned int hbool_t
Definition: H5public.h:142
H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id)
char * filename
Definition: cdjpeg.h:133
hsize_t hdr_size
Definition: H5Fpublic.h:107
H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
long long ssize_t
Definition: H5public.h:156
#define H5_DLL
Definition: H5api_adpt.h:256
int herr_t
Definition: H5public.h:124
H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist)
H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size)
H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types)
unsigned long long hsize_t
Definition: H5public.h:169
H5F_scope_t
Definition: H5Fpublic.h:79
H5_DLL herr_t H5Fclose(hid_t file_id)
H5_DLL htri_t H5Fis_hdf5(const char *filename)
hsize_t super_ext_size
Definition: H5Fpublic.h:105
H5F_libver_t
Definition: H5Fpublic.h:140
H5_DLL herr_t H5Funmount(hid_t loc, const char *name)
H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent)
HDFFCLIBAPI _fcd name
H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list)
H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
H5_ih_info_t msgs_info
Definition: H5Fpublic.h:108
HDFFCLIBAPI intf * size
int hid_t
Definition: H5Ipublic.h:54
H5_DLL hid_t H5Fget_access_plist(hid_t file_id)
H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope)
H5F_mem_t
Definition: H5Fpublic.h:120
struct H5F_info_t H5F_info_t
H5_DLL hssize_t H5Fget_freespace(hid_t file_id)
H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info)
H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle)
signed long long hssize_t
Definition: H5public.h:170
H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id)
HDFFCLIBAPI intf intf * flags
H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist)
H5F_close_degree_t
Definition: H5Fpublic.h:95
struct H5F_info_t::@25 sohm
H5_DLL hid_t H5Freopen(hid_t file_id)
int htri_t
Definition: H5public.h:143
H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist)

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52