Hi All,
I want to change the mac-802_11.cc by adding some code in
Mac802_11::command method. I added a procedure into ns-mobilenode.tcl as
follows:
Node/MobileNode instproc node-fail {} {
$self instvar mac_
return [$mac_(0) node-fail]
}
in mac-802_11.cc I added in command method as follows:
if (argc == 2) {
if (strcmp(argv[1], "node-fail") == 0) {
tcl.result( "node failed" ); // I added this to
trace whether my program passes back this string to my tcl program or not?
return TCL_OK;
}
}
in my main tcl program I use the added procedure to ns-mobilenode.tcl to
test it so:
set x [$node_(0) node-fail]
puts "$x"
but when I run the program. the string "node failed" didn't printed. it
seems I cant pass this string back to tcl interpreter or anywhere that I
dont know! .
I guess there is something that avoids me to use my added code in C++. I
dont know exactly where the problem is.
after changing the code in tcl and cc files I compiled them again to make
the new objects.
I would appreciate any help
Thanks a lot in advance
Amir