110 for (; it !=
m_modes.end(); it++)
112 if ((*it).second.m_name == name)
135 NS_LOG_WARN(
"Redefining UanTxMode with name \"" << name <<
"\"");
159 NS_FATAL_ERROR(
"Attempting to retrieve UanTxMode with uid, " << uid <<
", >= m_nextUid");
169 for (; it !=
m_modes.end(); it++)
171 if ((*it).second.m_name == name)
176 NS_FATAL_ERROR(
"Unknown mode, \"" << name <<
"\", requested from mode factory");
230 for (
uint32_t i = 0; i < modeNum; i++)
272 is.setstate(std::ios_base::failbit);
278 if (numModes == 0 && is.peek() == std::istream::traits_type::eof())
284 for (i = 0; is.peek() != std::istream::traits_type::eof() && i < numModes; i++)
289 is.setstate(std::ios_base::failbit);
295 is.setstate(std::ios_base::failbit);
Container for UanTxModes.
void DeleteMode(uint32_t num)
Delete the mode at given index.
UanModesList()
Constructor.
uint32_t GetNModes() const
Get the number of modes in this list.
void AppendMode(UanTxMode mode)
Add mode to this list.
UanTxMode operator[](uint32_t index) const
Retrieve a mode by index.
virtual ~UanModesList()
Destructor.
std::vector< UanTxMode > m_modes
The vector of modes in this list.
Global database of UanTxMode objects, retrievable by id or name.
static UanTxMode CreateMode(UanTxMode::ModulationType type, uint32_t dataRateBps, uint32_t phyRateSps, uint32_t cfHz, uint32_t bwHz, uint32_t constSize, std::string name)
UanTxMode MakeModeFromItem(const UanTxModeItem &item)
Create a public UanTxMode from an internal UanTxModeItem.
UanTxModeFactory()
Constructor.
static UanTxModeFactory & GetFactory()
Construct and get the static global factory instance.
static UanTxMode GetMode(std::string name)
Get a mode by name.
std::map< uint32_t, UanTxModeItem > m_modes
Container for modes.
~UanTxModeFactory()
Destructor.
bool NameUsed(std::string name)
Check if the mode name already exists.
uint32_t m_nextUid
next id number
UanTxModeItem & GetModeItem(uint32_t uid)
Get a mode by id.
Abstraction of packet modulation information.
uint32_t GetUid() const
Get a unique id for the mode.
ModulationType
Modulation type.
uint32_t GetConstellationSize() const
Get the number of constellation points in the modulation scheme.
uint32_t GetPhyRateSps() const
Get the physical signaling rate.
uint32_t GetDataRateBps() const
Get the data rate of the transmit mode.
uint32_t GetBandwidthHz() const
Get the transmission signal bandwidth.
std::string GetName() const
Get the mode name.
ModulationType GetModType() const
Get the modulation type of the mode.
uint32_t GetCenterFreqHz() const
Get the transmission center frequency.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
std::istream & operator>>(std::istream &is, Angles &a)
Container for the UanTxMode properties.
uint32_t m_constSize
Modulation constellation size (2 for BPSK, 4 for QPSK).
uint32_t m_phyRateSps
Symbol rate in symbols per second.
std::string m_name
Unique string name for this transmission mode.
UanTxMode::ModulationType m_type
Modulation type.
uint32_t m_bwHz
Bandwidth in Hz.
uint32_t m_dataRateBps
Data rate in BPS.
uint32_t m_cfHz
Center frequency in Hz.