bes  Updated for version 3.20.6
h5dmr.cc File Reference

DMR(Data Metadata Response) request processing source. More...

#include "config_hdf5.h"
#include <InternalErr.h>
#include <BESDebug.h>
#include <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 "HDF5Str.h"
#include "HDF5Float32.h"
#include "HDF5Float64.h"
#include "HDF5Url.h"
#include "HDF5Structure.h"
#include "HDF5CFUtil.h"
#include "h5dmr.h"
Include dependency graph for h5dmr.cc:

Go to the source code of this file.

Functions

bool breadth_first (hid_t pid, char *gname, D4Group *par_grp, const char *fname, bool use_dimscale)
 
string get_hardlink_dmr (hid_t h5obj_id, const string &oname)
 
void get_softlink (D4Group *par_grp, hid_t h5obj_id, const string &oname, int index, size_t val_size)
 
void map_h5_attrs_to_dap4 (hid_t oid, D4Group *d4g, BaseType *d4b, Structure *d4s, int flag)
 A function that map HDF5 attributes to DAP4. More...
 
void map_h5_dset_hardlink_to_d4 (hid_t h5_dsetid, const string &full_path, BaseType *d4b, Structure *d4s, int flag)
 
void read_objects (D4Group *d4_grp, const string &varname, const string &filename, const hid_t dset_id)
 
void read_objects_base_type (D4Group *d4_grp, const string &varname, const string &filename, hid_t dset_id)
 
void read_objects_structure (D4Group *d4_grp, const string &varname, const string &filename, hid_t dset_id)
 

Variables

HDF5PathFinder obj_paths
 A variable for remembering visited paths to break cyclic HDF5 groups. More...
 

Detailed Description

DMR(Data Metadata Response) 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 and breadth-first search to walk through an HDF5 file and build the in-memory DMR. The depth-first is for the case when HDF5 dimension scales are not used. The breadth-first is for the case when HDF5 dimension scales are used to generate an HDF5 file that follows the netCDF-4 data model. Using breadth-first ensures the

Definition in file h5dmr.cc.

Function Documentation

◆ breadth_first()

bool breadth_first ( hid_t  pid,
char *  gname,
D4Group *  par_grp,
const char *  fname,
bool  use_dimscale 
)

bool breadth_first(hid_t pid, char gname, DMR & dmr, D4Group par_grp, const char *fname,bool use_dimscale)

Parameters
pidgroup id
gnamegroup name (the absolute path from the root group)
dmrreference of DMR object
fnamethe HDF5 file name
use_dimscalewhether dimension scales are used.
Returns
0, if failed.
1, if succeeded.
Remarks
hard link is treated as a dataset.
will return error message to the DAP interface.
The reason to use breadth_first is that the DMR representation needs to show the dimension names and the variables under the group first and then the group names. So we use this search. In the future, we may just use the breadth_first search for all cases.??
See also
depth_first(hid_t pid, char *gname, DMR & dmr, const char *fname) in h5dds.cc

To keep track of soft links.

Definition at line 318 of file h5dmr.cc.

◆ get_softlink()

get_softlink ( D4Group *  par_grp,
hid_t  h5obj_id,
const string &  oname,
int  index,
size_t  val_size 
)

will put softlink information into DAP4.

Parameters
par_grpDAP4 group
h5_obj_idobject id
onameobject name: absolute name of a group
indexLink index
val_sizevalue size
Returns
void
Remarks
In case of error, it throws an exception

Definition at line 1073 of file h5dmr.cc.

◆ map_h5_attrs_to_dap4()

void map_h5_attrs_to_dap4 ( hid_t  oid,
D4Group *  d4g,
BaseType *  d4b,
Structure *  d4s,
int  flag 
)

A function that map HDF5 attributes to DAP4.

Definition at line 829 of file h5dmr.cc.

Variable Documentation

◆ obj_paths

HDF5PathFinder obj_paths

A variable for remembering visited paths to break cyclic HDF5 groups.

Definition at line 67 of file h5dmr.cc.