[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] how to schedule event in ns
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.