void ktotal_c ( ConstSpiceChar * kind,
SpiceInt * count )
Return the current number of kernels that have been loaded
via the KEEPER interface that are of a specified type.
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
kind I A list of kinds of kernels to count.
count O The number of kernels of type kind.
kind is a list of types of kernels to count when computing
loaded kernels. kind should consist of a list of words
of kernels to examine. Recognized types are
SPK --- All SPK files are counted in the total.
CK --- All CK files are counted in the total.
PCK --- All binary PCK files are counted in the
DSK --- All DSK files are counted in the total.
EK --- All EK files are counted in the total.
TEXT --- All text kernels that are not meta-text.
kernels are included in the total.
META --- All meta-text kernels are counted in the
ALL --- Every type of kernel is counted in the
kind is case insensitive. If a word appears in kind
that is not one of those listed above, it is ignored.
See the Examples section for illustrations of the
use of kind.
count is the number of kernels loaded through furnsh_c that
belong to the list specified by kind.
1) If a word on the list specified by kind is not recognized
it is ignored.
2) If kind is blank, or none of the words in kind is on the
list specified above, count will be returned as zero.
3) If the input file kind argument pointer is null, the error
SPICE(NULLPOINTER) will be signaled.
4) If the input file kind argument pointer is the empty string, the
error SPICE(EMPTYSTRING) will be signaled.
ktotal_c allows you to easily determine the number of kernels
loaded via the interface furnsh_c that are of a type of interest.
Suppose you wish to determine the number of SPK kernels that
have been loaded via the interface furnsh_c. Assign kind
the value "SPK" and call ktotal_c as shown:
ktotal_c ( "spk", &count );
printf ( "The number of loaded SPK files is: %d\n", count );
To determine the number of text kernels that are loaded that
are not meta-kernels:
ktotal_c ( "TEXT", &ntext );
printf ( "The number of non-meta-text kernels loaded is: %d\n",
To determine the number of SPK, CK and PCK kernels loaded, make the
ktotal_c ( "SPK PCK CK", &count );
To get a count of all loaded kernels:
ktotal_c ( "ALL", &count );
printf ( "There are %d SPICE kernels loaded.\n", count );
N.J. Bachman (JPL)
W.L. Taber (JPL)
-CSPICE Version 1.0.1, 20-JAN-2016 (NJB) (WLT)
Header was updated to reflect support for use
of DSKs. Header sections were reordered.
-CSPICE Version 1.0.0, 01-SEP-1999 (NJB) (WLT)
Number of loaded kernels of a given type