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

Required Reading


   CSPICE_DLABFS begins a forward segment search in a DLA file.



      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.

                [1,1] = size(handle); int32 = class(handle)

   the call:

      [dladsc, found] = cspice_dlabfs( handle )


      dladsc    the descriptor of the first DLA segment in the file
                associated with `handle'. `dladsc' is valid only if the
                output argument `found' is true.

                [SPICE_DLA_DSCSIZ,1]  = size(dladsc)
                                int32 = class(dladsc)

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

                [1,1] = size(found); logical = class(found)


   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.

      function dlab_t( dla )

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

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

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

          [dladsc, found] = cspice_dlabfs( handle );

          while  found

             % Display the contents of the current segment
             % descriptor.
             fprintf('Segment number = %d\n', segno )
             fprintf('   Backward segment pointer         = %d\n', ...
                                        dladsc(SPICE_DLA_BWDIDX) )
             fprintf('   Forward segment pointer          = %d\n', ...
                                        dladsc(SPICE_DLA_FWDIDX) )
             fprintf('   Integer component base address   = %d\n', ...
                                        dladsc(SPICE_DLA_IBSIDX) )
             fprintf('   Integer component size           = %d\n', ...
                                        dladsc(SPICE_DLA_ISZIDX) )
             fprintf('   D.p. component base address      = %d\n', ...
                                        dladsc(SPICE_DLA_DBSIDX) )
             fprintf('   D.p. component size              = %d\n', ...
                                        dladsc(SPICE_DLA_DSZIDX) )
             fprintf('   Character component base address = %d\n', ...
                                        dladsc(SPICE_DLA_CBSIDX) )
             fprintf('   Character component size         = %d\n', ...
                                        dladsc(SPICE_DLA_CSZIDX) )
             % Find the next segment.
             current = dladsc;
             segno = segno + 1;

             [dladsc, found] = cspice_dlafns( handle, current );


          % Close file.
          cspice_dascls( handle )

   MATLAB outputs:

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


   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

   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

Required Reading

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



   -Mice Version 1.0.0, 05-MAY-2014, NJB, EDW (JPL)


   begin forward search in dla file

Wed Apr  5 18:00:30 2017