//用ndnSIM仿真的第一步首先就是要创建自己的仿真模块
//这方面在网上并没有太多详细的描述
//所以在这里整理一下
工具
- ndnSIM 2.3
- ubuntu 16.04
创建新模块
- 在终端打开ndnSIM中ns-3所在的文件夹
cd ndnSIM/ns-3/
- 打开src文件夹
cd src/
- 在终端用create-module.py创建一个模块,也就是直接输入一下命令
./create-module.py ndn-vanet
- 接着你就会发现src文件夹中出现了一个名叫ndn-vanet的文件夹,里面包括doc、examples、helper、model、test文件夹和一个wscript文件
- 将你的仿真主程序放入examples,将所调用的程序(.cc & .h)文件放入model中,再将这些文件名字添加进wscript中
- 退到ns-3文件下,编译一下
cd ..
./waf configure --enables-examples
./waf
- 现在就可以开始仿真了
./waf --run=ndn-highway --vis