Open Ephys GUI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Attributes
SpikeObject Struct Reference

Allows spikes to be transmitted between processors. More...

#include <SpikeObject.h>

List of all members.

Public Attributes

uint8_t eventType
uint64_t timestamp
uint16_t source
uint16_t nChannels
uint16_t nSamples
uint16_t data [MAX_NUMBER_OF_SPIKE_CHANNELS *MAX_NUMBER_OF_SPIKE_CHANNEL_SAMPLES]
uint16_t gain [MAX_NUMBER_OF_SPIKE_CHANNELS]
uint16_t threshold [MAX_NUMBER_OF_SPIKE_CHANNELS]

Detailed Description

Allows spikes to be transmitted between processors.

For transmission between processors SpikeObjects must be packaged up into buffers that can fit into MidiEvents The following two methods can be used to package the above spike object into a buffer and unpackage a buffer into a SpikeObject.

The buffer is LittleEndian (thank Intel) and the byte order is the same as the SpikeObject definition. IE. the first 2 bytes are the timestamp, the next two bytes are the source identifier, etc... with the last set of bytes corresponding to the thresholds of the different channels.

Finally the buffer will have an additional byte on the end that is used to check the integerity of the entire package. The way this works is the buffer is divivded up into a series of 16 bit unsigned integers. The sum of all these integers (except the last 16 bit integer) is taken and the sum should equal that 16 bit integer. If not then the data is corrupted and should be dropped or dealt with another way.


Member Data Documentation

uint8_t SpikeObject::eventType
uint64_t SpikeObject::timestamp
uint16_t SpikeObject::source
uint16_t SpikeObject::nChannels
uint16_t SpikeObject::nSamples
uint16_t SpikeObject::gain[MAX_NUMBER_OF_SPIKE_CHANNELS]
uint16_t SpikeObject::threshold[MAX_NUMBER_OF_SPIKE_CHANNELS]

The documentation for this struct was generated from the following file: