winIDEA SDK
|
The winIDEA SDK for MATLAB uses the Java SDK. The API is identical with these exceptions:
java.lang.System.loadLibrary()
. Use the ICLoader
class from ISystemConnectLoader.jar
instead. See examples.enumeration constants require javaMethod
calls instead of direct access. For example:
IConnectDebug.EAccessFlags.fMonitor
can be accessed with::
fMonitorEnum = javaMethod('valueOf', 'si.isystem.connect.IConnectDebug$EAccessFlags', 'fMonitor');
Unzip the SDK file and copy the lib
directory to your preferred location. Add ISystemConnectLoader.jar
and IConnectJNI.jar
to MATLAB's static or dynamic Java classpath and load the library. This procedure is described below and implemented in the example script icInit.m
.
Load the library before using the winIDEA SDK. The java.lang.System.loadLibrary()
call may fail from the MATLAB window, so use si.isystem.connect.mutil.ICLoader
instead. Example:
javaaddpath('..\lib\ISystemConnectLoader.jar'); javaaddpath('..\lib\IConnectJNI.jar'); loader = si.isystem.connect.mutil.ICLoader;
Native libraries load from java.library.path
locations. Use '/' as the separator. The current directory ('.') should be in java.library.path
, and omit the extension. Example:
loader.loadLibraryFromSysPath('../lib/IConnectJNI');
Alternatively, load from an absolute path. Include the .dll
extension:
loader.loadLibraryAbs('d:\lib\IConnectJNI.dll');
Setting the java.library.path
in MATLAB is described in the MATLAB documentation <http://www.mathworks.com>
__. The current value can be obtained in MATLAB with::
java.lang.System.getProperty('java.library.path')
The IConnectJNI.dll
and IConnectJNI.jar
files are identical to Java versions, so only one system copy is needed. See the example script icInit.m
.
The examples
directory contains runnable m-files for use as project startup files. It includes librarypath.txt
, which sets the java.library.path
system variable when MATLAB starts in this directory. Otherwise, add the current directory to librarypath.txt
or modify icInit.m
to load the isystem.connect* native library IConnectJNI.dll
from an absolute path.
To run examples, first execute icInit.m
to load required libraries, then run other scripts.
The first step for using the winIDEA SDK is establishing a winIDEA connection:
cMgr = si.isystem.connect.ConnectionMgr(); cMgr.connect();
Then instantiate other classes based on required operations. For debug operations (reset, run, runUntilFunction, etc.), instantiate CDebugFacade
:
debug = si.isystem.connect.CDebugFacade(cMgr);
Now call methods:
debug.download(); debug.runUntilFunction('main'); debug.waitUntilStopped();
Documentation for all classes and their methods is available at the iSYSTEM web page <http://www.isystem.com/downloads/winIDEA/SDK/iSYSTEM.Python.SDK/documentation/isystem-connect-api/index.html>
__.
No general Simulink blocks are provided with winIDEA SDK calls, but MATLAB function blocks can call the winIDEA SDK.