MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HHChannel.h
Go to the documentation of this file.
1 #ifndef _HHChannel_h
2 #define _HHChannel_h
3 /**********************************************************************
4 ** This program is part of 'MOOSE', the
5 ** Messaging Object Oriented Simulation Environment,
6 ** also known as GENESIS 3 base code.
7 ** copyright (C) 2003-2014 Upinder S. Bhalla. and NCBS
8 ** It is made available under the terms of the
9 ** GNU Lesser General Public License version 2.1
10 ** See the file COPYING.LIB for the full notice.
11 *********************************************************************
12 */
13 
48 class HHChannel: public HHChannelBase, public ChanCommon
49 {
50 #ifdef DO_UNIT_TESTS
51  friend void testHHChannel();
52  friend void testHHGateCreation();
53 #endif // DO_UNIT_TESTS
54  public:
55  HHChannel();
56  ~HHChannel();
57 
59  // Value field access function definitions
61 
62  void vSetXpower( const Eref& e, double Xpower );
63  void vSetYpower( const Eref& e, double Ypower );
64  void vSetZpower( const Eref& e, double Zpower );
65  void vSetInstant( const Eref& e, int Instant );
66  int vGetInstant( const Eref& e ) const;
67  void vSetX( const Eref& e, double X );
68  double vGetX( const Eref& e ) const;
69  void vSetY( const Eref& e, double Y );
70  double vGetY( const Eref& e ) const;
71  void vSetZ( const Eref& e, double Z );
72  double vGetZ( const Eref& e ) const;
73  void vSetUseConcentration( const Eref& e, int value );
74  void vSetModulation( const Eref& e, double modulation );
75  double vGetModulation( const Eref& e ) const;
76 
77  void innerSetXpower( double Xpower );
78  void innerSetYpower( double Ypower );
79  void innerSetZpower( double Zpower );
80 
82  // Dest function definitions
84 
97  void vProcess( const Eref& e, ProcPtr p );
98 
106  void vReinit( const Eref& e, ProcPtr p );
107 
119  void vHandleConc( const Eref& e, double conc );
120 
122  // Gate handling functions
124 
127  HHGate* vGetXgate( unsigned int i ) const;
128 
132  HHGate* vGetYgate( unsigned int i ) const;
133 
137  HHGate* vGetZgate( unsigned int i ) const;
138 
140  void innerCreateGate(
141  const string& gateName,
142  HHGate** gatePtr, Id chanId, Id gateId );
143 
145  bool checkOriginal( Id chanId ) const;
146 
147  void vCreateGate( const Eref& e, string gateType );
154  void destroyGate( const Eref& e, string gateType );
155 
159  void innerDestroyGate( const string& gateName,
160  HHGate** gatePtr, Id chanId );
161 
165  bool setGatePower( const Eref& e, double power,
166  double* assignee, const string& gateType );
167 
169  static const Cinfo* initCinfo();
170 
171  private:
173  double conc_;
174 
175  double ( *takeXpower_ )( double, double );
176  double ( *takeYpower_ )( double, double );
177  double ( *takeZpower_ )( double, double );
178 
180  int instant_;
183  double X_;
185  double Y_;
187  double Z_;
188 
189  bool xInited_, yInited_, zInited_; // true when a state variable
190  // has been initialized
191  double g_;
192 
193  double integrate( double state, double dt, double A, double B );
194 
201 
204 
207 
209 
210  static const double EPSILON;
211  static const int INSTANT_X;
212  static const int INSTANT_Y;
213  static const int INSTANT_Z;
214 };
215 
216 
217 #endif // _HHChannel_h
double vGetZ(const Eref &e) const
Definition: HHChannel.cpp:260
HHGate * zGate_
HHGate data structure for the yGate.
Definition: HHChannel.h:206
uint32_t value
Definition: moosemodule.h:42
Definition: HHGate.h:31
void vCreateGate(const Eref &e, string gateType)
Definition: HHChannel.cpp:171
static const int INSTANT_Y
Definition: HHChannel.h:212
double conc_
Conc_ is input variable for Ca-dependent channels.
Definition: HHChannel.h:173
double X_
Definition: HHChannel.h:183
void vReinit(const Eref &e, ProcPtr p)
Definition: HHChannel.cpp:339
bool zInited_
Definition: HHChannel.h:189
HHGate * vGetYgate(unsigned int i) const
Definition: HHChannel.cpp:427
void vSetModulation(const Eref &e, double modulation)
Definition: HHChannel.cpp:405
HHGate * vGetXgate(unsigned int i) const
Definition: HHChannel.cpp:422
bool checkOriginal(Id chanId) const
Returns true if channel is original, false if copy.
Definition: HHChannel.cpp:146
double Z_
State variable for Z gate.
Definition: HHChannel.h:187
double(* takeXpower_)(double, double)
Definition: HHChannel.h:175
void destroyGate(const Eref &e, string gateType)
Definition: HHChannel.cpp:202
static const int INSTANT_Z
Definition: HHChannel.h:213
double g_
Definition: HHChannel.h:191
int instant_
bitmapped flag for X, Y, Z, to do equil calculation for gate
Definition: HHChannel.h:180
void vSetUseConcentration(const Eref &e, int value)
Definition: HHChannel.cpp:265
double(* takeZpower_)(double, double)
Definition: HHChannel.h:177
static const Cinfo * initCinfo()
Definition: HHChannel.cpp:24
static const double EPSILON
Definition: HHChannel.h:210
double Y_
State variable for Y gate.
Definition: HHChannel.h:185
void vSetXpower(const Eref &e, double Xpower)
Definition: HHChannel.cpp:108
int vGetInstant(const Eref &e) const
Definition: HHChannel.cpp:230
HHGate * yGate_
HHGate data structure for the yGate.
Definition: HHChannel.h:203
bool yInited_
Definition: HHChannel.h:189
Definition: Eref.h:26
void vSetX(const Eref &e, double X)
Definition: HHChannel.cpp:235
void vHandleConc(const Eref &e, double conc)
Definition: HHChannel.cpp:400
void vSetZ(const Eref &e, double Z)
Definition: HHChannel.cpp:255
double integrate(double state, double dt, double A, double B)
Internal variable used to calculate conductance.
Definition: HHChannel.cpp:278
void innerCreateGate(const string &gateName, HHGate **gatePtr, Id chanId, Id gateId)
Inner utility function for creating the gate.
Definition: HHChannel.cpp:159
HHGate * xGate_
Definition: HHChannel.h:200
void vSetY(const Eref &e, double Y)
Definition: HHChannel.cpp:245
void innerSetXpower(double Xpower)
void vSetInstant(const Eref &e, int Instant)
Definition: HHChannel.cpp:225
double vGetY(const Eref &e) const
Definition: HHChannel.cpp:250
void innerSetZpower(double Zpower)
void innerDestroyGate(const string &gateName, HHGate **gatePtr, Id chanId)
Definition: HHChannel.cpp:190
Definition: Id.h:17
double(* takeYpower_)(double, double)
Definition: HHChannel.h:176
double vGetX(const Eref &e) const
Definition: HHChannel.cpp:240
bool xInited_
Definition: HHChannel.h:189
static const int INSTANT_X
Definition: HHChannel.h:211
void innerSetYpower(double Ypower)
void vSetZpower(const Eref &e, double Zpower)
Definition: HHChannel.cpp:120
void vSetYpower(const Eref &e, double Ypower)
Definition: HHChannel.cpp:114
double vGetModulation(const Eref &e) const
Definition: HHChannel.cpp:411
bool setGatePower(const Eref &e, double power, double *assignee, const string &gateType)
Definition: HHChannel.cpp:86
Definition: Cinfo.h:18
HHGate * vGetZgate(unsigned int i) const
Definition: HHChannel.cpp:432
void vProcess(const Eref &e, ProcPtr p)
Definition: HHChannel.cpp:287