Index Page dafgh_c

A B C D E F G H I J K L M N O P Q R S T U V W X

Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries

#### Procedure

       void dafgh_c ( SpiceInt  * handle )

#### Abstract

       Return (get) the handle of the DAF currently being searched.

#### Required_Reading

       DAF

#### Keywords

       FILES

#### Brief_I/O

       Variable  I/O  Description
       --------  ---  --------------------------------------------------
       handle     O   Handle for current DAF.

#### Detailed_Input

       None.

#### Detailed_Output

       handle      is the handle for the current DAF (the handle
                   connected to the DAF that is currently being
                   actively searched).

#### Parameters

       None.

#### Exceptions

       1)  If this routine is called when no search is in progress in the
           the current DAF, the error SPICE(DAFNOSEARCH) is signaled.

       2)  If the DAF whose handle is to be returned has actually been
           closed, the error will be diagnosed by routines called by
           this routine.

#### Files

       This function returns the handle of a DAF that is currently
       being searched.

#### Particulars

       Under rare circumstances, it may be necessary to identify
       the particular DAF that is being searched (such as when
       the search is begun by one module and continued by another).

#### Examples

       Consider a program like the following, which examines the
       individual arrays in a DAF and examines the contents of those
       meeting certain criteria.

          #include "SpiceUsr.h"
              ...
          dafopw_c ( fname, &handle );
          dafbfs_c ( handle );
          daffna_c ( &found );

          while ( found )
          {
             check_segment ( status );

             if (  eqstr_c( status, "EXAMINE" )  )
             {
                examine_segment();
             }

             daffna_c ( &found );
          }

       The function check_segment, which assumes that a search is in
       progress, gets the summary and name for the current array, and
       uses them to decide whether the data in the array merit further
       consideration.

          void check_segment ( status )
            ...
          dafgs_c ( sum  );
          dafgn_c ( name );
          dafus_c ( sum, nd, ni, dc, ic );
            ...
          [ set status ]
            ...

       The function examine_segment examines the data in
       the array itself. In order to do do, it needs to have access
       not only to the summary, but to the handle of the file
       containing the array. This is provided by dafgh_c.

          void examine_segment()
            ...
          dafgs_c ( sum );
          dafus_c ( sum, nd, ni, dc, ic );
          dafgh_c ( &handle );

          dafgda_c ( handle, begin, end, data );
            ...

#### Restrictions

       None.

#### Literature_References

       NAIF Document 167.0, "Double Precision Array Files (DAF)
       Specification and User's Guide"

#### Author_and_Institution

       N.J. Bachman    (JPL)
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)

#### Version

       -CSPICE Version 1.0.0, 19-JUL-2011 (NJB)

#### Index_Entries

       get daf handle

#### Link to routine dafgh_c source file dafgh_c.c

    Wed Apr  5 17:54:30 2017