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

Enumerator
HT_GUARD_INTERVAL_SHORT 
HT_GUARD_INTERVAL_LONG 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211HTModeBase::Ieee80211HTModeBase ( unsigned int  modulationAndCodingScheme,
unsigned int  numberOfSpatialStreams,
const Hz  bandwidth,
GuardIntervalType  guardIntervalType 
)
36  :
39  mcsIndex(modulationAndCodingScheme),
41  netBitrate(bps(NaN)),
43 {
44 }
const unsigned int numberOfSpatialStreams
Definition: Ieee80211HTMode.h:54
const unsigned int mcsIndex
Definition: Ieee80211HTMode.h:53
bps netBitrate
Definition: Ieee80211HTMode.h:56
const GuardIntervalType guardIntervalType
Definition: Ieee80211HTMode.h:52
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
const Hz bandwidth
Definition: Ieee80211HTMode.h:51
#define NaN
Definition: INETMath.h:103
bps grossBitrate
Definition: Ieee80211HTMode.h:57

Member Function Documentation

virtual bps inet::physicallayer::Ieee80211HTModeBase::computeGrossBitrate ( ) const
protectedpure virtual
virtual bps inet::physicallayer::Ieee80211HTModeBase::computeNetBitrate ( ) const
protectedpure virtual
virtual Hz inet::physicallayer::Ieee80211HTModeBase::getBandwidth ( ) const
inlinevirtual
72 { return bandwidth; }
const Hz bandwidth
Definition: Ieee80211HTMode.h:51
bps inet::physicallayer::Ieee80211HTModeBase::getGrossBitrate ( ) const
virtual
virtual GuardIntervalType inet::physicallayer::Ieee80211HTModeBase::getGuardIntervalType ( ) const
inlinevirtual
69 { return guardIntervalType; }
const GuardIntervalType guardIntervalType
Definition: Ieee80211HTMode.h:52
virtual unsigned int inet::physicallayer::Ieee80211HTModeBase::getMcsIndex ( ) const
inlinevirtual
71 { return mcsIndex; }
const unsigned int mcsIndex
Definition: Ieee80211HTMode.h:53
bps inet::physicallayer::Ieee80211HTModeBase::getNetBitrate ( ) const
virtual

Reimplemented in inet::physicallayer::Ieee80211HTDataMode, and inet::physicallayer::Ieee80211HTSignalMode.

Referenced by inet::physicallayer::Ieee80211HTSignalMode::getNetBitrate(), and inet::physicallayer::Ieee80211HTDataMode::getNetBitrate().

224 {
225  if (std::isnan(netBitrate.get()))
227  return netBitrate;
228 }
const value_type & get() const
Definition: Units.h:89
virtual bps computeNetBitrate() const =0
bps netBitrate
Definition: Ieee80211HTMode.h:56
int inet::physicallayer::Ieee80211HTModeBase::getNumberOfDataSubcarriers ( ) const
virtual
238 {
239  if (bandwidth == MHz(20))
240  return 52;
241  else if (bandwidth == MHz(40))
242  // It is a special case, see Table 20-38—MCS parameters for
243  // optional 40 MHz MCS 32 format, N SS = 1, N ES = 1
244  return mcsIndex == 32 ? 48 : 108;
245  else
246  throw cRuntimeError("Unsupported bandwidth");
247 }
const unsigned int mcsIndex
Definition: Ieee80211HTMode.h:53
const Hz bandwidth
Definition: Ieee80211HTMode.h:51
mega< Hz >::type MHz
Definition: Units.h:906
int inet::physicallayer::Ieee80211HTModeBase::getNumberOfPilotSubcarriers ( ) const
virtual
250 {
251  if (bandwidth == MHz(20))
252  return 4;
253  else if (bandwidth == MHz(40))
254  // It is a spacial case, see the comment above.
255  return mcsIndex == 32 ? 4 : 6;
256  else
257  throw cRuntimeError("Unsupported bandwidth");
258 }
const unsigned int mcsIndex
Definition: Ieee80211HTMode.h:53
const Hz bandwidth
Definition: Ieee80211HTMode.h:51
mega< Hz >::type MHz
Definition: Units.h:906
virtual int inet::physicallayer::Ieee80211HTModeBase::getNumberOfSpatialStreams ( ) const
inlinevirtual
virtual int inet::physicallayer::Ieee80211HTModeBase::getNumberOfTotalSubcarriers ( ) const
inlinevirtual
virtual int getNumberOfPilotSubcarriers() const
Definition: Ieee80211HTMode.cc:249
virtual int getNumberOfDataSubcarriers() const
Definition: Ieee80211HTMode.cc:237

Member Data Documentation

const Hz inet::physicallayer::Ieee80211HTModeBase::bandwidth
protected
bps inet::physicallayer::Ieee80211HTModeBase::grossBitrate
mutableprotected
const GuardIntervalType inet::physicallayer::Ieee80211HTModeBase::guardIntervalType
protected
const unsigned int inet::physicallayer::Ieee80211HTModeBase::mcsIndex
protected
bps inet::physicallayer::Ieee80211HTModeBase::netBitrate
mutableprotected
const unsigned int inet::physicallayer::Ieee80211HTModeBase::numberOfSpatialStreams
protected

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