Abstraction of packet modulation information. More...
#include "uan-tx-mode.h"
Public Types | |
enum | ModulationType { PSK , QAM , FSK , OTHER } |
Modulation type. More... | |
Public Member Functions | |
UanTxMode () | |
Constructor. More... | |
~UanTxMode () | |
Destructor. More... | |
uint32_t | GetBandwidthHz (void) const |
Get the transmission signal bandwidth. More... | |
uint32_t | GetCenterFreqHz (void) const |
Get the transmission center frequency. More... | |
uint32_t | GetConstellationSize (void) const |
Get the number of constellation points in the modulation scheme. More... | |
uint32_t | GetDataRateBps (void) const |
Get the data rate of the transmit mode. More... | |
ModulationType | GetModType (void) const |
Get the modulation type of the mode. More... | |
std::string | GetName (void) const |
Get the mode name. More... | |
uint32_t | GetPhyRateSps (void) const |
Get the physical signaling rate. More... | |
uint32_t | GetUid (void) const |
Get a unique id for the mode. More... | |
Private Attributes | |
uint32_t | m_uid |
Mode id. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const UanTxMode &mode) |
Writes tx mode entry to stream os. More... | |
std::istream & | operator>> (std::istream &is, UanTxMode &mode) |
Reads tx mode entry from stream is. More... | |
class | UanTxModeFactory |
Abstraction of packet modulation information.
This contains a lightweight globally unique id for the mode. Mode details are held in the UanTxModeFactory. Attributes are set in by the UanTxModeFactory constructor.
Definition at line 41 of file uan-tx-mode.h.
Modulation type.
Enumerator | |
---|---|
PSK | Phase shift keying. |
QAM | Quadrature amplitude modulation. |
FSK | Frequency shift keying. |
OTHER | Unspecified/undefined. |
Definition at line 50 of file uan-tx-mode.h.
ns3::UanTxMode::UanTxMode | ( | ) |
Constructor.
Definition at line 29 of file uan-tx-mode.cc.
ns3::UanTxMode::~UanTxMode | ( | ) |
Destructor.
Definition at line 33 of file uan-tx-mode.cc.
uint32_t ns3::UanTxMode::GetBandwidthHz | ( | void | ) | const |
Get the transmission signal bandwidth.
Definition at line 63 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_bwHz, and m_uid.
Referenced by ns3::UanPhyPerCommonModes::CalcPer(), ns3::UanPhyCalcSinrDual::CalcSinrDb(), and ns3::UanPhyGen::CalculateSinrDb().
uint32_t ns3::UanTxMode::GetCenterFreqHz | ( | void | ) | const |
Get the transmission center frequency.
Definition at line 57 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_cfHz, and m_uid.
Referenced by ns3::UanPhyCalcSinrDual::CalcSinrDb(), ns3::UanPhyGen::CalculateSinrDb(), and ns3::UanPropModelThorp::GetPathLossDb().
uint32_t ns3::UanTxMode::GetConstellationSize | ( | void | ) | const |
Get the number of constellation points in the modulation scheme.
Definition at line 69 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_constSize, and m_uid.
Referenced by ns3::UanPhyPerUmodem::CalcPer(), ns3::UanPhyPerCommonModes::CalcPer(), and ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
uint32_t ns3::UanTxMode::GetDataRateBps | ( | void | ) | const |
Get the data rate of the transmit mode.
Definition at line 45 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_dataRateBps, and m_uid.
Referenced by ns3::UanPhyPerCommonModes::CalcPer(), ns3::UanTransducerHd::Receive(), ns3::UanPhyGen::SendPacket(), ns3::UanPhyGen::StartRxPacket(), and ns3::UanTransducerHd::Transmit().
UanTxMode::ModulationType ns3::UanTxMode::GetModType | ( | void | ) | const |
Get the modulation type of the mode.
Definition at line 39 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_type, and m_uid.
Referenced by ns3::UanPhyPerUmodem::CalcPer(), ns3::UanPhyPerCommonModes::CalcPer(), ns3::UanPhyCalcSinrDual::CalcSinrDb(), ns3::UanPhyCalcSinrDefault::CalcSinrDb(), and ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
std::string ns3::UanTxMode::GetName | ( | void | ) | const |
Get the mode name.
Definition at line 75 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_name, and m_uid.
Referenced by ns3::UanPhyCalcSinrDual::CalcSinrDb().
uint32_t ns3::UanTxMode::GetPhyRateSps | ( | void | ) | const |
Get the physical signaling rate.
Definition at line 51 of file uan-tx-mode.cc.
References ns3::UanTxModeFactory::GetFactory(), ns3::UanTxModeFactory::GetModeItem(), ns3::UanTxModeFactory::UanTxModeItem::m_phyRateSps, and m_uid.
Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
uint32_t ns3::UanTxMode::GetUid | ( | void | ) | const |
Get a unique id for the mode.
Definition at line 81 of file uan-tx-mode.cc.
References m_uid.
Referenced by ns3::UanPhyGen::StartRxPacket().
|
friend |
Writes tx mode entry to stream os.
os | The output stream. |
mode | The mode. |
Definition at line 86 of file uan-tx-mode.cc.
|
friend |
Reads tx mode entry from stream is.
is | The input stream. |
mode | The mode. |
Definition at line 94 of file uan-tx-mode.cc.
|
friend |
Definition at line 106 of file uan-tx-mode.h.
|
private |
Mode id.
Definition at line 111 of file uan-tx-mode.h.
Referenced by GetBandwidthHz(), GetCenterFreqHz(), GetConstellationSize(), GetDataRateBps(), GetModType(), GetName(), GetPhyRateSps(), GetUid(), and ns3::UanTxModeFactory::MakeModeFromItem().