NetAnim Error

247 views
Skip to first unread message

P Nagpal

unread,
Feb 25, 2016, 11:40:27 AM2/25/16
to ns-3-users
Dear All,

I am new to ns-3. I want to use netanim in the example lena-x2-handover-measures.cc (I have modified the pathloss model and Tx power of eNBs, I hope that doesn't have any impact on using NetAnim). I am having a problem when I try to run netanim (screenshot attached)

I have done the following:

1) included #include "ns3/netanim-module.h"in the code.
2) Included:  AnimationInterface anim("anim1.xml"); before Simulator::Run();
3) Modified the ns-3.24.1/src/lte/examples/wscript file as follows:
     obj.source = 'lena-x2-handover-measures.cc'
     obj = bld.create_ns3_program('lena-simple-epc-emu',
                                 ['lte', 'emu', 'flow-monitor', 'netanim'])

How can I solve this problem? Thank you very much!
netanimerror.png

Konstantinos

unread,
Feb 25, 2016, 11:44:20 AM2/25/16
to ns-3-users
Hi,

The netanim dependency was not added at the correct example file.

     obj = bld.create_ns3_program('lena-simple-epc-emu',
                                 ['lte', 'emu', 'flow-monitor', 'netanim'])

Regards,
K.
Message has been deleted

P Nagpal

unread,
Feb 25, 2016, 11:56:17 AM2/25/16
to ns-3-users
Dear K,

Thank you very much for the prompt reply. But, I haven't changed the wscript file with regards to 
'lena-simple-epc-emu'

  obj = bld.create_ns3_program('lena-simple-epc-emu',
                                 ['lte', 'emu', 'flow-monitor', 'netanim'])

The original file has the following code:

    obj.source = 'lena-x2-handover-measures.cc'
    obj = bld.create_ns3_program('lena-simple-epc-emu',
                                 ['lte', 'emu'])

Very sorry but I am getting confused on where to make changes in wscript for implementing netanim in lena-x2-handover-measures.

I have also tried the following but have had the same error:

    obj.source = 'lena-x2-handover-measures.cc'
    obj = bld.create_ns3_program('
lena-x2-handover-measures',

                                 ['lte', 'emu', 'flow-monitor', 'netanim'])

Thank you very much!
wscript

Konstantinos

unread,
Feb 25, 2016, 12:23:21 PM2/25/16
to ns-3-users
Hi,

The wscript file you send me is the original one, not your modification.
As I said, if you want to change the lena-x2-handover-measurements example 
This is the point you need to change

    obj = bld.create_ns3_program('lena-x2-handover-measures',
                                 ['lte', 'netanim'])

After any change in the wscript file, you should re-configure ns-3 (just running ./waf configure .. ) for that change to have an effect


Regards,
K.

P Nagpal

unread,
Feb 25, 2016, 12:31:05 PM2/25/16
to ns-3-users
Thank you very much for d help! I think I understood what you r saying. I have made the following changes and it's not giving error.

    obj.source = 'lena-x2-handover.cc'

    obj = bld.create_ns3_program('lena-x2-handover-measures',
                                 ['lte', 'netanim','flow-monitor'])


On Thursday, February 25, 2016 at 4:44:20 PM UTC, Konstantinos wrote:

haider rizvi

unread,
Feb 18, 2018, 11:20:30 AM2/18/18
to ns-3-users
Hello how to get graphs of lena x2 handover code in ns3 plz tell me
Reply all
Reply to author
Forward
0 new messages