INET Framework for OMNeT++/OMNEST
inet::physicallayer::Ieee80211HTDataMode Class Reference

#include <Ieee80211HTMode.h>

Inheritance diagram for inet::physicallayer::Ieee80211HTDataMode:
inet::physicallayer::IIeee80211DataMode inet::physicallayer::Ieee80211HTModeBase inet::physicallayer::Ieee80211HTTimingRelatedParametersBase inet::physicallayer::IPrintableObject

Public Member Functions

 Ieee80211HTDataMode (const Ieee80211HTMCS *modulationAndCodingScheme, const Hz bandwidth, GuardIntervalType guardIntervalType)
 
int getServiceBitLength () const
 
int getTailBitLength () const
 
virtual int getNumberOfSpatialStreams () const override
 
virtual int getBitLength (int dataBitLength) const override
 
virtual const simtime_t getDuration (int dataBitLength) const override
 
virtual bps getNetBitrate () const override
 
virtual bps getGrossBitrate () const override
 
virtual const Ieee80211HTMCSgetModulationAndCodingScheme () const
 
virtual const Ieee80211HTCodegetCode () const
 
virtual const Ieee80211OFDMModulationgetModulation () const override
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const
 Prints this object to the provided output stream. More...
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 
- Public Member Functions inherited from inet::physicallayer::Ieee80211HTModeBase
 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 unsigned int getMcsIndex () const
 
virtual Hz getBandwidth () const
 

Protected Member Functions

bps computeGrossBitrate () const override
 
bps computeNetBitrate () const override
 
unsigned int computeNumberOfSpatialStreams (const Ieee80211OFDMModulation *stream1Modulation, const Ieee80211OFDMModulation *stream2Modulation, const Ieee80211OFDMModulation *stream3Modulation, const Ieee80211OFDMModulation *stream4Modulation) const
 
unsigned int computeNumberOfCodedBitsPerSubcarrierSum () const
 
unsigned int computeNumberOfBccEncoders () const
 

Protected Attributes

const Ieee80211HTMCSmodulationAndCodingScheme
 
const unsigned int numberOfBccEncoders
 
- Protected Attributes inherited from inet::physicallayer::Ieee80211HTModeBase
const Hz bandwidth
 
const GuardIntervalType guardIntervalType
 
const unsigned int mcsIndex
 
const unsigned int numberOfSpatialStreams
 
bps netBitrate
 
bps grossBitrate
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
- Public Types inherited from inet::physicallayer::Ieee80211HTModeBase
enum  GuardIntervalType { HT_GUARD_INTERVAL_SHORT, HT_GUARD_INTERVAL_LONG }
 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211HTDataMode::Ieee80211HTDataMode ( const Ieee80211HTMCS modulationAndCodingScheme,
const Hz  bandwidth,
GuardIntervalType  guardIntervalType 
)
69  :
73 {
74 }
virtual const Ieee80211OFDMModulation * getModulation() const
Definition: Ieee80211HTMode.h:190
virtual const Ieee80211OFDMModulation * getStreamExtension2Modulation() const
Definition: Ieee80211HTMode.h:192
const unsigned int numberOfBccEncoders
Definition: Ieee80211HTMode.h:201
virtual const Ieee80211OFDMModulation * getStreamExtension1Modulation() const
Definition: Ieee80211HTMode.h:191
unsigned int getMcsIndex() const
Definition: Ieee80211HTMode.h:189
unsigned int computeNumberOfBccEncoders() const
Definition: Ieee80211HTMode.cc:280
const GuardIntervalType guardIntervalType
Definition: Ieee80211HTMode.h:52
const Hz bandwidth
Definition: Ieee80211HTMode.h:51
virtual const Ieee80211OFDMModulation * getStreamExtension3Modulation() const
Definition: Ieee80211HTMode.h:193
const Ieee80211HTMCS * modulationAndCodingScheme
Definition: Ieee80211HTMode.h:200
Ieee80211HTModeBase(unsigned int modulationAndCodingScheme, unsigned int numberOfSpatialStreams, const Hz bandwidth, GuardIntervalType guardIntervalType)
Definition: Ieee80211HTMode.cc:36
unsigned int computeNumberOfSpatialStreams(const Ieee80211OFDMModulation *stream1Modulation, const Ieee80211OFDMModulation *stream2Modulation, const Ieee80211OFDMModulation *stream3Modulation, const Ieee80211OFDMModulation *stream4Modulation) const
Definition: Ieee80211HTMode.cc:265

