AnalogSynapse.h

Go to the documentation of this file.
00001 #ifndef ANALOGSYNAPSE_H_
00002 #define ANALOGSYNAPSE_H_
00003 
00004 #include "InputTargetTypes.h"
00005 #include "SimObject.h"
00006 
00008 class AnalogSynapse : public SimObject
00009 {
00010 public:
00011     AnalogSynapse();
00012     virtual ~AnalogSynapse();
00013 
00015         float delay;
00016         
00018         double psr;
00019         
00020     virtual double getAnalogOutput(analog_port_id_t port = 0) const
00021     {
00022         return psr;
00023     }
00024 
00025     virtual void setAnalogInput(double i, analog_port_id_t port = 0)
00026     {
00027         psr += i;
00028     }
00029 
00030     virtual int reset( double dt )
00031     {
00032                 psr = 0;
00033         return 0;
00034     }
00035 
00036     virtual double getManagedDelay() const { return delay; }
00037     virtual int nSpikeInputPorts() const { return 0; };
00038     virtual int nSpikeOutputPorts() const { return 0; };
00039     virtual int nAnalogInputPorts() const { return MAX_PORT_NUMBER; };
00040     virtual int nAnalogOutputPorts() const { return 1; };
00041 
00042     virtual PortType outputPortType(port_t o) const
00043     {
00044         if( o<1 ) return analog; else return undefined;
00045     };
00046 
00047     virtual PortType inputPortType(port_t i) const
00048     {
00049         return analog;
00050     };
00051 
00052 };
00053 
00054 #endif /*ANALOGSYNAPSE_H_*/

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