00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _SpikeGen_h
00011 #define _SpikeGen_h
00012
00013 class SpikeGen
00014 {
00015 public:
00016 SpikeGen();
00017
00019
00021 void setThreshold( double threshold );
00022 double getThreshold() const;
00023
00024 void setRefractT( double val );
00025 double getRefractT() const;
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 bool getFired() const;
00036 void setEdgeTriggered( bool yes);
00037 bool getEdgeTriggered() const;
00038
00040
00042
00043 void process( const Eref& e, ProcPtr p );
00044 void reinit( const Eref& e, ProcPtr p );
00045 void handleVm( double val );
00046
00047 static const Cinfo* initCinfo();
00048 private:
00049 double threshold_;
00050 double refractT_;
00051 double lastEvent_;
00052 double V_;
00053 bool fired_;
00054 bool edgeTriggered_;
00055 };
00056
00057 #endif // _SpikeGen_h