Allows remote control (via IP) of a running Brian script
Initialisation arguments:
Once this object has been created, use a RemoteControlClient to issue commands.
Example usage
Main simulation code includes a line like this:
server = RemoteControlServer()
In an IPython shell you can do something like this:
client = RemoteControlClient()
spikes = client.evaluate('M.spikes')
i, t = zip(*spikes)
plot(t, i, '.')
client.execute('stop()')
Used to remotely control (via IP) a running Brian script
Initialisation arguments:
Use a RemoteControlServer on the simulation you want to control.
Has the following methods:
Executes the specified code in the server process. If it raises an exception, the server process will catch it and reraise it in the client process.
Evaluate the code in the server process and return the result. If it raises an exception, the server process will catch it and reraise it in the client process.
Temporarily stop the simulation in the server process, continue simulation with the :meth:’go’ method.
Continue a simulation that was paused.
Stop a simulation, equivalent to execute('stop()').
Example usage
Main simulation code includes a line like this:
server = RemoteControlServer()
In an IPython shell you can do something like this:
client = RemoteControlClient()
spikes = client.evaluate('M.spikes')
i, t = zip(*spikes)
plot(t, i, '.')
client.execute('stop()')