clpool_c |
Table of contents
Procedureclpool_c ( Clear the pool of kernel variables ) void clpool_c ( void ) AbstractRemove all kernel variables from the kernel pool. Watches on kernel variables are retained. Required_ReadingKERNEL KeywordsCONSTANTS FILES Brief_I/ONone. Detailed_InputNone. Detailed_OutputNone. ParametersNone. ExceptionsError free. 1) All known agents (those established through the CSPICE routine swpool_c) will be "notified" that their watched variables have been updated whenever clpool_c is called. FilesNone. Particularsclpool_c 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. Application programs can delete watches by calling the SPICELIB routine DWPOOL. See the header of that routine for details. ExamplesThe numerical results shown for this example may differ across platforms. The results depend on the SPICE kernels used as input, the compiler and supporting libraries, 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. /. Program clpool_ex1 ./ #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local variables ./ SpiceDouble dvals [1]; SpiceInt n; SpiceBoolean found; /. Place a value into the kernel pool. Recall the routines for direct insertion of pool assignments have arrays for input. ./ dvals[0] = -666.0; pdpool_c ( "TEST_VAR", 1, dvals ); /. Check for the variable assignment to TEST_VAR. ./ gdpool_c ( "TEST_VAR", 0, 1, &n, dvals, &found ); printf( "First call to gdpool_c:\n" ); if ( found ) { printf( " TEST_VAR value: %7.2f\n", dvals[0] ); } else { printf( " TEST_VAR not in kernel pool.\n" ); } /. Now clear the kernel pool. ./ clpool_c(); /. Again, check for the TEST_VAR assignment. ./ gdpool_c ( "TEST_VAR", 0, 1, &n, dvals, &found ); printf( "Second call to gdpool_c:\n" ); if ( found ) { printf( " TEST_VAR value: %5.2f\n", dvals[0] ); } else { printf( " TEST_VAR not in kernel pool.\n" ); } return ( 0 ); } When this program was executed on a Mac/Intel/cc/64-bit platform, the output was: First call to gdpool_c: TEST_VAR value: -666.00 Second call to gdpool_c: TEST_VAR not in kernel pool. Restrictions1) This routine should not be used to unload kernels that have been loaded via furnsh_c. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) I.M. Underwood (JPL) Version-CSPICE Version 1.0.2, 13-AUG-2021 (NJB) (JDR) Edited the header to comply with NAIF standard. Added complete code example. Added -Restrictions section. -CSPICE Version 1.0.1, 01-JUL-2014 (NJB) Updated comments regarding behavior of the watcher subsystem. -CSPICE Version 1.0.0, 18-JUN-1999 (IMU) (WLT) (NJB) Index_EntriesCLEAR the pool of kernel variables |
Fri Dec 31 18:41:03 2021