8. ZeroMQ RemoteΒΆ

In order to enable the FSMT ZeroMQ remote control, you need to start FSMT first, using the -e option:

fsmt -e TOPIC:FSMT_IP {other FSMT arguments}

Where TOPIC:FSMT_IP is the TOPICNAME and IP of the host you are running FSMT on. If you run things locally only, you might give mytopic: a try. Otherwise, try the external IP of your host.

If you want to stop fsmt remotely via network, you can do this by running


The fsmt_zmq_example script is installed by default in your installation prefix. If you need to implement a stop function in your own code implement the following logic using ZeroMQ:

import sys
import zmq

# ZeroMQ Context
context = zmq.Context()
sock = context.socket(zmq.REP)
connect_string = "tcp://"

message = sock.recv()
# Send the correct topic in order
# to stop the desired fsmt instance
message = "unittesting1337:stop"
# This stops FSMT
print "Sending: " + message