public final class SpiceKernelManager extends Object
It is based on the keeper.for file in the SPICE library.
Modifier and Type | Method and Description |
---|---|
static void |
clearAllKernels()
Clear the SpiceKernelManager subsystem: unload all kernels, clear the kernel pool, and re-initialize the
subsystem.
|
static void |
getArchAndType(File file)
Determine the architecture and type of SPICE kernels.
|
static void |
loadSpiceKernel(String file)
Load one or more SPICE kernels into a program.
|
static int |
totalNumberOfKernel(String type)
Return the number of kernels of a specified type that are currently loaded via the loadSpiceKernel interface.
|
static void |
unloadKernel(String file)
This interface allows you to unload binary kernels.
|
public static void loadSpiceKernel(String file) throws PatriusException, IOException
Based on the FURNSH routine of the SPICE library.
file
- SPICE kernel file (for now, only binary DAF files are allowed)PatriusException
- if there is any file loading or pool problemIOException
- if there is any file loading problempublic static int totalNumberOfKernel(String type)
Based on the KTOTAL routine from the SPICE library
type
- a kernel type (actually only SPK is allowed. add other types)public static void clearAllKernels() throws PatriusException
Based on the KCLEAR routine of the SPICE library
PatriusException
- if there is a problem unloading a filepublic static void unloadKernel(String file) throws IOException, PatriusException
The usual usage of loadSpiceKernel is to load each file needed by your program exactly one time. However, it is possible to load a kernel more than one time. The effect of unloading a kernel that has been loaded more than once is to "undo" the last loading of the kernel.
This method is based on the UNLOAD method from the SPICE library.
file
- path of the file to be unload from the systemIOException
- if there is any problem unloading or loading a filePatriusException
- if there is any problem unloading or loading a filepublic static void getArchAndType(File file) throws PatriusException, IOException
Based on the GETFAT routine of the SPICE library.
file
- The name of a file to be examinedPatriusException
- if there is a problem managing the file or the type is not SPK extend to other typesIOException
- if there is a problem managing the file (open/read/close)Copyright © 2023 CNES. All rights reserved.