public final class PoolSpice extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
checkPoolStateCounter(CounterArray c)
Check and update the POOL state counter tracked by a caller (user) routine.
|
static boolean |
checkUpdates(String agent)
Indicate whether or not any watched kernel variables that have a specified agent on their notification list have
been updated.
|
static boolean |
checkUpdatesIfCounterUpdate(CounterArray c,
String agent)
Determine whether or not any of the POOL variables that are to be watched and have AGENT on their distribution
list have been updated, but do the full watcher check only if the POOL state counter has changed.
|
static void |
clpool()
Clears the pool of kernel variables maintained by the kernel POOL subsystem.
|
static List<Integer> |
getIntVals(String var)
Return the integer value of a kernel variable from the kernel pool.
|
static List<String> |
getStrVals(String var)
Return the character value of a kernel variable from the kernel pool.
|
static void |
init()
This routine initializes the data structures needed for maintaining the kernel pool.
|
static void |
setWatch(String agent,
int nnames,
String[] names)
Add a name to the list of agents to notify whenever a member of a list of kernel variables is updated.
|
public static void init()
public static void clpool() throws PatriusException
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.
Inspired by the CLPOOL routine in pool.for
PatriusException
- if the counter is not about to overflowpublic static void setWatch(String agent, int nnames, String[] names) throws PatriusException
Inspired by SWPOOL in the SPICE library.
agent
- The name of an agent to be notified after updatesnnames
- The number of variables to associate with AGENTnames
- Variable names whose update causes the noticePatriusException
- if there is a problem incrementing the counter or the number of agents is too largepublic static boolean checkUpdates(String agent)
Inspired by CVPOOL of the SPICE library.
agent
- Name of the agent to check for noticestrue
if variables for AGENT have been updatedpublic static List<String> getStrVals(String var) throws PatriusException
Inspired by GCPOOL and STPOOL from the SPICE library. Doing th job for both.
var
- Name of the variable whose value is to be returnedPatriusException
- if there is a problem in the initialization processpublic static List<Integer> getIntVals(String var) throws PatriusException
Inspired by GIPOOL from the SPICE library.
var
- name of the variable whose values are to be returnedPatriusException
- if there is a problem in the initialization processpublic static boolean checkPoolStateCounter(CounterArray c)
Translation of ZZPCTRCK from the Spice library
c
- State counter to checkpublic static boolean checkUpdatesIfCounterUpdate(CounterArray c, String agent)
Translation of ZZCVPOOL from the Spice Library
c
- POOL state counter tracked by the calleragent
- name of the agent (routine) that need acess to the kernel poolCopyright © 2023 CNES. All rights reserved.