Hi All,

I have a question regarding the energy model and wireless-phy in ns-2.29.
In the function WirelessPhy::sendDown(Packet *p) we see the following code:
v1.23 
http://nsnam.cvs.sourceforge.net/nsnam/ns-2/mac/wireless-phy.cc?revision=1.23&view=markup
 

"

 207     if (em()) {
 208             //node is off here...
 209             if (Is_node_on() != true ) {
 210             Packet::free(p);
 211             return;
 212             }
 213             if(Is_node_on() == true && Is_sleeping() == true){
 214             em()-> DecrSleepEnergy(NOW-update_energy_time_,
 215                             P_sleep_);
 216             update_energy_time_ = NOW;
 217  218             }
"


v1.22 
http://nsnam.cvs.sourceforge.net/nsnam/ns-2/mac/wireless-phy.cc?revision=1.22&view=markup
 

"

 190     if (em())
 191         if ((em()->node_on() != true) || (em()->sleep())) {
 192             Packet::free(p);
 193             return;
 194         }
"

It seems rational to me that we should also "free" the packet if the 
node is on and sleeping (as in v1.22).
According to v 1.23-v1.25, the wireless-phy can send a packet down, even 
if it's sleeping?

What is the rationale?

Best regards,
Pieter

-- 
Pieter De Mil
Department of Information Technology (INTEC)
Ghent University - IBBT 
e: [EMAIL PROTECTED]
a: Gaston Crommenlaan 8 bus 201 - 9050 Ghent - Belgium
t: +32 9 3314981

Reply via email to