00001 /********************************************************************** 00002 ** This program is part of 'MOOSE', the 00003 ** Messaging Object Oriented Simulation Environment. 00004 ** Copyright (C) 2003-2007 Upinder S. Bhalla. and NCBS 00005 ** It is made available under the terms of the 00006 ** GNU Lesser General Public License version 2.1 00007 ** See the file COPYING.LIB for the full notice. 00008 **********************************************************************/ 00009 00010 #ifndef _SynChan_h 00011 #define _SynChan_h 00012 00013 class SynChan: public ChanCommon 00014 { 00015 public: 00016 SynChan(); 00017 ~SynChan(); 00018 00020 // Value field access function definitions 00022 00023 void setTau1( double tau1 ); 00024 double getTau1() const; 00025 00026 void setTau2( double tau2 ); 00027 double getTau2() const; 00028 00029 void setNormalizeWeights( bool value ); 00030 bool getNormalizeWeights() const; 00031 00032 // override virtual func from ChanBase 00033 void vSetGbar( const Eref& e, double Gbar ); 00034 00036 // Utility function for any time Gbar changes 00037 void normalizeGbar(); 00038 00042 double calcGk(); 00044 // ElementFinfo access function definitions 00046 /* 00047 unsigned int getNumSynapses() const; 00048 void setNumSynapses( unsigned int i ); 00049 Synapse* getSynapse( unsigned int i ); 00050 */ 00051 00053 // Dest function definitions 00055 00056 void vProcess( const Eref& e, ProcPtr p ); 00057 void vReinit( const Eref& e, ProcPtr p ); 00058 00059 void activation( double val ); 00061 00064 /* void innerAddSpike( unsigned int synIndex, const double time ); */ 00065 00066 static const Cinfo* initCinfo(); 00067 protected: // Used by NMDAChan 00068 00070 // Utility function 00072 // virtual unsigned int updateNumSynapse( Eref e ); 00073 00074 double tau1_; 00075 double tau2_; 00076 int normalizeWeights_; 00077 double xconst1_; 00078 double yconst1_; 00079 double xconst2_; 00080 double yconst2_; 00081 double norm_; 00082 double activation_; 00083 double X_; 00084 double Y_; 00085 double dt_; 00086 }; 00087 00088 00089 #endif // _SynChan_h