Overview and tutorial on the "C" Application Program Interface (API) to the Data Dictionary System.

INCLUDE FILES

"C" application programs should include "cdds.h". The DDS application makefiles will setup the appropriate include path. Each "C" program should define "_POSIX_SOURCE" and "ANSI" and should call "setargcv" before any other DDS call in order to get the command line parameters initialized into DDS.
#include <cdds.h>

cdds.h provides the declarations required to access the DDS "C" API routines. It also defines symbolic names for API constants which can be used in the following examples:

#include <cdds.h>
      integer ier, i, bin, tag, ndx, rank, size[RANK_MAX];
      const char *out_dict, name[80];
      BIN_TAG out_bin;
      float *data;
      ...
      rank = cdds_scank("axis", "");
      cdds_scanf("size", "");
      for (i=0;i<rank,i++) {
         cdds_scanf("", "%d", size[i]);
      }
      ...
      /* enforce array limits when reading */
      cdds_scanf(data, "%80s", name);
      ...
      /* get index to trace header */
      tag = cdds_member(out_bin, 0, "SrPtXC");
      ndx = cdds_index(out_bin, tag, DDS_FLOAT);
      data = cdds_malloc(size(1)*sizeof(float));
      ...
      /* open binary output stream */
      out_bin = cdds_open(out_dict, "out_format", "out_data", "w+");
    

cfft.h provides definitions needed for the cfft wrapper routines.

LIBRARY FILES

The DDS application makefiles will setup the appropriate library paths and libraries. libdds3.a contains all the DDS API routines; libgio.a contains the routines for the GIO I/O routines; libchost.a contains the "C" host-dependent routines.

FILES

$DDSROOT/include/cdds.h          "C" DDS interface
$DDSROOT/include/cfft.h          "C" FFT interface

$DDSROOT/lib/$TARCH/libdds3.a    DDS library
$DDSROOT/lib/$TARCH/libgio.a     GIO library
$DDSROOT/lib/$TARCH/libchost.a   "C" Host-dependent lib