Problems with running STDMA simulation in NS3-3.18 .

162 views
Skip to first unread message

teja...@gmail.com

unread,
May 11, 2016, 3:32:58 AM5/11/16
to ns-3-users
Hi , 

I am working on this code on github to run a stdma simulation in ns3 - 3.18. 


The author of the code talks about editing the WiFi module code to make some changes to include stdma.h in it. I am confused as to which file in wifi folder in the ns3 directory do I need to edit?

I ran the first.cc example code and it executes , but when I try to run the code he has provided in stdma/examples folder , I get the fatal error saying: stdma-module.h - no such file or directory. 

I have tried several ways to run the stdma simulation but not getting executed in NetAnim. I want to run a STDMA simulation in NetAnim.

Here is the traceback of the error:


harmeet@harmeet-HP-Pavilion-15-Notebook-PC:~/Desktop/ns-allinone-3.18.2/ns-3.18.1$ ./waf --run scratch/simple-stdma-example
Waf: Entering directory `/home/harmeet/Desktop/ns-allinone-3.18.2/ns-3.18.1/build'
[ 798/2050] cxx: scratch/simple-stdma-example.cc -> build/scratch/simple-stdma-example.cc.1.o
[ 799/2050] cxx: scratch/first.cc -> build/scratch/first.cc.2.o
[ 800/2050] cxx: scratch/subdir/scratch-simulator-subdir.cc -> build/scratch/subdir/scratch-simulator-subdir.cc.3.o
[ 802/2050] cxx: scratch/scratch-simulator.cc -> build/scratch/scratch-simulator.cc.4.o
../scratch/simple-stdma-example.cc:31:30: fatal error: ns3/stdma-module.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/harmeet/Desktop/ns-allinone-3.18.2/ns-3.18.1/build'
Build failed
 -> task in 'simple-stdma-example' failed (exit status 1): 
{task 140718957433808: cxx simple-stdma-example.cc -> simple-stdma-example.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-I.', '-I..', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '../scratch/simple-stdma-example.cc', '-c', '-o', 'scratch/simple-stdma-example.cc.1.o']


Thanks in advance. 

- Tejas

Konstantinos

unread,
May 11, 2016, 4:07:27 AM5/11/16
to ns-3-users
Hi Tejas,

We do not provide support for outdated ns-3 releases (we are currently on ns-3.25), nor to modules that are not part of the main ns-3 codebase.
You should contact the module developer for more information.

Having said that, some comments to your queries.

The git repository you found is a complete NS-3 repository, meaning that if you clone it, you can build it as it is with all the STDMA code inside. There is nothing you need to change.
However, the fact that it is based on an old ns-3 release, may cause issues with newer GCC compilers.

If you want to port forward the code to a newer ns-3 release, or your own codebase, you need to follow the manual.
The manual specifies how you add a new module in the NS-3 codebase.
Identify the new modules and modifications to existing modules and apply those changes. It is not just one header file.. it's a complete protocol implementation!

Regards,
K
Reply all
Reply to author
Forward
0 new messages