在NS3中添加新的VANET模块
来源:互联网 发布:大数据医疗公司 编辑:程序博客网 时间:2024/05/29 16:58
本文主要参考http://blog.csdn.net/barcodegun/article/details/6898193此博主的学习笔记,但由于版本过老,很多小细节不适用于ns-3.26,特来更新自己的学习笔记。
在NS3中添加新的VANET模块(vanet-test)
1. $cd ~/ns-allinone-3.26/ns-3.26/src
$./create-module.py vanet-test
即生成如下结构:
src/ new-module/ doc/ new-module.rst examples/ new-module-example.cc wscript helper/ new-module-helper.cc new-module-helper.h model/ new-module.cc new-module.h test/ new-module-test-suite.cc wscript*摘自ns3-manual
2. 原文中说需要需改的src/vanet/wscript及之后的内容需要改变,可能是因为版本的不一样。
修改方法:
src/vanet-test/wscript内容如下:
module = bld.create_ns3_module('vanet-test', ['network','propagation','wifi','mobility','core'])
module.source = [
'model/controller.cc',
'model/highway.cc',
'model/lane-change.cc',
'model/model.cc',
'model/obstacle.cc',
'model/vehicle.cc',
]
module_test = bld.create_ns3_module_test_library('vanet-test')
module_test.source = [
'test/vanet-test-test-suite.cc',
]
headers = bld(features='ns3header')
headers.module = 'vanet-test'
headers.source = [
'model/controller.h',
'model/highway.h',
'model/lane-change.h',
'model/model.h',
'model/obstacle.h',
'model/vehicle.h',
]
if bld.env.ENABLE_EXAMPLES:
bld.recurse('examples')
# bld.ns3_python_bindings()
src/vanet/examples/wscript内容如下:
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('vanet-highway-test',
['core', 'mobility', 'network', 'wifi', 'vanet'])
obj.source = 'vanet-highway-test.cc'
src/vane-testt/test/examples-to-run.py此处依旧按照原文操作。
注:将原文件夹中各模块内的.cc .h文件复制进对应的文件内。(eg. modul内的controller.cc等复制进/vanet-test/modul)因为版本问题controller.cc等无法编译。
3. $cd ..
$cd .. //回到ns-3.26
$./waf clean
$./waf configure --enable-examples --enable-tests
$./waf build
4. 编译后
Modules built:
antenna aodv applications
bridge buildings config-store
core csma csma-layout
dsdv dsr energy
fd-net-device flow-monitor internet
internet-apps lr-wpan lte
mesh mobility mpi
netanim (no Python) network nix-vector-routing
olsr point-to-point point-to-point-layout
propagation sixlowpan spectrum
stats tap-bridge test (no Python)
topology-read traffic-control uan
vanet-test (no Python) virtual-net-device visualizer
wave wifi wimax
- 在NS3中添加新的VANET模块
- ns3添加模块之vanet-highway
- ns3 添加模块
- Android系统开发小知识-在android产品开发中添加新的编译模块
- 如何给在用的nginx添加新模块?
- 在FILE_OP中添加新的操作
- 在uboot中添加新的命令
- 在caffe中添加新的层
- 在caffe中添加新的layer
- ns3中trace source的添加和调用
- 在eclipse中配置ns3
- Apache中添加gzip新模块
- ns3中loopback接口是在什么时候创建的?
- NS3-3.9+Ubuntu10.04+Vanet-highway 安装与测试
- (2) 在 Build 系统中添加新的内容 - 添加新的产品
- NS3-logging 日志模块的使用
- 在NS2中添加自己的应用模块
- 在ns-3中添加自己编写的模块
- hadoop2.4.1伪分布式搭建
- Unity协程的yield & C#的yield关键字
- struts执行流程
- ssm框架搭建过程中出现 spring-org.springframework.beans.factory.BeanDefinitionStoreException的解决
- Myeclipse错误Tomcat的不能部署问题
- 在NS3中添加新的VANET模块
- c++类--素数
- KeyError: ‘SQLALCHEMY_TRACK_MODIFICATIONS’ 的错误问题
- Caused by: java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger
- iOS处理耗时操作一种简单方法
- 使用Metrics监控应用程序的性能
- ToBox全球分享理念
- ImageLoader 加载本地图片
- windows7、windows8中mysql5.7的配置my.ini文件在哪