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

#include <Ieee80211OfdmMode.h>

Inheritance diagram for inet::physicallayer::Ieee80211OfdmDataMode:
inet::physicallayer::IIeee80211DataMode inet::physicallayer::Ieee80211OfdmModeBase inet::IPrintableObject inet::physicallayer::Ieee80211OfdmTimingRelatedParametersBase

Public Member Functions

 Ieee80211OfdmDataMode (const Ieee80211OfdmCode *code, const Ieee80211OfdmModulation *modulation, Hz channelSpacing, Hz bandwidth)
 
virtual ~Ieee80211OfdmDataMode ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints this object to the provided output stream. More...
 
b getServiceFieldLength () const
 
b getTailFieldLength () const
 
virtual Hz getBandwidth () const override
 
virtual b getPaddingLength (b dataLength) const override
 
virtual b getCompleteLength (b dataLength) const override
 
virtual const simtime_t getDuration (b dataLength) const override
 
const Ieee80211OfdmCodegetCode () const
 
const Ieee80211OfdmModulationgetModulation () const override
 
virtual bps getGrossBitrate () const override
 
virtual bps getNetBitrate () const override
 
virtual int getNumberOfSpatialStreams () const override
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 
- Public Member Functions inherited from inet::physicallayer::Ieee80211OfdmModeBase
 Ieee80211OfdmModeBase (const Ieee80211OfdmModulation *modulation, const Ieee80211OfdmCode *code, Hz channelSpacing, Hz bandwidth)
 
virtual ~Ieee80211OfdmModeBase ()
 
int getNumberOfDataSubcarriers () const
 
int getNumberOfPilotSubcarriers () const
 
int getNumberOfTotalSubcarriers () const
 

Additional Inherited Members

- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 
- Protected Member Functions inherited from inet::physicallayer::Ieee80211OfdmModeBase
bps computeGrossBitrate (const Ieee80211OfdmModulation *modulation) const
 
bps computeNetBitrate (bps grossBitrate, const Ieee80211OfdmCode *code) const
 
- Protected Attributes inherited from inet::physicallayer::Ieee80211OfdmModeBase
const Ieee80211OfdmModulationmodulation
 
const Ieee80211OfdmCodecode
 
const Hz bandwidth
 
bps netBitrate
 
bps grossBitrate
 

Constructor & Destructor Documentation

◆ Ieee80211OfdmDataMode()

inet::physicallayer::Ieee80211OfdmDataMode::Ieee80211OfdmDataMode ( const Ieee80211OfdmCode code,
const Ieee80211OfdmModulation modulation,
Hz  channelSpacing,
Hz  bandwidth 
)

◆ ~Ieee80211OfdmDataMode()

virtual inet::physicallayer::Ieee80211OfdmDataMode::~Ieee80211OfdmDataMode ( )
inlinevirtual
111 {}

Member Function Documentation

◆ getBandwidth()

virtual Hz inet::physicallayer::Ieee80211OfdmDataMode::getBandwidth ( ) const
inlineoverridevirtual

◆ getCode()

◆ getCompleteLength()

b inet::physicallayer::Ieee80211OfdmDataMode::getCompleteLength ( b  dataLength) const
overridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

184 {
185  return dataLength + getTailFieldLength() + getPaddingLength(dataLength);
186 }

Referenced by getDuration().

◆ getDuration()

const simtime_t inet::physicallayer::Ieee80211OfdmDataMode::getDuration ( b  dataLength) const
overridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

189 {
190  // IEEE Std 802.11-2007, section 17.3.2.2, table 17-3
191  // corresponds to N_{DBPS} in the table
192  unsigned int codedBitsPerOFDMSymbol = modulation->getSubcarrierModulation()->getCodeWordSize() * getNumberOfDataSubcarriers();
193  const ConvolutionalCode *convolutionalCode = code ? code->getConvolutionalCode() : nullptr;
194  unsigned int dataBitsPerOFDMSymbol = convolutionalCode ? convolutionalCode->getDecodedLength(codedBitsPerOFDMSymbol) : codedBitsPerOFDMSymbol;
195  // IEEE Std 802.11-2007, section 17.3.5.3, equation (17-11)
196  unsigned int numberOfSymbols = lrint(ceil((double)(getServiceFieldLength() + getCompleteLength(dataLength)).get() / dataBitsPerOFDMSymbol));
197  // Add signal extension for ERP PHY
198  return numberOfSymbols * getSymbolInterval();
199 }

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

◆ getGrossBitrate()

virtual bps inet::physicallayer::Ieee80211OfdmDataMode::getGrossBitrate ( ) const
inlineoverridevirtual

◆ getModulation()

◆ getNetBitrate()

virtual bps inet::physicallayer::Ieee80211OfdmDataMode::getNetBitrate ( ) const
inlineoverridevirtual

◆ getNumberOfSpatialStreams()

virtual int inet::physicallayer::Ieee80211OfdmDataMode::getNumberOfSpatialStreams ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

127 { return 1; }

◆ getPaddingLength()

b inet::physicallayer::Ieee80211OfdmDataMode::getPaddingLength ( b  dataLength) const
overridevirtual

Implements inet::physicallayer::IIeee80211DataMode.

