create WifiMode class instances and keep track of them. More...
#include <wifi-mode.h>
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... | |
WifiModeItem * | Get (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 WifiModeFactory * | GetFactory () |
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 |
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.
|
private |
typedef for a vector of WifiModeItem.
Definition at line 292 of file wifi-mode.h.
|
private |
Definition at line 135 of file wifi-mode.cc.
|
private |
Allocate a WifiModeItem from a given uniqueUid.
uniqueUid |
Definition at line 236 of file wifi-mode.cc.
References m_itemList.
Referenced by CreateWifiMode(), and GetFactory().
|
static |
uniqueName | the name of the associated WifiMode. This name must be unique accross all instances. |
modClass | the class of modulation |
isMandatory | true if this WifiMode is mandatory, false otherwise. |
bandwidth | the bandwidth (Hz) of the signal generated when the associated WifiMode is used. |
dataRate | the rate (bits/second) at which the user data is transmitted |
codingRate | if 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. |
constellationSize | the order of the constellation used. |
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().
|
private |
Return a WifiModeItem at the given uid index.
uid |
Definition at line 254 of file wifi-mode.cc.
References m_itemList, and NS_ASSERT.
Referenced by CreateWifiMode(), ns3::WifiMode::GetBandwidth(), ns3::WifiMode::GetCodeRate(), ns3::WifiMode::GetConstellationSize(), ns3::WifiMode::GetDataRate(), GetFactory(), ns3::WifiMode::GetModulationClass(), ns3::WifiMode::GetPhyRate(), ns3::WifiMode::GetUniqueName(), and ns3::WifiMode::IsMandatory().
|
staticprivate |
Return a WifiModeFactory.
Definition at line 261 of file wifi-mode.cc.
References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::bandwidth, ns3::WifiModeFactory::WifiModeItem::codingRate, ns3::WifiModeFactory::WifiModeItem::constellationSize, ns3::WifiModeFactory::WifiModeItem::dataRate, Get(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::modClass, ns3::WifiModeFactory::WifiModeItem::phyRate, ns3::WifiModeFactory::WifiModeItem::uniqueUid, ns3::WIFI_CODE_RATE_UNDEFINED, and ns3::WIFI_MOD_CLASS_UNKNOWN.
Referenced by CreateWifiMode(), ns3::WifiMode::GetBandwidth(), ns3::WifiMode::GetCodeRate(), ns3::WifiMode::GetConstellationSize(), ns3::WifiMode::GetDataRate(), ns3::WifiMode::GetModulationClass(), ns3::WifiMode::GetPhyRate(), ns3::WifiMode::GetUniqueName(), ns3::WifiMode::IsMandatory(), ns3::operator>>(), and ns3::WifiMode::WifiMode().
|
private |
Search and return WifiMode from a given name.
name | human-readable 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().
|
friend |
Serialize WifiMode from istream (human-readable).
is | std::istream |
mode |
Definition at line 58 of file wifi-mode.cc.
|
friend |
Definition at line 239 of file wifi-mode.h.
Referenced by CreateWifiMode(), and Search().
|
private |
Definition at line 293 of file wifi-mode.h.
Referenced by AllocateUid(), Get(), and Search().