26 #include "ns3/attribute-helper.h" 27 #include "ns3/callback.h" 32 #define SU_STA_ID 65535 56 bool IsAllowed (uint16_t channelWidth, uint8_t nss)
const;
68 uint64_t
GetPhyRate (uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
const;
84 uint64_t
GetPhyRate (uint16_t channelWidth)
const;
93 uint64_t
GetDataRate (uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
const;
106 uint64_t
GetDataRate (uint16_t channelWidth)
const;
137 uint32_t
GetUid (
void)
const;
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802...
Callback< bool, uint16_t, uint8_t > ModeAllowedCallback
Typedef for callback used to check whether the combination of <current WifiMode, channel width (in MH...
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...
Callback< uint64_t, uint16_t, uint16_t, uint8_t > PhyRateCallback
Typedef for callback used to calculate PHY rate of a WifiMode.
Declaration of the following enums:
Callback< uint64_t, const WifiTxVector &, uint16_t > PhyRateFromTxVectorCallback
Typedef for callback used to calculate PHY rate of a WifiMode from a TXVECTOR.
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.
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...
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)
Callback< uint16_t > ConstellationSizeCallback
Typedef for callback used to retrieve constellation size of a WifiMode.
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
Callback< uint64_t, uint16_t, uint16_t, uint8_t > DataRateCallback
Typedef for callback used to calculate data rate of a WifiMode.
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
WifiModeList::const_iterator WifiModeListIterator
An iterator for WifiModeList vector.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
uint16_t GetConstellationSize(void) const
uint64_t GetNonHtReferenceRate(void) const
create WifiMode class instances and keep track of them.
Callback< uint64_t, const WifiTxVector &, uint16_t > DataRateFromTxVectorCallback
Typedef for callback used to calculate data rate of a WifiMode from a TXVECTOR.
Callback< WifiCodeRate > CodeRateCallback
Typedef for callback used to retrieve code rate of a WifiMode.
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.
Callback< uint64_t > NonHtReferenceRateCallback
Typedef for callback used to calculate Non-HT Reference Rate of an MCS defined in HT or later amendme...
uint32_t AllocateUid(std::string uniqueUid)
Allocate a WifiModeItem from a given uniqueUid.
WifiCodeRate GetCodeRate(void) const
std::vector< WifiModeItem > WifiModeItemList
typedef for a vector of WifiModeItem.
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
friend std::istream & operator>>(std::istream &is, WifiMode &mode)
Serialize WifiMode from istream (human-readable).
bool IsHigherDataRate(WifiMode mode) const
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
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.