how to getting start to build a veins application

2019-02-20 04:26发布

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.

标签: omnet++ veins
1条回答
forever°为你锁心
2楼-- · 2019-02-20 05:08

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.

查看更多
登录 后发表回答