169 {
170  unsigned int codedBitsPerOFDMSymbol = modulation->getSubcarrierModulation()->getCodeWordSize() * NUMBER_OF_OFDM_DATA_SUBCARRIERS;
171  unsigned int dataBitsPerOFDMSymbol = codedBitsPerOFDMSymbol; // N_DBPS
172  if (code->getConvolutionalCode()) {
173  const ConvolutionalCode *convolutionalCode = code->getConvolutionalCode();
174  dataBitsPerOFDMSymbol = convolutionalCode->getDecodedLength(codedBitsPerOFDMSymbol);
175  }
176  unsigned int dataBitsLength = 6 + b(dataLength).get() + 16;
177  unsigned int numberOfOFDMSymbols = lrint(ceil(1.0 * dataBitsLength / dataBitsPerOFDMSymbol));
178  unsigned int numberOfBitsInTheDataField = dataBitsPerOFDMSymbol * numberOfOFDMSymbols; // N_DATA
179  unsigned int numberOfPadBits = numberOfBitsInTheDataField - dataBitsLength; // N_PAD
180  return b(numberOfPadBits);
181 }

Referenced by getCompleteLength().

◆ getServiceFieldLength()

b inet::physicallayer::Ieee80211OfdmDataMode::getServiceFieldLength ( ) const
inline
115 { return b(16); }

Referenced by getDuration().

◆ getTailFieldLength()

b inet::physicallayer::Ieee80211OfdmDataMode::getTailFieldLength ( ) const
inline
116 { return b(6); }

Referenced by getCompleteLength().

◆ printToStream()

std::ostream & inet::physicallayer::Ieee80211OfdmDataMode::printToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
overridevirtual

Prints this object to the provided output stream.

Reimplemented from inet::IPrintableObject.

150 {
151  stream << "Ieee80211OfdmDataMode";
152  if (level <= PRINT_LEVEL_DETAIL)
153  stream << EV_FIELD(netBitrate);
154  return stream;
155 }

The documentation for this class was generated from the following files:
inet::physicallayer::Ieee80211OfdmModeBase::bandwidth
const Hz bandwidth
Definition: Ieee80211OfdmMode.h:39
inet::IPrintableObject::PRINT_LEVEL_DETAIL
@ PRINT_LEVEL_DETAIL
Definition: IPrintableObject.h:24
inet::physicallayer::ApskModulationBase::getCodeWordSize
virtual unsigned int getCodeWordSize() const override
Definition: ApskModulationBase.h:37
NUMBER_OF_OFDM_DATA_SUBCARRIERS
#define NUMBER_OF_OFDM_DATA_SUBCARRIERS
Definition: Ieee80211OfdmDefs.h:15
inet::physicallayer::Ieee80211OfdmModeBase::code
const Ieee80211OfdmCode * code
Definition: Ieee80211OfdmMode.h:38
EV_FIELD
#define EV_FIELD(...)
Definition: INETDefs.h:112
inet::physicallayer::Ieee80211OfdmDataMode::getServiceFieldLength
b getServiceFieldLength() const
Definition: Ieee80211OfdmMode.h:115
inet::physicallayer::Ieee80211OfdmModeBase::getGrossBitrate
virtual bps getGrossBitrate() const
Definition: Ieee80211OfdmMode.cc:65
inet::physicallayer::Ieee80211OfdmDataMode::getPaddingLength
virtual b getPaddingLength(b dataLength) const override
Definition: Ieee80211OfdmMode.cc:168
inet::physicallayer::ConvolutionalCode::getDecodedLength
virtual int getDecodedLength(int encodedLength) const override
Definition: ConvolutionalCode.cc:49
inet::physicallayer::Ieee80211OfdmModulation::getSubcarrierModulation
const ApskModulationBase * getSubcarrierModulation() const
Definition: Ieee80211OfdmModulation.h:24
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::physicallayer::Ieee80211OfdmModeBase::Ieee80211OfdmModeBase
Ieee80211OfdmModeBase(const Ieee80211OfdmModulation *modulation, const Ieee80211OfdmCode *code, Hz channelSpacing, Hz bandwidth)
Definition: Ieee80211OfdmMode.cc:16
inet::physicallayer::Ieee80211OfdmModeBase::getNetBitrate
virtual bps getNetBitrate() const
Definition: Ieee80211OfdmMode.cc:72
inet::physicallayer::Ieee80211OfdmModeBase::modulation
const Ieee80211OfdmModulation * modulation
Definition: Ieee80211OfdmMode.h:37
inet::physicallayer::Ieee80211OfdmDataMode::getTailFieldLength
b getTailFieldLength() const
Definition: Ieee80211OfdmMode.h:116
inet::physicallayer::Ieee80211OfdmModeBase::netBitrate
bps netBitrate
Definition: Ieee80211OfdmMode.h:40
inet::physicallayer::Ieee80211OfdmDataMode::getCompleteLength
virtual b getCompleteLength(b dataLength) const override
Definition: Ieee80211OfdmMode.cc:183
inet::physicallayer::Ieee80211OfdmModeBase::getNumberOfDataSubcarriers
int getNumberOfDataSubcarriers() const
Definition: Ieee80211OfdmMode.h:51
inet::physicallayer::Ieee80211OfdmCode::getConvolutionalCode
const ConvolutionalCode * getConvolutionalCode() const
Definition: Ieee80211OfdmCode.h:31