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