HL-HDF
hlhdf_types.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of HLHDF.
5
6HLHDF is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11HLHDF is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with HLHDF. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
19
27#ifndef HLHDF_TYPES_H
28#define HLHDF_TYPES_H
29
30#include <hdf5.h>
31
95
107
112typedef struct {
113 unsigned super;
114 unsigned freelist;
115 unsigned stab;
116 unsigned shhdr;
118
123typedef struct {
124 size_t sizeof_addr;
125 size_t sizeof_size;
127
132typedef struct {
133 unsigned ik;
134 unsigned lk;
136
176
181typedef struct {
188
193 int level;
194
209 unsigned int szlib_mask;
210
215 unsigned int szlib_px_per_block;
217
230
241
254
261typedef struct {
262 char attrname[256];
263 size_t offset;
264 size_t size;
265 char format[256];
266 int ndims;
267 size_t dims[4];
269
276typedef struct {
277 char hltypename[256];
278 unsigned long objno[2];
279 size_t size;
280 int nAttrs;
284
289typedef struct _HL_Node HL_Node;
290
296
297#endif
HL_DataType
This is an enumeration variable designed to identify the type of data in a given node.
Definition hlhdf_types.h:236
HL_NodeMark
This is an enumeration variable designed to keep track of the status of a given node.
Definition hlhdf_types.h:246
HL_Type
This is an enumeration variable designed to identify the type of a given node.
Definition hlhdf_types.h:222
HL_CompressionType
Defines what type of compression that should be used.
Definition hlhdf_types.h:102
@ DTYPE_UNDEFINED_ID
Undefined data type.
Definition hlhdf_types.h:237
@ HL_SIMPLE
If the value is a scalar.
Definition hlhdf_types.h:238
@ HL_ARRAY
If the value is of array type.
Definition hlhdf_types.h:239
@ NMARK_SELECTMETA
Special variant for marking datasets that we are only interested in the metadata.
Definition hlhdf_types.h:252
@ NMARK_CREATED
If a node has been created but not been written.
Definition hlhdf_types.h:249
@ NMARK_SELECT
The node has been marked for fetching but the read has not been performed yet.
Definition hlhdf_types.h:251
@ NMARK_UNDEFINED
Undefined type.
Definition hlhdf_types.h:247
@ NMARK_ORIGINAL
Nothing has been done on the node, e.g.
Definition hlhdf_types.h:248
@ NMARK_CHANGED
If a nodes value has been changed and needs to be written.
Definition hlhdf_types.h:250
@ UNDEFINED_ID
An undefined type.
Definition hlhdf_types.h:223
@ ATTRIBUTE_ID
Attribute type (corresponds to H5A)
Definition hlhdf_types.h:224
@ GROUP_ID
Group type (corresponds to H5G)
Definition hlhdf_types.h:225
@ REFERENCE_ID
Reference type (corresponds to H5R)
Definition hlhdf_types.h:228
@ TYPE_ID
Type type (corresponds to H5T)
Definition hlhdf_types.h:227
@ DATASET_ID
Data set type (corresponds to H5D)
Definition hlhdf_types.h:226
@ CT_SZLIB
SZLIB compression.
Definition hlhdf_types.h:105
@ CT_NONE
No compression.
Definition hlhdf_types.h:103
@ CT_ZLIB
ZLIB compression.
Definition hlhdf_types.h:104
HL_FormatSpecifier
These are all valid format specifiers that are used within HLHDF.
Definition hlhdf_types.h:70
@ HLHDF_UCHAR
'uchar'
Definition hlhdf_types.h:74
@ HLHDF_ULLONG
'ullong'
Definition hlhdf_types.h:82
@ HLHDF_SHORT
'short'
Definition hlhdf_types.h:75
@ HLHDF_CHAR
'char'
Definition hlhdf_types.h:72
@ HLHDF_USHORT
'ushort'
Definition hlhdf_types.h:76
@ HLHDF_HBOOL
'hbool'
Definition hlhdf_types.h:89
@ HLHDF_LDOUBLE
'ldouble'
Definition hlhdf_types.h:85
@ HLHDF_HSSIZE
'hssize'
Definition hlhdf_types.h:87
@ HLHDF_COMPOUND
'compound'
Definition hlhdf_types.h:91
@ HLHDF_DOUBLE
'double'
Definition hlhdf_types.h:84
@ HLHDF_LONG
'long'
Definition hlhdf_types.h:79
@ HLHDF_ARRAY
'array' This is only something that will be read but is not possible to write
Definition hlhdf_types.h:92
@ HLHDF_UNDEFINED
'UNDEFINED' If no format has been specified, this string will be returned
Definition hlhdf_types.h:71
@ HLHDF_HSIZE
'hsize'
Definition hlhdf_types.h:86
@ HLHDF_FLOAT
'float'
Definition hlhdf_types.h:83
@ HLHDF_ULONG
'ulong'
Definition hlhdf_types.h:80
@ HLHDF_LLONG
'llong'
Definition hlhdf_types.h:81
@ HLHDF_HERR
'herr'
Definition hlhdf_types.h:88
@ HLHDF_STRING
'string'
Definition hlhdf_types.h:90
@ HLHDF_SCHAR
'schar'
Definition hlhdf_types.h:73
@ HLHDF_INT
'int'
Definition hlhdf_types.h:77
@ HLHDF_UINT
'uint'
Definition hlhdf_types.h:78
This type is designed to describe an individual node with a complicated structure,...
Definition hlhdf_types.h:261
size_t size
size of the data field
Definition hlhdf_types.h:264
int ndims
number of dimensions
Definition hlhdf_types.h:266
size_t offset
offset in the structure, use HOFFSET in HDF5
Definition hlhdf_types.h:263
This type is a list of HL_CompoundTypeAttributes.
Definition hlhdf_types.h:276
int nAllocAttrs
the number of allocated attributes
Definition hlhdf_types.h:281
size_t size
the size of this type
Definition hlhdf_types.h:279
int nAttrs
the number of attributes defining this type
Definition hlhdf_types.h:280
HL_CompoundTypeAttribute ** attrs
points at the different attributes that defines this type, max index is always nAttrs-1
Definition hlhdf_types.h:282
Compression properties.
Definition hlhdf_types.h:181
int level
The compression level when using ZLIB compression, compression is indicated by values between 1-9,...
Definition hlhdf_types.h:193
unsigned int szlib_mask
Mask when using szlib compression, the mask can be set up from two different sets of options.
Definition hlhdf_types.h:209
unsigned int szlib_px_per_block
The block size must be be even, with typical values being 8, 10, 16, and 32.
Definition hlhdf_types.h:215
HL_CompressionType type
The wanted compression type.
Definition hlhdf_types.h:187
Properties that can be finely tuned when creating a HDF5 file.
Definition hlhdf_types.h:141
HL_PropertySymK sym_k
See HL_PropertySymK.
Definition hlhdf_types.h:160
hsize_t userblock
See hdf5 documentation for H5Pset_userblock and H5Pget_userblock for purpose.
Definition hlhdf_types.h:150
HL_PropertySize sizes
See HL_PropertySize.
Definition hlhdf_types.h:155
unsigned istore_k
See hdf5 documentation for H5Pset_istore_k and H5Pget_istore_k for purpose.
Definition hlhdf_types.h:165
HL_PropertyVersion version
See HL_PropertyVersion.
Definition hlhdf_types.h:145
hsize_t meta_block_size
This is actually in the File access properties but atm it feels like overkill to provide the user wit...
Definition hlhdf_types.h:173
See hdf5 documentation for H5Pset_sizes and H5Pget_sizes for purpose.
Definition hlhdf_types.h:123
size_t sizeof_addr
Size of an object offset in bytes.
Definition hlhdf_types.h:124
size_t sizeof_size
Size of an object length in bytes.
Definition hlhdf_types.h:125
See hdf5 documentation for H5Pset_sym_k and H5Pget_sym_k for purpose.
Definition hlhdf_types.h:132
unsigned ik
Symbol table tree rank.
Definition hlhdf_types.h:133
unsigned lk
Symbol table node size.
Definition hlhdf_types.h:134
See hdf5 documentation for H5Pget_version for purpose.
Definition hlhdf_types.h:112
unsigned stab
Symbol table version number.
Definition hlhdf_types.h:115
unsigned super
Super block version number.
Definition hlhdf_types.h:113
unsigned freelist
Global freelist version number.
Definition hlhdf_types.h:114
unsigned shhdr
Shared object header version number.
Definition hlhdf_types.h:116
Represents a HDF5 file.
Definition hlhdf_nodelist.c:39
Represents a HDF5 object/attribute/reference/...
Definition hlhdf_node.c:40