#   Copyright 2011, 2012, 2013, 2014 Institut fuer Neuroinformatik, Ruhr-Universitaet Bochum, Germany
#   This file is part of cedar.
#   cedar is free software: you can redistribute it and/or modify it under
#   the terms of the GNU Lesser General Public License as published by the
#   Free Software Foundation, either version 3 of the License, or (at your
#   option) any later version.
#   cedar is distributed in the hope that it will be useful, but WITHOUT ANY
#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
#   FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
#   License for more details.
#   You should have received a copy of the GNU Lesser General Public License
#   along with cedar. If not, see <>.
#   Institute:   Ruhr-Universitaet Bochum
#                Institut fuer Neuroinformatik
#   File:        README
#   Maintainer:  Dan Neil
#   Email:
#   Date:        2014 07 9
#   Description:
#   Credits:

How to use:

At a high level, this plugin receives events over UDP from jAER or a compatible device.  These events are then summed up into a frame and used as a source in cedar.

Two steps to use this plugin.  First, compile the plugin:

1) Create a build directory:
    mkdir build
2) Move into the directory and set up the makefile:
    cd build
    cmake ..
3) Compile into a plugin:
    make -j 8

Now, you need to install jAER; see here:

Open jAER, set up the viewer (playing a logged data file or connecting to a DVS), and go to File->Remote->Enable Unicast Datagram (UDP) Output.  Set the port and destination of the address; the defaults should be fine.  Click okay.

Open cedar, Edit->Manage Plugins.  Click add, and navigate to the plugin.  Now, you should be able to find a new source: DvsUdp.  Add it, add a trigger, and run, and you should see the events!

Quick explanation of parameters:

  -Dynamic Range: this is the number of events it takes to saturate completely
  -Decay Factor: Decays the image by a given amount  
  -Frames per Second: At this rate (e.g., 30 FPS), the entire image array will be multiplied by the decay factor


1. There is no ability to set the IP and port of the DVS.  There's some thread-ownership problem of setting IP and port AFTER the constructor, so the only values that work will be the default ones anyway.

2. There is no timing information coming from the DVS.  As soon as a packet arrives, it is placed into the render array, and the render array is decayed at the FPS rate.

3. Cannot be stopped and restarted, for the connection issue above.