26 #include "ns3/he-ru.h" 269 NS_FATAL_ERROR (
"Error in creation of WifiMode named " << uniqueName << std::endl
270 <<
"Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS");
330 WifiModeItemList::const_iterator i;
334 if (i->uniqueUid == name)
345 << name <<
"\". Valid options are:");
366 for (WifiModeItemList::const_iterator i =
m_itemList.begin ();
369 if (i->uniqueUid == uniqueUid)
375 uint32_t uid =
static_cast<uint32_t
> (
m_itemList.size ());
390 static bool isFirstTime =
true;
394 uint32_t uid = factory.
AllocateUid (
"Invalid-WifiMode");
402 item->
GetPhyRateCallback = MakeNullCallback<uint64_t, uint16_t, uint16_t, uint8_t> ();
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802...
WifiMode()
Create an invalid WifiMode.
CodeRateCallback GetCodeRateCallback
Callback to retrieve code rate of this WifiModeItem.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
uint8_t mcsValue
MCS value.
bool IsAllowed(uint16_t channelWidth, uint8_t nss) const
DataRateFromTxVectorCallback GetDataRateFromTxVectorCallback
Callback to calculate data rate in bps of this WifiModeItem using a TXVECTOR as input.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
std::istream & operator>>(std::istream &is, Angles &a)
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Modulation class unknown or unspecified.
uint32_t GetUid(void) const
bool IsMandatory(void) const
bool operator<(const EventId &a, const EventId &b)
WifiMode Search(std::string name) const
Search and return WifiMode from a given name.
std::ostream & operator<<(std::ostream &os, const Angles &a)
static WifiMode CreateWifiMcs(std::string uniqueName, uint8_t mcsValue, WifiModulationClass modClass, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, PhyRateFromTxVectorCallback phyRateFromTxVectorCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, NonHtReferenceRateCallback nonHtReferenceRateCallback, ModeAllowedCallback isModeAllowedCallback)
PhyRateCallback GetPhyRateCallback
Callback to calculate PHY rate in bps of this WifiModeItem.
NonHtReferenceRateCallback GetNonHtReferenceRateCallback
Callback to calculate non-HT reference rate of this WifiModeItem.
WifiModeItemList m_itemList
item list
WifiModulationClass GetModulationClass() const
std::string GetUniqueName(void) const
WifiModulationClass modClass
modulation class
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
PhyRateFromTxVectorCallback GetPhyRateFromTxVectorCallback
Callback to calculate PHY rate in bps of this WifiModeItem using a TXVECTOR as input.
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, PhyRateFromTxVectorCallback phyRateFromTxVectorCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, ModeAllowedCallback isModeAllowedCallback)
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsHigherCodeRate(WifiMode mode) const
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
friend class WifiMode
allow WifiMode class access
uint16_t GetConstellationSize(void) const
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
uint64_t GetNonHtReferenceRate(void) const
create WifiMode class instances and keep track of them.
bool operator==(const EventId &a, const EventId &b)
const uint16_t WIFI_CODE_RATE_UNDEFINED
undefined coding rate
uint64_t GetPhyRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
static WifiModeFactory * GetFactory()
Return a WifiModeFactory.
ModeAllowedCallback IsModeAllowedCallback
Callback to check whether the combination of <MCS, channel width (MHz), NSS> is allowed.
uint32_t AllocateUid(std::string uniqueUid)
Allocate a WifiModeItem from a given uniqueUid.
WifiCodeRate GetCodeRate(void) const
bool IsNull(void) const
Check for null implementation.
WifiModeItem * Get(uint32_t uid)
Return a WifiModeItem at the given UID index.
uint8_t GetMcsValue(void) const
bool isMandatory
flag to indicate whether this mode is mandatory
bool IsHigherDataRate(WifiMode mode) const
ConstellationSizeCallback GetConstellationSizeCallback
Callback to retrieve constellation size of this WifiModeItem.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
This is the data associated to a unique WifiMode.
std::string uniqueUid
unique UID
DataRateCallback GetDataRateCallback
Callback to calculate data rate in bps of this WifiModeItem.