119 std::map<uint32_t, UanTxModeItem>::iterator it =
m_modes.begin ();
121 for (; it !=
m_modes.end (); it++)
123 if ((*it).second.m_name == name)
133 uint32_t dataRateBps,
147 NS_LOG_WARN (
"Redefining UanTxMode with name \"" << name <<
"\"");
172 << uid <<
", >= m_nextUid");
181 std::map<uint32_t, UanTxModeItem>::iterator it =
m_modes.begin ();
182 for (; it !=
m_modes.end (); it++)
184 if ((*it).second.m_name == name)
189 NS_FATAL_ERROR (
"Unknown mode, \"" << name <<
"\", requested from mode factory");
243 std::vector<UanTxMode>::iterator it =
m_modes.begin ();
244 for (uint32_t i = 0; i < modeNum; i++)
270 for (uint32_t i = 0; i < ml.
m_modes.size (); i++)
286 is.setstate (std::ios_base::failbit);
291 for (
int i = 0; i < numModes && !is.eof (); i++)
296 is.setstate (std::ios_base::failbit);
Global database of UanTxMode objects, retrievable by id or name.
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
uint32_t m_cfHz
Center frequency in Hz.
uint32_t GetNModes(void) const
Get the number of modes in this list.
std::string GetName(void) const
Get the mode name.
#define NS_ASSERT(condition)
UanTxModeFactory()
Constructor.
static UanTxMode GetMode(std::string name)
Get a mode by name.
Container for UanTxModes.
std::map< uint32_t, UanTxModeItem > m_modes
Container for modes.
static UanTxModeFactory & GetFactory(void)
Construct and get the static global factory instance.
virtual ~UanModesList()
Destructor.
ModulationType GetModType(void) const
Get the modulation type of the mode.
uint32_t m_constSize
Modulation constellation size (2 for BPSK, 4 for QPSK).
static UanTxMode CreateMode(UanTxMode::ModulationType type, uint32_t dataRateBps, uint32_t phyRateSps, uint32_t cfHz, uint32_t bwHz, uint32_t constSize, std::string name)
#define NS_FATAL_ERROR(msg)
fatal error handling
uint32_t m_dataRateBps
Data rate in BPS.
uint32_t GetDataRateBps(void) const
Get the data rate of the transmit mode.
UanTxModeItem & GetModeItem(uint32_t uid)
Get a mode by id.
UanTxMode::ModulationType m_type
Modulation type.
Abstraction of packet modulation information.
ModulationType
Modulation type.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
UanTxMode operator[](uint32_t index) const
Retrieve a mode by index.
std::string m_name
Unique string name for this transmission mode.
~UanTxModeFactory()
Destructor.
uint32_t m_phyRateSps
Symbol rate in symbols per second.
uint32_t GetCenterFreqHz(void) const
Get the transmission center frequency.
UanModesList()
Constructor.
uint32_t m_nextUid
next id number
uint32_t GetPhyRateSps(void) const
Get the physical signaling rate.
Container for the UanTxMode properties.
uint32_t m_bwHz
Bandwidth in Hz.
void AppendMode(UanTxMode mode)
Add mode to this list.
NS_LOG_COMPONENT_DEFINE("UanTxMode")
UanTxMode MakeModeFromItem(const UanTxModeItem &item)
Create a public UanTxMode from an internal UanTxModeItem.
uint32_t GetConstellationSize(void) const
Get the number of constellation points in the modulation scheme.
ATTRIBUTE_HELPER_CPP(ObjectFactory)
uint32_t GetBandwidthHz(void) const
Get the transmission signal bandwidth.
bool NameUsed(std::string name)
Check if the mode name already exists.
uint32_t GetUid(void) const
Get a unique id for the mode.
std::vector< UanTxMode > m_modes
The vector of modes in this list.
void DeleteMode(uint32_t num)
Delete the mode at given index.