15#include "ns3/attribute-helper.h"
16#include "ns3/callback.h"
Simulation virtual time values and global simulation resolution.
create WifiMode class instances and keep track of them.
Callback< uint64_t, const WifiTxVector &, uint16_t > PhyRateCallback
Typedef for callback used to calculate PHY rate of a WifiMode from a TXVECTOR.
WifiModeItem * Get(uint32_t uid)
Return a WifiModeItem at the given UID index.
Callback< WifiCodeRate > CodeRateCallback
Typedef for callback used to retrieve code rate of a WifiMode.
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)
std::vector< WifiModeItem > WifiModeItemList
typedef for a vector of WifiModeItem.
uint32_t AllocateUid(std::string uniqueUid)
Allocate a WifiModeItem from a given uniqueUid.
static WifiModeFactory * GetFactory()
Return a WifiModeFactory.
WifiModeItemList m_itemList
item list
Callback< uint64_t, const WifiTxVector &, uint16_t > DataRateCallback
Typedef for callback used to calculate data rate of a WifiMode from a TXVECTOR.
WifiMode Search(std::string name) const
Search and return WifiMode from a given name.
Callback< uint16_t > ConstellationSizeCallback
Typedef for callback used to retrieve constellation size of a WifiMode.
friend std::istream & operator>>(std::istream &is, WifiMode &mode)
Serialize WifiMode from istream (human-readable).
Callback< bool, const WifiTxVector & > AllowedCallback
Typedef for callback used to check whether a given combination 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...
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, AllowedCallback isAllowedCallback)
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...
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
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)
WifiModeList::const_iterator WifiModeListIterator
An iterator for WifiModeList vector.
std::istream & operator>>(std::istream &is, Angles &a)
bool operator<(const EventId &a, const EventId &b)
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes.
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
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.
Declaration of the following enums: