26 #include "ns3/he-ru.h" 256 NS_FATAL_ERROR (
"Error in creation of WifiMode named " << uniqueName << std::endl
257 <<
"Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS");
314 WifiModeItemList::const_iterator i;
318 if (i->uniqueUid == name)
329 << name <<
"\". Valid options are:");
350 for (WifiModeItemList::const_iterator i =
m_itemList.begin ();
353 if (i->uniqueUid == uniqueUid)
359 uint32_t uid =
static_cast<uint32_t
> (
m_itemList.size ());
374 static bool isFirstTime =
true;
378 uint32_t uid = factory.
AllocateUid (
"Invalid-WifiMode");
386 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...
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
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...
WifiCodeRate
This enumeration defines the various convolutional coding rates used for the OFDM transmission modes ...
#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.
uint16_t GetGuardInterval(void) const
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
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
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, ModeAllowedCallback isModeAllowedCallback)
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.
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
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
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
static WifiMode CreateWifiMcs(std::string uniqueName, uint8_t mcsValue, WifiModulationClass modClass, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, NonHtReferenceRateCallback nonHtReferenceRateCallback, ModeAllowedCallback isModeAllowedCallback)
#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
No explicit coding (e.g., DSSS rates)
create WifiMode class instances and keep track of them.
bool operator==(const EventId &a, const EventId &b)
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.
uint16_t GetChannelWidth(void) const
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.