Index Page
cspice_pipool
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_PIPOOL provides toolkit programmers a method for
   programmatically inserting integer data into the kernel pool.

I/O


   Given:

      name    name of the kernel pool variable to associate with the values
              supplied in the array 'ivals'. 'name' is restricted to a length
              of 32 characters or less.

              [1,m] = size(name); char = class(name)

      ivals   values to load into the kernel pool subsystem with the assigned
              variable name 'name'.

              [n,1] = size(ivals); int32 = class(ivals)

   the call:

       cspice_pipool( name, ivals)

   returns:

      Inserts the variable 'name' into the kernel pool with values as
      defined in 'ivals'.

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.

      %
      % Define the parameters for the double array.
      %
      PIPOOL_DIM  = 9;
      PIPOOL_VAR  = 'pipool_array';
      START       = 1;

      %
      % Populate the 'pipool_arr' array with PIPOOL_DIM values.
      %
      pipool_arr = int32([0:PIPOOL_DIM-1]');

      %
      % Insert the array data into the kernel pool
      % with variable name 'pipool_array'.
      %
      cspice_pipool( PIPOOL_VAR, pipool_arr)

      %
      % Retrieve the variable's associated values in
      % array 'ivals'.
      %
      ivals = cspice_gipool( PIPOOL_VAR, START, PIPOOL_DIM );

      %
      % Check we found the expected variable, and ensure
      % the expected values.
      %
      if ( ~isempty(ivals) )

         txt = sprintf( 'Found array variable %s with entries:', PIPOOL_VAR );
         disp(txt)

         n_elements = size( ivals );

         txt = sprintf( '   %d\n', ivals );
         disp(txt)

      else

         txt = sprintf( 'Failed to find %s in the kernel pool',  PIPOOL_VAR  );
         disp(txt)

      end

      %
      % Clear the kernel pool.
      %
      cspice_clpool

   MATLAB outputs:

      Found array variable pipool_array with entries:
         0
         1
         2
         3
         4
         5
         6
         7
         8

Particulars


   None.

Required Reading


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

   MICE.REQ
   KERNEL.REQ

Version


   -Mice Version 1.1.1, 12-MAR-2012, EDW (JPL), SCK (JPL)

      Edited I/O section to conform to NAIF standard for Mice documentation.

      Added mention of the length restriction on the kernel pool variable
      name 'name'.

   -Mice Version 1.1.0, 23-FEB-2009, EDW (JPL)

      Added zzmice_str call on input 'name' to convert string cells to
      character arrays if 'name' has type string cells. Added proper
      markers for usage string variable types.

   -Mice Version 1.0.0, 24-JAN-2006, EDW (JPL)

Index_Entries


   Set the value of a numeric kernel pool variable


Wed Apr  5 18:00:34 2017