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 carrierFrequencyMode, 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

inet::physicallayer::Ieee80211HTCompliantModes::Ieee80211HTCompliantModes ( )
326 {
327 }
inet::physicallayer::Ieee80211HTCompliantModes::~Ieee80211HTCompliantModes ( )
virtual
330 {
331  for (auto & entry : modeCache)
332  delete entry.second;
333 }
std::map< std::tuple< Hz, unsigned int, Ieee80211HTModeBase::GuardIntervalType >, const Ieee80211HTMode * > modeCache
Definition: Ieee80211HTMode.h:465

Member Function Documentation

const Ieee80211HTMode * inet::physicallayer::Ieee80211HTCompliantModes::getCompliantMode ( const Ieee80211HTMCS mcsMode,
Ieee80211HTMode::BandMode  carrierFrequencyMode,
Ieee80211HTPreambleMode::HighTroughputPreambleFormat  preambleFormat,
Ieee80211HTModeBase::GuardIntervalType  guardIntervalType 
)
static
336 {
337  const char *name =""; //TODO
338  auto htModeId = std::make_tuple(mcsMode->getBandwidth(), mcsMode->getMcsIndex(), guardIntervalType);
339  auto mode = singleton.modeCache.find(htModeId);
340  if (mode == std::end(singleton.modeCache))
341  {
342  const Ieee80211OFDMSignalMode *legacySignal = nullptr;
343  const Ieee80211HTSignalMode *htSignal = nullptr;
345  htSignal = new Ieee80211HTSignalMode(mcsMode->getMcsIndex(), &Ieee80211OFDMCompliantModulations::bpskModulation, Ieee80211HTCompliantCodes::getCompliantCode(&Ieee80211OFDMCompliantCodes::ofdmConvolutionalCode1_2, &Ieee80211OFDMCompliantModulations::bpskModulation, nullptr, nullptr, nullptr, mcsMode->getBandwidth(), false), mcsMode->getBandwidth(), guardIntervalType);
346  else if (preambleFormat == Ieee80211HTPreambleMode::HT_PREAMBLE_MIXED)
347  {
349  htSignal = new Ieee80211HTSignalMode(mcsMode->getMcsIndex(), &Ieee80211OFDMCompliantModulations::qbpskModulation, Ieee80211HTCompliantCodes::getCompliantCode(&Ieee80211OFDMCompliantCodes::ofdmConvolutionalCode1_2, &Ieee80211OFDMCompliantModulations::qbpskModulation, nullptr, nullptr, nullptr, mcsMode->getBandwidth(), false), mcsMode->getBandwidth(), guardIntervalType);
350  }
351  else
352  throw cRuntimeError("Unknown preamble format");
353  const Ieee80211HTDataMode *dataMode = new Ieee80211HTDataMode(mcsMode, mcsMode->getBandwidth(), guardIntervalType);
354  const Ieee80211HTPreambleMode *preambleMode = new Ieee80211HTPreambleMode(htSignal, legacySignal, preambleFormat, dataMode->getNumberOfSpatialStreams());
355  const Ieee80211HTMode *htMode = new Ieee80211HTMode(name, preambleMode, dataMode, carrierFrequencyMode);
356  singleton.modeCache.insert(std::pair<std::tuple<Hz, unsigned int, Ieee80211HTModeBase::GuardIntervalType>, const Ieee80211HTMode *>(htModeId, htMode));
357  return htMode;
358  }
359  return mode->second;
360 }
std::map< std::tuple< Hz, unsigned int, Ieee80211HTModeBase::GuardIntervalType >, const Ieee80211HTMode * > modeCache
Definition: Ieee80211HTMode.h:465
static const Ieee80211OFDMModulation qbpskModulation
Definition: Ieee80211OFDMModulation.h:45
static const Ieee80211ConvolutionalCode ofdmConvolutionalCode1_2
Definition: Ieee80211OFDMCode.h:50
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:35
static Ieee80211HTCompliantModes singleton
Definition: Ieee80211HTMode.h:463
static const Ieee80211OFDMModulation bpskModulation
Definition: Ieee80211OFDMModulation.h:46
static const Ieee80211OFDMSignalMode ofdmHeaderMode6MbpsRate13
Definition: Ieee80211OFDMMode.h:178

Member Data Documentation

std::map<std::tuple<Hz, unsigned int, Ieee80211HTModeBase::GuardIntervalType>, const Ieee80211HTMode *> inet::physicallayer::Ieee80211HTCompliantModes::modeCache
protected
Ieee80211HTCompliantModes inet::physicallayer::Ieee80211HTCompliantModes::singleton
staticprotected

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