A Discrete-Event Network Simulator
API
ns3::WifiModeFactory Class Reference

create WifiMode class instances and keep track of them. More...

#include "wifi-mode.h"

+ Collaboration diagram for ns3::WifiModeFactory:

Classes

struct  WifiModeItem
 This is the data associated to a unique WifiMode. More...
 

Static Public Member Functions

static WifiMode CreateWifiMcs (std::string uniqueName, uint8_t mcsValue, WifiModulationClass modClass)
 
static WifiMode CreateWifiMode (std::string uniqueName, WifiModulationClass modClass, bool isMandatory, WifiCodeRate codingRate, uint16_t constellationSize)
 

Private Types

typedef std::vector< WifiModeItemWifiModeItemList
 typedef for a vector of WifiModeItem. More...
 

Private Member Functions

 WifiModeFactory ()
 
uint32_t AllocateUid (std::string uniqueUid)
 Allocate a WifiModeItem from a given uniqueUid. More...
 
WifiModeItemGet (uint32_t uid)
 Return a WifiModeItem at the given uid index. More...
 
WifiMode Search (std::string name) const
 Search and return WifiMode from a given name. More...
 

Static Private Member Functions

static WifiModeFactoryGetFactory ()
 Return a WifiModeFactory. More...
 

Private Attributes

WifiModeItemList m_itemList
 item list More...
 

Friends

std::istream & operator>> (std::istream &is, WifiMode &mode)
 Serialize WifiMode from istream (human-readable). More...
 
class WifiMode
 allow WifiMode class access More...
 

Detailed Description

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.

Definition at line 263 of file wifi-mode.h.

Member Typedef Documentation

typedef for a vector of WifiModeItem.

Definition at line 359 of file wifi-mode.h.

Constructor & Destructor Documentation

ns3::WifiModeFactory::WifiModeFactory ( )
private

Definition at line 676 of file wifi-mode.cc.

Member Function Documentation

uint32_t ns3::WifiModeFactory::AllocateUid ( std::string  uniqueUid)
private

Allocate a WifiModeItem from a given uniqueUid.

Parameters
uniqueUid
Returns
uid

Definition at line 777 of file wifi-mode.cc.

References m_itemList.

Referenced by CreateWifiMcs(), CreateWifiMode(), and GetFactory().

+ Here is the caller graph for this function:

WifiMode ns3::WifiModeFactory::CreateWifiMcs ( std::string  uniqueName,
uint8_t  mcsValue,
WifiModulationClass  modClass 
)
static
Parameters
uniqueNamethe name of the associated WifiMode. This name must be unique accross all instances.
mcsValuethe mcs value
modClassthe class of modulation
Returns
WifiMode

Create a HT or VHT WifiMode.

Definition at line 719 of file wifi-mode.cc.

