INET Framework for OMNeT++/OMNEST
inet::physicallayer::Ieee80211HtModeBase Class Referenceabstract

#include <Ieee80211HtMode.h>

Inheritance diagram for inet::physicallayer::Ieee80211HtModeBase:
inet::physicallayer::Ieee80211HtDataMode inet::physicallayer::Ieee80211HtSignalMode

Public Types

enum  GuardIntervalType { HT_GUARD_INTERVAL_SHORT, HT_GUARD_INTERVAL_LONG }
 

Public Member Functions

 Ieee80211HtModeBase (unsigned int modulationAndCodingScheme, unsigned int numberOfSpatialStreams, const Hz bandwidth, GuardIntervalType guardIntervalType)
 
virtual int getNumberOfDataSubcarriers () const
 
virtual int getNumberOfPilotSubcarriers () const
 
virtual int getNumberOfTotalSubcarriers () const
 
virtual GuardIntervalType getGuardIntervalType () const
 
virtual int getNumberOfSpatialStreams () const
 
virtual unsigned int getMcsIndex () const
 
virtual Hz getBandwidth () const
 
virtual bps getNetBitrate () const
 
virtual bps getGrossBitrate () const
 

Protected Member Functions

virtual bps computeGrossBitrate () const =0
 
virtual bps computeNetBitrate () const =0
 

Protected Attributes

const Hz bandwidth
 
const GuardIntervalType guardIntervalType
 
const unsigned int mcsIndex
 
const unsigned int numberOfSpatialStreams
 
bps netBitrate
 
bps grossBitrate
 

Member Enumeration Documentation

◆ GuardIntervalType

Enumerator
HT_GUARD_INTERVAL_SHORT 
HT_GUARD_INTERVAL_LONG 
34  {
35  HT_GUARD_INTERVAL_SHORT, // 400 ns
36  HT_GUARD_INTERVAL_LONG // 800 ns
37  };

Constructor & Destructor Documentation

◆ Ieee80211HtModeBase()

inet::physicallayer::Ieee80211HtModeBase::Ieee80211HtModeBase ( unsigned int  modulationAndCodingScheme,
unsigned int  numberOfSpatialStreams,
const Hz  bandwidth,
GuardIntervalType  guardIntervalType 
)
28  :
31  mcsIndex(modulationAndCodingScheme),
33  netBitrate(bps(NaN)),
35 {
36 }

Member Function Documentation

◆ computeGrossBitrate()

virtual bps inet::physicallayer::Ieee80211HtModeBase::computeGrossBitrate ( ) const
protectedpure virtual

◆ computeNetBitrate()

virtual bps inet::physicallayer::Ieee80211HtModeBase::computeNetBitrate ( ) const
protectedpure virtual

◆ getBandwidth()

virtual Hz inet::physicallayer::Ieee80211HtModeBase::getBandwidth ( ) const
inlinevirtual

Reimplemented in inet::physicallayer::Ieee80211HtDataMode.

61 { return bandwidth; }

◆ getGrossBitrate()

bps inet::physicallayer::Ieee80211HtModeBase::getGrossBitrate ( ) const
virtual

◆ getGuardIntervalType()

virtual GuardIntervalType inet::physicallayer::Ieee80211HtModeBase::getGuardIntervalType ( ) const
inlinevirtual
58 { return guardIntervalType; }

◆ getMcsIndex()

virtual unsigned int inet::physicallayer::Ieee80211HtModeBase::getMcsIndex ( ) const
inlinevirtual
60 { return mcsIndex; }

◆ getNetBitrate()

bps inet::physicallayer::Ieee80211HtModeBase::getNetBitrate ( ) const
virtual

◆ getNumberOfDataSubcarriers()

int inet::physicallayer::Ieee80211HtModeBase::getNumberOfDataSubcarriers ( ) const
virtual
226 {
227  if (bandwidth == MHz(20))
228  return 52;
229  else if (bandwidth == MHz(40))
230  // It is a special case, see Table 20-38—MCS parameters for
231  // optional 40 MHz MCS 32 format, N SS = 1, N ES = 1
232  return mcsIndex == 32 ? 48 : 108;
233  else
234  throw cRuntimeError("Unsupported bandwidth");
235 }

