2

I am new to veins and would like to use it. I have taken my time to learn omnetpp and SUMO. now I can use both successfully. I also downloaded and installed veins and the example works well.

now I need to build my own application using veins. simply, I need to simulate a straight road where vehicles are moving and send messages to a single RSU.

I can't find any documentation for veins or its example. can anybody help me to know what steps should I follow to do this? for example, which ned files should be created, how cars and RSUs are created, how to set the application of each node,etc.

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
Rehab11
  • 483
  • 2
  • 7
  • 16

1 Answers1

6

First of all, you need to create the corresponding SuMO scenario (your road) which you can use in the example simulation instead of the provided one.

Next, you have to setup the simulation scenario in OMNeT++. Since the example simulation already contains a RSU, you do not have to add it anymore (except for position it to a location of choice). Vehicle nodes are automatically created on runtime by the TraCI module in Veins.

Now you already have your scenario where vehicles are moving on a road and are able to communicate with the RSU. However, the old application provided by the example simulation will be executed on all nodes which you probably want to change. Hence, you need to write your own application which can be executed on those nodes.

To write your own application, you can use MyVeinsApp as a starting point and simply add the desired functionality. It will already provide sending of some messages (see BaseWaveApplLayer). Also have a look at the demo application used in the example simulation.

After you have written your own application, modify omnetpp.ini to use this application on all your nodes.

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
  • Thank you. Your comment gave me a good starting point. I will try – Rehab11 Sep 26 '17 at 12:51
  • I still don't know how car nodes are created in omnet. In the Scenario of the example, I can see a single RSU but don't see cars. Are they created while running sumo? – Rehab11 Sep 26 '17 at 19:44
  • Cars are created by the [TraCI](http://veins.car2x.org/documentation/modules/#traci) module in veins. I added this to the original post. – Julian Heinovski Sep 27 '17 at 11:50