0

这是关于NS2 MAC层模拟的。

假设Ns2信道带宽为1 Mbps

那么,默认情况下,通道分为多少个槽?

如果分开,每个单独的插槽是多少?

这条线 mac->phymib_.getSlotTime()给出了什么?

4

2 回答 2

0

谈到频道插槽,我假设您询问的是 Mac/Tdma 无线协议(另外指定):

进入源代码:

来自 tdma-mac.cc:

//Get the parameters of the link (which in bound in mac.cc, 2M by default),
//the packet length within one TDMA slot (1500 byte by default), 
//and the max number of nodes (64) in the simulations.

// Max data length allowed in one slot (byte)
#define MAC_TDMA_MAX_DATA_LEN 1500        

// How many time slots in one frame.
#define MAC_TDMA_SLOT_NUM       32           

ns-default.tcl 中还定义了无线链路的默认带宽以及其他一些值:

Phy/WirelessPhy set bandwidth_ 2e6

Mac/Tdma set slot_packet_len_   1500
Mac/Tdma set max_node_num_  64
于 2014-07-03T17:49:08.357 回答
0

mac->phymib_.getSlotTime()返回 a 的持续时间slot,它是802.11 MAC 协议的分布式协调功能(DCF) 的参数。

回覆:how many slots is the channel divided into.

我认为你混淆了802.11 MACwith TDMA

如果您对在 中进行模拟感兴趣TDMAns2您应该查看文件mac/mac-tdma.ccmac/mac-tdma.h. 不幸的是,TDMAallinone-package 没有给出示例脚本。

于 2013-02-18T14:35:22.773 回答