Referenced by inet::physicallayer::Ieee80211HtSignalMode::computeGrossBitrate(), inet::physicallayer::Ieee80211HtDataMode::computeGrossBitrate(), and inet::physicallayer::Ieee80211HtDataMode::getDuration().

◆ getNumberOfPilotSubcarriers()

int inet::physicallayer::Ieee80211HtModeBase::getNumberOfPilotSubcarriers ( ) const
virtual
238 {
239  if (bandwidth == MHz(20))
240  return 4;
241  else if (bandwidth == MHz(40))
242  // It is a spacial case, see the comment above.
243  return mcsIndex == 32 ? 4 : 6;
244  else
245  throw cRuntimeError("Unsupported bandwidth");
246 }

◆ getNumberOfSpatialStreams()

virtual int inet::physicallayer::Ieee80211HtModeBase::getNumberOfSpatialStreams ( ) const
inlinevirtual

◆ getNumberOfTotalSubcarriers()

virtual int inet::physicallayer::Ieee80211HtModeBase::getNumberOfTotalSubcarriers ( ) const
inlinevirtual

Member Data Documentation

◆ bandwidth

const Hz inet::physicallayer::Ieee80211HtModeBase::bandwidth
protected

◆ grossBitrate

bps inet::physicallayer::Ieee80211HtModeBase::grossBitrate
mutableprotected

Referenced by getGrossBitrate().

◆ guardIntervalType

const GuardIntervalType inet::physicallayer::Ieee80211HtModeBase::guardIntervalType
protected

◆ mcsIndex

const unsigned int inet::physicallayer::Ieee80211HtModeBase::mcsIndex
protected

◆ netBitrate

bps inet::physicallayer::Ieee80211HtModeBase::netBitrate
mutableprotected

Referenced by getNetBitrate().

◆ numberOfSpatialStreams

const unsigned int inet::physicallayer::Ieee80211HtModeBase::numberOfSpatialStreams
protected

The documentation for this class was generated from the following files:
inet::physicallayer::Ieee80211HtModeBase::HT_GUARD_INTERVAL_LONG
@ HT_GUARD_INTERVAL_LONG
Definition: Ieee80211HtMode.h:36
inet::physicallayer::Ieee80211HtModeBase::guardIntervalType
const GuardIntervalType guardIntervalType
Definition: Ieee80211HtMode.h:41
inet::units::units::bps
compose< b, pow< s, -1 > > bps
Definition: Units.h:1169
inet::physicallayer::Ieee80211HtModeBase::netBitrate
bps netBitrate
Definition: Ieee80211HtMode.h:45
inet::physicallayer::Ieee80211HtModeBase::computeNetBitrate
virtual bps computeNetBitrate() const =0
inet::physicallayer::Ieee80211HtModeBase::getNumberOfPilotSubcarriers
virtual int getNumberOfPilotSubcarriers() const
Definition: Ieee80211HtMode.cc:237
inet::physicallayer::Ieee80211HtModeBase::mcsIndex
const unsigned int mcsIndex
Definition: Ieee80211HtMode.h:42
inet::physicallayer::Ieee80211HtModeBase::bandwidth
const Hz bandwidth
Definition: Ieee80211HtMode.h:40
inet::physicallayer::Ieee80211HtModeBase::numberOfSpatialStreams
const unsigned int numberOfSpatialStreams
Definition: Ieee80211HtMode.h:43
NaN
#define NaN
Definition: INETMath.h:91
inet::physicallayer::Ieee80211HtModeBase::HT_GUARD_INTERVAL_SHORT
@ HT_GUARD_INTERVAL_SHORT
Definition: Ieee80211HtMode.h:35
inet::physicallayer::Ieee80211HtModeBase::grossBitrate
bps grossBitrate
Definition: Ieee80211HtMode.h:46
inet::units::value::get
const value_type & get() const
Definition: Units.h:108
inet::units::units::MHz
mega< Hz >::type MHz
Definition: Units.h:1083
inet::physicallayer::Ieee80211HtModeBase::computeGrossBitrate
virtual bps computeGrossBitrate() const =0
inet::physicallayer::Ieee80211HtModeBase::getNumberOfDataSubcarriers
virtual int getNumberOfDataSubcarriers() const
Definition: Ieee80211HtMode.cc:225