AODV* aodvagent;
// set i to be the node id char command[256];
sprintf(command, "foreach aodvagent [Agent/AODV info instances]\
{\nif { [$aodvagent id] == %d} {\nset i $aodvagent}}\nset t $i\n", i);
Tcl& tcl = Tcl::instance();
tcl.eval(command);
const char* ref = tcl.result(); aodvagent = (AODV*)tcl.lookup(ref);
|