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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_DLABFS begins a forward segment search in a DLA file.

I/O


   Given:

      handle   the DAS integer handle associated with the file to be searched.

               help, handle
                  LONG = Scalar

               This handle is used to identify the file in subsequent calls to
               other DLA or DAS routines.

   the call:

      cspice_dlabfs, handle, dladsc, found

   returns:

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

               help, dladsc
                  LONG = Array[SPICE_DLA_DSCSIZ]

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

      found    a logical flag indicating whether a segment was found.

               help, found
                  BOOLEAN = Scalar

               `found' has the value true if a segment was found; otherwise
               `found' is false.

Parameters


   SPICE_DLA_DSCSIZ

               is the size of a SPICELIB DLA descriptor, defined in
               IcyDLA.pro.

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.

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

      Example code begins here.


      PRO dlabfs_ex1

         ;;
         ;; 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

         ;;
         ;; Local variables
         ;;
         fname = ''

         ;;
         ;; Prompt for the name of the file to search.
         ;;
         read, fname, PROMPT='Name of DLA file > '

         ;;
         ;; Open the DSK file for read access.
         ;; We use the DAS-level interface for
         ;; this function.
         ;;
         cspice_dasopr, fname, 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


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, using the DSK file named phobos512.bds, the output
      was:


      Name of DLA file > phobos512.bds

      Segment number =            1

         Backward segment pointer         =           -1
         Forward segment pointer          =           -1
         Integer component base address   =           11
         Integer component size           =     29692614
         D.p. component base address      =            0
         D.p. component size              =      4737076
         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. Note that it is not necessary to call this routine to
   conduct a forward traversal; all that is necessary is to have
   access to the first descriptor in the file, which this routine
   provides.

Exceptions


   1)  If the input file handle is invalid, an error is signaled by a
       routine in the call tree of this routine.

   2)  If an error occurs while reading the DLA file, the error
       is signaled by a routine in the call tree of this
       routine.

   3)  If the input argument `handle' is undefined, an error is
       signaled by the IDL error handling system.

   4)  If the input argument `handle' is not of the expected type, or
       it does not have the expected dimensions and size, an error is
       signaled by the Icy interface.

   5)  If any of the output arguments, `dladsc' or `found', is not a
       named variable, an error is signaled by the Icy interface.

Files


   See description of input argument `handle'.

Restrictions


   None.

Required_Reading


   DAS.REQ
   DLA.REQ
   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   M. Liukis           (JPL)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.1, 19-JUL-2021 (JDR)

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections. Updated
       list of Required Reading.

       Edited the header to comply with NAIF standard. Modified
       code example to prompt for input DLA file.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

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

Index_Entries


   begin forward search in DLA file



Fri Dec 31 18:43:03 2021