Hi Asma, You must write your own command function in your c++ code.For Example, your class name is MyAgent and then it must contain a member function called by "command" . Via this function, you can call functions that are defined in your class (MyAgent). This function provides you control power over the c++ functions from your otcl code.
int MyAgent::command (int argc, const char*const* argv) { if (argc==2) { if(strcmp(argv[1],"private-function")==0) { private-function(); return (TCL_OK); } } } Above code demonstrates how you can call private-function, that is defined in your c++ code, from your otcl script. "http://nile.wpi.edu/NS" contains a good document about this topic. Have a good day. Guzin Ulutas (CEng)