ZMQInterface

IMPORTANT: The Open Ephys GUI documentation has migrated to a new site – please visit https://open-ephys.github.io for the most up-to-date information.

Function

A plugin enabling the interfacing of ZeroMQ clients to Open Ephys. The interface exposes all data and events and allows to provide events to the application, enabling the creation of advanced visualization and monitoring add-ons.

Note: The client application may be written in any language/platform supporting ZeroMQ.

Usage

The example code for receiving continuous data is written in Python, although in principle it should be possible from any language supporting ZeroMQ.
Currently, ZMQInterface doesn’t support handling event data. If you want to send or receive event data in Open Ephys using ZMQ, use the NetworkEvents and EventBroadcaster plugins from the ZMQPlugins repo.

In the python_clients/ZMQPlugins directory of the original repo, you'll find an example python client called simple_plotter_zmq.py which plots the continuous data received from Open Ephys GUI over a network port (see image below).

There are two important things that needs to be taken care of by the client app. One is, setup a heartbeat protocol to maintain connection between Open Ephys GUI and the client app. The other is receiving the continuous data from the GUI and handling it on the client app.

Data Packets

The data packets sent by ZMQInterface are multipart messages divided into three parts

  1. Message Envelope: The type of message being received, either DATA or EVENT.

  2. Message Header: An array of message header attributes and its values: message number, type (data, spike, or event), number of channels, number of samples, number of real samples, timestamp, and the sample rate.

  3. Message Data: The actual continuous data.

Attribution

Originally developed by Francesco Battaglia at Memory Dynamics Lab

Updated and maintained by András Széll

Source Code

Original repository: https://github.com/aszell/ZMQInterface

Open Ephys ZMQPlugins repository (includes NetworkEvents & EventBroadcaster): https://github.com/open-ephys-plugins/ZMQPlugins