|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspice.basic.KernelPool
public class KernelPool
Class KernelPool supports access to the kernel pool data structure.
Version 1.0.0 08-JAN-2010 (NJB)
Field Summary | |
---|---|
static int |
CHARACTER
|
static java.lang.String |
CSPICE_CHARACTER
|
static java.lang.String |
CSPICE_NUMERIC
|
static int |
NUMERIC
|
Constructor Summary | |
---|---|
KernelPool()
|
Method Summary | |
---|---|
static boolean |
checkWatch(java.lang.String agent)
Determine whether any of the kernel variables associated with a specified agent have been updated. |
static void |
clear()
Clear the kernel pool. |
static void |
delete(java.lang.String name)
Delete a variable from the kernel pool. |
static boolean |
exists(java.lang.String name)
Indicate whether a kernel variable of a given name exists. |
static boolean |
exists(java.lang.String name,
int dataType)
Indicate whether a kernel variable of a given name and data type exists. |
static KernelVarDescriptor |
getAttributes(java.lang.String name)
Get the attributes of a kernel variable specified by name. |
static java.lang.String[] |
getCharacter(java.lang.String name)
Fetch a character kernel variable. |
static java.lang.String[] |
getCharacter(java.lang.String name,
int start,
int room)
Fetch a slice (a contiguous sequence of array elements) of a character kernel variable. |
static int |
getDataType(java.lang.String name)
Get the data type of a specified kernel variable. |
static double[] |
getDouble(java.lang.String name)
Fetch a double precision kernel variable. |
static double[] |
getDouble(java.lang.String name,
int start,
int room)
Fetch a slice (a contiguous sequence of array elements) of a double precision kernel variable. |
static int[] |
getInteger(java.lang.String name)
Fetch an integer kernel variable. |
static int[] |
getInteger(java.lang.String name,
int start,
int room)
Fetch a slice (a contiguous sequence of array elements) of an integer kernel variable. |
static java.lang.String[] |
getNames(java.lang.String template)
Retrieve an array containing all names of kernel variables that match a given template. |
static java.lang.String[] |
getNames(java.lang.String template,
int start,
int room)
Retrieve a slice of an array containing all names of kernel variables that match a given template. |
static int |
getParameter(java.lang.String name)
Return kernel pool size parameters specified by name. |
static int |
getSize(java.lang.String name)
Get the size of a specified kernel variable. |
static KernelVarStringComponent |
getStringComponent(java.lang.String name,
int nth,
java.lang.String contin)
Return a component of a string value from the kernel pool. |
static void |
load(java.lang.String name)
Load a text kernel into the kernel pool. |
static void |
loadFromBuffer(java.lang.String[] cvals)
Load into the kernel pool variables defined by "keyword=value" assignments in a string array. |
static void |
putCharacter(java.lang.String name,
java.lang.String[] values)
Insert a character kernel variable into the kernel pool. |
static void |
putDouble(java.lang.String name,
double[] values)
Insert a double precision kernel variable into the kernel pool. |
static void |
putInteger(java.lang.String name,
int[] values)
Insert an integer kernel variable into the kernel pool. |
static void |
setWatch(java.lang.String agent,
java.lang.String[] names)
Associate an agent with a set of kernel variables to be watched. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CHARACTER
public static final int NUMERIC
public static final java.lang.String CSPICE_CHARACTER
public static final java.lang.String CSPICE_NUMERIC
Constructor Detail |
---|
public KernelPool()
Method Detail |
---|
public static KernelVarDescriptor getAttributes(java.lang.String name) throws SpiceException
SpiceException
public static boolean exists(java.lang.String name, int dataType) throws SpiceException
Note that this functionality differs from that of the CSPICE routine `expool_c', which is restricted to numeric kernel variables.
SpiceException
public static boolean exists(java.lang.String name) throws SpiceException
Note that this functionality differs from that of the CSPICE routine `expool_c', which is restricted to numeric kernel variables.
SpiceException
public static int getDataType(java.lang.String name) throws SpiceException, KernelVarNotFoundException
SpiceException
KernelVarNotFoundException
public static int getSize(java.lang.String name) throws SpiceException, KernelVarNotFoundException
SpiceException
KernelVarNotFoundException
public static java.lang.String[] getCharacter(java.lang.String name) throws SpiceException, KernelVarNotFoundException
To obtain a slice of a character kernel variable,
see the method getCharacter( String name, int start, int room )
.
SpiceException
KernelVarNotFoundException
public static java.lang.String[] getCharacter(java.lang.String name, int start, int room) throws SpiceException, KernelVarNotFoundException
To obtain an entire character kernel variable in one call.
see the method getCharacter( String name )
.
SpiceException
KernelVarNotFoundException
public static KernelVarStringComponent getStringComponent(java.lang.String name, int nth, java.lang.String contin) throws SpiceException
This method is analgous to the CSPICE routine stpool_c.
This method treats the string array associated with a character kernel variable as a sequence of components, where each component consists of a sequence of array elements connected by continuation characters.
It is permissible for the input index not to correspond to
an existing component. The returned KernelVarStringComponent
instance contains a "found flag" that indicates whether the
component exists.
The indices of the components are zero-based.
SpiceException
public static double[] getDouble(java.lang.String name) throws SpiceException, KernelVarNotFoundException
To obtain a slice of a double precision kernel variable,
see the method getDouble( String name, int start, int room )
.
SpiceException
KernelVarNotFoundException
public static double[] getDouble(java.lang.String name, int start, int room) throws SpiceException, KernelVarNotFoundException
To obtain an entire double precision kernel variable in one call.
see the method getDouble( String name )
.
SpiceException
KernelVarNotFoundException
public static int[] getInteger(java.lang.String name) throws SpiceException, KernelVarNotFoundException
To obtain a slice of an integer kernel variable,
see the method getInteger( String name, int start, int room )
.
SpiceException
KernelVarNotFoundException
public static int[] getInteger(java.lang.String name, int start, int room) throws SpiceException, KernelVarNotFoundException
To obtain an entire integer kernel variable in one call.
see the method getInteger( String name )
.
SpiceException
KernelVarNotFoundException
public static void putCharacter(java.lang.String name, java.lang.String[] values) throws SpiceException
SpiceException
public static void putDouble(java.lang.String name, double[] values) throws SpiceException
SpiceException
public static void putInteger(java.lang.String name, int[] values) throws SpiceException
SpiceException
public static void loadFromBuffer(java.lang.String[] cvals) throws SpiceException
SpiceException
public static void load(java.lang.String name) throws SpiceException
Caution: kernels loaded via this method are NOT loaded into the kernel database.
SpiceException
public static void clear() throws SpiceException
Caution: this routine should not be used together with the kernel database.
SpiceException
public static int getParameter(java.lang.String name) throws SpiceException
name is the name of a kernel pool size parameter. The following parameters may be specified: MAXVAR is the maximum number of variables that the kernel pool may contain at any one time. MAXVAR should be a prime number. MAXLEN is the maximum length of the variable names that can be stored in the kernel pool. MAXVAL is the maximum number of distinct values that may belong to the variables in the kernel pool. Each variable must have at least one value, and may have any number, so long as the total number does not exceed MAXVAL. MAXVAL must be at least as large as MAXVAR. MXNOTE is the maximum number of distinct variable-agents pairs that can be maintained by the kernel pool. (A variable is "paired" with an agent, if that agent is to be notified whenever the variable is updated.) MAXAGT is the maximum number of agents that can be kept on the distribution list for notification of updates to kernel variables. MAXCHR is the maximum number of characters that can be stored in a component of a string valued kernel variable. MAXLIN is the maximum number of character strings that can be stored as data for kernel pool variables. Note that the case of name is insignificant. Embedded blanks are also ignored.
SpiceException
public static void delete(java.lang.String name) throws SpiceException
SpiceException
public static java.lang.String[] getNames(java.lang.String template) throws SpiceException
To obtain a slice of the array of variable names matching a
template,
see the method getNames( String template, int start, int room )
.
SpiceException
public static java.lang.String[] getNames(java.lang.String template, int start, int room) throws SpiceException
To obtain the full array of variable names matching a
template, see the method getNames( String template)
.
SpiceException
public static void setWatch(java.lang.String agent, java.lang.String[] names) throws SpiceException
SpiceException
public static boolean checkWatch(java.lang.String agent) throws SpiceException
SpiceException
|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |