SSFNet的安装和运行

首先应该安装1.4的jdk版本,因为源代码中的enum与1.5的jdk关键字重复。
在linux下安装的时候很简单,只需要在其根目录下输入make all即可。因为你下载下来的是.java文件,要运行当然要先进行编译成.class文件了,因为所有的SSFNet simulation要跑起来都必须从/src/SSF/Net/Net.class开始入口,因为该文件中才有main函数。你可以看根目录下的Makefile是在干些什么事情,比如像我,就把worm的test注释掉了,因为对我没有用处。 明白了其原理,那么在windows下面也是同样的道理,你可以先把下载下来的src都编译成为.class来为每次模拟运行。当然也可以在集成开发环境,如eclispe中来运行,只需把其jar文件作为build path添加进来,然后把src下的源文件作为工程普通文件倒入即可。
SSFNet运行的时候都必须从/src/SSF/Net/Net这个文件为入口,通常的运行命令是:java SSF.Net.Net 1000 my.dml $SSF_HOME/examples/net.dml其中1000表示仿真时间,my.dml是自己配置的网络,最后一个参数official DML SSFNet schema file that is used for automatic validation of your input DML file所以说SSFNet是 self-configuring的,即 that is, each SSFNet class instance can autonomously configure itself by querying a configuration database, which may be locally resident or available over the Web整个SSFNet仿真运行的流程如下:At the start of the sumulation run, SSF.Net.Net object will use the services of the DML library to load the content of the files my.dml and net.dml into a runtime Configuration database object. After that, SSF.Net.Net will systematically instantiate and configure all simulation objects (Hosts, Routers, protocols, and network links). Once all simulation objects have been instatiated, the initialization phase begins (Entity subclasses call their init() method), and finally SSF.Net.Net invokes its method startAll(), and the simulation begins with simulation time value equal to 0 sec. There is a lot of verbose output, including the automatically generated IP address blocks etc.
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值