References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::codingRate, ns3::WifiModeFactory::WifiModeItem::constellationSize, Get(), GetFactory(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::mcsValue, ns3::WifiModeFactory::WifiModeItem::modClass, NS_ASSERT, ns3::WifiModeFactory::WifiModeItem::uniqueUid, ns3::WIFI_CODE_RATE_UNDEFINED, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, and WifiMode.

Referenced by ns3::WifiPhy::GetHeMcs0(), ns3::WifiPhy::GetHeMcs1(), ns3::WifiPhy::GetHeMcs10(), ns3::WifiPhy::GetHeMcs11(), ns3::WifiPhy::GetHeMcs2(), ns3::WifiPhy::GetHeMcs3(), ns3::WifiPhy::GetHeMcs4(), ns3::WifiPhy::GetHeMcs5(), ns3::WifiPhy::GetHeMcs6(), ns3::WifiPhy::GetHeMcs7(), ns3::WifiPhy::GetHeMcs8(), ns3::WifiPhy::GetHeMcs9(), ns3::WifiPhy::GetHtMcs0(), ns3::WifiPhy::GetHtMcs1(), ns3::WifiPhy::GetHtMcs10(), ns3::WifiPhy::GetHtMcs11(), ns3::WifiPhy::GetHtMcs12(), ns3::WifiPhy::GetHtMcs13(), ns3::WifiPhy::GetHtMcs14(), ns3::WifiPhy::GetHtMcs15(), ns3::WifiPhy::GetHtMcs16(), ns3::WifiPhy::GetHtMcs17(), ns3::WifiPhy::GetHtMcs18(), ns3::WifiPhy::GetHtMcs19(), ns3::WifiPhy::GetHtMcs2(), ns3::WifiPhy::GetHtMcs20(), ns3::WifiPhy::GetHtMcs21(), ns3::WifiPhy::GetHtMcs22(), ns3::WifiPhy::GetHtMcs23(), ns3::WifiPhy::GetHtMcs24(), ns3::WifiPhy::GetHtMcs25(), ns3::WifiPhy::GetHtMcs26(), ns3::WifiPhy::GetHtMcs27(), ns3::WifiPhy::GetHtMcs28(), ns3::WifiPhy::GetHtMcs29(), ns3::WifiPhy::GetHtMcs3(), ns3::WifiPhy::GetHtMcs30(), ns3::WifiPhy::GetHtMcs31(), ns3::WifiPhy::GetHtMcs4(), ns3::WifiPhy::GetHtMcs5(), ns3::WifiPhy::GetHtMcs6(), ns3::WifiPhy::GetHtMcs7(), ns3::WifiPhy::GetHtMcs8(), ns3::WifiPhy::GetHtMcs9(), ns3::WifiPhy::GetVhtMcs0(), ns3::WifiPhy::GetVhtMcs1(), ns3::WifiPhy::GetVhtMcs2(), ns3::WifiPhy::GetVhtMcs3(), ns3::WifiPhy::GetVhtMcs4(), ns3::WifiPhy::GetVhtMcs5(), ns3::WifiPhy::GetVhtMcs6(), ns3::WifiPhy::GetVhtMcs7(), ns3::WifiPhy::GetVhtMcs8(), and ns3::WifiPhy::GetVhtMcs9().

+ Here is the call graph for this function:

WifiMode ns3::WifiModeFactory::CreateWifiMode ( std::string  uniqueName,
WifiModulationClass  modClass,
bool  isMandatory,
WifiCodeRate  codingRate,
uint16_t  constellationSize 
)
static
Parameters
uniqueNamethe name of the associated WifiMode. This name must be unique accross all instances.
modClassthe class of modulation
isMandatorytrue if this WifiMode is mandatory, false otherwise.
codingRateif convolutional coding is used for this rate then this parameter specifies the convolutional coding rate used. If there is no explicit convolutional coding step (e.g., for DSSS rates) then the caller should set this parameter to WIFI_CODE_RATE_UNCODED.
constellationSizethe order of the constellation used.
Returns
WifiMode

Create a WifiMode (not used for HT or VHT).

Definition at line 681 of file wifi-mode.cc.

References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::codingRate, ns3::WifiModeFactory::WifiModeItem::constellationSize, Get(), GetFactory(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::mcsValue, ns3::WifiModeFactory::WifiModeItem::modClass, NS_ASSERT, NS_FATAL_ERROR, ns3::WifiModeFactory::WifiModeItem::uniqueUid, ns3::WIFI_CODE_RATE_UNDEFINED, ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_UNKNOWN, ns3::WIFI_MOD_CLASS_VHT, and WifiMode.

Referenced by ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), ns3::WifiPhy::GetErpOfdmRate12Mbps(), ns3::WifiPhy::GetErpOfdmRate18Mbps(), ns3::WifiPhy::GetErpOfdmRate24Mbps(), ns3::WifiPhy::GetErpOfdmRate36Mbps(), ns3::WifiPhy::GetErpOfdmRate48Mbps(), ns3::WifiPhy::GetErpOfdmRate54Mbps(), ns3::WifiPhy::GetErpOfdmRate6Mbps(), ns3::WifiPhy::GetErpOfdmRate9Mbps(), ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate24Mbps(), ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate48Mbps(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate6Mbps(), ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate9Mbps(), ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz(), and ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMode ns3::WifiModeFactory::Search ( std::string  name) const
private

Search and return WifiMode from a given name.

Parameters
namehuman-readable WifiMode
Returns
WifiMode

Definition at line 742 of file wifi-mode.cc.

References m_itemList, NS_FATAL_ERROR, NS_LOG_UNCOND, and WifiMode.

Referenced by ns3::operator>>(), and ns3::WifiMode::WifiMode().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  is,
WifiMode mode 
)
friend

Serialize WifiMode from istream (human-readable).

Parameters
isstd::istream
mode
Returns
std::istream

Definition at line 63 of file wifi-mode.cc.

friend class WifiMode
friend

allow WifiMode class access

Definition at line 305 of file wifi-mode.h.

Referenced by CreateWifiMcs(), CreateWifiMode(), and Search().

Member Data Documentation

WifiModeItemList ns3::WifiModeFactory::m_itemList
private

item list

Definition at line 360 of file wifi-mode.h.

Referenced by AllocateUid(), Get(), and Search().


The documentation for this class was generated from the following files: