|
INET Framework for OMNeT++/OMNEST
|
#include <Ieee80211ModeSet.h>
|
| | Ieee80211ModeSet (const char *name, const std::vector< Entry > entries) |
| |
| virtual std::ostream & | printToStream (std::ostream &stream, int level, int evFlags=0) const override |
| | Prints this object to the provided output stream. More...
|
| |
| const char * | getName () const override |
| |
| bool | containsMode (const IIeee80211Mode *mode) const |
| |
| bool | getIsMandatory (const IIeee80211Mode *mode) const |
| |
| const IIeee80211Mode * | findMode (bps bitrate, Hz bandwidth=Hz(NaN), int numSpatialStreams=-1) const |
| |
| const IIeee80211Mode * | findMode (bps minBitrate, bps maxBitrate, Hz bandwidth=Hz(NaN), int numSpatialStreams=-1) const |
| |
| const IIeee80211Mode * | getMode (bps bitrate, Hz bandwidth=Hz(NaN), int numSpatialStreams=-1) const |
| |
| const IIeee80211Mode * | getMode (bps minBitrate, bps maxBitrate, Hz bandwidth=Hz(NaN), int numSpatialStreams=-1) const |
| |
| const IIeee80211Mode * | getSlowestMode () const |
| |
| const IIeee80211Mode * | getFastestMode () const |
| |
| const IIeee80211Mode * | getSlowerMode (const IIeee80211Mode *mode) const |
| |
| const IIeee80211Mode * | getFasterMode (const IIeee80211Mode *mode) const |
| |
| const IIeee80211Mode * | getSlowestMandatoryMode () const |
| |
| const IIeee80211Mode * | getFastestMandatoryMode () const |
| |
| const IIeee80211Mode * | getSlowerMandatoryMode (const IIeee80211Mode *mode) const |
| |
| const IIeee80211Mode * | getFasterMandatoryMode (const IIeee80211Mode *mode) const |
| |
| simtime_t | getSifsTime () const |
| |
| simtime_t | getSlotTime () const |
| |
| simtime_t | getPhyRxStartDelay () const |
| |
| int | getCwMin () const |
| |
| int | getCwMax () const |
| |
| IIeee80211Mode * | _getSlowestMode () const |
| |
| IIeee80211Mode * | _getFastestMode () const |
| |
| IIeee80211Mode * | _getSlowestMandatoryMode () const |
| |
| IIeee80211Mode * | _getFastestMandatoryMode () const |
| |
| 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 |
| |
◆ Ieee80211ModeSet()
| inet::physicallayer::Ieee80211ModeSet::Ieee80211ModeSet |
( |
const char * |
name, |
|
|
const std::vector< Entry > |
entries |
|
) |
| |
462 std::vector<Entry> *nonConstEntries =
const_cast<std::vector<Entry> *
>(&this->
entries);
463 std::stable_sort(nonConstEntries->begin(), nonConstEntries->end(), EntryNetBitrateComparator());
464 auto referenceMode =
entries[0].mode;
466 auto mode = entry.mode;
467 if (mode->getSifsTime() != referenceMode->getSifsTime() ||
468 mode->getSlotTime() != referenceMode->getSlotTime() ||
469 mode->getPhyRxStartDelay() != referenceMode->getPhyRxStartDelay())
◆ _getFastestMandatoryMode()
| IIeee80211Mode* inet::physicallayer::Ieee80211ModeSet::_getFastestMandatoryMode |
( |
| ) |
const |
|
inline |
◆ _getFastestMode()
| IIeee80211Mode* inet::physicallayer::Ieee80211ModeSet::_getFastestMode |
( |
| ) |
const |
|
inline |
◆ _getSlowestMandatoryMode()
| IIeee80211Mode* inet::physicallayer::Ieee80211ModeSet::_getSlowestMandatoryMode |
( |
| ) |
const |
|
inline |
◆ _getSlowestMode()
| IIeee80211Mode* inet::physicallayer::Ieee80211ModeSet::_getSlowestMode |
( |
| ) |
const |
|
inline |
◆ containsMode()
| bool inet::physicallayer::Ieee80211ModeSet::containsMode |
( |
const IIeee80211Mode * |
mode | ) |
const |
|
inline |
◆ findMode() [1/2]
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::findMode |
( |
bps |
bitrate, |
|
|
Hz |
bandwidth = Hz(NaN), |
|
|
int |
numSpatialStreams = -1 |
|
) |
| const |
◆ findMode() [2/2]
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::findMode |
( |
bps |
minBitrate, |
|
|
bps |
maxBitrate, |
|
|
Hz |
bandwidth = Hz(NaN), |
|
|
int |
numSpatialStreams = -1 |
|
) |
| const |
505 for (
size_t index = 0; index <
entries.size(); index++) {
506 auto mode =
entries[index].mode;
507 auto dataMode = mode->getDataMode();
508 auto bitrate = dataMode->getNetBitrate();
509 if (minBitrate <= bitrate && bitrate <= maxBitrate &&
510 (std::isnan(bandwidth.get()) || dataMode->getBandwidth() == bandwidth) &&
511 (numSpatialStreams == -1 || dataMode->getNumberOfSpatialStreams() == numSpatialStreams))
◆ findModeIndex()
| int inet::physicallayer::Ieee80211ModeSet::findModeIndex |
( |
const IIeee80211Mode * |
mode | ) |
const |
|
protected |
◆ findModeSet()
| const Ieee80211ModeSet * inet::physicallayer::Ieee80211ModeSet::findModeSet |
( |
const char * |
mode | ) |
|
|
static |
603 for (
int index = 0; index < (int)(&
modeSets)->size(); index++) {
605 if (strcmp(modeSet->getName(), mode) == 0)
Referenced by getModeSet().
◆ getCwMax()
| int inet::physicallayer::Ieee80211ModeSet::getCwMax |
( |
| ) |
const |
|
inline |
71 {
return entries[0].mode->getLegacyCwMax(); }
◆ getCwMin()
| int inet::physicallayer::Ieee80211ModeSet::getCwMin |
( |
| ) |
const |
|
inline |
70 {
return entries[0].mode->getLegacyCwMin(); }
◆ getFasterMandatoryMode()
595 for (
int i = index + 1; i < (int)
entries.size(); i++)
◆ getFasterMode()
559 if (index >= 0 && index < (
int)
entries.size() - 1)
560 return entries[index + 1].mode;
◆ getFastestMandatoryMode()
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::getFastestMandatoryMode |
( |
| ) |
const |
575 for (
int i = (
int)
entries.size() - 1; i >= 0; i--)
◆ getFastestMode()
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::getFastestMode |
( |
| ) |
const |
◆ getIsMandatory()
| bool inet::physicallayer::Ieee80211ModeSet::getIsMandatory |
( |
const IIeee80211Mode * |
mode | ) |
const |
◆ getMode() [1/2]
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::getMode |
( |
bps |
bitrate, |
|
|
Hz |
bandwidth = Hz(NaN), |
|
|
int |
numSpatialStreams = -1 |
|
) |
| const |
◆ getMode() [2/2]
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::getMode |
( |
bps |
minBitrate, |
|
|
bps |
maxBitrate, |
|
|
Hz |
bandwidth = Hz(NaN), |
|
|
int |
numSpatialStreams = -1 |
|
) |
| const |
530 const IIeee80211Mode *mode =
findMode(minBitrate, maxBitrate, bandwidth, numSpatialStreams);
532 throw cRuntimeError(
"Unknown bitrate: (%g - %g) in operation mode: '%s'", minBitrate.get(), maxBitrate.get(),
getName());
◆ getModeIndex()
| int inet::physicallayer::Ieee80211ModeSet::getModeIndex |
( |
const IIeee80211Mode * |
mode | ) |
const |
|
protected |
◆ getModeSet()
| const Ieee80211ModeSet * inet::physicallayer::Ieee80211ModeSet::getModeSet |
( |
const char * |
mode | ) |
|
|
static |
◆ getName()
| const char* inet::physicallayer::Ieee80211ModeSet::getName |
( |
| ) |
const |
|
inlineoverride |
◆ getPhyRxStartDelay()
| simtime_t inet::physicallayer::Ieee80211ModeSet::getPhyRxStartDelay |
( |
| ) |
const |
|
inline |
69 {
return entries[0].mode->getPhyRxStartDelay(); }
◆ getSifsTime()
| simtime_t inet::physicallayer::Ieee80211ModeSet::getSifsTime |
( |
| ) |
const |
|
inline |
67 {
return entries[0].mode->getSifsTime(); }
Referenced by inet::ieee80211::RecipientAckPolicy::computeAckDurationField(), inet::ieee80211::RecipientQosAckPolicy::computeAckDurationField(), inet::ieee80211::RecipientQosAckPolicy::computeBasicBlockAckDurationField(), inet::ieee80211::SingleProtectionMechanism::computeBlockAckReqDurationField(), inet::ieee80211::QosCtsPolicy::computeCtsDurationField(), inet::ieee80211::CtsPolicy::computeCtsDurationField(), inet::ieee80211::OriginatorProtectionMechanism::computeDataFrameDurationField(), inet::ieee80211::SingleProtectionMechanism::computeDataOrMgmtFrameDurationField(), inet::ieee80211::OriginatorProtectionMechanism::computeMgmtFrameDurationField(), inet::ieee80211::OriginatorProtectionMechanism::computeRtsDurationField(), inet::ieee80211::SingleProtectionMechanism::computeRtsDurationField(), inet::ieee80211::OriginatorAckPolicy::getAckTimeout(), inet::ieee80211::OriginatorQosAckPolicy::getAckTimeout(), inet::ieee80211::OriginatorQosAckPolicy::getBlockAckTimeout(), inet::ieee80211::QosRtsPolicy::getCtsTimeout(), inet::ieee80211::RtsPolicy::getCtsTimeout(), and inet::ieee80211::FrameSequenceContext::getIfs().
◆ getSlotTime()
| simtime_t inet::physicallayer::Ieee80211ModeSet::getSlotTime |
( |
| ) |
const |
|
inline |
◆ getSlowerMandatoryMode()
585 for (
int i = index - 1; i >= 0; i--)
◆ getSlowerMode()
551 return entries[index - 1].mode;
◆ getSlowestMandatoryMode()
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::getSlowestMandatoryMode |
( |
| ) |
const |
567 for (
size_t i = 0; i <
entries.size(); i++)
◆ getSlowestMode()
| const IIeee80211Mode * inet::physicallayer::Ieee80211ModeSet::getSlowestMode |
( |
| ) |
const |
◆ printToStream()
| virtual std::ostream& inet::physicallayer::Ieee80211ModeSet::printToStream |
( |
std::ostream & |
stream, |
|
|
int |
level, |
|
|
int |
evFlags = 0 |
|
) |
| const |
|
inlineoverridevirtual |
Prints this object to the provided output stream.
Reimplemented from inet::IPrintableObject.
44 {
return stream <<
"Ieee80211ModeSet, name = " <<
name; }
◆ entries
| const std::vector<Entry> inet::physicallayer::Ieee80211ModeSet::entries |
|
protected |
Referenced by findMode(), findModeIndex(), getFasterMandatoryMode(), getFasterMode(), getFastestMandatoryMode(), getFastestMode(), getIsMandatory(), getSlowerMandatoryMode(), getSlowerMode(), getSlowestMandatoryMode(), getSlowestMode(), and Ieee80211ModeSet().
◆ modeSets
◆ name
| std::string inet::physicallayer::Ieee80211ModeSet::name |
|
protected |
The documentation for this class was generated from the following files:
mega< bps >::type Mbps
Definition: Units.h:1171
const std::vector< Entry > entries
Definition: Ieee80211ModeSet.h:32
std::string name
Definition: Ieee80211ModeSet.h:31
Ieee80211ModeSet(const char *name, const std::vector< Entry > entries)
Definition: Ieee80211ModeSet.cc:458
static const DelayedInitializer< std::vector< Ieee80211ModeSet > > modeSets
Definition: Ieee80211ModeSet.h:35
int findModeIndex(const IIeee80211Mode *mode) const
Definition: Ieee80211ModeSet.cc:476
static const Ieee80211ModeSet * findModeSet(const char *mode)
Definition: Ieee80211ModeSet.cc:601
const IIeee80211Mode * getSlowestMandatoryMode() const
Definition: Ieee80211ModeSet.cc:565
const IIeee80211Mode * getFastestMandatoryMode() const
Definition: Ieee80211ModeSet.cc:573
int getModeIndex(const IIeee80211Mode *mode) const
Definition: Ieee80211ModeSet.cc:484
const IIeee80211Mode * findMode(bps bitrate, Hz bandwidth=Hz(NaN), int numSpatialStreams=-1) const
Definition: Ieee80211ModeSet.cc:498
const IIeee80211Mode * getFastestMode() const
Definition: Ieee80211ModeSet.cc:542
const IIeee80211Mode * getSlowestMode() const
Definition: Ieee80211ModeSet.cc:537
const char * getName() const override
Definition: Ieee80211ModeSet.h:46
const IIeee80211Mode * getMode(bps bitrate, Hz bandwidth=Hz(NaN), int numSpatialStreams=-1) const
Definition: Ieee80211ModeSet.cc:519