[ns] again PHY - MAC interaction: RXThresh_ ???
Utente ns2
utente_ns2 at hotmail.com
Tue Aug 29 08:39:52 PDT 2006
Dear friends,
look at the following code , extracted from the file wireless-phy.cc :
if(propagation_) {
s.stamp((MobileNode*)node(), ant_, 0, lambda_);
Pr = propagation_->Pr(&p->txinfo_, &s, this);
if (Pr < CSThresh_) { // This is the sensitivity of the
wireless card
pkt_recvd = 0;
goto DONE;
}
if (Pr < RXThresh_) {
/*
* We can detect, but not successfully receive
* this packet.
*/
hdr_cmn *hdr = HDR_CMN(p);
hdr->error() = 1;
}
}
One question about RXThresh_:
if CSThresh_ < Pr < RXThresh_ we have that:
A. pkt_recvd = 1 (the packet will be sent to the MAC Layer - thank you
again, Joshua :-) )
B: the packet is marked with hdr->error() = 1 .
In the case Pr > RXThresh_ we will have that:
A. pkt_recvd = 1 (the packet will be sent to the MAC Layer)
B. hdr->error() is untouched, it is equal to 0
So, the only difference introduced in the status of the packet by the
RXThreshold is the flag 0/1 in the common header field.
What I haven't understood is how MAC treats the above different kind of
packets.
It seems that at MAC level no difference is done between packet with
hdr->error() = 0 and hdr->error() = 1.
My guess is that once again the solution is in some inherited classes... but
I really cannot see where...
I hope you can give me some hints.
Regards,
Pasquale
_________________________________________________________________
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/
More information about the Ns-users
mailing list