create WifiMode class instances and keep track of them. More...
#include <wifi-mode.h>
Classes | |
struct | WifiModeItem |
Static Public Member Functions | |
static WifiMode | CreateBpsk (std::string uniqueName, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, uint32_t phyRate) |
static WifiMode | CreateQam (std::string uniqueName, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, uint32_t phyRate, uint8_t constellationSize) |
Private Types | |
typedef std::vector< struct WifiModeItem > | WifiModeItemList |
Private Member Functions | |
WifiModeFactory () | |
bool | Search (std::string name, WifiMode *mode) |
uint32_t | AllocateUid (std::string uniqueName) |
WifiModeItem * | Get (uint32_t uid) |
Static Private Member Functions | |
static WifiModeFactory * | GetFactory () |
Private Attributes | |
WifiModeItemList | m_itemList |
Friends | |
class | WifiMode |
std::istream & | operator>> (std::istream &is, WifiMode &mode) |
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 133 of file wifi-mode.h.
typedef std::vector<struct WifiModeItem> ns3::WifiModeFactory::WifiModeItemList [private] |
Definition at line 198 of file wifi-mode.h.
ns3::WifiModeFactory::WifiModeFactory | ( | ) | [private] |
Definition at line 120 of file wifi-mode.cc.
uint32_t ns3::WifiModeFactory::AllocateUid | ( | std::string | uniqueName | ) | [private] |
Definition at line 182 of file wifi-mode.cc.
References m_itemList.
Referenced by CreateBpsk(), CreateQam(), and GetFactory().
WifiMode ns3::WifiModeFactory::CreateBpsk | ( | std::string | uniqueName, | |
bool | isMandatory, | |||
uint32_t | bandwidth, | |||
uint32_t | dataRate, | |||
uint32_t | phyRate | |||
) | [static] |
uniqueName | the name of the associated WifiMode. This name must be unique accross _all_ instances. | |
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 | |
phyRate | the rate (bits/second) at which the encoded user data is transmitted The phyRate includes FEC so, is typically higher than the dataRate. |
Create a BPSK WifiMode.
Definition at line 124 of file wifi-mode.cc.
References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::bandwidth, ns3::WifiMode::BPSK, ns3::WifiModeFactory::WifiModeItem::constellationSize, ns3::WifiModeFactory::WifiModeItem::dataRate, Get(), GetFactory(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::modulation, ns3::WifiModeFactory::WifiModeItem::phyRate, ns3::WifiModeFactory::WifiModeItem::uniqueUid, and WifiMode.
Referenced by ns3::WifiPhy::Get12mba(), ns3::WifiPhy::Get18mba(), ns3::WifiPhy::Get24mba(), ns3::WifiPhy::Get36mba(), ns3::WifiPhy::Get48mba(), ns3::WifiPhy::Get54mba(), ns3::WifiPhy::Get6mba(), and ns3::WifiPhy::Get9mba().
WifiMode ns3::WifiModeFactory::CreateQam | ( | std::string | uniqueName, | |
bool | isMandatory, | |||
uint32_t | bandwidth, | |||
uint32_t | dataRate, | |||
uint32_t | phyRate, | |||
uint8_t | constellationSize | |||
) | [static] |
uniqueName | the name of the associated WifiMode. This name must be unique accross _all_ instances. | |
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 | |
phyRate | the rate (bits/second) at which the encoded user data is transmitted The phyRate includes FEC so, is typically higher than the dataRate. | |
constellationSize | the number of elements included in the QAM constellation. |
Create a QAM WifiMode.
Definition at line 143 of file wifi-mode.cc.
References AllocateUid(), ns3::WifiModeFactory::WifiModeItem::bandwidth, ns3::WifiModeFactory::WifiModeItem::constellationSize, ns3::WifiModeFactory::WifiModeItem::dataRate, Get(), GetFactory(), ns3::WifiModeFactory::WifiModeItem::isMandatory, ns3::WifiModeFactory::WifiModeItem::modulation, ns3::WifiModeFactory::WifiModeItem::phyRate, ns3::WifiMode::QAM, ns3::WifiModeFactory::WifiModeItem::uniqueUid, and WifiMode.
struct WifiModeFactory::WifiModeItem * ns3::WifiModeFactory::Get | ( | uint32_t | uid | ) | [read, private] |
Definition at line 200 of file wifi-mode.cc.
References m_itemList, and NS_ASSERT.
Referenced by CreateBpsk(), CreateQam(), ns3::WifiMode::GetBandwidth(), ns3::WifiMode::GetConstellationSize(), ns3::WifiMode::GetDataRate(), ns3::WifiMode::GetModulationType(), ns3::WifiMode::GetPhyRate(), ns3::WifiMode::GetUniqueName(), ns3::WifiMode::IsMandatory(), ns3::WifiMode::IsModulationBpsk(), and ns3::WifiMode::IsModulationQam().
WifiModeFactory * ns3::WifiModeFactory::GetFactory | ( | void | ) | [static, private] |
Definition at line 207 of file wifi-mode.cc.
References AllocateUid().
Referenced by CreateBpsk(), CreateQam(), ns3::WifiMode::GetBandwidth(), ns3::WifiMode::GetConstellationSize(), ns3::WifiMode::GetDataRate(), ns3::WifiMode::GetModulationType(), ns3::WifiMode::GetPhyRate(), ns3::WifiMode::GetUniqueName(), ns3::WifiMode::IsMandatory(), ns3::WifiMode::IsModulationBpsk(), ns3::WifiMode::IsModulationQam(), and ns3::WifiMode::WifiMode().
bool ns3::WifiModeFactory::Search | ( | std::string | name, | |
WifiMode * | mode | |||
) | [private] |
Definition at line 164 of file wifi-mode.cc.
References m_itemList, and WifiMode.
std::istream& operator>> | ( | std::istream & | is, | |
WifiMode & | mode | |||
) | [friend] |
friend class WifiMode [friend] |
Definition at line 174 of file wifi-mode.h.
Referenced by CreateBpsk(), CreateQam(), and Search().
Definition at line 199 of file wifi-mode.h.
Referenced by AllocateUid(), Get(), and Search().