dlinknctu / OpenNet

A Simulator for Software-Defined Wireless Local Area Network
GNU General Public License v2.0
72 stars 44 forks source link

Build changes in ns3 code into OpenNet #98

Closed akhila-rao closed 7 years ago

akhila-rao commented 7 years ago

Hi,

I made some changes to the ns3 source code by adding in a few functions I needed and successfully built the code using ./build.py in the OpenNet/ns-allinone-3.22 directory. I then also compiled the mininet code by executing ./install.sh -n in the OpenNet/mininet/util/ directory. I am trying to access these ns3 functions I added through python wrappers in the ns3.py script. But when I set up the simulation I get the error AttributeError: 'wifi.YansWifiPhy' object has no attribute 'MyNewlyAddedFunction' Even though I have added this function as public and built the code.

Is there some other linking I need to do for the changes in ns3 source code to be accessible to me in ns3.py

I am actually not sure if this has anything to do with OpenNet or is a ns3 python bindings issue, So a link to some relevant information woudl also be appreciated.

-Regards

kansokusha commented 7 years ago

It seems that installation of NS-3 Python libraries have not been performed after you add new functions.

Please try following commands under "OpenNet/ns-allinone-3.22/ns-3.22":

# ./waf build
# ./waf install