|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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;
PhyRateCallback GetPhyRateCallback
Callback to calculate PHY rate in bps of this WifiModeItem.
std::vector< WifiModeItem > WifiModeItemList
typedef for a vector of WifiModeItem.
WifiModeItem * Get(uint32_t uid)
Return a WifiModeItem at the given UID index.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes.
bool IsHigherCodeRate(WifiMode mode) const
This is the data associated to a unique WifiMode.
Callback< uint64_t, uint16_t, uint16_t, uint8_t > DataRateCallback
Typedef for callback used to calculate data rate of a WifiMode.
bool IsMandatory(void) const
Callback< uint64_t, const WifiTxVector &, uint16_t > PhyRateFromTxVectorCallback
Typedef for callback used to calculate PHY rate of a WifiMode from a TXVECTOR.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string uniqueUid
unique UID
WifiModulationClass modClass
modulation class
DataRateCallback GetDataRateCallback
Callback to calculate data rate in bps of this WifiModeItem.
bool IsHigherDataRate(WifiMode mode) const
Callback< uint64_t, const WifiTxVector &, uint16_t > DataRateFromTxVectorCallback
Typedef for callback used to calculate data rate of a WifiMode from a TXVECTOR.
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
Declaration of the following enums:
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...
Callback< bool, uint16_t, uint8_t > ModeAllowedCallback
Typedef for callback used to check whether the combination of <current WifiMode, channel width (in MH...
Callback< uint64_t, uint16_t, uint16_t, uint8_t > PhyRateCallback
Typedef for callback used to calculate PHY rate of a WifiMode.
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
represent a single transmission mode
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, PhyRateFromTxVectorCallback phyRateFromTxVectorCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, ModeAllowedCallback isModeAllowedCallback)
WifiMode Search(std::string name) const
Search and return WifiMode from a given name.
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)
uint64_t GetPhyRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
WifiModeItemList m_itemList
item list
Callback< uint16_t > ConstellationSizeCallback
Typedef for callback used to retrieve constellation size of a WifiMode.
Callback< WifiCodeRate > CodeRateCallback
Typedef for callback used to retrieve code rate of a WifiMode.
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.
friend std::istream & operator>>(std::istream &is, WifiMode &mode)
Serialize WifiMode from istream (human-readable).
std::ostream & operator<<(std::ostream &os, const Angles &a)
PhyRateFromTxVectorCallback GetPhyRateFromTxVectorCallback
Callback to calculate PHY rate in bps of this WifiModeItem using a TXVECTOR as input.
WifiModeList::const_iterator WifiModeListIterator
An iterator for WifiModeList vector.
bool IsAllowed(uint16_t channelWidth, uint8_t nss) const
uint16_t GetConstellationSize(void) const
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
uint8_t GetMcsValue(void) const
std::istream & operator>>(std::istream &is, Angles &a)