|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmodelica.simulation.core.network.SimulationControlClient
public class SimulationControlClient
Simulation Control Client is a TCP/IP based communication unit to control a simulation runtime using message parsing As default the ip of a simulation runtime control server is localhost (127.0.0.1) and the port is 10501. The user can change the port
Constructor Summary | |
---|---|
SimulationControlClient()
|
Method Summary | |
---|---|
static void |
checkConnection()
Checks if a connection to a simulation runtime control server is established otherwise it will connect to a runtime |
static void |
clearAll(java.lang.String seq)
Sends a shutdown message to the runtime and closes all open sockets and servers. |
static boolean |
send_changetime_Message(java.lang.String seq,
java.lang.String time)
Changes the simulation time and goes back to a specific time step |
static boolean |
send_changevalue_Message(java.lang.String seq,
java.lang.String time,
java.lang.String fullQualifiedName,
java.lang.String value)
Changes the value of the appended parameters and stets the simulation time back to the point where the user clicked in the UI |
static boolean |
send_pause_Message(java.lang.String seq)
Pauses the running simulation |
static boolean |
send_setcontrolclienturl_Message(java.lang.String seq,
java.lang.String ccPort)
Changes the IP and port of the Control Server. |
static boolean |
send_setfilter_Message(java.lang.String seq,
java.util.ArrayList<ModelicaProperty> plotProperties)
Sets the filter for variables and parameters which should send from OMI to the client UI Note: Please maintain the following operation order to avoid problems while simulating: 1. setcontrolclienturl, 2. settransferclienturl, 3. setfilter |
static boolean |
send_settransferclienturl_Message(java.lang.String seq,
java.lang.String tcPort)
Changes the IP and port of the Control Server. |
static boolean |
send_shutdown_Message(java.lang.String seq)
Shuts the simulation down |
static boolean |
send_start_Message(java.lang.String seq)
Starts or continues the simulation |
static boolean |
send_stop_Message(java.lang.String seq)
Stops the running simulation and resets all values to the beginning |
static boolean |
send_useindex_Message(java.lang.String seq)
TODO |
static void |
setRuntime_ControlServerPort(int newPort)
Changes the default port if a simulation runtime control server is also using a non default port |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimulationControlClient()
Method Detail |
---|
public static void setRuntime_ControlServerPort(int newPort)
newPort
- New simulation runtime control server portpublic static boolean send_changevalue_Message(java.lang.String seq, java.lang.String time, java.lang.String fullQualifiedName, java.lang.String value)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.time
- fullQualifiedName
- value
-
public static boolean send_changetime_Message(java.lang.String seq, java.lang.String time)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.time
-
public static boolean send_setcontrolclienturl_Message(java.lang.String seq, java.lang.String ccPort)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.ccPort
-
public static boolean send_settransferclienturl_Message(java.lang.String seq, java.lang.String tcPort)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.tcPort
-
public static boolean send_setfilter_Message(java.lang.String seq, java.util.ArrayList<ModelicaProperty> plotProperties)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.plotProperties
-
public static boolean send_useindex_Message(java.lang.String seq)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.
public static boolean send_start_Message(java.lang.String seq)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.
public static boolean send_pause_Message(java.lang.String seq)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.
public static boolean send_stop_Message(java.lang.String seq)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.
public static boolean send_shutdown_Message(java.lang.String seq)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.
public static void checkConnection() throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public static void clearAll(java.lang.String seq)
seq
- A sequence number is helpful to manage operation request and reply, a UI has to send a sequence number combined with an operation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |