185 "Trying to get HT reference rate for a non-HT rate");
286 << uniqueName << std::endl
287 <<
"Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is "
288 "WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS");
344 if (i->uniqueUid == name)
354 NS_LOG_UNCOND(
"Could not find match for WifiMode named \"" << name <<
"\". Valid options are:");
377 if (i->uniqueUid == uniqueUid)
398 static bool isFirstTime =
true;
bool IsNull() const
Check for null implementation.
Simulation virtual time values and global simulation resolution.
create WifiMode class instances and keep track of them.
WifiModeItem * Get(uint32_t uid)
Return a WifiModeItem at the given UID index.
static WifiMode CreateWifiMcs(std::string uniqueName, uint8_t mcsValue, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, NonHtReferenceRateCallback nonHtReferenceRateCallback, AllowedCallback isAllowedCallback)
uint32_t AllocateUid(std::string uniqueUid)
Allocate a WifiModeItem from a given uniqueUid.
static WifiModeFactory * GetFactory()
Return a WifiModeFactory.
WifiModeItemList m_itemList
item list
WifiMode Search(std::string name) const
Search and return WifiMode from a given name.
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, AllowedCallback isAllowedCallback)
friend class WifiMode
allow WifiMode class access
represent a single transmission mode
WifiMode()
Create an invalid WifiMode.
const std::string & GetUniqueName() const
bool IsHigherDataRate(WifiMode mode) const
uint16_t GetConstellationSize() const
WifiModulationClass GetModulationClass() const
uint64_t GetPhyRate(MHz_u channelWidth, Time guardInterval, uint8_t nss) const
uint64_t GetDataRate(MHz_u channelWidth, Time guardInterval, uint8_t nss) const
uint64_t GetNonHtReferenceRate() const
WifiCodeRate GetCodeRate() const
bool IsHigherCodeRate(WifiMode mode) const
bool IsAllowed(MHz_u channelWidth, uint8_t nss) const
uint8_t GetMcsValue() const
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetGuardInterval(Time guardInterval)
Sets the guard interval duration (in nanoseconds)
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetNss(uint8_t nss)
Sets the number of Nss.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
Callback< R, Args... > MakeNullCallback()
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
@ WIFI_MOD_CLASS_UNKNOWN
Modulation class unknown or unspecified.
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
@ WIFI_MOD_CLASS_DSSS
DSSS (Clause 15)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
bool operator==(const EventId &a, const EventId &b)
std::ostream & operator<<(std::ostream &os, const Angles &a)
std::istream & operator>>(std::istream &is, Angles &a)
bool operator<(const EventId &a, const EventId &b)
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
@ WIFI_CODE_RATE_UNDEFINED
undefined coding rate
This is the data associated to a unique WifiMode.
WifiModulationClass modClass
modulation class
uint8_t mcsValue
MCS value.
AllowedCallback IsAllowedCallback
Callback to check whether a given combination of is allowed.
std::string uniqueUid
unique UID
bool isMandatory
flag to indicate whether this mode is mandatory
PhyRateCallback GetPhyRateCallback
Callback to calculate PHY rate in bps of this WifiModeItem.
DataRateCallback GetDataRateCallback
Callback to calculate data rate in bps of this WifiModeItem.
NonHtReferenceRateCallback GetNonHtReferenceRateCallback
Callback to calculate non-HT reference rate of this WifiModeItem.
ConstellationSizeCallback GetConstellationSizeCallback
Callback to retrieve constellation size of this WifiModeItem.
CodeRateCallback GetCodeRateCallback
Callback to retrieve code rate of this WifiModeItem.