Global database of UanTxMode objects, retrievable by id or name. More...
#include "uan-tx-mode.h"
Classes | |
struct | UanTxModeItem |
Container for the UanTxMode properties. More... | |
Public Member Functions | |
UanTxModeFactory () | |
Constructor. More... | |
~UanTxModeFactory () | |
Destructor. More... | |
Static Public Member Functions | |
static UanTxMode | CreateMode (UanTxMode::ModulationType type, uint32_t dataRateBps, uint32_t phyRateSps, uint32_t cfHz, uint32_t bwHz, uint32_t constSize, std::string name) |
static UanTxMode | GetMode (std::string name) |
Get a mode by name. More... | |
static UanTxMode | GetMode (uint32_t uid) |
Get a mode by id. More... | |
Private Member Functions | |
UanTxModeItem & | GetModeItem (uint32_t uid) |
Get a mode by id. More... | |
UanTxModeItem & | GetModeItem (std::string name) |
Get a mode by name. More... | |
UanTxMode | MakeModeFromItem (const UanTxModeItem &item) |
Create a public UanTxMode from an internal UanTxModeItem. More... | |
bool | NameUsed (std::string name) |
Check if the mode name already exists. More... | |
Static Private Member Functions | |
static UanTxModeFactory & | GetFactory (void) |
Construct and get the static global factory instance. More... | |
Private Attributes | |
std::map< uint32_t, UanTxModeItem > | m_modes |
Container for modes. More... | |
uint32_t | m_nextUid |
next id number More... | |
Friends | |
class | UanTxMode |
Global database of UanTxMode objects, retrievable by id or name.
Definition at line 138 of file uan-tx-mode.h.
ns3::UanTxModeFactory::UanTxModeFactory | ( | ) |
Constructor.
Definition at line 107 of file uan-tx-mode.cc.
ns3::UanTxModeFactory::~UanTxModeFactory | ( | ) |
|
static |
type | Modulation type. |
dataRateBps | Data rate in BPS. |
phyRateSps | Symbol rate in symbols per second. |
cfHz | Center frequency in Hz. |
bwHz | Bandwidth in Hz. |
constSize | Modulation constellation size (2 for BPSK, 4 for QPSK). |
name | Unique string name for this transmission mode. |
Definition at line 132 of file uan-tx-mode.cc.
References GetFactory(), GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_bwHz, ns3::UanTxModeFactory::UanTxModeItem::m_cfHz, ns3::UanTxModeFactory::UanTxModeItem::m_constSize, ns3::UanTxModeFactory::UanTxModeItem::m_dataRateBps, m_modes, ns3::UanTxModeFactory::UanTxModeItem::m_name, m_nextUid, ns3::UanTxModeFactory::UanTxModeItem::m_phyRateSps, ns3::UanTxModeFactory::UanTxModeItem::m_type, ns3::UanTxModeFactory::UanTxModeItem::m_uid, MakeModeFromItem(), NameUsed(), and NS_LOG_WARN.
Referenced by ns3::UanPhyGen::GetDefaultModes().
|
staticprivate |
Construct and get the static global factory instance.
Definition at line 216 of file uan-tx-mode.cc.
Referenced by CreateMode(), ns3::UanTxMode::GetBandwidthHz(), ns3::UanTxMode::GetCenterFreqHz(), ns3::UanTxMode::GetConstellationSize(), ns3::UanTxMode::GetDataRateBps(), GetMode(), ns3::UanTxMode::GetModType(), ns3::UanTxMode::GetName(), and ns3::UanTxMode::GetPhyRateSps().
|
static |
Get a mode by name.
name | String name of mode. |
Definition at line 194 of file uan-tx-mode.cc.
References GetFactory(), GetModeItem(), and MakeModeFromItem().
|
static |
Get a mode by id.
uid | Unique ID of mode. |
Definition at line 201 of file uan-tx-mode.cc.
References GetFactory(), GetModeItem(), and MakeModeFromItem().
|
private |
Get a mode by id.
uid | The unique id to find. |
Definition at line 167 of file uan-tx-mode.cc.
References m_modes, m_nextUid, and NS_FATAL_ERROR.
Referenced by CreateMode(), ns3::UanTxMode::GetBandwidthHz(), ns3::UanTxMode::GetCenterFreqHz(), ns3::UanTxMode::GetConstellationSize(), ns3::UanTxMode::GetDataRateBps(), GetMode(), ns3::UanTxMode::GetModType(), ns3::UanTxMode::GetName(), and ns3::UanTxMode::GetPhyRateSps().
|
private |
Get a mode by name.
name | The mode name to find. |
Definition at line 179 of file uan-tx-mode.cc.
References m_modes, and NS_FATAL_ERROR.
|
private |
Create a public UanTxMode from an internal UanTxModeItem.
item | The UanTxModeItem to reference. |
Definition at line 208 of file uan-tx-mode.cc.
References ns3::UanTxMode::m_uid, and ns3::UanTxModeFactory::UanTxModeItem::m_uid.
Referenced by CreateMode(), and GetMode().
|
private |
Check if the mode name already exists.
name | The mode name to test. |
Definition at line 117 of file uan-tx-mode.cc.
References m_modes.
Referenced by CreateMode().
|
friend |
Definition at line 180 of file uan-tx-mode.h.
|
private |
Container for modes.
Definition at line 208 of file uan-tx-mode.h.
Referenced by CreateMode(), GetModeItem(), NameUsed(), and ~UanTxModeFactory().
|
private |
next id number
Definition at line 181 of file uan-tx-mode.h.
Referenced by CreateMode(), and GetModeItem().