Member Function Documentation

bps inet::physicallayer::Ieee80211HTDataMode::computeGrossBitrate ( ) const
overrideprotectedvirtual

Implements inet::physicallayer::Ieee80211HTModeBase.

207 {
208  unsigned int numberOfCodedBitsPerSubcarrierSum = computeNumberOfCodedBitsPerSubcarrierSum();
209  unsigned int numberOfCodedBitsPerSymbol = numberOfCodedBitsPerSubcarrierSum * getNumberOfDataSubcarriers();
211  return bps(numberOfCodedBitsPerSymbol / getSymbolInterval());
213  return bps(numberOfCodedBitsPerSymbol / getShortGISymbolInterval());
214  else
215  throw cRuntimeError("Unknown guard interval type");
216 }
const GuardIntervalType guardIntervalType
Definition: Ieee80211HTMode.h:52
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
unsigned int computeNumberOfCodedBitsPerSubcarrierSum() const
Definition: Ieee80211HTMode.cc:271
virtual int getNumberOfDataSubcarriers() const
Definition: Ieee80211HTMode.cc:237
bps inet::physicallayer::Ieee80211HTDataMode::computeNetBitrate ( ) const
overrideprotectedvirtual

Implements inet::physicallayer::Ieee80211HTModeBase.

219 {
221 }
virtual const Ieee80211HTCode * getCode() const
Definition: Ieee80211HTMode.h:222
virtual bps getGrossBitrate() const override
Definition: Ieee80211HTMode.h:220
const IForwardErrorCorrection * getForwardErrorCorrection() const
Definition: Ieee80211HTCode.h:40
unsigned int inet::physicallayer::Ieee80211HTDataMode::computeNumberOfBccEncoders ( ) const
protected
281 {
282  // When the BCC FEC encoder is used, a single encoder is used, except that two encoders
283  // are used when the selected MCS has a PHY rate greater than 300 Mb/s (see 20.6).
284  return getGrossBitrate() > Mbps(300) ? 2 : 1;
285 }
scale< bps, 1, 1000000 > Mbps
Definition: Units.h:987
virtual bps getGrossBitrate() const override
Definition: Ieee80211HTMode.h:220
unsigned int inet::physicallayer::Ieee80211HTDataMode::computeNumberOfCodedBitsPerSubcarrierSum ( ) const
protected
272 {
273  return
278 }
virtual const Ieee80211OFDMModulation * getModulation() const
Definition: Ieee80211HTMode.h:190
virtual const Ieee80211OFDMModulation * getStreamExtension2Modulation() const
Definition: Ieee80211HTMode.h:192
virtual const Ieee80211OFDMModulation * getStreamExtension1Modulation() const
Definition: Ieee80211HTMode.h:191
const APSKModulationBase * getSubcarrierModulation() const
Definition: Ieee80211OFDMModulation.h:34
virtual const Ieee80211OFDMModulation * getStreamExtension3Modulation() const
Definition: Ieee80211HTMode.h:193
const Ieee80211HTMCS * modulationAndCodingScheme
Definition: Ieee80211HTMode.h:200
virtual unsigned int getCodeWordSize() const override
Definition: APSKModulationBase.h:47
unsigned int inet::physicallayer::Ieee80211HTDataMode::computeNumberOfSpatialStreams ( const Ieee80211OFDMModulation stream1Modulation,
const Ieee80211OFDMModulation stream2Modulation,
const Ieee80211OFDMModulation stream3Modulation,
const Ieee80211OFDMModulation stream4Modulation 
) const
protected
266 {
267  return (stream1Modulation ? 1 : 0) + (stream2Modulation ? 1 : 0) +
268  (stream3Modulation ? 1 : 0) + (stream4Modulation ? 1 : 0);
269 }
int inet::physicallayer::Ieee80211HTDataMode::getBitLength ( int  dataBitLength) const
overridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

