I am trying to print out the route table, and rt_print function in aodv.cc
plus this code on in AODV::command:
int
AODV::command(int argc, const char*const* argv) {
...
...
else if (strcasecmp(argv[1], "rt_print") == 0) {// print routing tables to a
file
FILE *fp = fopen("route.txt","a");
printf("\nRouting table at node %d\n", addr());
fclose(fp);
return TCL_OK;
}
}
and call this in my TCL like this:
for {set i 1} {$i < $nodes} {incr i} {
$ns_ at 10.0 "$node_($i) rt_print"
}
But I get an error:
ns: _o32 rt_print:
(_o32 cmd line 1)
invoked from within
"_o32 cmd rt_print"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o32" line 2)
(SplitObject unknown line 2)
invoked from within
"_o32 rt_print"
Does anyone know how to solve this SplitObject error. From my understanding,
SplitObject error is caused by no having a corresponding C++ object used in
TCL. Any pointers??
Or If I want to print out the routing table in AODV, how do I do it?
Many Thanks,
Asraf.
--
View this message in context:
http://www.nabble.com/SplitObject-error-after-adding-a-simple-print-function-tp19896331p19896331.html
Sent from the ns-users mailing list archive at Nabble.com.