Class MatlabEngine
java.lang.Object
org.eclipse.epsilon.emc.simulink.engine.MatlabEngine
-
Field Summary
Modifier and TypeFieldDescriptionprotected Method
protected Method
protected Object
protected Method
protected StringBuilder
protected Method
protected Method
protected Method
protected Method
protected Method
protected Method
protected Set<IGenericSimulinkModel>
protected String
protected Method
protected Method
protected Method
protected StringBuilder
protected Stopwatch
protected Boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addModel
(IGenericSimulinkModel model) void
close()
static MatlabEngine
static MatlabEngine
connectMatlab
(String name) void
void
enableTryCatch
(boolean enableTryCatch) void
void
This method is now lazily executed.evalWithResult
(String cmd) evalWithResult
(String cmd, Object... parameters) evalWithSetupAndResult
(String setup, String cmd, Object... parameters) void
void
void
fevalAsync
(String function, Object... handles) fevalWithResult
(int numberOfOutputs, String function, Object... handles) fevalWithResult
(String function, Object... handles) static String[]
void
flush()
Executes all commands to be executed in the eval method that have been stored in a queue.protected static Class<?>
getVariable
(String variable) static boolean
boolean
boolean
boolean
protected Object
protected Object[]
processInputObject
(Object[] objects) void
putVariable
(String variableName, Object value) void
quit()
void
release
(IGenericSimulinkModel model) void
static void
setEngineClass
(Class<?> matlabEngineClass) void
setProject
(String project) void
setReduceExchanges
(boolean reduceExchanges) static MatlabEngine
static MatlabEngine
startMatlab
(String[] options) void
trackApi
(boolean track)
-
Field Details
-
engine
-
getVariableMethod
-
getVariableAsyncMethod
-
putVariableMethod
-
putVariableAsyncMethod
-
evalMethod
-
evalAsyncMethod
-
fevalMethod
-
fevalWithVariableOutputsMethod
-
fevalAsyncMethod
-
closeMethod
-
quitMethod
-
disconnectMethod
-
project
-
models
-
evalCommandQueue
-
tryCatchEnabled
-
sb
-
stopWatch
-
-
Constructor Details
-
MatlabEngine
- Throws:
Exception
-
MatlabEngine
-
-
Method Details
-
isDisconnected
- Throws:
Exception
-
getStopWatch
- Returns:
- the stopWatch
-
setEngineClass
-
trackApi
public void trackApi(boolean track) -
getStream
-
setProject
- Throws:
MatlabException
-
addModel
-
getProject
-
release
- Throws:
MatlabRuntimeException
-
enableTryCatch
public void enableTryCatch(boolean enableTryCatch) -
isTryCatchEnabled
-
evalWithSetupAndResult
public Object evalWithSetupAndResult(String setup, String cmd, Object... parameters) throws MatlabException - Throws:
MatlabException
-
evalWithResult
- Throws:
MatlabException
-
evalWithResult
- Throws:
MatlabException
-
eval
This method is now lazily executed. All commands are stored in a queue and are only dispatched when the methodflush()
is invoked.- Parameters:
cmd
-parameters
-- Throws:
MatlabException
-
is
-
getMatlabClass
-
processInputObject
-
processInputObject
-
startMatlab
- Throws:
MatlabException
-
startMatlab
- Throws:
MatlabException
-
findMatlab
- Throws:
MatlabException
-
connectMatlab
- Throws:
MatlabException
-
connectMatlab
- Throws:
MatlabException
-
resetTimer
public void resetTimer() -
eval
- Throws:
MatlabException
-
evalAsync
- Throws:
MatlabException
-
getVariable
- Throws:
MatlabException
-
fevalWithResult
public Object fevalWithResult(int numberOfOutputs, String function, Object... handles) throws MatlabException - Throws:
MatlabException
-
feval
- Throws:
MatlabException
-
fevalWithResult
- Throws:
MatlabException
-
feval
- Throws:
MatlabException
-
putVariable
- Throws:
MatlabException
-
fevalAsync
- Throws:
MatlabException
-
close
- Throws:
MatlabException
-
quit
- Throws:
MatlabException
-
disconnect
- Throws:
MatlabException
-
flush
Executes all commands to be executed in the eval method that have been stored in a queue.- Throws:
MatlabException
-
isEvalCommandQueueEmpty
public boolean isEvalCommandQueueEmpty() -
setReduceExchanges
public void setReduceExchanges(boolean reduceExchanges) - Parameters:
reduceExchanges
-
-
isReduceExchanges
public boolean isReduceExchanges()
-