public class OMCClient extends OMCInterface
This implementation is based on OpenModelica's system documentation which is available here: System Documentation. The implementation awaits CORBA-object references in the following 2 path's:
$TMP/openmodelica.objid$TMP/openmodelica.USER.objidfallbackLocale, GET_ERRORS, localeEnvVariable, log, maxSleep, maxTrys| Constructor and Description |
|---|
OMCClient() |
OMCClient(java.nio.file.Path omcExec) |
OMCClient(java.nio.file.Path omcExec,
java.lang.String locale) |
OMCClient(java.lang.String omcExec) |
OMCClient(java.lang.String omcExec,
IORNameProvider iorProvider) |
OMCClient(java.lang.String omcExec,
java.lang.String locale) |
OMCClient(java.lang.String omcExec,
java.lang.String locale,
IORNameProvider iorProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connects this client to omc.
|
void |
disconnect()
Disconnects this client from omc.
|
java.util.Optional<java.lang.String> |
getError() |
Result |
sendExpression(java.lang.String expression)
Sends the given expression to omc & returning the result from omc.
|
call, cd, checkAllModelsRecursive, checkModel, getClassInformation, getList, getVersion, is_public OMCClient()
public OMCClient(java.lang.String omcExec)
public OMCClient(java.nio.file.Path omcExec)
public OMCClient(java.nio.file.Path omcExec,
java.lang.String locale)
public OMCClient(java.lang.String omcExec,
java.lang.String locale)
public OMCClient(java.lang.String omcExec,
IORNameProvider iorProvider)
public OMCClient(java.lang.String omcExec,
java.lang.String locale,
IORNameProvider iorProvider)
public Result sendExpression(java.lang.String expression)
OMCInterfacesendExpression in class OMCInterfaceexpression - a modelica-expressionpublic void connect()
throws java.io.IOException,
java.net.ConnectException
OMCInterfaceconnect in class OMCInterfacejava.io.IOException - if an io-error occursjava.net.ConnectExceptionOMCInterface.disconnect()public void disconnect()
throws java.io.IOException
OMCInterfacedisconnect in class OMCInterfacejava.io.IOException - if an io-error occursOMCInterface.connect()public java.util.Optional<java.lang.String> getError()