Re: [ns] signal strenght

2011-04-06 Thread Urlan Salgado de Barros

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


[ns] Reference for 2 queues in C++ level for duplex link

2011-04-06 Thread dipjahid

Hello all,
I am stuck at one point. I know that a duplex-link in ns is two simplex
links. And each link has one queue (in my case RED queue) associated with
it. But I have to communicate between these two queues in the C++ level so
I have to have the references for these queues. Can anybody please give
some ideas how it is possible in ns?

Thanks,
Jahid



[ns] HelloTimer function in ADOV of ns-2.30

2011-04-06 Thread molly

Hi,all. 

HelloTimer::handle(Event*) {

   agent-sendHello();

   double interval = MinHelloInterval + ((MaxHelloInterval -
MinHelloInterval) * Random::uniform());

   assert(interval = 0);

   Scheduler::instance().schedule(this, intr, interval);

}

Originally, I read from a book, saying the hello packet is sent every one
second. But the code above says different. Now I am puzzled whether the
hello packet is sent every one second or not?? Can anybody give me a
detailed explanations!!



[ns] finding node by location

2011-04-06 Thread Sudhanshu Pant

Hi
i want to know if the coordinates are given, then how to reretrieve the node
located at that location or around the coordinate.
like
If(location = x,y) then
{make the node root}

-- 

Sudhanshu Pant




--