ns3::WifiMode Class Reference

represent a single transmission mode More...

#include <wifi-mode.h>

List of all members.

Public Types

enum  ModulationType { BPSK, QAM }

Public Member Functions

uint32_t GetBandwidth (void) const
uint32_t GetPhyRate (void) const
uint32_t GetDataRate (void) const
bool IsModulationBpsk (void) const
bool IsModulationQam (void) const
enum ModulationType GetModulationType (void) const
uint8_t GetConstellationSize (void) const
std::string GetUniqueName (void) const
bool IsMandatory (void) const
uint32_t GetUid (void) const
 WifiMode ()
 WifiMode (std::string name)

Private Member Functions

 WifiMode (uint32_t uid)

Private Attributes

uint32_t m_uid

Friends

class WifiModeFactory

Detailed Description

represent a single transmission mode

A WifiMode is implemented by a single integer which is used to lookup in a global array the characteristics of the associated transmission mode. It is thus extremely cheap to keep a WifiMode variable around.

Definition at line 39 of file wifi-mode.h.


Member Enumeration Documentation

Enumerator:
BPSK 
QAM 

Definition at line 42 of file wifi-mode.h.


Constructor & Destructor Documentation

ns3::WifiMode::WifiMode (  ) 

Create an invalid WifiMode. Calling any method on the instance created will trigger an assert. This is useful to separate the declaration of a WifiMode variable from its initialization.

Definition at line 104 of file wifi-mode.cc.

ns3::WifiMode::WifiMode ( std::string  name  ) 

Definition at line 110 of file wifi-mode.cc.

References ns3::WifiModeFactory::GetFactory(), and NS_FATAL_ERROR.

ns3::WifiMode::WifiMode ( uint32_t  uid  )  [private]

Definition at line 107 of file wifi-mode.cc.


Member Function Documentation

uint32_t ns3::WifiMode::GetBandwidth ( void   )  const
uint8_t ns3::WifiMode::GetConstellationSize ( void   )  const
Returns:
the size of the modulation constellation.

Definition at line 82 of file wifi-mode.cc.

References ns3::WifiModeFactory::WifiModeItem::constellationSize, ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), and m_uid.

uint32_t ns3::WifiMode::GetDataRate ( void   )  const
enum WifiMode::ModulationType ns3::WifiMode::GetModulationType ( void   )  const
Returns:
the type of modulation used by this mode.

Definition at line 76 of file wifi-mode.cc.

References ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), m_uid, and ns3::WifiModeFactory::WifiModeItem::modulation.

Referenced by ns3::WifiRemoteStation::GetControlAnswerMode().

uint32_t ns3::WifiMode::GetPhyRate ( void   )  const
Returns:
the physical bit rate of this signal.

If a transmission mode uses 1/2 FEC, and if its data rate is 3Mbs, the phy rate is 6Mbs

Definition at line 52 of file wifi-mode.cc.

References ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), m_uid, and ns3::WifiModeFactory::WifiModeItem::phyRate.

Referenced by ns3::InterferenceHelper::CalculateChunkSuccessRate(), ns3::YansErrorRateModel::GetChunkSuccessRate(), and ns3::WifiRemoteStation::GetControlAnswerMode().

uint32_t ns3::WifiMode::GetUid ( void   )  const
Returns:
the uid associated to this wireless mode.

Each specific wireless mode should have a different uid. For example, the 802.11b 1Mbs and the 802.11b 2Mbs modes should have different uids.

Definition at line 100 of file wifi-mode.cc.

References m_uid.

std::string ns3::WifiMode::GetUniqueName ( void   )  const
Returns:
a human-readable representation of this WifiMode instance.

Definition at line 88 of file wifi-mode.cc.

References ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), m_uid, and ns3::WifiModeFactory::WifiModeItem::uniqueUid.

bool ns3::WifiMode::IsMandatory ( void   )  const
Returns:
true if this mode is a mandatory mode, false otherwise.

Definition at line 94 of file wifi-mode.cc.

References ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), ns3::WifiModeFactory::WifiModeItem::isMandatory, and m_uid.

Referenced by ns3::WifiRemoteStationManager::Reset().

bool ns3::WifiMode::IsModulationBpsk ( void   )  const
Returns:
true if this mode uses a bpsk modulation, false otherwise.

Definition at line 64 of file wifi-mode.cc.

References BPSK, ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), m_uid, and ns3::WifiModeFactory::WifiModeItem::modulation.

bool ns3::WifiMode::IsModulationQam ( void   )  const
Returns:
true if this mode uses a qam modulation, false otherwise.

Definition at line 70 of file wifi-mode.cc.

References ns3::WifiModeFactory::Get(), ns3::WifiModeFactory::GetFactory(), m_uid, ns3::WifiModeFactory::WifiModeItem::modulation, and QAM.


Friends And Related Function Documentation

friend class WifiModeFactory [friend]

Definition at line 111 of file wifi-mode.h.


Member Data Documentation

uint32_t ns3::WifiMode::m_uid [private]

The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:25 2009 for NS-3 by  doxygen 1.6.3