[Ns-developers] ns-3 contributions : Wifi::GetPowerDm & PacketSocket::DoBind

Providence SALUMU MUNGA psalumu at gmail.com
Fri Mar 28 00:20:53 PDT 2008


Hi Mathieu,

As discussed last time, I attach two patch proposals that I
cooked. The first one is related to the Tx/Rx power computation and the
second one to PacketSocket binding procedure in the case of
multiple devices

We didn't discuss the last one though, so don't hesitate to comment on
it please.

Best regards,

- Providence.


Le Wed, 20 Feb 2008 19:23:36 +0100,
Mathieu Lacage <mathieu.lacage at sophia.inria.fr> a écrit :

> hi,
> 
> On Tue, 2008-02-19 at 08:58 +0100, Providence SALUMU MUNGA wrote:
> 
> > double 
> > WifiPhy::GetPowerDbm (uint8_t power) const
> > {
> >   NS_ASSERT (m_txPowerBaseDbm <= m_txPowerEndDbm);
> >   NS_ASSERT (m_nTxPower > 0);
> >   double dbm = m_txPowerBaseDbm + (m_txPowerEndDbm -
> > m_txPowerBaseDbm) / m_nTxPower; return dbm;
> > }
> > 
> > I don't understand why the "uint8_t power" parameter isn't used
> > throughout the core function. Isn't there any mistake here?
> 
> Indeed. It looks like a problem. I suspect that correct code should
> look like this:
> double dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm -
> m_txPowerBaseDbm) / m_nTxPower;
> 
> Would you care enough to cook a patch and send it to the ns-developers
> ML ?
> 
> thanks again,
> Mathieu


-- 
Providence SALUMU M.

Doctorant, Département Logiciels-Réseaux
TELECOM SudParis
9 rue Charles Fourier, 91011 Evry Cedex

Tel: +33 1 60 76 44 65
Mob: +33 6 84 54 94 85
Fax: +33 1 60 76 47 11
http://www-lor.int-evry.fr/


More information about the Ns-developers mailing list