A Discrete-Event Network Simulator
API
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
ns3::UanTxMode Class Reference

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
 

Detailed Description

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.

Member Enumeration Documentation

◆ ModulationType

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.

Constructor & Destructor Documentation

◆ UanTxMode()

ns3::UanTxMode::UanTxMode ( )

Constructor.

Definition at line 29 of file uan-tx-mode.cc.

◆ ~UanTxMode()

ns3::UanTxMode::~UanTxMode ( )

Destructor.

Definition at line 33 of file uan-tx-mode.cc.

Member Function Documentation

◆ GetBandwidthHz()

uint32_t ns3::UanTxMode::GetBandwidthHz ( void  ) const

◆ GetCenterFreqHz()

uint32_t ns3::UanTxMode::GetCenterFreqHz ( void  ) const

◆ GetConstellationSize()

uint32_t ns3::UanTxMode::GetConstellationSize ( void  ) const

Get the number of constellation points in the modulation scheme.

Returns
Number of constellation points.

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().

◆ GetDataRateBps()

uint32_t ns3::UanTxMode::GetDataRateBps ( void  ) const

◆ GetModType()

UanTxMode::ModulationType ns3::UanTxMode::GetModType ( void  ) const

◆ GetName()

std::string ns3::UanTxMode::GetName ( void  ) const

◆ GetPhyRateSps()

uint32_t ns3::UanTxMode::GetPhyRateSps ( void  ) const

Get the physical signaling rate.

Returns
PHY rate in symbols per second.

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().

◆ GetUid()

uint32_t ns3::UanTxMode::GetUid ( void  ) const

Get a unique id for the mode.

Returns
Unique ID.

Definition at line 81 of file uan-tx-mode.cc.

References m_uid.

Referenced by ns3::UanPhyGen::StartRxPacket().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const UanTxMode mode 
)
friend

Writes tx mode entry to stream os.

Parameters
osThe output stream.
modeThe mode.
Returns
The stream.

Definition at line 87 of file uan-tx-mode.cc.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
UanTxMode mode 
)
friend

Reads tx mode entry from stream is.

Parameters
isThe input stream.
modeThe mode.
Returns
The stream.

Definition at line 94 of file uan-tx-mode.cc.

◆ UanTxModeFactory

friend class UanTxModeFactory
friend

Definition at line 106 of file uan-tx-mode.h.

Member Data Documentation

◆ m_uid

uint32_t ns3::UanTxMode::m_uid
private

The documentation for this class was generated from the following files: