1.class DcaTxop : public Dcf
/**
* \brief handle packet fragmentation and retransmissions.
* \ingroup wifi
*
* This class implements the packet fragmentation and
* retransmission policy. It uses the ns3::MacLow and ns3::DcfManager
* helper classes to respectively send packets and decide when
* to send them. Packets are stored in a ns3::WifiMacQueue until
* they can be sent.
*
* The policy currently implemented uses a simple fragmentation
* threshold: any packet bigger than this threshold is fragmented
* in fragments whose size is smaller than the threshold.
*
* The retransmission policy is also very simple: every packet is
* retransmitted until it is either successfully transmitted or
* it has been retransmitted up until the ssrc or slrc thresholds.
*
* The rts/cts policy is similar to the fragmentation policy: when
* a packet is bigger than a threshold, the rts/cts protocol is used.
*/
簡要說明:處理包的分組和重傳
該類繼承包分組和重傳策略。它使用ns3::MacLow and ns3::DcfManager幫助類分別完成發(fā)送包和決定何時發(fā)送包飞几。包被存儲在ns3::WifiMacQueue中砚哆,止到發(fā)送出去。
當前使用的策略使用一個簡單的分組閾值:任何大于該閾值的片將被分成小于該閾值的分組屑墨。
重傳策略也非常簡單:每一個包竟被重傳止到被成功傳輸或者已經被重傳達到了ssrc or slrc閾值躁锁。
rts/cts策略與分組碎片策略相似:當一個包大于閾值時纷铣,將使用rts/cts協議。
2.class MacRxMiddle
/**
* \ingroup wifi
*
* This class handles duplicate detection and recomposition of fragments.
*/
該類處理重復探測和分組片的重排战转。
3. class MacTxMiddle
/**
* \ingroup wifi
*
* Handles sequence numbering of IEEE 802.11 data frames
*/
處理802.11數據幀的序列號
4. class MacLow : public Object
/**
* \ingroup wifi
* \brief handle RTS/CTS/DATA/ACK transactions.
*/
處理RTS/CTS/DATA/ACK交互
5. class DcfManager
/**
* \brief Manage a set of ns3::DcfState
* \ingroup wifi
*
* Handle a set of independent ns3::DcfState, each of which represents
* a single DCF within a MAC stack. Each ns3::DcfState has a priority
* implicitely associated with it (the priority is determined when the
* ns3::DcfState is added to the DcfManager: the first DcfState to be
* added gets the highest priority, the second, the second highest
* priority, and so on.) which is used to handle "internal" collisions.
* i.e., when two local DcfState are expected to get access to the
* medium at the same time, the highest priority local DcfState wins
* access to the medium and the other DcfState suffers a "internal"
* collision.
*/
簡要說明:處理一系列ns3::DcfState
處理一系列獨立的ns3::DcfState搜立,每一個都代表一個在MAC棧中的單獨的DCF。每一個ns3::DcfState都有一個隱式關聯與他的優(yōu)先級(當ns3::DcfState被添加到DcfManager槐秧,這個優(yōu)先級被決定:第一個添加的DcfState具有最高優(yōu)先級啄踊,第二個具有第二高優(yōu)先級,以此類推)刁标。這個優(yōu)先級被用于處理“內部的”的碰撞颠通。例如,當兩個本地DcfState期望在同一時間訪問介質膀懈,最高優(yōu)先級本地DcfState贏得訪問介質權限顿锰,其他DcfState遭遇一個“內部的”碰撞。
6. class WifiRemoteStationManager : public Object
/**
* \ingroup wifi
* \brief hold a list of per-remote-station state.
*
* \sa ns3::WifiRemoteStation.
*/
保存一系列per-remote-station state
7. class EdcaTxopN : public Dcf
/**
* \ingroup wifi
* This queue contains packets for a particular access class.
* possibles access classes are:
*
* -AC_VO : voice, tid = 6,7 ^
* -AC_VI : video, tid = 4,5 |
* -AC_BE : best-effort, tid = 0,3 | priority
* -AC_BK : background, tid = 1,2 |
*
* For more details see section 9.1.3.1 in 802.11 standard.
*/
這個隊列包含了一個具體的訪問類的包启搂∨鹂兀可能的訪問類是:
-AC_VO : voice, tid = 6,7 ^
-AC_VI : video, tid = 4,5 |
-AC_BE : best-effort, tid = 0,3 | priority
-AC_BK : background, tid = 1,2 |
獲取更多細節(jié),請看802.11標準的9.1.3.1節(jié)
8. enum TypeOfStation
/**
* Enumeration for type of station
*/
枚舉station的類型:
STA,
AP,
ADHOC_STA,
MESH,
HT_STA,
HT_AP,
HT_ADHOC_STA,
OCB
9. class WifiMode
/**
* \brief represent a single transmission mode
* \ingroup wifi
*
* A WifiMode is implemented by a single integer which is used
* to lookup in a global array the characteristics of the
* associated transmission mode. It is thus extremely cheap to
* keep a WifiMode variable around.
*
* \see attribute_WifiMode
*/
簡要說明:代表一個單獨的傳輸模式
一個WiFi模式是由用于在一個全局數組來查找相關的傳輸模式的特性的單個整數來實現的狐血。這是極其因此便宜*保持無線模式變量左右淀歇。
10. enum WifiModulationClass
/**
* This enumeration defines the modulation classes per
* (Table 9-4 "Modulation classes"; IEEE 802.11-2012).
*/
該枚舉類定義了每個調制類
11. class WifiModeFactory
/**
* \brief create WifiMode class instances and keep track of them.
*
* This factory ensures that each WifiMode created has a unique name
* and assigns to each of them a unique integer.
*/
簡要說明:創(chuàng)建WifiMode類實例,并對他們保持跟蹤匈织。
這個工廠類保證每一個被創(chuàng)建的WifiMode有一個唯一的名字浪默,并給每一個分配一個唯一的整數。
12. class MacLowDcfListener
/**
* \brief listen to NAV events
* \ingroup wifi
*
* This class is typically connected to an instance of ns3::Dcf
* and calls to its methods are forwards to the corresponding
* ns3::Dcf methods.
*/
簡要說明:監(jiān)聽NAV事件
該來一般與一個ns3::Dcf實例關聯在一起缀匕,它的方法調用是轉發(fā)到相應的ns3::Dcf方法纳决。
13. class MacLowAggregationCapableTransmissionListener
/**
* \ingroup wifi
* \brief listen for block ack events.
*/
監(jiān)聽塊ACK事件
14. class MacLowTransmissionParameters
/**
* \brief control how a packet is transmitted.
* \ingroup wifi
*
* The ns3::MacLow::StartTransmission method expects
* an instance of this class to describe how the packet
* should be transmitted.
*/
簡要說明:控制一個包如何傳輸
ns3::MacLow::StartTransmission方法預料該來的實例,描述一個包如何被傳輸的乡小。
15. class WifiTxVector
/**
* This class mimics(模仿) the TXVECTOR which is to be
* passed to the PHY in order to define the parameters which are to be
* used for a transmission. See IEEE 802.11-2007 15.2.6 "Transmit PLCP",
* and also 15.4.4.2 "PMD_SAP peer-to-peer service primitive(原始的)
* parameters".
*
* If this class is constructed with the constructor that takes no
* arguments, then the client must explicitly(明確的) set the mode and
* transmit power level parameters before using them. Default
* member initializers(初始化) are provided for the other parameters, to
* conform to a non-MIMO/long guard configuration, although these
* may also be explicitly set after object construction.
*
* When used in a infrastructure context, WifiTxVector values should be
* drawn from WifiRemoteStationManager parameters since rate adaptation
* is responsible for picking the mode, number of streams, etc., but in
* the case in which there is no such manager (e.g. mesh), the client
* still needs to initialize at least the mode and transmit power level
* appropriately.
*
* \note the above reference is valid for the DSSS PHY only (clause
* 15). TXVECTOR is defined also for the other PHYs, however they
* don't include the TXPWRLVL explicitly in the TXVECTOR. This is
* somewhat strange, since all PHYs actually have a
* PMD_TXPWRLVL.request primitive. We decide to include the power
* level in WifiTxVector for all PHYs, since it serves better our
* purposes, and furthermore it seems close to the way real devices
* work (e.g., madwifi).
*/
該類模仿了TXVECTOR阔加,它將被傳遞到PHY,這是為了定義一次傳輸所用的參數满钟。請看IEEE 802.11-2007 15.2.6 "Transmit PLCP"和 15.4.4.2 "PMD_SAP peer-to-peer service primitive(原始的)parameters".
如果該類使用沒有參數的構造器構建胜榔,則客戶端必須在使用它們之前明確的設置模式和傳輸能量水平參數。提供了其他參數來完成默認的成員初始化湃番,確保一個non-MIMO /long guard configuration夭织,盡管這些可能在對象創(chuàng)建之后來明確的設置。
16. struct Item
/**
* A struct that holds information about a packet for putting
* in a packet queue.
*/
結構體包含三個元素:
* \param packet
* \param hdr
* \param tstamp
結構體吠撮,保存了一個包的信號尊惰,該包存放在包隊列中。
/**
* typedef for packet (struct Item) queue.
*/
typedef std::list<struct Item> PacketQueue;包隊列
17. class InterferenceHelper
/**
* \ingroup wifi
* \brief handles interference calculations
*/
簡要說明:處理干擾計算