[Ns-developers] Underwater acoustic module for NS-3

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Oct 28 00:50:59 PDT 2008


hi leonard,

I went through your code so, here are some (very minor) comments. 

1) The code looks pretty good, kudos !

2) I have spotted a couple of [tab] characters: the ns-3 coding style
disallows them (http://www.nsnam.org/codingstyle.html)

3) the following:
 .AddAttribute ("Channel", "The channel attached to this device",
      PointerValue (),
      MakePointerAccessor(&UanNetDevice::DoGetChannel,
                                           &UanNetDevice::SetChannel),
      MakePointerChecker<UanChannel> ())
would be better if re-indented as:
 .AddAttribute ("Channel", "The channel attached to this device",
                PointerValue (),
                MakePointerAccessor(&UanNetDevice::DoGetChannel,
                                    &UanNetDevice::SetChannel),
                MakePointerChecker<UanChannel> ())

The above is not currently present in the coding style document but
there have been private discussions to try to indent through proper
vertical alignment. We should try to resolve that issue officially and
document it.

4) It would be cool to at least minimally document how your addressing
scheme in uan-address.h. (I know _zero_ about underwater communications
so, I have no idea what a single byte address is about).

5) the following:
Address
UanMacCw::GetAddress()
{
  return this->m_address;
}

could be written more simply as:
Address
UanMacCw::GetAddress()
{
  return m_address;
}

6) coding style in UanMacCw::StartTimer
if ()
  {
  }
else
  {
  }

7) I see that you spent a lot of effort on the PHY models. It looks also
that it might be possible to share at least the uan-tx-mode code with
the wifi codebase. You probably know better which other parts of your
code could potentially be reused/shared so, it would be nice if you
could outline these.

Finally, I can see that you spent a lot of time using ns-3 so, I would
be curious to get feedback about what you liked best, what you disliked
most, etc.

regards,
Mathieu

On Mon, 2008-10-13 at 19:48 -0700, Leonard Tracy wrote:
> Hi all,
> 
> I have begun work on developing a module to enable simulation of underwater
> acoustic networks in NS3.  This work is still early in the development
> cycle, however, I am hoping to solicit code reviews and/or suggestions for
> design improvement.  The freehg repository is avilable at
> 
> http://freehg.org/u/ltracy/ns3-uan
> 
> My ultimate goal is to develop a general framework that can be used to model
> a variety of different underwater scenarios (e.g. research new MAC layers
> with various underlying PHY/channel models).  To this end, I've followed the
> design model of the wifi module included in current NS3 releases (with some
> pointers from Mathieu) with some modifications to account for the difference
> in intended purpose.  So far I've developed simple examples for that
> exemplify the interplay between the channel, propagation and noise models,
> and the MAC and PHY layers.  I think all of these work, although I have not
> done much testing.
> 
> I'm hoping for inclusion into the main NS3 dev branch at some point,
> possibly as soon as ns-3.4.  Thanks in advance for any comments.
> 
> Leonard Tracy



More information about the Ns-developers mailing list