1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
package javasci ;
/********************************************************************************************************/
/* Allan CORNET */
/* INRIA 2005 */
/********************************************************************************************************/
public class Scilab
{
/********************************************************************************************************/
private static native void Initialize();
/**
* Initialize Scilab interface
*/
public static native void Events();
/**
* do a Scilab event
* See SCI/examples/callsci/callsciJava/others/ExempleEvent.java
*/
public static native boolean HaveAGraph();
/**
* Detect if a Scilab graphic window is opened
*/
public static native boolean Exec(String job);
/**
* Execute a command in Scilab
*/
public static native boolean ExistVar(String VarName);
/**
* Detect if Variable name exists in Scilab
*/
public static native int TypeVar(String VarName);
/**
* Get Scilab type of a variable
* -1 not exist
* 1 : real or complex constant matrix.
* 2 : polynomial matrix.
* 4 : boolean matrix.
* 5 : sparse matrix.
* 6 : sparse boolean matrix.
* 8 : matrix of integers stored on 1 2 or 4 bytes
* 9 : matrix of graphic handles
* 10 : matrix of character strings.
* 11 : un-compiled function.
* 13 : compiled function.
* 14 : function library.
* 15 : list.
* 16 : typed list (tlist)
* 17 : mlist
* 128 : pointer
*/
public static native int GetLastErrorCode();
/**
* Get Last Error Code
* 0 no error
*/
public static boolean ExecuteScilabScript(String scriptfilename)
/**
* Execute a scilab script .sce
*/
{
return Exec("exec(''"+scriptfilename+"'');");
}
public static native boolean Finish();
/**
* When you finish to use Scilab Call scilab.quit, clean memory, ...
*/
/**
* See SCI/examples/callsci/callsciJava/others
* and
* SCI/examples/callsci/callsciJava/ihm
* for some simple examples
*/
/********************************************************************************************************/
static
{
System.loadLibrary("javasci");
Initialize();
}
/********************************************************************************************************/
}
/********************************************************************************************************/
|