21 #include "ns3/simulator.h"
22 #include "ns3/assert.h"
147 uint8_t constellationSize)
165 item->
phyRate = dataRate * 6 / 5;
168 item->
phyRate = dataRate * 4 / 3;
171 item->
phyRate = dataRate * 3 / 2;
174 item->
phyRate = dataRate * 2 / 1;
190 NS_FATAL_ERROR (
"Error in creation of WifiMode named " << uniqueName << std::endl
191 <<
"Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is WIFI_MOD_CLASS_DSSS");
203 WifiModeItemList::const_iterator i;
207 if (i->uniqueUid == name)
218 << name <<
"\". Valid options are:");
239 for (WifiModeItemList::const_iterator i =
m_itemList.begin ();
242 if (i->uniqueUid == uniqueUid)
263 static bool isFirstTime =
true;
267 uint32_t uid = factory.
AllocateUid (
"Invalid-WifiMode");
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
WifiMode()
Create an invalid WifiMode.
WifiCodeRate
This enumeration defines the various convolutional coding rates used for the OFDM transmission modes ...
enum WifiModulationClass GetModulationClass() const
#define NS_ASSERT(condition)
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
bool IsMandatory(void) const
#define NS_FATAL_ERROR(msg)
fatal error handling
Modulation class unknown or unspecified.
WifiModeItem * Get(uint32_t uid)
Return a WifiModeItem at the given uid index.
enum WifiCodeRate GetCodeRate(void) const
enum WifiCodeRate codingRate
std::string GetUniqueName(void) const
WifiModeItemList m_itemList
static WifiMode CreateWifiMode(std::string uniqueName, enum WifiModulationClass modClass, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, enum WifiCodeRate codingRate, uint8_t constellationSize)
uint32_t GetBandwidth(void) const
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
uint8_t GetConstellationSize(void) const
uint64_t GetPhyRate(void) const
#define NS_LOG_UNCOND(msg)
No explicit coding (e.g., DSSS rates)
create WifiMode class instances and keep track of them.
WifiModulationClass
This enumeration defines the modulation classes per IEEE 802.11-2007, Section 9.6.1, Table 9-2.
bool operator==(const EventId &a, const EventId &b)
uint8_t constellationSize
static WifiModeFactory * GetFactory()
Return a WifiModeFactory.
uint32_t AllocateUid(std::string uniqueUid)
Allocate a WifiModeItem from a given uniqueUid.
enum WifiModulationClass modClass
ATTRIBUTE_HELPER_CPP(ObjectFactory)
uint32_t GetUid(void) const
WifiMode Search(std::string name)
Search and return WifiMode from a given name.
uint64_t GetDataRate(void) const
This is the data associated to a unique WifiMode.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)