[Ns-developers] Review of underwater acoustic network device

Faker Moatamri faker.moatamri at sophia.inria.fr
Wed Oct 21 05:18:51 PDT 2009


Hi Leonard & All,

In the effort to merge your code in ns-3-dev main tree, I have been 
reviewing your code and the review is available here: 
http://codereview.appspot.com/87043. I also did builds and tests of the 
code available in http://code.nsnam.org/ltracy/ns-3-dev-uan.
*
Code review:*
Overall the code is good, some changes are expected:
- Coding style changes
- More doxygen as requested by Craig
- Folder changes in the examples and header files creation (create 
examples/uan and examples/uan/dat)
- Remove commented code
- Member variable should always be private unless you have a very good 
reason
- Testing should be conform with the new testing framework (./test.py)

*Compiling and testing:
*I tried compiling under linux with g++ 3.4.6, 4.0.4, 4.1.2, 4.2.4, 
4.3.3 and 4.4.0 from the repository 
http://code.nsnam.org/ltracy/ns-3-dev-uan
Result:
-g++ 3.4.6
Building failed with error:

[560/703] cxx: src/devices/uan/uan-prop-model-ideal.cc -> build/debug/src/devices/uan/uan-prop-model-ideal_1.o
../src/devices/uan/uan-prop-model.cc: In member function `std::complex<double> ns3::UanPdp::SumTapsFromMaxC(ns3::Time, ns3::Time) const':
../src/devices/uan/uan-prop-model.cc:219: warning: converting to `uint32_t' from `double'
../src/devices/uan/uan-prop-model.cc: In member function `double ns3::UanPdp::SumTapsFromMaxNc(ns3::Time, ns3::Time) const':
../src/devices/uan/uan-prop-model.cc:248: warning: converting to `uint32_t' from `double'
[561/703] cxx: src/devices/uan/uan-mac-aloha.cc -> build/debug/src/devices/uan/uan-mac-aloha_1.o

-g++ 4.0.4, g++ 4.1.2:
Building failed because of this warning:

[542/703] cxx: src/helper/qos-wifi-mac-helper.cc -> build/debug/src/helper/qos-wifi-mac-helper_1.o
cc1plus: warnings being treated as errors
debug/ns3/uan-phy.h:94: warning: ‘class ns3::UanPhyListener’ has virtual functions but non-virtual destructor
Waf: Leaving directory `/home/buildslave/slave/full-mimas-g++-4.0.4/build/build'


-g++ 4.2.4, g++ 4.3.3, g++ 4.4.0:
Debug building successful
testing: failed: neither ./waf --check or ./test.py worked
Optimized building failed:

[571/703] cxx: src/devices/uan/uan-test.cc -> build/optimized/src/devices/uan/uan-test_1.o
cc1plus: warnings being treated as errors
../src/devices/uan/uan-prop-model.cc: In member function ‘double ns3::UanPdp::SumTapsFromMaxNc(ns3::Time, ns3::Time) const’:
../src/devices/uan/uan-prop-model.cc:236: warning: ‘maxTapIndex’ may be used uninitialized in this function
Waf: Leaving directory `/home/buildslave/slave/full-mimas-g++-4.2.4/build/build'
Build failed

Best regards
Faker Moatamri



More information about the Ns-developers mailing list