bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
hdf5_handler.h
Go to the documentation of this file.
1
2// This file is part of hdf5_handler a HDF5 file handler for the OPeNDAP
3// data server.
4
5// Copyright (c) 2009-2023 The HDF Group, Inc. and OPeNDAP, Inc.
6//
7// This is free software; you can redistribute it and/or modify it under the
8// terms of the GNU Lesser General Public License as published by the Free
9// Software Foundation; either version 2.1 of the License, or (at your
10// option) any later version.
11//
12// This software is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15// License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public
18// License along with this library; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20//
21// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
22// You can contact The HDF Group, Inc. at 410 E University Ave,
23// Suite 200, Champaign, IL 61820
24
33
38#ifndef _hdf5_handler_H
39#define _hdf5_handler_H
40
41#include "config_hdf5.h"
42
43#include <stdio.h>
44#include <stdlib.h>
45#include <ctype.h>
46#include <string.h>
47#include <assert.h>
48
49#include <iostream>
50#include <string>
51#include <vector>
52#include <sstream>
53
54#include <libdap/DAS.h>
55#include <libdap/DDS.h>
56#include <libdap/parser.h>
57#include <libdap/ConstraintEvaluator.h>
58#include <libdap/InternalErr.h>
59#include <hdf5.h>
60
61
63const int DODS_MAX_RANK=30;
65const int DODS_NAMELEN=1024;
67const std::string HDF5_OBJ_FULLPATH="HDF5_OBJ_FULLPATH";
68
69
71typedef struct DS {
75#if 0
76 //hid_t dset;
77#endif
79 hid_t type;
81#if 0
82 //hid_t dataspace;
83#endif
85 int ndims;
88 vector <string> dimnames;
89 vector <string> dimnames_path;
91 hsize_t nelmts;
93 hsize_t need;
96typedef struct DSattr {
100 hid_t type;
102 int ndims;
107 hsize_t nelmts;
109 hsize_t need;
111
113static const char STRING[] = "String";
115static const char BYTE[] = "Byte";
118static const char UINT8[] = "UInt8";
120static const char INT8[] = "Int8";
122static const char INT32[] = "Int32";
124static const char INT16[] = "Int16";
126static const char INT64[] = "Int64";
127
129static const char FLOAT64[] = "Float64";
131static const char FLOAT32[] = "Float32";
133static const char UINT16[] = "UInt16";
135static const char UINT32[] = "UInt32";
137static const char UINT64[] = "UInt64";
138
141static const char INT_ELSE[] = "Int_else";
143static const char FLOAT_ELSE[] = "Float_else";
145static const char COMPOUND[] = "Structure";
147static const char ARRAY[] = "Array";
149static const char URL[] = "Url";
150
151// These header files have to be left in this location. Don't move to the top.
152#include "h5das.h"
153#include "h5dds.h"
154#include "h5dmr.h"
155#include "h5get.h"
156#include "HDF5PathFinder.h"
157
158#endif
This class is to find and break a cycle in the HDF5 group. It is used to handle the rara case for the...
Data attributes processing header for the default option.
Data structure and retrieval processing header for the default option.
Data structure and retrieval processing header for the default option.
const int DODS_NAMELEN
Maximum length of variable or attribute name(default option only).
const int DODS_MAX_RANK
Maximum number of dimensions in an array(default option only).
struct DS DS_t
A structure for DDS generation.
const std::string HDF5_OBJ_FULLPATH
The special DAS attribute name for HDF5 path information from the top(root) group.
struct DSattr DSattr_t
A structure for DAS generation.
A structure for DDS generation.
hsize_t nelmts
Number of elements.
hsize_t need
Space needed.
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
hid_t type
HDF5 data set id.
hsize_t size[DODS_MAX_RANK]
Size of each dimension.
int ndims
HDF5 data space id.
A structure for DAS generation.
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
int size[DODS_MAX_RANK]
int ndims
Number of dimensions.
hsize_t nelmts
Number of elements.
hid_t type
Memory type.
hsize_t need
Memory space needed to hold nelmts type.