-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprecall.mod
57 lines (48 loc) · 1.07 KB
/
precall.mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
: $Id: precall.mod,v 1.3 1995/12/16 19:00:01 billl Exp $
COMMENT
presynaptic pointer array
ENDCOMMENT
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
NEURON {
POINT_PROCESS PRESYN
RANGE spk_internal, spk, num
GLOBAL thresh
}
PARAMETER {
thresh = 0 : voltage level nec for release
num = -1 : number for reporting spk occurrence
}
ASSIGNED {
spk : available for user monitoring of spiking
spk_internal : internal use only (if taken externally ...)
v
}
INCLUDE "presyn.inc"
INITIAL {
spk = 0
spk_internal = 0
}
BREAKPOINT {
SOLVE pp
}
PROCEDURE pp() {
if (v > thresh) {
if (spk_internal == 0) {
newspike() : only allow this to happen once
spk_internal = 1
spk = 1
VERBATIM
{char func[8] = "precall";
Symbol* s = hoc_lookup(func);
if (s && num>=0) {
hoc_pushx(num);
hoc_call_func(s, 1);
}
}
ENDVERBATIM
}
} else {
spk_internal = 0 : drop back down at the end of the spike
spk = 0
}
}