在ns-3中 允许和禁止例子的执行
来源:互联网 发布:毛呢大衣面料知乎 编辑:程序博客网 时间:2024/05/22 10:48
在ns-3中 允许和禁止例子的执行
首先介绍一种最简单允许 examples 和 tests的方法:
$./waf configure --enable-examples --enable-tests
$./waf build
就OK了。
具体查看当前哪些例子可以执行,见:http://blog.csdn.net/barcodegun/article/details/6899522
其他方法见下面:
===============================
有三种方法:
1.当一次使用 build.py 运行
禁止: $ ./build.py
允许: $ ./build.py --enable-examples --enable-tests
2.第一次使用 waf 运行build
禁止:
$./waf configure
$./waf build
允许:
$./waf configure --enable-examples --enable-tests
$./waf build
3.build好之后,使用waf 进行ns-3配置 configuration
enable/disable examples and tests using the ns-3 configuration file
定义.ns3rc这个文件
$cp utils/.ns3rc .
//从utils目录中复制到ns根目录
比如,我的安装目录是~/repos/ns-3-allinone/ns-3-dev/
把 ~/repos/ns-3-allinone/ns-3-dev/utils/.ns3rc 复制到 ~/repos/ns-3-allinone/ns-3-dev/.ns3rc
注意, 以.开头的文件是隐藏文件,在 shell 环境中 $ ls -al 命令可以查看。
然后修改 ~/repos/ns-3-allinone/ns-3-dev/ 目录下 .ns3rc文件 $ vim .ns3rc
禁止: # Set this equal to true if you want examples to be run.
examples_enabled = False
# Set this equal to true if you want tests to be run.
tests_enabled = False
允许:
# Set this equal to true if you want examples to be run.
examples_enabled = True
# Set this equal to true if you want tests to be run.
tests_enabled = True
修改这个文件,然后:
$./waf configure
$./waf build
测试:
$ ./test.py -c core
$./waf --run hello-simulator
显示: Hello Simulator
首先介绍一种最简单允许 examples 和 tests的方法:
$./waf configure --enable-examples --enable-tests
$./waf build
就OK了。
具体查看当前哪些例子可以执行,见:http://blog.csdn.net/barcodegun/article/details/6899522
其他方法见下面:
===============================
有三种方法:
1.当一次使用 build.py 运行
禁止: $ ./build.py
允许: $ ./build.py --enable-examples --enable-tests
2.第一次使用 waf 运行build
禁止:
$./waf configure
$./waf build
允许:
$./waf configure --enable-examples --enable-tests
$./waf build
3.build好之后,使用waf 进行ns-3配置 configuration
enable/disable examples and tests using the ns-3 configuration file
定义.ns3rc这个文件
$cp utils/.ns3rc .
//从utils目录中复制到ns根目录
比如,我的安装目录是~/repos/ns-3-allinone/ns-3-dev/
把 ~/repos/ns-3-allinone/ns-3-dev/utils/.ns3rc 复制到 ~/repos/ns-3-allinone/ns-3-dev/.ns3rc
注意, 以.开头的文件是隐藏文件,在 shell 环境中 $ ls -al 命令可以查看。
然后修改 ~/repos/ns-3-allinone/ns-3-dev/ 目录下 .ns3rc文件 $ vim .ns3rc
禁止: # Set this equal to true if you want examples to be run.
examples_enabled = False
# Set this equal to true if you want tests to be run.
tests_enabled = False
允许:
# Set this equal to true if you want examples to be run.
examples_enabled = True
# Set this equal to true if you want tests to be run.
tests_enabled = True
修改这个文件,然后:
$./waf configure
$./waf build
测试:
$ ./test.py -c core
$./waf --run hello-simulator
显示: Hello Simulator
- 在ns-3中 允许和禁止例子的执行
- 一个ns-3的Gnuplot例子
- 一个ns-3的Gnuplot例子
- 在ns-3中添加自己编写的模块
- 实现在eclipse中编译ns-3的详细步骤
- 在ns-3中查看当前有哪些程序可以执行
- 在ns-3中运行程序
- MyEclipse中配置允许使用被禁止的类
- 关于博文的禁止评论和允许评论
- ns3 (ns-3)在CentOS的安装
- 在ubuntu14.04中安装和配置NS-2
- 在NS中添加一个新协议的步骤
- 老外写的在NS中增加恶意节点
- 在NS中添加自己编写新协议的步骤
- PowerShell因为在此系统中禁止执行脚本问题的解决方法
- batch:在系统负载水平允许的时候执行命令
- 服务器如何允许和禁止CNAME访问
- PowerShell因为在此系统中禁止执行脚本解决方法
- 央视聚焦都市裸婚族:年轻人为房子丧失青春
- 利用Boost实现高度可移植的多线程C++程序
- 餐前试毒:做个吃货,做个傻逼
- 校园网下VMWare和windows XP共享上网
- register ocx
- 在ns-3中 允许和禁止例子的执行
- VirtualDub
- ubuntu server 安装图形界面
- 列举注册表值
- ASP.NET MVC案例教程(基于ASP.NET MVC beta)——第五篇:MVC整合Ajax
- PB及ASA数据库程序的发布
- 编写单元测试用例(摘抄)
- 几种嵌入式RTOS的分析与比较
- 洗钱