bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
h5dds.cc File Reference

DDS/DODS request processing source. More...

#include <memory>
#include <libdap/InternalErr.h>
#include <BESDebug.h>
#include <libdap/mime_util.h>
#include "hdf5_handler.h"
#include "HDF5Int32.h"
#include "HDF5UInt32.h"
#include "HDF5UInt16.h"
#include "HDF5Int16.h"
#include "HDF5Byte.h"
#include "HDF5Array.h"
#include "HDF5Float32.h"
#include "HDF5Float64.h"
#include "HDF5Url.h"
#include "HDF5Structure.h"
#include "HDF5CFUtil.h"
Include dependency graph for h5dds.cc:

Go to the source code of this file.

Functions

bool depth_first (hid_t pid, const char *gname, DDS &dds, const char *fname)
 
void read_objects (DDS &dds_table, const string &varname, const string &filename)
 
void read_objects_base_type (DDS &dds_table, const string &varname, const string &filename)
 
void read_objects_structure (DDS &dds_table, const string &varname, const string &filename)
 

Detailed Description

DDS/DODS request processing source.

This file is part of h5_dap_handler, a C++ implementation of the DAP handler for HDF5 data.

This file contains functions which use depth-first search to walk through an HDF5 file and build the in-memory DDS.

Author
Hyo-Kyung Lee hyokl.nosp@m.ee@h.nosp@m.dfgro.nosp@m.up.o.nosp@m.rg
Kent Yang myang.nosp@m.6@hd.nosp@m.fgrou.nosp@m.p.or.nosp@m.g

Definition in file h5dds.cc.

Function Documentation

◆ depth_first()

bool depth_first ( hid_t pid,
const char * gname,
DDS & dds,
const char * fname )

will fill DDS table.

This function will walk through hdf5 gname group using the depth-first approach to obtain data information (data type and data pattern) of all hdf5 datasets and then put them into ithe dds table.

Parameters
pidgroup id
gnamegroup name (the absolute path from the root group)
ddsreference of DDS object
fnamethe HDF5 file name
Returns
0, if failed.
1, if succeeded.
Remarks
hard link is treated as a dataset.
will return error message to the DAP interface.
See also
depth_first(hid_t pid, char *gname, DAS & das, const char *fname) in h5das.cc

Definition at line 86 of file h5dds.cc.

◆ read_objects()

void read_objects ( DDS & dds_table,
const string & varname,
const string & filename )

fills in information of a dataset (name, data type, data space) into one DDS table.

Parameters
dds_tableDestination for the HDF5 objects.
varnameAbsolute name of an HDF5 dataset.
filenameThe HDF5 file name that maps to the DDS dataset name.
Exceptions
errora string of error message to the dods interface.

Definition at line 369 of file h5dds.cc.

◆ read_objects_base_type()

void read_objects_base_type ( DDS & dds_table,
const string & varname,
const string & filename )

fills in information of a dataset (name, data type, data space) into one DDS table.

Given a reference to an instance of class DDS, a filename that refers to an hdf5 file and an HDF5 dataset name, read hdf5 file and extract all the dimensions of the HDF5 dataset. Add the HDF5 dataset that maps to the DAP variable and its dimensions to the instance of DDS.

It will use dynamic cast to put necessary information into subclass of dods datatype.

Parameters
dds_tableDestination for the HDF5 objects.
varnameAbsolute name of an HDF5 dataset.
filenameThe HDF5 dataset name that maps to the DDS dataset name.
Exceptions
errora string of error message to the dods interface.

Definition at line 256 of file h5dds.cc.

◆ read_objects_structure()

void read_objects_structure ( DDS & dds_table,
const string & varname,
const string & filename )

fills in information of a structure dataset (name, data type, data space) into a DDS table. HDF5 compound datatype will map to DAP structure.

Parameters
dds_tableDestination for the HDF5 objects.
varnameAbsolute name of structure
filenameThe HDF5 file name that maps to the DDS dataset name.
Exceptions
errora string of error message to the dods interface.

Definition at line 309 of file h5dds.cc.