A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

Static Public Member Functions

static WifiMode CreateWifiMode (std::string uniqueName, enum WifiModulationClass modClass, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, enum WifiCodeRate codingRate, uint8_t constellationSize)

Private Types

typedef std::vector< struct
WifiModeItem
WifiModeItemList

Private Member Functions

 WifiModeFactory ()
uint32_t AllocateUid (std::string uniqueName)
WifiModeItemGet (uint32_t uid)
WifiMode Search (std::string name)

Static Private Member Functions

static WifiModeFactoryGetFactory ()

Private Attributes

WifiModeItemList m_itemList

Friends

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

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 183 of file wifi-mode.h.

Member Typedef Documentation

typedef std::vector<struct WifiModeItem> ns3::WifiModeFactory::WifiModeItemList
private

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

Constructor & Destructor Documentation

ns3::WifiModeFactory::WifiModeFactory ( )
private

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

Member Function Documentation

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

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

References m_itemList.

Referenced by CreateWifiMode(), and GetFactory().

+ Here is the caller graph for this function:

WifiMode ns3::WifiModeFactory::CreateWifiMode ( std::string  uniqueName,
enum WifiModulationClass  modClass,
bool  isMandatory,
uint32_t  bandwidth,
uint32_t  dataRate,
enum WifiCodeRate  codingRate,
uint8_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.
bandwidththe bandwidth (Hz) of the signal generated when the associated WifiMode is used.
dataRatethe rate (bits/second) at which the user data is transmitted
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.

Create a WifiMode.

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

References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::bandwidth, ns3::WifiModeFactory::WifiModeItem::codingRate, ns3::WifiModeFactory::WifiModeItem::constellationSize, ns3::WifiModeFactory::WifiModeItem::dataRate, Get(), GetFactory(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::modClass, NS_ASSERT, NS_FATAL_ERROR, ns3::WifiModeFactory::WifiModeItem::phyRate, ns3::WifiModeFactory::WifiModeItem::uniqueUid, ns3::WIFI_CODE_RATE_1_2, ns3::WIFI_CODE_RATE_2_3, ns3::WIFI_CODE_RATE_3_4, ns3::WIFI_CODE_RATE_UNDEFINED, ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_UNKNOWN, 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)
private

Definition at line 176 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

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

friend class WifiMode
friend

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

Referenced by CreateWifiMode(), and Search().

Member Data Documentation

WifiModeItemList ns3::WifiModeFactory::m_itemList
private

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

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


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