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. | |
~UanTxModeFactory () | |
Destructor. | |
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. | |
static UanTxMode | GetMode (uint32_t uid) |
Get a mode by id. | |
Private Member Functions | |
UanTxModeItem & | GetModeItem (std::string name) |
Get a mode by name. | |
UanTxModeItem & | GetModeItem (uint32_t uid) |
Get a mode by id. | |
UanTxMode | MakeModeFromItem (const UanTxModeItem &item) |
Create a public UanTxMode from an internal UanTxModeItem. | |
bool | NameUsed (std::string name) |
Check if the mode name already exists. | |
Static Private Member Functions | |
static UanTxModeFactory & | GetFactory () |
Construct and get the static global factory instance. | |
Private Attributes | |
std::map< uint32_t, UanTxModeItem > | m_modes |
Container for modes. | |
uint32_t | m_nextUid |
next id number | |
Friends | |
class | UanTxMode |
Global database of UanTxMode objects, retrievable by id or name.
Definition at line 128 of file uan-tx-mode.h.
ns3::UanTxModeFactory::UanTxModeFactory | ( | ) |
Constructor.
Definition at line 95 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 121 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 Experiment::CreateMode(), UanTest::DoPhyTests(), and ns3::UanPhyGen::GetDefaultModes().
|
staticprivate |
Construct and get the static global factory instance.
Definition at line 203 of file uan-tx-mode.cc.
Referenced by CreateMode(), ns3::UanTxMode::GetBandwidthHz(), ns3::UanTxMode::GetCenterFreqHz(), ns3::UanTxMode::GetConstellationSize(), ns3::UanTxMode::GetDataRateBps(), GetMode(), 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 181 of file uan-tx-mode.cc.
References GetFactory(), GetModeItem(), and MakeModeFromItem().
Get a mode by id.
uid | Unique ID of mode. |
Definition at line 188 of file uan-tx-mode.cc.
References GetFactory(), GetModeItem(), and MakeModeFromItem().
|
private |
Get a mode by name.
name | The mode name to find. |
Definition at line 166 of file uan-tx-mode.cc.
References m_modes, and NS_FATAL_ERROR.
|
private |
Get a mode by id.
uid | The unique id to find. |
Definition at line 155 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(), GetMode(), ns3::UanTxMode::GetModType(), ns3::UanTxMode::GetName(), and ns3::UanTxMode::GetPhyRateSps().
|
private |
Create a public UanTxMode from an internal UanTxModeItem.
item | The UanTxModeItem to reference. |
Definition at line 195 of file uan-tx-mode.cc.
References ns3::UanTxMode::m_uid, and ns3::UanTxModeFactory::UanTxModeItem::m_uid.
Referenced by CreateMode(), GetMode(), and GetMode().
|
private |
Check if the mode name already exists.
name | The mode name to test. |
Definition at line 106 of file uan-tx-mode.cc.
References m_modes.
Referenced by CreateMode().
|
friend |
Definition at line 170 of file uan-tx-mode.h.
|
private |
Container for modes.
Definition at line 198 of file uan-tx-mode.h.
Referenced by ~UanTxModeFactory(), CreateMode(), GetModeItem(), GetModeItem(), and NameUsed().
|
private |
next id number
Definition at line 171 of file uan-tx-mode.h.
Referenced by CreateMode(), and GetModeItem().