You must to insert in* sendUp()* method. I don't kwno what ns version you're
using, so, let me take as example* ns2.29* and the browse source
http://www.auto-nomos.de/ns2doku/wireless-phy_8cc-source.html :
You can find* sendUp()* method at line *00306*. Inside* if (propagation_)*,
situated at line *00340*, you have to insert *cmh-rssi = Pr* at final of
if(propagation_), at line *00361*.
In other ns versions, these lines may have been changed, but the ideia is
the same.
Best regards,
Urlan
2011/4/6 neeraj gupta neerajgupt...@rediffmail.com
Hi
the value double rssi is to be inserted in which class or inline method . I
want to add neighbors using the signal strength what steps do i need to
follow.
Neeraj Gupta
On Tue, 29 Mar 2011 09:00:38 , Urlan Salgado de Barros ur...@comp.ufla.br
wrote
Ops, sorry, three steps! =D
Urlan
2011/3/29 Urlan Salgado de Barros ur...@comp.ufla.br
Hi.
Try these two steps:
1)
Insert an atribute (*double rssi*) in the *struct hdr_cmn* (*packet.h*);
2)
Inside method *sendUp* from *WirelessPhy *class (*wireless-phy.cc*), set
the atribute *rssi *with the *Pr *value:
hdr_cmn *cmh = hdr_cmn::access(p);
cmh-rssi = Pr;
3)
Further, you will read *rssi *value in your routing protocol.
hdr_cmn *cmh = hdr_cmn::access(p);
printf(RSSI: %f, cmh-rssi);
These steps will help you.
But it is strange. Some mouths ago I sent an email that I was explaining
about a similar question.
Best regards,
Urlan
2011/3/28 salahedin rehan s_l_...@yahoo.es
I am trying to modify aodv.cc broadcast mechanism so a packet is only
broadcasted if the signal strenght between the transmitting and the
recieving
node is greater than a certain value. I found out that tworayground.cc
file
calculate the signal strenght between two nodes using the function
below:
double TwoRayGround : : Pr (PacketStamp *t, PacketStamp *r,
WirelessPhy
*ifp).
Can anybody tell me what are these variables PacketStamp *t,
PacketStamp
*r,
WirelessPhy *ifp and how can I call this function from aodv.cc??
It is soo urgetn and important guys please give me some hints at least
to
where
to look into it...
Thanks
--
_
Urlan Salgado de Barros
MSc. Student in Applied Informatics
Member of NR2 Group
Federal University of ParanĂ¡ - Curitiba - Brazil
URL: http://www.nr2.ufpr.br/~urlan
--
_
Urlan Salgado de Barros
MSc. Student in Applied Informatics
Member of NR2 Group
Federal University of ParanĂ¡ - Curitiba - Brazil
URL: http://www.nr2.ufpr.br/~urlan
http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?
--
_
Urlan Salgado de Barros
MSc. Student in Applied Informatics
Member of NR2 Group
Federal University of ParanĂ¡ - Curitiba - Brazil
URL: http://www.nr2.ufpr.br/~urlan