NS3实例分析third.cc_Building a Wireless Network Topology
来源:互联网 发布:儿童学古诗软件 编辑:程序博客网 时间:2024/05/16 03:58
转自:http://blog.sina.com.cn/s/blog_7ec2ab360102wxh3.html
这节我们将利用一个无线网络来进一步扩展关于NS3网络设备和信道的知识。其中,我们将看到WifiHelper,其作用类似于PointToPointHelper和CsmaHelper。
在example/tutorial下的third.cc脚本是second.cc的升级版,我们在third.cc中添加了Wifi网络。
一.third.cc代码
#include "ns3/core-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
// Default Network Topology
// 网络拓扑结构
// Number of wifi or csma nodes can be increased up to 250
//
//
// ----------------------------|----------------------------
//
//
//
//
// n5
//
//
//