Hi Chris,
I am changing things in open-ephys to receive messages from multiple sources using a subscriber based protocol.
It would be easier if I can send messages from Mworks using a publisher protocol (i.e., instead of the reponse/request).
Can you please add publisher-style output?
It might be better to rename the existing “open ephys” modules in mworks as generic “0MQ” modules since they can serve many other purposes (i.e., have a publisher module, subscriber module, and a request/response module)
Thank you,
Shay
Hi Shay,
I think this is a good use case for MWorks’ Python actions (run_python_file and run_python_string). I’ve attached an example experiment and associated Python scripts that demonstrate how to do ZeroMQ PUB/SUB, where the publisher is MWorks, and the subscriber is an external process. (Note that it makes use of some very new MWorks/Python functions, so you’ll need to use a nightly build from this week.)
If you don’t have pyzmq installed, you can get it like so:
easy_install --user pip # If pip is not installed
~/Library/Python/2.7/bin/pip install --user pyzmq
To launch the subscriber process:
python sub.py
If you have any questions, please let me know.
Cheers,
Chris
Attachment: zmq_via_python.zip (1.22 KB)