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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_DLAFNS finds the segment following a specified segment in a
   DLA file.

   For important details concerning this module's function, please refer to
   the CSPICE routine dlafns_c.

I/O


   Given:

      handle    the DAS integer handle associated with the file to be
                searched. This handle is used to identify the file in
                subsequent calls to other DLA or DAS routines.

      dladsc    the descriptor of the a DLA segment in the file
                associated with `handle'.

   the call:

      cspice_dlafns, handle, dladsc, nxtdsc, found

   returns:

      nxtdsc    the descriptor of the next DLA segment following the
                segment associated with the input argument `descr'.

               `nxtdsc' is valid only if the output argument `found'
               is true.

      found     a logical flag indicating whether the next segment was
                found.  `found' has the value true if the segment
                was found; otherwise `found' is false.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   Open a DLA file for read access, traverse the segment
   list from front to back, and display segment address
   and size attributes.

      PRO dlab_t, dla

          ;;
          ;; Constants
          ;;
          SPICE_DLA_BWDIDX = 0
          SPICE_DLA_FWDIDX = 1
          SPICE_DLA_IBSIDX = 2
          SPICE_DLA_ISZIDX = 3
          SPICE_DLA_DBSIDX = 4
          SPICE_DLA_DSZIDX = 5
          SPICE_DLA_CBSIDX = 6
          SPICE_DLA_CSZIDX = 7

          ;;
          ;; Open the DSK file for read access.
          ;; We use the DAS-level interface for
          ;; this function.
          ;;
          cspice_dasopr, dla, handle

          ;;
          ;; Begin a forward search through the
          ;; kernel, treating the file as a DLA.
          ;; In this example, it's a very short
          ;; search.
          ;;
          segno = 1L

          cspice_dlabfs, handle, dladsc, found

          while found do begin

             ;;
             ;; Display the contents of the current segment
             ;; descriptor.
             ;;
             print
             print, 'Segment number = ', segno
             print
             print, '   Backward segment pointer         = ', $
                                       dladsc[SPICE_DLA_BWDIDX]
             print, '   Forward segment pointer          = ', $
                                        dladsc[SPICE_DLA_FWDIDX]
             print, '   Integer component base address   = ', $
                                        dladsc[SPICE_DLA_IBSIDX]
             print, '   Integer component size           = ', $
                                        dladsc[SPICE_DLA_ISZIDX]
             print, '   D.p. component base address      = ', $
                                        dladsc[SPICE_DLA_DBSIDX]
             print, '   D.p. component size              = ', $
                                        dladsc[SPICE_DLA_DSZIDX]
             print, '   Character component base address = ', $
                                        dladsc[SPICE_DLA_CBSIDX]
             print, '   Character component size         = ', $
                                        dladsc[SPICE_DLA_CSZIDX]

             ;;
             ;; Find the next segment.
             ;;
             current = dladsc
             segno = segno + 1

             cspice_dlafns, handle, current, dladsc, found

          end

          ;;
          ;; Close file.
          ;;
          cspice_dascls, handle

      END

   IDL outputs:

      IDL> dlab_t, 'phobos_3_3.bds'

      Segment number =            1

         Backward segment pointer         =           -1
         Forward segment pointer          =           -1
         Integer component base address   =           11
         Integer component size           =      3311271
         D.p. component base address      =            0
         D.p. component size              =       494554
         Character component base address =            0
         Character component size         =            0

Particulars


   DLA files are built using the DAS low-level format; DLA files are
   a specialized type of DAS file in which data are organized as a
   doubly linked list of segments. Each segment's data belong to
   contiguous components of character, double precision, and integer
   type.

   This routine supports forward traversal of a DLA file's segment
   list. A forward traversal may be started from any segment in
   the file; it is not necessary to call cspice_dlabfs first. The role
   of cspice_dlabfs is simply to return the descriptor of the first
   segment in the file.

Required Reading


   ICY.REQ
   DAS.REQ
   DSK.REQ

Version


   -Icy Version 1.0.0, 13-DEC-2016, ML (JPL), EDW (JPL)

Index_Entries


   find next segment in dla file



Wed Apr  5 17:58:00 2017