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

#include <Ieee80211VhtMode.h>

Public Member Functions

 Ieee80211VhtCompliantModes ()
 
virtual ~Ieee80211VhtCompliantModes ()
 

Static Public Member Functions

static const Ieee80211VhtModegetCompliantMode (const Ieee80211Vhtmcs *mcsMode, Ieee80211VhtMode::BandMode centerFrequencyMode, Ieee80211VhtPreambleMode::HighTroughputPreambleFormat preambleFormat, Ieee80211VhtModeBase::GuardIntervalType guardIntervalType)
 

Protected Attributes

std::map< std::tuple< Hz, unsigned int, Ieee80211VhtModeBase::GuardIntervalType, unsigned int >, const Ieee80211VhtMode * > modeCache
 

Static Protected Attributes

static Ieee80211VhtCompliantModes singleton
 

Constructor & Destructor Documentation

◆ Ieee80211VhtCompliantModes()

inet::physicallayer::Ieee80211VhtCompliantModes::Ieee80211VhtCompliantModes ( )
671 {
672 }

◆ ~Ieee80211VhtCompliantModes()

inet::physicallayer::Ieee80211VhtCompliantModes::~Ieee80211VhtCompliantModes ( )
virtual
675 {
676  for (auto& entry : modeCache)
677  delete entry.second;
678 }

Member Function Documentation

◆ getCompliantMode()

const Ieee80211VhtMode * inet::physicallayer::Ieee80211VhtCompliantModes::getCompliantMode ( const Ieee80211Vhtmcs mcsMode,
Ieee80211VhtMode::BandMode  centerFrequencyMode,
Ieee80211VhtPreambleMode::HighTroughputPreambleFormat  preambleFormat,
Ieee80211VhtModeBase::GuardIntervalType  guardIntervalType 
)
static
681 {
682  const char *name = ""; // TODO
683  unsigned int nss = mcsMode->getNumNss();
684  auto htModeId = std::make_tuple(mcsMode->getBandwidth(), mcsMode->getMcsIndex(), guardIntervalType, nss);
685  auto mode = singleton.modeCache.find(htModeId);
686  if (mode == singleton.modeCache.end()) {
687  const Ieee80211OfdmSignalMode *legacySignal = nullptr;
688  const Ieee80211VhtSignalMode *htSignal = nullptr;
689  switch (preambleFormat) {
691  htSignal = new Ieee80211VhtSignalMode(mcsMode->getMcsIndex(), &Ieee80211OfdmCompliantModulations::bpskModulation, Ieee80211VhtCompliantCodes::getCompliantCode(&Ieee80211OfdmCompliantCodes::ofdmConvolutionalCode1_2, &Ieee80211OfdmCompliantModulations::bpskModulation, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, mcsMode->getBandwidth(), false), mcsMode->getBandwidth(), guardIntervalType);
692  break;
695  htSignal = new Ieee80211VhtSignalMode(mcsMode->getMcsIndex(), &Ieee80211OfdmCompliantModulations::qbpskModulation, Ieee80211VhtCompliantCodes::getCompliantCode(&Ieee80211OfdmCompliantCodes::ofdmConvolutionalCode1_2, &Ieee80211OfdmCompliantModulations::qbpskModulation, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, mcsMode->getBandwidth(), false), mcsMode->getBandwidth(), guardIntervalType);
696  break;
697  default:
698  throw cRuntimeError("Unknown preamble format");
699  }
700  const Ieee80211VhtDataMode *dataMode = new Ieee80211VhtDataMode(mcsMode, mcsMode->getBandwidth(), guardIntervalType);
701  const Ieee80211VhtPreambleMode *preambleMode = new Ieee80211VhtPreambleMode(htSignal, legacySignal, preambleFormat, dataMode->getNumberOfSpatialStreams());
702  const Ieee80211VhtMode *htMode = new Ieee80211VhtMode(name, preambleMode, dataMode, centerFrequencyMode);
703  singleton.modeCache.insert(std::pair<std::tuple<Hz, unsigned int, Ieee80211VhtModeBase::GuardIntervalType, unsigned int>, const Ieee80211VhtMode *>(htModeId, htMode));
704  return htMode;
705  }
706  return mode->second;
707 }

Member Data Documentation

◆ modeCache

std::map<std::tuple<Hz, unsigned int, Ieee80211VhtModeBase::GuardIntervalType, unsigned int>, const Ieee80211VhtMode *> inet::physicallayer::Ieee80211VhtCompliantModes::modeCache
protected

◆ singleton

Ieee80211VhtCompliantModes inet::physicallayer::Ieee80211VhtCompliantModes::singleton
staticprotected

Referenced by getCompliantMode().


The documentation for this class was generated from the following files:
inet::physicallayer::Ieee80211VhtPreambleMode::HT_PREAMBLE_GREENFIELD
@ HT_PREAMBLE_GREENFIELD
Definition: Ieee80211VhtMode.h:114
inet::physicallayer::Ieee80211OfdmCompliantModes::ofdmHeaderMode6MbpsRate13
static const Ieee80211OfdmSignalMode ofdmHeaderMode6MbpsRate13
Definition: Ieee80211OfdmMode.h:174
inet::physicallayer::Ieee80211VhtCompliantCodes::getCompliantCode
static const Ieee80211VhtCode * getCompliantCode(const Ieee80211ConvolutionalCode *convolutionalCode, const Ieee80211OfdmModulation *stream1Modulation, const Ieee80211OfdmModulation *stream2Modulation, const Ieee80211OfdmModulation *stream3Modulation, const Ieee80211OfdmModulation *stream4Modulation, const Ieee80211OfdmModulation *stream5Modulation, const Ieee80211OfdmModulation *stream6Modulation, const Ieee80211OfdmModulation *stream7Modulation, const Ieee80211OfdmModulation *stream8Modulation, Hz bandwidth, bool withScrambling=true)
Definition: Ieee80211VhtCode.cc:26
inet::physicallayer::Ieee80211OfdmCompliantModulations::bpskModulation
static const Ieee80211OfdmModulation bpskModulation
Definition: Ieee80211OfdmModulation.h:37
inet::physicallayer::Ieee80211VhtPreambleMode::HT_PREAMBLE_MIXED
@ HT_PREAMBLE_MIXED
Definition: Ieee80211VhtMode.h:113
inet::physicallayer::Ieee80211VhtCompliantModes::singleton
static Ieee80211VhtCompliantModes singleton
Definition: Ieee80211VhtMode.h:674
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
inet::physicallayer::Ieee80211VhtCompliantModes::modeCache
std::map< std::tuple< Hz, unsigned int, Ieee80211VhtModeBase::GuardIntervalType, unsigned int >, const Ieee80211VhtMode * > modeCache
Definition: Ieee80211VhtMode.h:676