#ifndef SPIKE_H #define SPIKE_H #include #include "neuron.h" #include "log.h" class SpikeMUX { public: typedef Neuron::id_type id_type; // WARN: this id refers to the spiking neuron, not the spike itself wich can not be addressed directly SpikeMUX(id_type dst) : dst(dst), time(-INFINITY), current(0.0) {} SpikeMUX(id_type dst, double time) : dst(dst), time(time), current(0.0) {} // reflection template bool reflect(Action &a); static id_type numElements() { DIE("Spike::numElements() called"); } static SpikeMUX * singleton(id_type num); // do some reflection magic to multiplex between IntrinsicNeuron and ExternalNoise // properties id_type dst; double time; double current; }; SpikeMUX staticSpikeMUX(-1); // single copy to use for reading spikes #endif // SPIKE_H