2012年08月14日
(2012-08-14 10:27:34)
标签:
杂谈 |
分类: 计算机相关 |
Hi ! Thanks for your help!!!
But I actually did all you said ....
What I do in my agent code is that depending on the context I am routing packets with AODV.
Do I have to implement something special concerning the ifqueue ? Valerie.
--- Martin Wenig
<wenig <at> i4.informatik.rwth-aachen.de>
wrote: > Hi!
> > I have never heard of the class Para_Agent, so i suppose this is your own code. If it is a subclass of AODV, then it seems as if you didn't set the ifqueue variable. In the AODV class it gets set in the command method with
else if(strcmp(argv[1], "if-queue") == 0)
{ ifqueue = (PriQueue*)
TclObject::lookup(argv[2]);
if(ifqueue == 0)
return TCL_ERROR;
return TCL_OK; }
So, if you have a base class, then calling the AODV command-method at the end of your own command-method could help. Or you simply copy the code from above to your command method.Also make sure that in your OTcl script the interface queue is set to "Queue/DropTail/PriQueue" or similar. "CMUPriQueue" doesn't work... I hope this helps you.
Hi, When I run AODV simulations, I get a segmentation fault everytime
Priqueue::filter() gets called in aodv rt_ll_failed(). Here is what I get from
gdb: Program received signal SIGSEGV, Segmentation fault.
0x08125b32 in PriQueue::filter(int) (this=0x0, id=8)
at queue/priqueue.cc:158 158 for(p = q_->head(); p; p =
> p->next_)
{ gdb) bt #0 0x08125b32 in PriQueue::filter(int) (this=0x0, > >id=8) > > at queue/priqueue.cc:158 > >#1 0x081edc4f in Para_Agent::rt_ll_failed(Packet*) > >(this=0x8639ca8, > > p=0x870ef10) at para/para.cc:2529 > >#2 0x081eda12 in aodv_rt_failed_callback > >(p=0x870ef10, arg=0x8639ca8) > > at para/para.cc:2475 > >#3 0x0810cb60 in Mac802_11::RetransmitRTS() > >(this=0x863ad08) > > at mac/mac-802_11.cc:1489 > >#4 0x0810b934 in Mac802_11::send_timer() > >(this=0x863ad08) > > at mac/mac-802_11.cc:938 > >#5 0x0810b87d in Mac802_11::sendHandler() > >(this=0x863ad08) > > at mac/mac-802_11.cc:908 > >#6 0x0812916a in TxTimer::handle(Event*) > >(this=0x863aea0) > > at mac/mac-timers.cc:204 > >........ > > > > > >Is this a bug in Ns2 or in my code ??? Is there a > >solution to this ???? Your help is appreciated !!! > > > >Regards, > > > > > > > > > > > -- > +-----------------------------------------------------------------+ > | Dipl.-Inform. Martin Wenig > | > | Aachen University of Technology Phone: +49 > (241) 80-21416 | > | Computer Science Department Fax: +49 > (241) 80-22220 | > | Communication and Distributed Systems > | > | Ahornstr 55, D-52074 Aachen, Germany > | > | http://www-i4.informatik.rwth-aachen.de/ > | > +-----------------------------------------------------------------+ >first I think it's right ,but the catalog is wrong ,it should be at /tcl/lib/ns-mobilenode.tcl then change it ,it will be all right.
前一篇:天蝎座爱你的表现