261 {
262  return getServiceBitLength() + getTailBitLength() + dataBitLength; // TODO: padding?
263 }
int getTailBitLength() const
Definition: Ieee80211HTMode.h:214
int getServiceBitLength() const
Definition: Ieee80211HTMode.h:213
virtual const Ieee80211HTCode* inet::physicallayer::Ieee80211HTDataMode::getCode ( ) const
inlinevirtual
222 { return modulationAndCodingScheme->getCode(); }
const Ieee80211HTMCS * modulationAndCodingScheme
Definition: Ieee80211HTMode.h:200
const Ieee80211HTCode * getCode() const
Definition: Ieee80211HTMode.h:188
const simtime_t inet::physicallayer::Ieee80211HTDataMode::getDuration ( int  dataBitLength) const
overridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

Referenced by inet::physicallayer::Ieee80211HTMode::getDuration().

288 {
289  unsigned int numberOfCodedBitsPerSubcarrierSum = computeNumberOfCodedBitsPerSubcarrierSum();
290  unsigned int numberOfCodedBitsPerSymbol = numberOfCodedBitsPerSubcarrierSum * getNumberOfDataSubcarriers();
291  const IForwardErrorCorrection *forwardErrorCorrection = getCode() ? getCode()->getForwardErrorCorrection() : nullptr;
292  unsigned int dataBitsPerSymbol = forwardErrorCorrection ? forwardErrorCorrection->getDecodedLength(numberOfCodedBitsPerSymbol) : numberOfCodedBitsPerSymbol;
293  int numberOfSymbols = lrint(ceil((double)getBitLength(dataBitLength) / dataBitsPerSymbol)); // TODO: getBitLength(dataBitLength) should be divisible by dataBitsPerSymbol
294  return numberOfSymbols * getSymbolInterval();
295 }
virtual int getBitLength(int dataBitLength) const override
Definition: Ieee80211HTMode.cc:260
virtual const Ieee80211HTCode * getCode() const
Definition: Ieee80211HTMode.h:222
unsigned int computeNumberOfCodedBitsPerSubcarrierSum() const
Definition: Ieee80211HTMode.cc:271
virtual int getDecodedLength(int encodedLength) const =0
virtual int getNumberOfDataSubcarriers() const
Definition: Ieee80211HTMode.cc:237
const IForwardErrorCorrection * getForwardErrorCorrection() const
Definition: Ieee80211HTCode.h:40
virtual bps inet::physicallayer::Ieee80211HTDataMode::getGrossBitrate ( ) const
inlineoverridevirtual

Reimplemented from inet::physicallayer::Ieee80211HTModeBase.

virtual bps getGrossBitrate() const
Definition: Ieee80211HTMode.cc:230
virtual const Ieee80211OFDMModulation* inet::physicallayer::Ieee80211HTDataMode::getModulation ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

virtual const Ieee80211OFDMModulation * getModulation() const
Definition: Ieee80211HTMode.h:190
const Ieee80211HTMCS * modulationAndCodingScheme
Definition: Ieee80211HTMode.h:200
virtual const Ieee80211HTMCS* inet::physicallayer::Ieee80211HTDataMode::getModulationAndCodingScheme ( ) const
inlinevirtual
221 { return modulationAndCodingScheme; }
const Ieee80211HTMCS * modulationAndCodingScheme
Definition: Ieee80211HTMode.h:200
virtual bps inet::physicallayer::Ieee80211HTDataMode::getNetBitrate ( ) const
inlineoverridevirtual

Reimplemented from inet::physicallayer::Ieee80211HTModeBase.

virtual bps getNetBitrate() const
Definition: Ieee80211HTMode.cc:223
virtual int inet::physicallayer::Ieee80211HTDataMode::getNumberOfSpatialStreams ( ) const
inlineoverridevirtual
int inet::physicallayer::Ieee80211HTDataMode::getServiceBitLength ( ) const
inline
213 { return 16; }
int inet::physicallayer::Ieee80211HTDataMode::getTailBitLength ( ) const
inline
214 { return 6 * numberOfBccEncoders; }
const unsigned int numberOfBccEncoders
Definition: Ieee80211HTMode.h:201

Member Data Documentation

const Ieee80211HTMCS* inet::physicallayer::Ieee80211HTDataMode::modulationAndCodingScheme
protected
const unsigned int inet::physicallayer::Ieee80211HTDataMode::numberOfBccEncoders
protected

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