[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is txtime()?
txtime(p) is the time necessary to trasmit the full packet on a link
with zero delay, viz. end_trasmission_time - start_trasmission_time,
viz. packet_size(bit)/link_rate(bit/sec) (look in delay.h).
The arrival time at node i+1 is defined as that time at which the last
bit of packet k has arrived at this node, so the LinkDelay at node i
schedules the arrival of k at node i+1 at time txtime. If there is also
a delay it will be txtime + delay, so
s.schedule(target_, p, txt + delay_);
Gang Zhang wrote:
>
> Hi, there:
>
> PLease take a look at the following question:
>
> it is in the file delay.cc
>
> +++++++++++++++++++++++++++++++++++++++++++++++++
> void LinkDelay::recv(Packet* p, Handler* h)
> {
> double txt=txtime(p);
>
> /************ what do the txtime(p) mean *****/
>
> Scheduler& s=Scheduler::instance();
> if (dynamic_) {
> Event* e=(Event* )p;
> e->time_=txt+delay_;
> itq_->enque(p); //for convinience, use a queue to store
> packets in
> s.schedule(this, p, txt+delay_);
> } else {
> s.schedule(target_, p, txt + delay_);
> }
> s.schedule(h, &intr_, txt);
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++
> could sb give me a hint? thanks a lot.
>
> gang
--
Massimo Pegorer, student
Dipartimento di Elettronica e Informatica
Universita' degli Studi di Padova
Padova - ITALIA