Skip to content

MissionControlClient

Alessandro Febretti edited this page Jul 19, 2013 · 14 revisions

[[module omega]]

Last revision: ver. 4.1-alpha6 - 19 Jul 2013

Implements a mission control client. Mission control is a protocol used to communicate to running omegalib * instances, or let different instances to connect with each other and exchange data or python commands. The default mission control client (if available) can be obtained with the global getMissionControlClient() function call.

Methods

Method(s) Description
static [[MissionControlClient]] create() Creates a new mission control client.
connect(string host, int port) Connects to a mission control server on the specified host and port. The default port used by mission control servers is 22500.
dispose() Shuts down the client
setName(string name), string getName() Sets or gets this connection's name. The connection name may be used in log information to identify the client.
postCommand(string command) Sends a script command to all the other connected clients. If the strng starts with @clientId, the command will be sent only to the client called clientId
bool isConnected() Returns true if the client is connected to a server.
closeConnection() Closes the connection. If no connection is open, does nothing.
string-list listConnectedClients() Returns a list containing the names of all the clients connected to this session
setClientConnectedCommand(string cmd) Sets a command to be executed when a new client connects to this sessions. The command string can contain a %clientId% token that will be substituted with the client name.
setClientDisonnectedCommand(string cmd) Sets a command to be executed when a client disconnects to this sessions. The command string can contain a %clientId% token that will be substituted with the client name.
setClientListUpdatedCommand(string cmd) Sets a command to be executed when the list of client names changes. This will be executed when a client connects, disconnects or changes its name.
Clone this wiki locally