#include <HHChannel2D.h>
Public Member Functions | |
HHChannel2D () | |
void | setUseConcentration (int value) |
int | getUseConcentration () |
void | setXindex (string index) |
string | getXindex () const |
void | setYindex (string index) |
string | getYindex () const |
void | setZindex (string index) |
string | getZindex () const |
void | setXpower (const Eref &e, double Xpower) |
double | getXpower (const Eref &e) const |
void | setYpower (const Eref &e, double Ypower) |
double | getYpower (const Eref &e) const |
void | setZpower (const Eref &e, double Zpower) |
double | getZpower (const Eref &e) const |
void | setInstant (int Instant) |
int | getInstant () const |
void | setX (double X) |
double | getX () const |
void | setY (double Y) |
double | getY () const |
void | setZ (double Z) |
double | getZ () const |
HHGate2D * | getXgate (unsigned int i) |
Access function used for the X gate. The index is ignored. | |
HHGate2D * | getYgate (unsigned int i) |
Access function used for the Y gate. The index is ignored. | |
HHGate2D * | getZgate (unsigned int i) |
Access function used for the Z gate. The index is ignored. | |
void | setNumGates (unsigned int num) |
Dummy assignment function for the number of gates. | |
unsigned int | getNumXgates () const |
unsigned int | getNumYgates () const |
Returns 1 if Y gate present, otherwise 0. | |
unsigned int | getNumZgates () const |
Returns 1 if Z gate present, otherwise 0. | |
void | vProcess (const Eref &e, ProcPtr p) |
void | vReinit (const Eref &e, ProcPtr p) |
void | conc1 (double conc) |
void | conc2 (double conc) |
void | createGate (const Eref &e, string gateType) |
void | innerCreateGate (const string &gateName, HHGate2D **gatePtr, Id chanId, Id gateId) |
Inner utility function for creating the gate. | |
bool | checkOriginal (Id chanId) const |
Returns true if channel is original, false if copy. | |
void | destroyGate (const Eref &e, string gateType) |
void | innerDestroyGate (const string &gateName, HHGate2D **gatePtr, Id chanId) |
bool | setGatePower (const Eref &e, double power, double *assignee, const string &gateType) |
Static Public Member Functions | |
static PFDD | selectPower (double power) |
static const Cinfo * | initCinfo () |
Specify the Class Info static variable for initialization. | |
Public Attributes | |
double(* | takeXpower_ )(double, double) |
double(* | takeYpower_ )(double, double) |
double(* | takeZpower_ )(double, double) |
HHChannel2D::HHChannel2D | ( | ) |
bool HHChannel2D::checkOriginal | ( | Id | chanId | ) | const |
Returns true if channel is original, false if copy.
If the gate exists and has only this element for input, then change the gate power. If the gate exists and has multiple parents, then make a new gate, set its power. If the gate does not exist, make a new gate, set its power.
The function is designed with the idea that if copies of this channel are made, then they all point back to the original HHGate. (Unless they are cross-node copies). It is only if we subsequently alter the HHGate of this channel that we need to make our own variant of the HHGate, or disconnect from an existing one.
References HHGate2D::isOriginalChannel().
void HHChannel2D::conc1 | ( | double | conc | ) |
Assign the local conc_ to the incoming conc from the concentration calculations for the compartment. Typically the message source will be a CaConc object, but there are other options for computing the conc.
Referenced by initCinfo().
void HHChannel2D::conc2 | ( | double | conc | ) |
Referenced by initCinfo().
void HHChannel2D::createGate | ( | const Eref & | e, | |
string | gateType | |||
) |
Function for safely creating each gate, identified by strings as X, Y and Z. Will only work on a new channel, not on a copy. The idea is that the gates are always referred to the original 'library' channel, and their contents cannot be touched except by the original.
void HHChannel2D::destroyGate | ( | const Eref & | e, | |
string | gateType | |||
) |
Utility function for destroying gate. Works only on original HHChannel. Somewhat dangerous, should never be used after a copy has been made as the pointer of the gate will be in use elsewhere.
int HHChannel2D::getInstant | ( | ) | const |
Referenced by initCinfo().
unsigned int HHChannel2D::getNumXgates | ( | ) | const |
Access function for the number of Xgates. Gives 1 if present, otherwise 0.
Referenced by initCinfo().
unsigned int HHChannel2D::getNumYgates | ( | ) | const |
Returns 1 if Y gate present, otherwise 0.
Referenced by initCinfo().
unsigned int HHChannel2D::getNumZgates | ( | ) | const |
Returns 1 if Z gate present, otherwise 0.
Referenced by initCinfo().
int HHChannel2D::getUseConcentration | ( | ) |
double HHChannel2D::getX | ( | ) | const |
Referenced by initCinfo().
HHGate2D * HHChannel2D::getXgate | ( | unsigned int | i | ) |
Access function used for the X gate. The index is ignored.
Referenced by initCinfo().
string HHChannel2D::getXindex | ( | ) | const |
Referenced by initCinfo().
double HHChannel2D::getXpower | ( | const Eref & | e | ) | const |
Assigns the Xpower for this gate. If the gate exists and has only this element for input, then change the gate value. If the gate exists and has multiple parents, then make a new gate. If the gate does not exist, make a new gate
Referenced by initCinfo().
double HHChannel2D::getY | ( | ) | const |
Referenced by initCinfo().
HHGate2D * HHChannel2D::getYgate | ( | unsigned int | i | ) |
Access function used for the Y gate. The index is ignored.
Referenced by initCinfo().
string HHChannel2D::getYindex | ( | ) | const |
Referenced by initCinfo().
double HHChannel2D::getYpower | ( | const Eref & | e | ) | const |
Referenced by initCinfo().
double HHChannel2D::getZ | ( | ) | const |
Referenced by initCinfo().
HHGate2D * HHChannel2D::getZgate | ( | unsigned int | i | ) |
Access function used for the Z gate. The index is ignored.
Referenced by initCinfo().
string HHChannel2D::getZindex | ( | ) | const |
Referenced by initCinfo().
double HHChannel2D::getZpower | ( | const Eref & | e | ) | const |
Referenced by initCinfo().
const Cinfo * HHChannel2D::initCinfo | ( | ) | [static] |
Specify the Class Info static variable for initialization.
Reimplemented from ChanCommon.
References conc1(), conc2(), getInstant(), getNumXgates(), getNumYgates(), getNumZgates(), getX(), getXgate(), getXindex(), getXpower(), getY(), getYgate(), getYindex(), getYpower(), getZ(), getZgate(), getZindex(), getZpower(), ChanBase::initCinfo(), HHGate2D::initCinfo(), setInstant(), setNumGates(), setX(), setXindex(), setXpower(), setY(), setYindex(), setYpower(), setZ(), setZindex(), and setZpower().
void HHChannel2D::innerCreateGate | ( | const string & | gateName, | |
HHGate2D ** | gatePtr, | |||
Id | chanId, | |||
Id | gateId | |||
) |
Inner utility function for creating the gate.
Inner utility for destroying the gate
PFDD HHChannel2D::selectPower | ( | double | power | ) | [static] |
Referenced by setXpower(), setYpower(), and setZpower().
bool HHChannel2D::setGatePower | ( | const Eref & | e, | |
double | power, | |||
double * | assignee, | |||
const string & | gateType | |||
) |
Utility for altering gate powers
Referenced by setXpower(), setYpower(), and setZpower().
void HHChannel2D::setInstant | ( | int | Instant | ) |
Referenced by initCinfo().
void HHChannel2D::setNumGates | ( | unsigned int | num | ) |
Dummy assignment function for the number of gates.
Referenced by initCinfo().
void HHChannel2D::setUseConcentration | ( | int | value | ) |
void HHChannel2D::setX | ( | double | X | ) |
Referenced by initCinfo().
void HHChannel2D::setXindex | ( | string | index | ) |
Referenced by initCinfo().
void HHChannel2D::setXpower | ( | const Eref & | e, | |
double | Xpower | |||
) |
Assigns the Xpower for this gate. If the gate exists and has only this element for input, then change the gate value. If the gate exists and has multiple parents, then make a new gate. If the gate does not exist, make a new gate
References selectPower(), setGatePower(), and takeXpower_.
Referenced by initCinfo().
void HHChannel2D::setY | ( | double | Y | ) |
Referenced by initCinfo().
void HHChannel2D::setYindex | ( | string | index | ) |
Referenced by initCinfo().
void HHChannel2D::setYpower | ( | const Eref & | e, | |
double | Ypower | |||
) |
References selectPower(), setGatePower(), and takeYpower_.
Referenced by initCinfo().
void HHChannel2D::setZ | ( | double | Z | ) |
Referenced by initCinfo().
void HHChannel2D::setZindex | ( | string | index | ) |
Referenced by initCinfo().
void HHChannel2D::setZpower | ( | const Eref & | e, | |
double | Zpower | |||
) |
References selectPower(), setGatePower(), and takeZpower_.
Referenced by initCinfo().
processFunc handles the update and calculations every clock tick. It first sends the request for evaluation of the gate variables to the respective gate objects and recieves their response immediately through a return message. This is done so that many channel instances can share the same gate lookup tables, but do so cleanly. Such messages should never go to a remote node. Then the function does its own little calculations to send back to the parent compartment through regular messages.
Implements ChanBase.
References ProcInfo::dt, ChanCommon::getGbar(), HHGate2D::lookupBoth(), ChanCommon::sendProcessMsgs(), ChanBase::setGk(), takeXpower_, takeYpower_, takeZpower_, ChanCommon::updateIk(), and ChanCommon::vGetModulation().
Reinitializes the values for the channel. This involves computing the steady-state value for the channel gates using the provided Vm from the parent compartment. It involves a similar cycle through the gates and then updates to the parent compartment as for the processFunc.
Here we get the steady-state values for the gate (the 'instant' calculation) as A_/B_.
Implements ChanBase.
References Eref::element(), ChanCommon::getGbar(), Element::getName(), HHGate2D::lookupBoth(), ChanCommon::sendReinitMsgs(), ChanBase::setGk(), takeXpower_, takeYpower_, takeZpower_, ChanCommon::updateIk(), and ChanCommon::vGetModulation().
double( * HHChannel2D::takeXpower_)(double, double) |
Referenced by setXpower(), vProcess(), and vReinit().
double( * HHChannel2D::takeYpower_)(double, double) |
Referenced by setYpower(), vProcess(), and vReinit().
double( * HHChannel2D::takeZpower_)(double, double) |
Referenced by setZpower(), vProcess(), and vReinit().