Writing to a Vgroup
Contents:
Following are functions used in writing to Vgroups:
- Vaddtagref (vfadtr) --
Insert the tag/reference number pair of a data object into a Vgroup
(Use for any HDF object).
- Vinsert (vfinsrt) --
Establish a link from a Vgroup to either another Vgroup or to a Vdata
identifier. (Use Vaddtagref for HDF objects that are not Vgroups
or Vdatas.)
- Vsetname (vfsnam) --
Set the name for a Vgroup.
- Vsetclass (vfscls) --
Set the class name for a Vgroup.
(Functions in bold are included in the program example for this tutorial.)
The following program adds an SDS to a Vgroup (You can either download the
C or FORTRAN program at the end, or just take a
look at the HTML version with the HDF calls highlighted):
If you have downloaded this program, then you can
compile and run it. It creates an HDF file
called vg_sd1.hdf (for FORTRAN, vg_sd1f.hdf). You can view
the contents of the HDF file that gets created by this program, in the
next section, "Contents of HDF File Created".
This program uses Vaddtagref to add the SDS object to the Vgroup.
If you were adding another Vgroup or a Vdata to a Vgroup, then you
could also use the Vinsert function.
Following is a detailed review of what this program does:
You can view the contents of the HDF file that gets created, by
using the vshow or the hdp command.
The output using vshow and hdp dumpvg are very similar.
With vshow it looks as follows:
Programs used in this tutorial:
[Compiling a program]