|
Bugzilla – Full Text Bug Listing |
| Summary: | MobilityHelper.SetPositionAllocator (type, args) does not seem to work | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Mathieu Lacage <mathieu.lacage> |
| Component: | python bindings | Assignee: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gjcarneiro, ns-bugs |
| Priority: | P3 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
*** Bug 374 has been marked as a duplicate of this bug. *** 3742:3fd36a505c0e |
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@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.