AnalogInputNeuron.h

Go to the documentation of this file.
00001 #ifndef ANALOGINPUTNEURON_H_
00002 #define ANALOGINPUTNEURON_H_
00003 
00004 #include "SimObject.h"
00005 
00006 #include <vector>
00007 
00008 class AnalogInputNeuron : public SimObject
00009 {
00010     SIMOBJECT( AnalogInputNeuron, AdvancePhase::One )
00011 
00012 public:
00013 
00014     AnalogInputNeuron();
00015 
00016     AnalogInputNeuron(const std::vector<double> &values);
00017 
00018     virtual ~AnalogInputNeuron();
00019 
00020     void setAnalogValues(const std::vector<double> &values);
00021 
00022     void addAnalogValue(double v);
00023 
00024     const std::vector<double> & getAnalogValues() const;
00025 
00026     virtual double getAnalogOutput(analog_port_id_t port = 0) const;
00027 
00028     virtual int advance(AdvanceInfo const &);
00029 
00030     virtual int reset( double dt );
00031 
00032     /* virtual int getFieldOffset(string fieldname); */
00033 
00034     void printAnalogValues() const;
00035 
00036     virtual double getManagedDelay() const { return 0; }
00037     virtual int nSpikeInputPorts() const { return 0; };
00038     virtual int nSpikeOutputPorts() const { return 0; };
00039     virtual int nAnalogInputPorts() const { return 0; };
00040     virtual int nAnalogOutputPorts() const { return 256; };
00041     virtual PortType outputPortType(port_t o) const { return analog; };
00042     virtual PortType inputPortType(port_t i) const { return undefined; };
00043 
00044 
00045 protected:
00046     std::vector<double> values;
00047     int current;
00048     double Vm;
00049 };
00050 
00051 #endif /*ANALOGINPUTNEURON_H_*/

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