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

#include <Ieee80211HtMode.h>

Public Member Functions

 Ieee80211HtCompliantModes ()
 
virtual ~Ieee80211HtCompliantModes ()
 

Static Public Member Functions

static const Ieee80211HtModegetCompliantMode (const Ieee80211Htmcs *mcsMode, Ieee80211HtMode::BandMode centerFrequencyMode, Ieee80211HtPreambleMode::HighTroughputPreambleFormat preambleFormat, Ieee80211HtModeBase::GuardIntervalType guardIntervalType)
 

Protected Attributes

std::map< std::tuple< Hz, unsigned int, Ieee80211HtModeBase::GuardIntervalType >, const Ieee80211HtMode * > modeCache
 

Static Protected Attributes

static Ieee80211HtCompliantModes singleton
 

Constructor & Destructor Documentation

◆ Ieee80211HtCompliantModes()

inet::physicallayer::Ieee80211HtCompliantModes::Ieee80211HtCompliantModes ( )
313 {
314 }

◆ ~Ieee80211HtCompliantModes()

inet::physicallayer::Ieee80211HtCompliantModes::~Ieee80211HtCompliantModes ( )
virtual
317 {
318  for (auto& entry : modeCache)
319  delete entry.second;
320 }

Member Function Documentation

◆ getCompliantMode()

const Ieee80211HtMode * inet::physicallayer::Ieee80211HtCompliantModes::getCompliantMode ( const Ieee80211Htmcs mcsMode,
Ieee80211HtMode::BandMode  centerFrequencyMode,
Ieee80211HtPreambleMode::HighTroughputPreambleFormat  preambleFormat,
Ieee80211HtModeBase::GuardIntervalType  guardIntervalType 
)
static
323 {
324  const char *name = ""; // TODO
325  auto htModeId = std::make_tuple(mcsMode->getBandwidth(), mcsMode->getMcsIndex(), guardIntervalType);
326  auto mode = singleton.modeCache.find(htModeId);
327  if (mode == singleton.modeCache.end()) {
328  const Ieee80211OfdmSignalMode *legacySignal = nullptr;
329  const Ieee80211HtSignalMode *htSignal = nullptr;
330  switch (preambleFormat) {
332  htSignal = new Ieee80211HtSignalMode(mcsMode->getMcsIndex(), &Ieee80211OfdmCompliantModulations::bpskModulation, Ieee80211HtCompliantCodes::getCompliantCode(&Ieee80211OfdmCompliantCodes::ofdmConvolutionalCode1_2, &Ieee80211OfdmCompliantModulations::bpskModulation, nullptr, nullptr, nullptr, mcsMode->getBandwidth(), false), mcsMode->getBandwidth(), guardIntervalType);
333  break;
336  htSignal = new Ieee80211HtSignalMode(mcsMode->getMcsIndex(), &Ieee80211OfdmCompliantModulations::qbpskModulation, Ieee80211HtCompliantCodes::getCompliantCode(&Ieee80211OfdmCompliantCodes::ofdmConvolutionalCode1_2, &Ieee80211OfdmCompliantModulations::qbpskModulation, nullptr, nullptr, nullptr, mcsMode->getBandwidth(), false), mcsMode->getBandwidth(), guardIntervalType);
337  break;
338  default:
339  throw cRuntimeError("Unknown preamble format");
340  }
341  const Ieee80211HtDataMode *dataMode = new Ieee80211HtDataMode(mcsMode, mcsMode->getBandwidth(), guardIntervalType);
342  const Ieee80211HtPreambleMode *preambleMode = new Ieee80211HtPreambleMode(htSignal, legacySignal, preambleFormat, dataMode->getNumberOfSpatialStreams());
343  const Ieee80211HtMode *htMode = new Ieee80211HtMode(name, preambleMode, dataMode, centerFrequencyMode);
344  singleton.modeCache.insert(std::pair<std::tuple<Hz, unsigned int, Ieee80211HtModeBase::GuardIntervalType>, const Ieee80211HtMode *>(htModeId, htMode));
345  return htMode;
346  }
347  return mode->second;
348 }

Member Data Documentation

◆ modeCache

std::map<std::tuple<Hz, unsigned int, Ieee80211HtModeBase::GuardIntervalType>, const Ieee80211HtMode *> inet::physicallayer::Ieee80211HtCompliantModes::modeCache
protected

◆ singleton

Ieee80211HtCompliantModes inet::physicallayer::Ieee80211HtCompliantModes::singleton
staticprotected

Referenced by getCompliantMode().


The documentation for this class was generated from the following files:
inet::physicallayer::Ieee80211HtPreambleMode::HT_PREAMBLE_GREENFIELD
@ HT_PREAMBLE_GREENFIELD
Definition: Ieee80211HtMode.h:123
inet::physicallayer::Ieee80211HtCompliantCodes::getCompliantCode
static const Ieee80211HtCode * getCompliantCode(const Ieee80211ConvolutionalCode *convolutionalCode, const Ieee80211OfdmModulation *stream1Modulation, const Ieee80211OfdmModulation *stream2Modulation, const Ieee80211OfdmModulation *stream3Modulation, const Ieee80211OfdmModulation *stream4Modulation, Hz bandwidth, bool withScrambling=true)
Definition: Ieee80211HtCode.cc:26
inet::physicallayer::Ieee80211OfdmCompliantModes::ofdmHeaderMode6MbpsRate13
static const Ieee80211OfdmSignalMode ofdmHeaderMode6MbpsRate13
Definition: Ieee80211OfdmMode.h:174
inet::physicallayer::Ieee80211HtCompliantModes::singleton
static Ieee80211HtCompliantModes singleton
Definition: Ieee80211HtMode.h:455
inet::physicallayer::Ieee80211HtPreambleMode::HT_PREAMBLE_MIXED
@ HT_PREAMBLE_MIXED
Definition: Ieee80211HtMode.h:122
inet::physicallayer::Ieee80211OfdmCompliantModulations::bpskModulation
static const Ieee80211OfdmModulation bpskModulation
Definition: Ieee80211OfdmModulation.h:37
inet::physicallayer::Ieee80211HtCompliantModes::modeCache
std::map< std::tuple< Hz, unsigned int, Ieee80211HtModeBase::GuardIntervalType >, const Ieee80211HtMode * > modeCache
Definition: Ieee80211HtMode.h:457
inet::physicallayer::Ieee80211OfdmCompliantModulations::qbpskModulation
static const Ieee80211OfdmModulation qbpskModulation
Definition: Ieee80211OfdmModulation.h:36
inet::physicallayer::Ieee80211OfdmCompliantCodes::ofdmConvolutionalCode1_2
static const Ieee80211ConvolutionalCode ofdmConvolutionalCode1_2
Definition: Ieee80211OfdmCode.h:40