Bug 506

Summary: New MobilityHelper::SetPositionAllocator overloaded API doesn't work
Product: ns-3 Reporter: Rajib Bhattacharjea <raj.b>
Component: helpersAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: normal CC: craigdo, gjcarneiro, ns-bugs
Priority: P1    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Rajib Bhattacharjea 2009-02-20 16:32:01 UTC
I used allinone, which informed me it was getting pybindgen version:  0.10.0.626.  Looking at the hg status after python-scanning a fresh ns-3-dev tree gives me a list of modified bindings files (M bindings/python/ns3_module*.py).

Trying to build with the new bindings however gives a c++ error:
debug/bindings/python/ns3_module_helper.cc: In function ‘PyObject* _wrap_PyNs3MobilityHelper_SetPositionAllocator__1(PyNs3MobilityHelper*, PyObject*, PyObject*, PyObject**)’:
debug/bindings/python/ns3_module_helper.cc:3382: error: call of overloaded ‘SetPositionAllocator(std::string)’ is ambiguous

How to recreate:
hg clone http://code.nsnam.org/ns-3-allinone
cd ns-3-allinone
./download.py
cd ns-3-dev
./waf configure
./waf --python-scan
./waf

Relevent Platform Info:
architecture        : x86
distro              : Ubuntu 8.04
ns-3-dev version   : 4199:761a6ee97850
pybindgen version   : 0.10.0.626 
pygccxml version    : 0.9.5 
gccxml version      : 0.9.0
g++ version         : 4.2.4
Comment 1 Gustavo J. A. M. Carneiro 2009-02-21 16:54:47 UTC
I confirm the bug, but it's not a pybindgen bug.  It's simply new API that was introduced and conflicts with the previous one.  Any pure C++ code that wants to call MobilityHelper::SetPositionAllocator with a single argument will experience this problem.  The API is simply unusable as it is now.


Revision: 4140
Branch: default
Author: Craig Dowell <craigdo@ee.washington.edu>  2009-01-21 01:39:18
Committer: Craig Dowell <craigdo@ee.washington.edu>  2009-01-21 01:39:18
Parent: 4139:d45e62c78504 (add an object name service)
Child:  4141:3f7f08d9daad (make simple version of Names:Add even simpler.  Use that in examples/names.cc)

    Brute force all of the helpers to use object name service

Over to Craig.
Comment 2 Craig Dowell 2009-02-21 17:45:30 UTC
Removed string version of SetPositionAllocator since it is ambiguous with all-default-value version of call made with one string parameter.

Comment 3 Rajib Bhattacharjea 2009-02-23 10:29:25 UTC
4201:511a086fde07