MechanismStandard

classes
   action         in             panel          
   count          name           save           
   get            out            set            

SYNTAX

ms = new MechanismStandard("name")

DESCRIPTION

Storage for parameter values of a membrane mechanism or point process. This class is useful in maintaining a default set of parameters and can be used to specify values for a set of sections.

name is a density mechanism such as hh or a point process such as VClamp. A MechanismStandard instance, when created, contains default values for all parameters associated with the mechanism.

In combination with the MechanismType class it is possible to create generic graphical interface widgets that are independent of the particular mechanism and parameter names.

EXAMPLES

execute following example
objref ms1, ms2
ms1 = new MechanismStandard("hh")
ms2 = new MechanismStandard("AlphaSynapse")
ms2.set("gmax", .3)
ms1.panel()
ms2.panel()

SEE ALSO

MechanismType


panel

MechanismStandard

SYNTAX

ms.panel()

DESCRIPTION

Popup a panel of parameters for this mechanism. It's a good idea to set the default values before generating the panel.

SEE ALSO

nrnglobalmechmenu , nrnmechmenu , nrnpointmenu


action

MechanismStandard

SYNTAX

ms.action("statement")

DESCRIPTION

action to be executed when any variable is changed in the panel. The hoc variable hoc_ac_ is set to the index of the variable (0 to count-1).

EXAMPLES

execute following example
create soma, axon, dend[3]
forsec "a" insert hh
forsec "d" insert pas
xpanel("Updated when MechanismStandard is changed")
xvalue("dend[0].g_pas")
xvalue("dend[1].g_pas")
xvalue("dend[2].g_pas")
xpanel()
objref ms
ms = new MechanismStandard("pas")
ms.action("change_pas()")
ms.panel()

proc change_pas() {
	forall if(ismembrane("pas")) {
		ms.out()
	}
}


in

MechanismStandard

SYNTAX

ms.in()
ms.in(pointprocess)
ms.in(mechanismstandard)

DESCRIPTION

copies parameter values into this mechanism standard from ...
ms.in()
the mechanism located in first segment of the currently accessed section.
ms.in(pointprocess)
the point process object
ms.in(mechanismstandard)
another mechanism standard
If the source is not the same type as the standard then nothing happens.


out

MechanismStandard

SYNTAX

ms.out()
ms.out(pointprocess)
ms.out(mechanismstandard)

DESCRIPTION

copies parameter values from this mechanism standard to ...
ms.out()
the mechanism located in the currently accessed section (all segments).
ms.out(pointprocess)
the point process argument
ms.out(mechanismstandard)
another mechanism standard
If the target is not the same type as the standard then nothing happens.


set

MechanismStandard

SYNTAX

ms.set("varname", val [, arrayindex])

DESCRIPTION

sets the parameter in the standard to val. If the variable is an array, then the optional index can be specified.


get

MechanismStandard

SYNTAX

val = ms.get("varname" [, arrayindex])

DESCRIPTION

returns the value of the parameter.


save

MechanismStandard

SYNTAX

.save("name")

DESCRIPTION

For saving the state of a MechanismStandard to a session file. The name will be the objectvar that the instance gets assigned to when the session file is read. See pointman.hoc for an example of usage.


count

MechanismStandard

SYNTAX

cnt = ms.count()

DESCRIPTION

Returns the number of parameter names of the mechanism represented by the MechanismStandard.


name

MechanismStandard

SYNTAX

ms.name(strdef)
size = ms.name(strdef, i)

DESCRIPTION

The single arg form assigns the name of the mechanism to the strdef variable.

When the i parameter is present (i ranges from 0 to ms.count()-1) the strdef parameter gets assigned the ith name of the mechanism represented by the MechanismStandard. In addition the return value is the array size of that parameter (1 for a scalar).


neuron/neuron/classes/mechstan.hel : Nov 5 09:55