public interface IOMCCommand
Modifier and Type | Method and Description |
---|---|
boolean |
getInheritanceCount(java.lang.String modelName)
Check if the (base-)model inherits from other classes.
|
java.util.HashMap |
getModelComponent(java.lang.String modelName)
Return the list of component declarations within (base-)model.
|
void |
initializeServer()
Initialize the communication with the (OpenModelica compiler)OMC.
|
boolean |
isError(java.lang.String retval)
Check if there is an error in the return value of sendCommand("command") method and
fetch the error-information of current run.
|
void |
loadModelicaFile(java.lang.String fileName,
java.lang.String modelName)
load the Modelica file(s) and library.
|
void |
modifyComponents(java.lang.String values,
java.lang.String modelName,
java.lang.String components)
Modify parameter(s) and variable(s) of the Modelica model before building the Modelica model.
|
void |
plotPltFile(java.lang.String modelName)
Plot the plt file by calling PxgraphApplication.main(modelName).
|
void |
runModel(java.lang.String fileName,
java.lang.String modelName,
java.lang.String startTime,
java.lang.String stopTime,
int numberOfIntervals,
java.lang.String outputFormat,
java.lang.String processingMode)
Build the Modelica model.
|
void |
stopServer()
Leave and quit OpenModelica environment.
|
boolean getInheritanceCount(java.lang.String modelName)
modelName
- The (base-)model that should be built.java.util.HashMap getModelComponent(java.lang.String modelName)
modelName
- The (base-)model that should be built.void initializeServer() throws ConnectException
ConnectException
- If we're unable to start communicating with
the server.boolean isError(java.lang.String retval)
retval
- The string returned by the (OpenModelica Compiler)OMC.void loadModelicaFile(java.lang.String fileName, java.lang.String modelName) throws ConnectException
fileName
- File which the model should be loaded from.modelName
- Name of the model which should be built.ConnectException
- If commands couldn't
be sent to the (OpenModelic Compiler)OMC.void modifyComponents(java.lang.String values, java.lang.String modelName, java.lang.String components) throws IllegalActionException, ConnectException
values
- New values to change the components' values.modelName
- The (base-)model that should be built.components
- The models' components to change.ConnectException
- If commands couldn't
be sent to the (OpenModelica Compiler)OMC.IllegalActionException
void plotPltFile(java.lang.String modelName) throws ConnectException
modelName
- Name of the model which should be built.ConnectException
- If commands could not be sent to the OMC.void runModel(java.lang.String fileName, java.lang.String modelName, java.lang.String startTime, java.lang.String stopTime, int numberOfIntervals, java.lang.String outputFormat, java.lang.String processingMode) throws ConnectException, java.io.IOException, IllegalActionException
fileName
- File which the model should be loaded from.modelName
- Name of the (base-)model which should be built.startTime
- The start time of simulation.stopTime
- The stop time of simulation.numberOfIntervals
- Number of intervals in the result file.outputFormat
- Format of the result file.processingMode
- The mode of processing for running the executable result file of building the Modelica model.ConnectException
- If commands couldn't
be sent to the (OpenModelic Compiler)OMC.java.io.IOException
- If the executable result file of buildModel()
couldn't be executed.IllegalActionException
void stopServer() throws ConnectException
ConnectException
- If quit command couldn't
be sent to the OMC.