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 | 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< 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) const |
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 |
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... | |
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 298 of file wifi-mode.h.
|
private |
typedef for a vector of WifiModeItem.
Definition at line 394 of file wifi-mode.h.
|
private |
Definition at line 669 of file wifi-mode.cc.
|
private |
Allocate a WifiModeItem from a given uniqueUid.
uniqueUid | the unique UID |
Definition at line 769 of file wifi-mode.cc.
References m_itemList.
Referenced by CreateWifiMcs(), CreateWifiMode(), and GetFactory().
|
static |
uniqueName | the name of the associated WifiMode. This name must be unique across all instances. |
mcsValue | the MCS value |
modClass | the class of modulation |
Create a HT WifiMode.
Definition at line 712 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_HT, 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().
|
static |
uniqueName | the name of the associated WifiMode. This name must be unique across all instances. |
modClass | the class of modulation |
isMandatory | true if this WifiMode is mandatory, false otherwise. |
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 non-HT WifiMode.
Definition at line 674 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_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, 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().
|
private |
Return a WifiModeItem at the given UID index.
uid | the UID index |
Definition at line 787 of file wifi-mode.cc.
References m_itemList, and NS_ASSERT.
Referenced by CreateWifiMcs(), CreateWifiMode(), ns3::WifiMode::GetCodeRate(), ns3::WifiMode::GetConstellationSize(), ns3::WifiMode::GetDataRate(), GetFactory(), ns3::WifiMode::GetMcsValue(), ns3::WifiMode::GetModulationClass(), ns3::WifiMode::GetNonHtReferenceRate(), ns3::WifiMode::GetUniqueName(), ns3::WifiMode::IsAllowed(), ns3::WifiMode::IsHigherDataRate(), and ns3::WifiMode::IsMandatory().
|
staticprivate |
Return a WifiModeFactory.
Definition at line 794 of file wifi-mode.cc.
References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::codingRate, ns3::WifiModeFactory::WifiModeItem::constellationSize, Get(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::mcsValue, ns3::WifiModeFactory::WifiModeItem::modClass, ns3::WifiModeFactory::WifiModeItem::uniqueUid, ns3::WIFI_CODE_RATE_UNDEFINED, and ns3::WIFI_MOD_CLASS_UNKNOWN.
Referenced by CreateWifiMcs(), CreateWifiMode(), ns3::WifiMode::GetCodeRate(), ns3::WifiMode::GetConstellationSize(), ns3::WifiMode::GetDataRate(), ns3::WifiMode::GetMcsValue(), ns3::WifiMode::GetModulationClass(), ns3::WifiMode::GetNonHtReferenceRate(), ns3::WifiMode::GetUniqueName(), ns3::WifiMode::IsAllowed(), ns3::WifiMode::IsHigherDataRate(), 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 734 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 | the input stream |
mode | the WifiMode |
Definition at line 46 of file wifi-mode.cc.
|
friend |
allow WifiMode class access
Definition at line 340 of file wifi-mode.h.
Referenced by CreateWifiMcs(), CreateWifiMode(), and Search().
|
private |
item list
Definition at line 395 of file wifi-mode.h.
Referenced by AllocateUid(), Get(), and Search().