Thanks for your reply........... this value variable is declared inside .cc file or .tcl script.
I hv written this code inside the .cc file.... now how this will work? Do i need to create another variable in the tcl script to print this value? If you tell me the steps it would appreciated..... lets assume whenever void AODV::recv() function executed I write value=CURRENT_TIME, Now, how this value can be read through my tcl script? with best Regards. ________________________________ From: "[email protected]" <[email protected]> To: itishi saxena <[email protected]>; "[email protected]" <[email protected]>; "[email protected]" <[email protected]> Sent: Tuesday, 27 November 2012 5:45 PM Subject: re: [ns] how to get value from .cc file to tcl script????? Hi, Tcl& tcl=Tcl::instance(); tcl.resultf("%1.1f",value); where resultf(const char* fmt,...) uses the C++ format “fmt” of printf to passe a string to the TCL interpreter. There are other functions similar to resultf. I am sure you can find them easily on the Web. Best, Behnaz ----- Original Message ----- Expéditeur: itishi saxena <[email protected]> à: "[email protected]" <[email protected]>, "[email protected]" <[email protected]> Sujet: [ns] how to get value from .cc file to tcl script????? Date: Tue, 27 Nov 2012 09:11:33 +0800 (SGT) > Hello Friends, > > How it is possible to check a value of a parameter in the > tcl script from a .cc code? e.g. in AODV i have declared a > variable and assigning a value at certain point. I want > tcl script can read that value so that I can perform some > other operation in tcl script. > > I know use of bind( "x_" , "&x") and it works like passing > value from tcl to .cc, what if I want other way around > from .cc to tcl?? > > Any clue will be appreciated. > > with Regards.
