> But this doesn't work.  Uptarget_ gives me an NsObject instead of a LL
> object...
try casting it to an c++ LL object. Mind that this will only be a quick fix
to see if it works - its terrible programming !


Pedro Vale Estrela





> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: sexta-feira, 9 de Junho de 2006 23:33
> To: Pedro Vale Estrela
> Cc: ns-users@ISI.EDU
> Subject: RE: [ns] Clearing a queue at a node in ns-2
> 
> Whoah, that is too complicated for me.   I don't know ns-2 very well.
> What do you mean by:
> "make a pointer to the ITF" -- doesn't it have a pointer (uptarget_)?
> According to the diagram on pg 145 I should do uptarget_ ->downtarget_-
> >reset()
> since
> uptarget will take me to the LL, downtarget will take me to the IFq, and
> reset will reset the queue for that node.
> 
> But this doesn't work.  Uptarget_ gives me an NsObject instead of a LL
> object...
> 
> 
> 
> On Fri, 9 Jun 2006, Pedro Vale Estrela wrote:
> 
> >
> > Yes,
> >
> > http://www.isi.edu/nsnam/ns/doc/ns_doc.pdf
> > pag 145,
> >
> > - at your C++ MAC module, make a pointer to the ITF;
> >     - either search the C++ NODE methods for getting the pointer
> > reference you need (you want the reverse of the downtarget_ on the ITF;
> for
> > making this, search the code that sets the downtarget_ variable in C++
> in
> > the ITF; (tip: use DDD, put a breakpoint somewhere in mobilenode.cc)
> > in that moment, set something like:
> >  downtarget_->my_ITF_ = this;
> >
> > - then at the appropriate time, call reset() of it.
> >    my_ITF->reset();
> >
> > Of course that this is not good C++ Object-Orientation practices, but
> use it
> > to simply try your ideia; if it works nice, then make the same thing
> with
> > provte variables and public set/get methods.
> >
> >
> > You can also perform the same trick by:
> >   Calling TCL / searching the ITF object you want based on the current
> MAC
> > object / call reset of it. The benefit is that you can fine tune this
> method
> > without recompiling NS2 each time.
> >
> >
> > If this works, please put this on the NS2 WIKI!
> > Pedro Vale Estrela
> >
> >
> >> Hi ns,
> >>
> >> I'd like to clear a node's queue from the mac-layer in my simulation
> after
> >> I've received a certain packet.  Can I call a PacketQueue function like
> >> "reset()" from the mac layer?  If not, how would I clear the queue?
> >>
> >> Thanks!
> >>
> >> Kathy
> >>
> >>
> >>
> >
> >
> >
> 


Reply via email to