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_kclear

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


Abstract


   CSPICE_KCLEAR clears the KEEPER system: unload all kernels, clear the kernel
   pool, and re-initialize the system.

I/O


   The call:

      cspice_kclear

   performs the KEEPER reset.

Parameters


   None.

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) Load a meta-kernel containing three kernels, and count the
      number of files in the kernel pool before and after calling
      cspice_kclear.

      Use the meta-kernel shown below to load the required SPICE
      kernels.


         KPL/MK

         File name: kclear_ex1.tm

         This meta-kernel is intended to support operation of SPICE
         example programs. The kernels shown here should not be
         assumed to contain adequate or correct versions of data
         required by SPICE-based user applications.

         In order for an application to use this meta-kernel, the
         kernels referenced here must be present in the user's
         current working directory.

         The names and contents of the kernels referenced
         by this meta-kernel are as follows:

            File name                     Contents
            ---------                     --------
            de421.bsp                     Planetary ephemeris
            pck00008.tpc                  Planet orientation and
                                          radii
            naif0009.tls                  Leapseconds


         \begindata

            KERNELS_TO_LOAD = ( 'de421.bsp',
                                'pck00008.tpc',
                                'naif0009.tls'  )

         \begintext

         End of meta-kernel


      Example code begins here.


      PRO kclear_ex1

         ;;
         ;; Load the standard meta kernel, retrieve the number of
         ;; loaded kernels.
         ;;
         cspice_furnsh, 'kclear_ex1.tm'
         cspice_ktotal, 'ALL', n
         print, 'Count of loaded kernels before cspice_kclear call', n

         ;;
         ;; Clear the KEEPER system, retrieve the number of loaded
         ;; after the clear.
         ;;
         cspice_kclear
         cspice_ktotal, 'ALL', n
         print, 'Count of loaded kernels after cspice_kclear call ', n

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      Count of loaded kernels before cspice_kclear call           4
      Count of loaded kernels after cspice_kclear call            0


Particulars


   This entry point allows you re-initialize the KEEPER system with
   a single call. The KEEPER system is the kernel management system
   underlying the set of Icy 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 Icy, for which the
   state of the KEEPER system persists after any Icy-based IDL
   script is run. Successive runs of Icy-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.

Exceptions


   1)  If an error occurs when setting a kernel pool watch or
       checking watched variables, the error is signaled by a routine
       in the call tree of this routine.

Files


   See -Particulars.

Restrictions


   1)  Calling this routine will wipe out any kernel pool data
       inserted via the Icy API routines to put data into the
       kernel pool (cspice_pcpool, cspice_pdpool and cspice_pipool).

Required_Reading


   ICY.REQ
   KERNEL.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.0.1, 10-AUG-2021 (JDR)

       Edited -Examples section to comply with NAIF standard. Added
       example's meta-kernel and problem statement.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

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

   -Icy Version 1.0.0, 17-NOV-2006 (EDW)

Index_Entries


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



Fri Dec 31 18:43:05 2021