Bug 1222 - Incomplete PointToPointNetDevice Python bindings
Incomplete PointToPointNetDevice Python bindings
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: python bindings
ns-3.11
All All
: P5 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-19 05:19 UTC by alina
Modified: 2011-07-21 06:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alina 2011-07-19 05:19:47 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.
Comment 1 Gustavo J. A. M. Carneiro 2011-07-21 06:08:25 UTC
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