how to get start to build a veins application

只愿长相守 提交于 2019-11-29 12:31:34

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!