Bug 1656

Summary: 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)
Product: ns-3 Reporter: Alex Afanasyev <alexander.afanasyev>
Component: python bindingsAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: NEW ---    
Severity: normal CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Patch

Description Alex Afanasyev 2013-04-26 18:35:09 EDT
Created attachment 1577 [details]
Patch

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" ?