Bugzilla – Bug 1222
Incomplete PointToPointNetDevice Python bindings
Last modified: 2011-07-21 06:08:25 UTC
Hi, I am trying to use ns-3.11 Python bindings but the generated class interfaces seem to be incomplete. This is what I did: $ hg clone http://code.nsnam.org/ns-3-allinone ns-3-allinone $ cd ns-3-allinone $ ./download.py -n ns-3.11 $ ./waf configure -d debug --enable-tests --enable-examples $ ./waf $ cd build/debug/bindings/python $ LD_LIBRARY_PATH=../../ ipython In [1]: import ns.point_to_point In [2]: e = ns.point_to_point.PointToPointNetDevice() In [3]: e.GetQueue() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /home/alina/repos/ns-3-allinone/ns-3.11/build/debug/bindings/python/<ipython console> in <module>() AttributeError: 'point_to_point.PointToPointNetDevice' object has no attribute 'GetQueue' I then rescaned the bindings and recompiled: $ ./waf --apiscan=all $ ./waf clean $ ./waf But got the same results. In src/point-to-point/bindings/modulegen__gcc_LP64.py I can see: ## point-to-point-net-device.h (module 'point-to-point'): ns3::Ptr<ns3::Queue> ns3::PointToPointNetDevice::GetQueue() const [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::Queue >', [], is_const=True) And in build/debug/src/point-to-point/bindings/ns3modulegen.log I found this warnings: /home/alina/repos/ns-3-allinone/ns-3.11/src/point-to-point/bindings/modulegen__gcc_LP64.py:9: UserWarning: exception TypeLookupError(['ns3::Ptr < ns3::Queue >', 'ns3::Queue *'],) in wrapper public: retval? ???::GetQueue (params?) const; I am using Debian Squeeze, Linux version 2.6.36-rc6-amd64, arch x86_64.
changeset: 7376:7ace70ee4468 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Thu Jul 21 11:07:59 2011 +0100 summary: Bug 1222 - Incomplete PointToPointNetDevice Python bindings