[ns] OTCL-Linkage
Hello P. actually I need only the values of the bind variables in the AODV agent. The binding itsself works - I've tested it. What I want is to use the value of, let's say, rq_context in the function AODV::sendRequest(). This variable has the value of 0, it gets it in the simulation script: set context1 [new Agent/Context] $ns_ attach-agent $node_(1) $context1 $context1 set rq_cxt_otcl 0 $context1 set rt_cxt_otcl 5 But I don't know how to call on the current instance of my ContextAgent out of the function sendRequest()to be able to us the value of rq_context??? // call in AODV-function void AODV::sendRequest(nsaddr_t dst) { ... ContextAgentObject = ; rq-rq_cxt = ContextAgentObject-rq_context; //value of rq_context should be 0 ... } jana -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
[ns] How to reference an object generated in simulation script?
when I create a new Object in my tcl script, just like set Agent1 [new Agent/AODV] How do I reference this special Agent in C++? Are there special methods that I can use? jana -- Feel free – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
Re: [ns] OTCL-Linkage
Hello Prashant Batra, actually I thought about a solution with global variables, but I want to use my new class the same way the AODV protocol is used just with some extensions and without affecting AODV. That's why I think it's best to go on looking for a solution accessing objects created in my tcl script. Thank you anyway. jana -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer