Hi ,my ns friends:

I am quite confused by some code in wireless-phy.cc,it is:

     double begin_adjust_time = MIN(channel_idle_time_, temp);
     double finish_adjust_time = MIN(channel_idle_time_, NOW+txtime);
     double gap_adjust_time = finish_adjust_time - begin_adjust_time;
     if (gap_adjust_time < 0.0) {
      fprintf(stderr,"What the heck ! negative gap time.\n");
     }
     if ((gap_adjust_time > 0.0) && (status_ == RECV)) {
      em()->DecrTxEnergy(gap_adjust_time,
           Pt_consume_-Pr_consume_);
     }
Can anyone try to explain this code? I want to know what is the meaning that we 
access the gap_adjust_time and compute  Pt_consume_-Pr_consume_
Another question is what is the diff between in Pt_ and  Pt_consume_
Thanks lot and happy a day:-)

Wells  [EMAIL PROTECTED]
2006-4-14 

Reply via email to