I am communicating between compartments with NetCons, but I am running into problems with using net_event for some communication because the parameters are passed by reference and I negate some of what I need when two events are simultaneous. I also have to jump through hoops to make it so that the event does not propagate back onto itself, which I can do, but I'm generating events that only get ignored, which is rather wasteful....
I can avoid all of my issues if I can talk directly to my ARTIFICIAL_CELL objects that a given ARTIFICIAL_CELL of mine needs to talk to and keep net_event for those cases where I fire action potentials. What I cannot figure out is how to properly get a reference to an object (I'm confused on Objects, Symbols, and Props and the associated fields). What I want in my NMODL code is something like:
Code: Select all
NET_RECEIVE(w) {
.
.
VERBATIM {
Point_process* target;
double* pweight;
double* pthresh;
double* pdel;
int pscount, cnt;
if (_pnt->presyn_) { // _pnt is an implicit parameter of this MyArtCell
pscount = nrn_presyn_count(_pnt->presyn_);
// printf(" This point process is %.0f and sources %d NetCons\n", (double)((long)_pnt), pscount);
for (i=0; i < pscount; ++i) {
cnt = nrn_netcon_info(nrn_presyn_netcon(_pnt->presyn_, i),
&pweight, &target, &pthresh, &pdel);
// These two lines is what is unavailable and I need to know how to code for correctly in NMODL.
MyArtCell* myArtCellP = (MyArtCell*)(target);
myArtCellP->myFunction(some, vars);
}
}
}
ENDVERBATIM
}