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
 This is the data associated to a unique WifiMode. More...
 

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
 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)
 Search and return WifiMode from a given name. More...
 

Static Private Member Functions

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

Private Attributes

WifiModeItemList m_itemList
 

Friends

std::istream & operator>> (std::istream &is, WifiMode &mode)
 Serialize WifiMode from istream (human-readable). More...
 
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 209 of file wifi-mode.h.

Member Typedef Documentation

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

typedef for a vector of WifiModeItem.

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

Constructor & Destructor Documentation

ns3::WifiModeFactory::WifiModeFactory ( )
private

Definition at line 135 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 236 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.
Returns
WifiMode

Create a WifiMode.

Definition at line 141 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_5_6, 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::GetOfdmRate108MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate120MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate121_5MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate135MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate135MbpsBW40MHzShGi(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate13MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate14_4MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate150MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate15MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate19_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate21_7MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate24Mbps(), ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate26MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate28_9MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate30MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate39MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate40_5MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate43_3MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate45MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate48Mbps(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate52MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate54MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate57_8MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate58_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate60MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate65MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate65MbpsBW20MHzShGi(), ns3::WifiPhy::GetOfdmRate6_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate6Mbps(), ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate72_2MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate7_2MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate81MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate90MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate9Mbps(), ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz(), and ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz().

+ Here is the call graph for this function:

struct WifiModeFactory::WifiModeItem * ns3::WifiModeFactory::Get ( uint32_t  uid)
private
WifiMode ns3::WifiModeFactory::Search ( std::string  name)
private

Search and return WifiMode from a given name.

Parameters
namehuman-readable WifiMode
Returns
WifiMode

Definition at line 201 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 58 of file wifi-mode.cc.

friend class WifiMode
friend

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

Referenced by CreateWifiMode(), and Search().

Member Data Documentation

WifiModeItemList ns3::WifiModeFactory::m_itemList
private

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

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


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