Index Page
cspice_gipool
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_GIPOOL returns the value of an integer kernel
   variable (scalar or array) from the kernel pool.

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

I/O


   Given:

      name     the scalar string name of a pool variable associated
               to integer values.

      start    a scalar integer value for the index indicating the
               first component of the data vector assigned
               to 'name' for return (index 0 for all elements).

      room     the scalar integer specifying the maximum number of components
               that can return for 'name'.

   the call:

      cspice_gipool, name, start, room, ivals, found

   returns:

      ivals    a scalar integer array of the values copied from the kernel pool
               data assigned to 'name' beginning at index 'start'.

      found    a scalar boolean that flags whether 'name' exists in
               the kernel pool and has integer type.

               'ivals' has a size of 'room' or less.

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.

      ;;
      ;; Load a kernel containing the variable assignments:
      ;;
      ;;   CTEST_VAL = ('LARRY', 'MOE', 'CURLY' )
      ;;
      ;;   ITEST_VAL = ( 3141, 186, 282 )
      ;;
      ;;   DTEST_VAL = ( 3.1415, 186. , 282.397 )
      ;;
      cspice_furnsh, 'pool_t.tm'

      ;;
      ;; Retrieve up-to 'ROOM' character entries for
      ;; kernel pool variable named 'ITEST_VAL' to
      ;; the array named 'ivals'. The first index to return,
      ;; 'START', has value 0 (this returns all components).
      ;;
      VAR    = 'ITEST_VAL'
      ROOM   = 25
      START  = 0

      cspice_gipool, VAR, START, ROOM, ivals, found

      if (found) then begin

         print, 'Found ' + VAR + ' in the kernel pool'

         for i=0, n_elements(ivals)-1 do begin
            print, '   Element ' + string(i) + ' of ' + VAR + ': ', ivals[i]
         endfor

      endif else begin
         print, 'Failed to find  ' + VAR + ' in the kernel pool'
      endelse

      ;;
      ;; Unload the test kernel.
      ;;
      cspice_unload, 'pool_t.tm'

   IDL outputs:

      Found ITEST_VAL in the kernel pool
         Element        0 of ITEST_VAL:         3141
         Element        1 of ITEST_VAL:          186
         Element        2 of ITEST_VAL:          282

Particulars


   None.

Required Reading


   ICY.REQ
   KERNEL.REQ

Version


   -Icy Version 1.0.3, 26-AUG-2016, EDW (JPL), JDR (ODC Space)

      Edit to example code. Typos in kernel names; "pool_t.ker"
      and "pool_t.pro" rather than "pool_t.tm."

   -Icy Version 1.0.2, 03-JAN-2007, EDW (JPL)

      Edit to I/O section for 'room' and 'start' to improve clarity.

   -Icy Version 1.0.1, 23-JUN-2005, EDW (JPL)

      Minor correction to example. 'cvals' replaced
      with 'ivals'.

   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries


   RETURN the integer value of a pooled kernel variable




Wed Apr  5 17:58:01 2017