|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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> ();
PhyRateCallback GetPhyRateCallback
Callback to calculate PHY rate in bps of this WifiModeItem.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
WifiModeItem * Get(uint32_t uid)
Return a WifiModeItem at the given UID index.
bool IsHigherCodeRate(WifiMode mode) const
This is the data associated to a unique WifiMode.
bool IsMandatory(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string uniqueUid
unique UID
WifiModulationClass modClass
modulation class
bool IsNull(void) const
Check for null implementation.
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
DataRateCallback GetDataRateCallback
Callback to calculate data rate in bps of this WifiModeItem.
bool IsHigherDataRate(WifiMode mode) const
bool operator<(const EventId &a, const EventId &b)
WifiCodeRate GetCodeRate(void) const
NonHtReferenceRateCallback GetNonHtReferenceRateCallback
Callback to calculate non-HT reference rate of this WifiModeItem.
WifiModulationClass GetModulationClass() const
const uint16_t WIFI_CODE_RATE_UNDEFINED
undefined coding rate
ConstellationSizeCallback GetConstellationSizeCallback
Callback to retrieve constellation size of this WifiModeItem.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
@ WIFI_MOD_CLASS_UNKNOWN
Modulation class unknown or unspecified.
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
represent a single transmission mode
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, PhyRateFromTxVectorCallback phyRateFromTxVectorCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, ModeAllowedCallback isModeAllowedCallback)
WifiMode Search(std::string name) const
Search and return WifiMode from a given name.
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
uint32_t AllocateUid(std::string uniqueUid)
Allocate a WifiModeItem from a given uniqueUid.
uint64_t GetNonHtReferenceRate(void) const
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)
std::string GetUniqueName(void) const
WifiMode()
Create an invalid WifiMode.
bool operator==(const EventId &a, const EventId &b)
#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 NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
uint64_t GetPhyRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
WifiModeItemList m_itemList
item list
bool isMandatory
flag to indicate whether this mode is mandatory
ModeAllowedCallback IsModeAllowedCallback
Callback to check whether the combination of <MCS, channel width (MHz), NSS> is allowed.
uint8_t mcsValue
MCS value.
uint32_t GetUid(void) const
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.
static WifiModeFactory * GetFactory()
Return a WifiModeFactory.
CodeRateCallback GetCodeRateCallback
Callback to retrieve code rate of this WifiModeItem.
DataRateFromTxVectorCallback GetDataRateFromTxVectorCallback
Callback to calculate data rate in bps of this WifiModeItem using a TXVECTOR as input.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
create WifiMode class instances and keep track of them.
std::ostream & operator<<(std::ostream &os, const Angles &a)
friend class WifiMode
allow WifiMode class access
PhyRateFromTxVectorCallback GetPhyRateFromTxVectorCallback
Callback to calculate PHY rate in bps of this WifiModeItem using a TXVECTOR as input.
bool IsAllowed(uint16_t channelWidth, uint8_t nss) const
@ WIFI_MOD_CLASS_DSSS
DSSS (Clause 15)
uint16_t GetConstellationSize(void) const
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
uint8_t GetMcsValue(void) const
std::istream & operator>>(std::istream &is, Angles &a)