Bug 1656 - extension: Specialized version of GetObject in MobilityModel to allow python bindings use MobilityModels through basic interface (doesn't require bindings for the specific mobility model)
extension: Specialized version of GetObject in MobilityModel to allow python ...
Status: NEW
Product: ns-3
Classification: Unclassified
Component: python bindings
All All
: P5 normal
Assigned To: Gustavo J. A. M. Carneiro
Depends on:
  Show dependency treegraph
Reported: 2013-04-26 18:35 EDT by Alex Afanasyev
Modified: 2013-10-14 10:36 EDT (History)
1 user (show)

See Also:

Patch (3.45 KB, application/octet-stream)
2013-04-26 18:35 EDT, Alex Afanasyev

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Afanasyev 2013-04-26 18:35:09 EDT
Created attachment 1577 [details]

The attached patch implements a specialized version of GetObject method (MobilityModel::GetMobilityModel) in MobilityModel class. This method is now used by the visualizer to obtain mobility interface.

This trick is necessary in order to use in python mobility models that are not explicitly exported (or impossible to export) to python bindings generation.
Comment 1 Gustavo J. A. M. Carneiro 2013-10-13 11:41:06 EDT
Can you help me understand better this is needed?  What error do you get when getting a mobility model that is not known to the Python bindings?  Maybe there's a way to make pybindgen smarter about this and avoid this workaround...
Comment 2 Alex Afanasyev 2013-10-14 06:10:49 EDT
Here is what I have encountered.  When in Python we needed to get hold of an aggregated object, we use something like this (copied from visualizer):

   mob = ns3_node.GetObject(ns.mobility.MobilityModel.GetTypeId())

Somehow, when a specific mobility model does not have corresponding bindings, this results in mob to have only Object interface and nothing from Mobility interface.
Comment 3 Gustavo J. A. M. Carneiro 2013-10-14 10:36:49 EDT
Right. I think understand what happens.
What does your waf configure say about "Checking for internal GCC cxxabi" ?