AnalogLevelBasedInputNeuron.h

Go to the documentation of this file.
00001 #ifndef ANALOGLEVELBASEDINPUTNEURON_H_
00002 #define ANALOGLEVELBASEDINPUTNEURON_H_
00003 
00004 #include "SimObject.h"
00005 
00006 #include <vector>
00007 
00008 
00010 
00015 class AnalogLevelBasedInputNeuron : public SimObject
00016 {
00017     SIMOBJECT( AnalogLevelBasedInputNeuron, AdvancePhase::One )
00018 
00019 public:
00020 
00021     AnalogLevelBasedInputNeuron();
00022 
00023     AnalogLevelBasedInputNeuron(const std::vector<double> &levels, const std::vector<double> &durations);
00024 
00025     virtual ~AnalogLevelBasedInputNeuron();
00026 
00027     void setAnalogValues(const std::vector<double> &levels, const std::vector<double> &durations);
00028     
00029     const std::vector<double> & getLevels() const;
00030     const std::vector<double> & getDurations() const;
00031 
00032     virtual double getAnalogOutput(analog_port_id_t port = 0) const;
00033 
00034     virtual int advance(AdvanceInfo const &ai);
00035 
00036     virtual int reset( double dt );
00037 
00038     virtual double getManagedDelay() const { return 0; }
00039     virtual int nSpikeInputPorts() const { return 0; };
00040     virtual int nSpikeOutputPorts() const { return 0; };
00041     virtual int nAnalogInputPorts() const { return 0; };
00042     virtual int nAnalogOutputPorts() const { return 256; };
00043     virtual PortType outputPortType(port_t o) const { return analog; };
00044     virtual PortType inputPortType(port_t i) const { return undefined; };
00045 
00046 
00047 protected:
00048     std::vector<double> levels;
00049     std::vector<double> durations;
00050     unsigned curr_level;
00051     unsigned curr_timestep;
00052     unsigned curr_numsteps;
00053     double Vm;
00054 };
00055 
00056 #endif /*ANALOGLEVELBASEDINPUTNEURON_H_*/

Generated on Wed Jul 9 16:34:38 2008 for PCSIM by  doxygen 1.5.5