Network Events

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

The Network Events module will check for incoming messages and add them to the signal processing stream as timestamped strings.

These messages can be sent from another program on the same machine, or a different machine on the same network.

Since the Network Events module sends events, and not continuous data, it needs to be used in conjunction with another source. The best way to do this is with a Merger, with both the Network Events module and the other source feeding into the same signal chain.


Dependencies

The Network Events module uses the ZeroMQ library to receive messages. It requires version 3.2.x or higher.

By default, the Network Events module will compile, but the networking code will not. Therefore, you need to make sure ZEROMQ is defined as a preprocessor definition, and that you have the ZeroMQ library installed somewhere. You can either install it via a package manager (such as apt-get or yum) or by directly downloading it from the ZeroMQ site.

In Ubuntu, the library needed is : libzmqpp-dev

Sending messages

Currently, all the example code for sending messages is written in Matlab, although in principle it should be possible from any language.

In the Resources/Matlab folder, you'll find a matlab_zeroMQ_wrapper_example.m, which shows how to send messages. Assuming the zeroMQ mex file is in the same directory (which it should be by default), all you have to do is initialize the connection using 'StartConnectThread' and the appropriate url, then send a message using 'Send', the handle of your connection, and the string you want. 

Controlling of data aquisition/recording

The network events module provides features for controlling data acquisition and recording functions.

The following commands are available:

  • "StartAcquisition" – Starts data aquisition

  • "StopAcquisition" – Stops data aquisition

  • "StartRecord [CreateNewDir=1] [RecDir=recording_directory_path] [PrependText=some_text] [AppendText=some_text]" – Starts recording of data

    Optional keyword arguments of the form kwarg=value:
    • CreateNewDir – creates a new (sub)directory with the current date string
    • RecDir – recording directory
    • PrependText – text to be prepended to the date string
    • AppendText – text to be appended to the date string
  • "StopRecord" – Stops recording

An example can be found at Resources/Python/record_control_example_client.py