GNU General Public License v2.0

项目介绍

m00re/ns-3-stdma 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 GNU General Public License v2.0 许可证,目前获得 50 个 Star、24 次 Fork。

仓库全名
m00re/ns-3-stdma
开源许可证
GNU General Public License v2.0
Star 数
50
Fork 数
24
未关闭 Issue
2

README 摘要

NS-3 STDMA: Self-organizing TDMA implementation for NS-3 ======================================================== This is an implementation of the protocol Self-Organizing TDMA (STDMA) in NS-3 and is envisioned to be used as a replacement for the CSMA-based MAC protocol used in the 'wifi' module of NS-3. As such, the provided 'stdma' module of this repository re-uses the existing WifiPhy-based implementation of the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ns-3-stdma 用什么语言开发?

主要使用 Python 编写,采用 GNU General Public License v2.0 许可证,目前有 50 个 Star。

ns-3-stdma 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v2.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 ns-3-stdma 的源码?

可以直接克隆仓库:git clone https://github.com/m00re/ns-3-stdma.git,默认分支为 master;安装与运行步骤见仓库 README。

ns-3-stdma 最近还在维护吗?

仓库最近一次更新为 2016年4月4日,当前有 2 个未关闭 Issue;Star 数为 50,可作为社区活跃度的参考。

关于

An implementation of Self-Organizing TDMA (STDMA) for VANETs in NS-3

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
106
价值分
37
活跃状态
活跃

README

NS-3 STDMA: Self-organizing TDMA implementation for NS-3

This is an implementation of the protocol Self-Organizing TDMA (STDMA) in NS-3 and is envisioned to be used as a replacement for the CSMA-based MAC protocol used in the ‘wifi’ module of NS-3. As such, the provided ‘stdma’ module of this repository re-uses the existing WifiPhy-based implementation of the official NS-3 distribution.

STDMA is a time-division multiplexing based protocol initially developed for and standardized in the Automatic Identification System (AIS) as well as in VDL Mode 4 to periodically exchange positioning information between ships and aircrafts.

In contrast to CSMA, which employs a random access based scheme to the wireless channel, STDMA implements a reservation based scheme: time is divided in so called frames that last for a certain duration, and those frames are further ivided into equally sized transmission slots that accommodate a single packet transmission. The protocol is therefore well suited to be used in active safety systems such as Intelligent Transportation Systems (ITS) in general or VANETs in particular.

  1. Implementation Overview

The current implementation was developed against version 3.18 of NS-3 and has not been tested for more recent and neither for earlier versions of NS-3.

Switching from the CSMA-based implementation of the NS-3 wifi module to the above STDMA implementation is quite simple and requires only a few line changes in your simulation script (see section 2 below).

What should be kept in mind when using the STDMA implementation:

  • Nodes/applications need to generate packets on a periodic basis and it is necessary that there is always one packet ready to be transmitted if a reserved transmission slot is awaiting.
  • The minimum transmission rate supported is 2 packets per frame
  • Variable transmission rates are not supported
  1. How to use the STDMA implementation

If you have the following lines of code to configure your Wifi nodes

#include "ns3/wifi-module.h"

using namespace ns3;

// Create 10 nodes
NodeContainer m_nodes;
m_nodes.Create(10);

// Create Wifi MAC helpers...
WifiHelper wifiHelper = WifiHelper::Default ();
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
// ... and configure them as desired
wifiHelper.SetStandard(WIFI_PHY_STANDARD_80211p_CCH);
wifiMac.SetType ("ns3::AdhocWifiMac");
wifiHelper.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
                                    "DataMode", StringValue (datarate),
                                    "NonUnicastMode", StringValue (datarate));

// Create the wireless channel configuration
YansWifiChannelHelper wifiChannel;
wifiChannel.AddPropagationLoss("ns3::RangePropagationLossModel");
wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel");
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default();
wifiPhy.SetChannel(wifiChannel.Create());

// And finally install/apply the Wifi configuration on all nodes
wifiHelper.Install(wifiPhy, wifiMac, m_nodes);

you simply need to change the above code block to look like the one below

#include "ns3/wifi-module.h"
#include "ns3/stdma-module.h"

using namespace ns3;

// Create 10 nodes
NodeContainer m_nodes;
m_nodes.Create(10);

// Create Wifi MAC helpers...
stdma::StdmaHelper stdmaHelper;
stdma::StdmaMacHelper stdmaMac = stdma::StdmaMacHelper::Default();
// ... and configure them as desired
stdmaHelper.SetStandard(WIFI_PHY_STANDARD_80211p_CCH);

// Create the wireless channel configuration
YansWifiChannelHelper wifiChannel;
wifiChannel.AddPropagationLoss("ns3::RangePropagationLossModel");
wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel");
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default();
wifiPhy.SetChannel(wifiChannel.Create());

// And finally install/apply the Wifi configuration on all nodes
stdmaHelper.Install(wifiPhy, stdmaMac, m_nodes, startupTimes);

and you are ready to go.

  1. Complete example scenario

The module ships with a simple but fully functional example scenario that is built as long as NS-3 is built with examples enabled. The source code to this example is located in src/stdma/examples/simple-stdma-example.cc and consists of a scenario in which 10 nodes startup simultaneously and then transmit 10 packets/sec over a time duration of 20 seconds.

评论

暂无评论