📄 saphiramanager.java
字号:
/** SaphiraManager.java*/package OaaSaphira.CarrierUnit;/*** Title: SaphiraManager<p>* Description: An interface to the Saphira environment<p>* Company: University of Applied Sciences, Hamburg<p>* <p>* If you find this package useful or you want to make comments on it,* please drop me a line (osherenko@gmx.de).* @author Alexander M. Osherenko (osherenko@gmx.de)* @version 1.0*/public class SaphiraManager extends Thread {/**Default constructor. See also the Saphira developer guide www.ai.sri.com/~konolige/saphira.*/ public SaphiraManager() { }/**Starts the Saphira thread.*/ public void run() { // TODO: thread priority // starting saphira this.RunSaphira(); } /*** Runs the Saphira environment*/ public native void RunSaphira(); /**Prints a message.@param msg - A message to print on the Saphira console.*/ public native void sfMessage(String msg); /*** Loads a Colbert file.* @param fileName A Colbert file to load to the Saphira environment.*/ public native void sfLoadEvalFile(String fileName); /*** Starts a task, for example activity that is already registered in the Saphira environment.* @param schema Library name of the task.* @param iname Instantiation name of the task.* @param timeout Must be specified; a timeout of 0 means the activity executes indefinitely.* @param suspend 0 if the behavior is to be active immediately, and 1 if it is to bestarted in a suspended state, to be activated by a resume signal.* @arg an integer argument to pass to the activated task.* @return 0 if the task is started successfully, and -1 if it did not.*/ public native int sfStartTask (String schema, String iname, int timeout, int priority, int suspend, int arg);/*** Returns the task state.* @param task Task name.* @return 1 if the task has completed successfully, failed, or timed out; it is 2 if the micro-task isnot on the scheduler抯 list; and it is 0 if the micro-task is still active.*/ public native int sfTaskFinished(String task); static { System.loadLibrary("SaphiraWrapper"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -