[Ns-bugs] [Bug 291] New: MobilityHelper.SetPositionAllocator (type, args) does not seem to work
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Mon Aug 18 10:14:53 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=291
Summary: MobilityHelper.SetPositionAllocator (type, args) does
not seem to work
Product: ns-3
Version: pre-release
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: python bindings
AssignedTo: ns-bugs at isi.edu
ReportedBy: mathieu.lacage at sophia.inria.fr
CC: gjcarneiro at gmail.com
I tried calling this method as follows:
mobility = MobilityHelper ()
mobility.SetPositionAllocator ('ns3::RandomRectanglePositionAllocator',
n1 = 'X', v1 = RandomVariableValue
(UniformVariable (-5.0, 5.0)),
n2 = 'Y', v2 = RandomVariableValue
(UniformVariable (-5.0, 5.0)))
But I get this error:
mathieu at ns-test:~/code/ns-3-sigcomm$ python ./examples/sigcomm.py
Traceback (most recent call last):
File "./examples/sigcomm.py", line 168, in <module>
main(sys.argv)
File "./examples/sigcomm.py", line 75, in main
n2 = 'Y', v2 = RandomVariableValue (UniformVariable (-5.0, 5.0)))
TypeError: argument 1 must be ns3.PositionAllocator, not str
which shows that the python bindings seem to expect me to call the overloaded
version of that method which takes a Ptr<PositionAllocator> argument.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list