Table of contents
CSPICE_CLPOOL removes all kernel variables from the kernel pool. Watches
on kernel variables are retained.
The call:
cspice_clpool
deletes all variable assignments loaded into the kernel
pool.
None.
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) This code example demonstrates how to assign values to kernel
pool variables, how to check for the existence of kernel pool
variables and how to clear the kernel pool, i.e. how to delete
all variable assignments loaded into the kernel pool.
Place a value into the kernel pool and check for the variable
to which the value has been assigned. Clear the kernel pool
and check for that variable again.
Example code begins here.
PRO clpool_ex1
;;
;; Place a value into the kernel pool. Recall the routines
;; for direct insertion of pool assignments have arrays for
;; input.
;;
dvals = [-666.D0]
cspice_pdpool, 'TEST_VAR', dvals
;;
;; Check for the variable assignment to TEST_VAR.
;;
cspice_gdpool, 'TEST_VAR', 1L, 1L, dvals, found
print, format='(A)', 'First call to cspice_gdpool:'
if ( found ) then begin
print, format='(A,F8.2)', ' TEST_VAR value:', dvals[0]
endif else begin
print, format='(A)', ' TEST_VAR not in kernel pool.'
endelse
;;
;; Now clear the kernel pool.
;;
cspice_clpool
;;
;; Again, check for the TEST_VAR assignment.
;;
cspice_gdpool, 'TEST_VAR', 1L, 1L, dvals, found
print, format='(A)', 'Second call to cspice_gdpool:'
if ( found ) then begin
print, format='(A,F6.2)', ' TEST_VAR value:', dvals[0]
endif else begin
print, format='(A)', ' TEST_VAR not in kernel pool.'
endelse
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
First call to cspice_gdpool:
TEST_VAR value: -666.00
Second call to cspice_gdpool:
TEST_VAR not in kernel pool.
cspice_clpool clears the pool of kernel variables maintained by
the kernel POOL subsystem. All the variables in the pool are deleted.
However, all watcher information is retained.
Each watched variable will be regarded as having been updated.
Any agent associated with that variable will have a notice
posted for it indicating that its watched variable has been
updated.
1) All known agents (those established through the SPICELIB
routine SWPOOL) will be "notified" that their watched
variables have been updated whenever cspice_clpool is called.
None.
1) This routine should not be used to unload kernels that
have been loaded via cspice_furnsh.
ICY.REQ
KERNEL.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.2, 13-AUG-2021 (JDR)
Edited the header to comply with NAIF standard. Added complete
code example.
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.1, 12-JUN-2006 (EDW)
Minor edit to header, placed note concerning cspice_clpool
behavior in the -Particulars section.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
CLEAR the pool of kernel variables
|