[Ns-developers] debugging ns-3 bindings problems

Tom Henderson tomh at tomh.org
Thu May 28 07:32:47 PDT 2009


> 
> True, the method is declared virtual, but is being ignored by pybindgen:
> 
>    ../bindings/python/ns3_module_node.py:2852: 
> TypeLookupError(['ns3::Socket::SocketErrno &'],)
> 
> Why this "ns3::Socket::SocketErrno &" type is being rejected by 
> pybindgen I do not know.  Sounds like a bug.  I am looking into it.  
> Sorry about that...
> 

OK, thanks for looking into this, but I am also wondering in general 
whether there is a way to increase verbosity in pybindgen logging, or 
whether it is already at the maximum.  By the way, the other missing 
virtual function has similar type error:

../bindings/python/ns3_module_node.py:2852: 
TypeLookupError(['ns3::Socket::SocketErrno &'],)
../bindings/python/ns3_module_node.py:2857: 
TypeLookupError(['ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, 
ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, 
ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >'],)

but these TypeLookupErrors seem fairly common (I counted 93 instances in 
the log) so I wasn't sure whether this was the real issue.

Another question I had when looking into this was why two similar 
abstract base classes (Ipv4ListRouting and Ipv4StaticRouting) generated 
different pybindgen error statements:

??:??: <pybindgen.CppClass 'ns3::Ipv4ListRouting'> / 
CodeGenerationError('ns3::Ipv4ListRouting cannot be constructed (have 
pure virtual methods but no helper class)',)

??:??: <pybindgen.CppClass 'ns3::Ipv4StaticRouting'> / 
CodeGenerationError('ns3::Ipv4StaticRouting cannot be constructed (class 
has pure virtual methods)',)

What causes this distinction?  (that one of the classes has the "but no 
helper class" log message)?  The abstract base classes in ns-3 all seem 
to generate one or the other of these messages, but I couldn't figure 
out what determines which error statement to be outputted.

Thanks,
Tom




More information about the Ns-developers mailing list