Class MatlabEngine
java.lang.Object
org.eclipse.epsilon.emc.simulink.engine.MatlabEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Methodprotected Methodprotected Objectprotected Methodprotected StringBuilderprotected Methodprotected Methodprotected Methodprotected Methodprotected Methodprotected Methodprotected Set<IGenericSimulinkModel>protected Stringprotected Methodprotected Methodprotected Methodprotected StringBuilderprotected Stopwatchprotected Boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddModel(IGenericSimulinkModel model) voidclose()static MatlabEnginestatic MatlabEngineconnectMatlab(String name) voidvoidenableTryCatch(boolean enableTryCatch) voidvoidThis method is now lazily executed.evalWithResult(String cmd) evalWithResult(String cmd, Object... parameters) evalWithSetupAndResult(String setup, String cmd, Object... parameters) voidvoidvoidfevalAsync(String function, Object... handles) fevalWithResult(int numberOfOutputs, String function, Object... handles) fevalWithResult(String function, Object... handles) static String[]voidflush()Executes all commands to be executed in the eval method that have been stored in a queue.protected static Class<?>getVariable(String variable) static booleanbooleanbooleanbooleanprotected Objectprotected Object[]processInputObject(Object[] objects) voidputVariable(String variableName, Object value) voidquit()voidrelease(IGenericSimulinkModel model) voidstatic voidsetEngineClass(Class<?> matlabEngineClass) voidsetProject(String project) voidsetReduceExchanges(boolean reduceExchanges) static MatlabEnginestatic MatlabEnginestartMatlab(String[] options) voidtrackApi(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()
-