NS-3 和Aqua-sim-ng 学习笔记(一)

因为要搞水下网络,OMNET++不太合适,就转Aqua-sim。这是基于NS-2上的模型,NS-2需要额外学一门tcl脚本语言。

正好查到它的一个升级版Aqua-sim-NG,在github上,https://github.com/rmartin5/aqua-sim-ng是基于NS-3的,只需要基本的C++,不用学tcl语言。美滋滋。

 

装好ubuntu之后,安装NS-3和Aqua-sim。

注意:NS-3安装前有一下依赖包,需要安装。

 

NS-3安装教程https://blog.csdn.net/rical730/article/details/71504169

https://blog.csdn.net/xiao_sheng_jun/article/details/83628692

http://134.74.112.6/mediawiki/index.php/Install_and_run_Aqua-Sim-NG_code

 

建议bake查看NS-3的依赖,(也可以使用他安装)

 

开始提示我没有 Cmake 安装教程https://www.cnblogs.com/photo520/p/9486144.html

最后一步出错,提示intall fail 教程:https://blog.csdn.net/u010668907/article/details/50000527/

 

 ubuntu解压+安装+卸载

sudo dpkg -i [deb文件名]

sudo apt-get install -f 依赖关系错误,修复安装

sudo dpkg -l 查看已经安装的软件

sudo dpkg -r [软件名] 卸载

 

 NS-3入门:https://www.nsnam.org/docs/release/3.29/tutorial/html/getting-started.html

 

 Aqua-sim-ng的入门程序----【broadcastMAC_example】

 文件在 aquasim-ng/examples文件夹下的  broadcastMAC_example

源代码:

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2016 University of Connecticut
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Robert Martin <[email protected]>
 */

#include "ns3/core-module.h"
#include
  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值