Index Page
cspice_kclear
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_KCLEAR clears the KEEPER system: unload all kernels, clears
   the kernel pool, and re-initialize the system.

I/O


   The call:

      cspice_kclear

      Re-initialize the KEEPER system.

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 the standard meta kernel, retrieve the number of
     % loaded kernels.
     %
     cspice_furnsh( 'standard.tm' )

     n   = cspice_ktotal( 'ALL' );
     txt = sprintf('Count of loaded kernels before cspice_kclear call: %d', n);
     disp( txt )

   MATLAB outputs:

     Count of loaded kernels before cspice_kclear call: 4

   The expected result counting standard.tm and the three kernels
   named in the meta kernel.

     %
     % Clear the KEEPER system, retrieve the number of loaded
     % after the clear.
     %
     cspice_kclear

     n   = cspice_ktotal( 'ALL' );
     txt = sprintf('Count of loaded kernels after cspice_kclear call: %d', n);
     disp( txt )

   MATLAB outputs:

     Count of loaded kernels after cspice_kclear call: 0

Particulars


   This routine allows you re-initialize the KEEPER system with
   a single call.  The KEEPER system is the kernel management system
   underlying the set of Mice APIs

      cspice_furnsh
      cspice_ktotal
      cspice_kdata
      cspice_kinfo
      cspice_kclear
      cspice_unload

   This routine unloads all kernels from their kernel-type-specific
   kernel management subsystems (SPKBSR, CKBSR, etc.), clears the
   kernel pool, clears KEEPER's internal file database, and re-sets
   the watch status for the kernel variables used to load kernels
   via meta-kernels.

   This capability, though implemented in Fortran, is particularly
   relevant to SPICE implementations such as Mice, for which the
   state of the KEEPER system persists after any Mice-based MATLAB
   script is run. Successive runs of Mice-based scripts may perform
   in unexpected ways when scripts access data loaded during runs of
   previous scripts.

   Cleaning up after such programs using explicit unload_c commands is
   tedious and error-prone.  One call to this routine sets the
   KEEPER system to its initial state, preventing unintentional
   interaction between scripts via KEEPER's state.

Required Reading


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

   MICE.REQ
   KERNEL.REQ

Version


   -Mice Version 1.0.0, 01-DEC-2006, EDW (JPL)

Index_Entries


   Re-initialize the keeper system
   Clear the keeper system
   Unload all kernels


Wed Apr  5 18:00:33 2017