Diffiiculty in creating a new module in ns3.21

196 views
Skip to first unread message

Parth Joshi

unread,
Jan 20, 2016, 1:36:25 PM1/20/16
to ns-3-users
I am trying to achieve Vanet Simulation using this link. Now I understand that I need to create a different module inside src folder to be able to run this program. I followed all the steps according to nsnam website. So as I have all the files already present with me do I need to create seperate helper for header files? Or do I substitute the files made during creating new module?I have put all these files in the image. Please tell me do I need to edit/change wscript file or anything else to do.
Screenshot from 2016-01-18 23:29:42.png

Konstantinos

unread,
Jan 20, 2016, 2:31:54 PM1/20/16
to ns-3-users
Hi Parth,

I would recommend to use the latest NS-3 release, not ns-3.21 (that's almost two years old).
It is not necessary to create separate folder, but it is advised for better organisation. 
The code does not have any helper class, so if you want one, you need to develop it.

The wscript file you use should match the format of the ns-3 version you use. 
The original from the link you provided is more than 4yr old, so there will be some minor changes with the updates in WAF tool.

Generally I would recommend to follow the manual https://www.nsnam.org/docs/manual/html/new-modules.html

Regards,
K.

Parth Joshi

unread,
Jan 20, 2016, 2:58:52 PM1/20/16
to ns-3-...@googlegroups.com
Thanks man for the response. 
I did create a new module. but I dont know where to put all files or how to edit helper files (pretty new to this)

Also i found this thread --> https://groups.google.com/forum/#!msg/ns-3-users/aOXi5A9tCy8/Q0URtl5r_BMJ

here you have said that changing  "vanet-highway-example" inside the src/vanet-highway/example/ to "vanet-highway-test"
But It doesnt work. Should I try it in ns 3.15?

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/ToUp-A8_y54/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Jan 20, 2016, 3:46:29 PM1/20/16
to ns-3-users
The code is >5yr old and it is quoted 
"Note: The source code is delivered 'as-is', and we cannot offer any support. Code last updated December 2011."

Having said that, the documentation explains what should be placed where.
You should use the latest NS-3 release (ns-3.24 now), follow the documentation for that release, and report any problems you have for that.
We can not provide help of un-supported modules on old ns-3 releases. 

The are also other modification that you should do to the code to make it work in latest ns-3 release due to changes in the the API.

K.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Parth Joshi

unread,
Jan 21, 2016, 10:32:39 AM1/21/16
to ns-3-...@googlegroups.com
Okay so I changed the wscript inside the vanet-highway module (in the image). Also I put respective files inside the 'model' and 'helper' subfolders inside the vanet-highway module. I put screenshots of those too.
Now when I build the waf again, I get the errors like 'common-module.h' not found or 'node-module.h' not found.
Now I know these modules are not there anymore in ns3. So how to solve this problem? Any Idea?

To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/ToUp-A8_y54/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
helper.png
model folder.png
waf compile
wscript.png

Tommaso Pecorella

unread,
Jan 21, 2016, 10:40:43 AM1/21/16
to ns-3-users
Hi,

any include with a name ending in "-module.h" is automatically built from a module (!) by adding all the headers in the module itself.
The thing you have to do is to use your brain and some (little) guesswork. Example:
node-module.h -> node -> node is in network module -> try with network-module.h
or...
common -> no more common, let's comment it -> see what are the errors -> add the headers.
and so on.

T.

Parth Joshi

unread,
Jan 21, 2016, 4:01:11 PM1/21/16
to ns-3-...@googlegroups.com
Thanks Tommaso, great suggestion. So I changed node to network module, commented different modules like 'common', 'contrib'. It was all working good till ./waf encountered another error. Its like solving one thing leads to another.

Look at these errors. 
wificonfiguration problem.png

Parth Joshi

unread,
Jan 21, 2016, 4:02:10 PM1/21/16
to ns-3-...@googlegroups.com
i tried using 'wave' module instead of 'wifi' as some posts on internet suggested but it still doesnt work. Please help me guys.

Tommaso Pecorella

unread,
Jan 21, 2016, 5:45:29 PM1/21/16
to ns-3-users
Many constants and APIs have their names changed. Note that we did it on purpose, in order to avoid forward-port misuse.
You must check what's changed (in this case the whole code). For sure WIFI_PHY_STANDARD_80211p_SCH and WIFI_PHY_STANDARD_80211p_CCH are gone, the others should not raise errors (if you did include the right module).

T.
Reply all
Reply to author
Forward
0 new messages