[ns] bind variables

juan manuel gomez garcia juanmagoga at hotmail.com
Sun Jan 27 08:23:38 PST 2008


 Hello: I want to bind two variables in TCL with two variables in C++. I realize the following thing:  In TCL script:  set zigbee [new Agent/ZIGBEE] $zigbee set DestinoPaqID 79 $zigbee set OrigenPaqID 2  In lib/ns-default.tcl:  Agent/ZIGBEE set OrigenPaqID 1 Agent/ZIGBEE set DestinoPaqID 1  In C++: In constructor function: bind("OrigenPaqID",&OrigenPaqID); bind("DestinoPaqID",&DestinoPaqID);  The problem is that if I execute the following sentence inside one C++ function, for example recv():  fprintf(stdout,"OrigenID=%d\n\n",OrigenPaqID); fprintf(stdout,"DestinoID=%d.\n\n",DestinoPaqID);  I always obtain:  OrigenID=1 DestinoID=1  How I can see OrigenID=2 and DestinoID=79? What is the problem? Why I always obtain the same thing?   Thank you. 
_________________________________________________________________
La vida de los famosos al desnudo en MSN Entretenimiento
http://entretenimiento.es.msn.com/


More information about the Ns-users mailing list