[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] how to schedule event in ns
In my understanding, the Event intr has no explicit meaning, but to
trigger the upper layer to send another packet down (ie, the ifq
layer). You may want to dubug the code a little bit, then you may get some
idea. Hope it helps,
-chen xuan
On Sun, 10 Jun 2001, Xiao Xuan wrote:
> Hi, everyone,
> I want to use ns to do something in wireless mac. I find that there is a
> member varibles -- Event intr_ in file mac.h. But I don't find any initials
> or assignments for it. In file mac.cc, I also find that a function
> following uses this variable.
> void Mac::sendDown(Packet* p)
> {
> Scheduler& s = Scheduler::instance();
> double txt = txtime(p);
> downtarget_->recv(p, this);
> if(!abstract_)
> s.schedule(&hRes_, &intr_, txt);
> }
> Can someone give me some explanation?
> Btw, in function Scheduler::instance().schedule(uptarget_, p, delay_) ,
> uptarget_ is a pointor to NsObject object. But the schedule's definition is
> schedule(Handler* h, Event* e, double delay). I read the ns manual ,but feel
> it is not so comprehensive.
> Tks in advance. :)
>
> Xiao Xuan
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
--
Xuan Chen
USC/ISI