23 #include "ns3/abort.h" 30 m_guardInterval (800),
34 m_aggregation (false),
39 m_modeInitialized (false)
46 uint16_t guardInterval,
50 uint16_t channelWidth,
57 m_txPowerLevel (powerLevel),
58 m_preamble (preamble),
59 m_channelWidth (channelWidth),
60 m_guardInterval (guardInterval),
64 m_aggregation (aggregation),
67 m_bssColor (bssColor),
69 m_modeInitialized (true)
74 : m_mode (txVector.m_mode),
75 m_txPowerLevel (txVector.m_txPowerLevel),
76 m_preamble (txVector.m_preamble),
77 m_channelWidth (txVector.m_channelWidth),
78 m_guardInterval (txVector.m_guardInterval),
79 m_nTx (txVector.m_nTx),
80 m_nss (txVector.m_nss),
81 m_ness (txVector.m_ness),
82 m_aggregation (txVector.m_aggregation),
83 m_stbc (txVector.m_stbc),
84 m_ldpc (txVector.m_ldpc),
85 m_bssColor (txVector.m_bssColor),
86 m_length (txVector.m_length),
87 m_modeInitialized (txVector.m_modeInitialized)
94 m_muUserInfos.insert (std::make_pair (info.first, info.second));
119 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU (" << staId <<
")");
135 return m_muUserInfos.begin ()->second.mcs.GetModulationClass ();
175 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU (" << staId <<
")");
190 nss = (nss < info.second.nss) ? info.second.nss : nss;
235 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU");
280 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU");
344 return (modeName !=
"VhtMcs9");
351 return (modeName !=
"VhtMcs6");
355 return (modeName !=
"VhtMcs9");
362 return (modeName !=
"VhtMcs9");
378 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU");
386 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU");
401 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for HE MU");
414 std::pair<std::size_t, std::size_t>
430 toneRangesContentChannel1.push_back (std::make_pair (-244, -3));
431 toneRangesContentChannel2.push_back (std::make_pair (3, 244));
434 toneRangesContentChannel1.push_back (std::make_pair (-500, -259));
435 toneRangesContentChannel2.push_back (std::make_pair (-258, -17));
436 toneRangesContentChannel1.push_back (std::make_pair (-16, -4));
437 toneRangesContentChannel1.push_back (std::make_pair (4, 16));
438 toneRangesContentChannel1.push_back (std::make_pair (17, 258));
439 toneRangesContentChannel2.push_back (std::make_pair (259, 500));
442 toneRangesContentChannel1.push_back (std::make_pair (-1012, -771));
443 toneRangesContentChannel2.push_back (std::make_pair (-770, -529));
444 toneRangesContentChannel1.push_back (std::make_pair (-528, -516));
445 toneRangesContentChannel1.push_back (std::make_pair (-508, -496));
446 toneRangesContentChannel1.push_back (std::make_pair (-495, -254));
447 toneRangesContentChannel2.push_back (std::make_pair (-253, -12));
448 toneRangesContentChannel1.push_back (std::make_pair (12, 253));
449 toneRangesContentChannel2.push_back (std::make_pair (254, 495));
450 toneRangesContentChannel2.push_back (std::make_pair (496, 508));
451 toneRangesContentChannel2.push_back (std::make_pair (516, 528));
452 toneRangesContentChannel1.push_back (std::make_pair (529, 770));
453 toneRangesContentChannel2.push_back (std::make_pair (771, 1012));
459 std::size_t numRusContentChannel1 = 0;
460 std::size_t numRusContentChannel2 = 0;
466 numRusContentChannel1++;
470 numRusContentChannel2++;
473 return std::make_pair (numRusContentChannel1, numRusContentChannel2);
480 os <<
"TXVECTOR not valid";
487 <<
" NTx: " << +v.
GetNTx ()
490 <<
" STBC: " << v.
IsStbc ()
491 <<
" FEC coding: " << (v.
IsLdpc () ?
"LDPC" :
"BCC");
503 os <<
" num User Infos: " << userInfoMap.size ();
504 for (
auto & ui : userInfoMap)
506 os <<
", {STA-ID: " << ui.first
507 <<
", " << ui.second.ru
508 <<
", MCS: " << ui.second.mcs
509 <<
", Nss: " << +ui.second.nss <<
"}";
514 os <<
" mode: " << v.
GetMode ()
515 <<
" Nss: " << +v.
GetNss ();
uint16_t m_channelWidth
channel width in MHz
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802...
uint8_t GetNssMax(void) const
bool IsAggregation(void) const
Checks whether the PSDU contains A-MPDU.
uint8_t m_nTx
number of TX antennas
std::vector< SubcarrierRange > SubcarrierGroup
a vector of subcarrier ranges defining a subcarrier group
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
bool m_ldpc
LDPC FEC coding if true, BCC otherwise.
void SetBssColor(uint8_t color)
Set the BSS color.
std::map< uint16_t, HeMuUserInfo > HeMuUserInfoMap
map of HE MU specific user info paramters indexed by STA-ID
WifiModulationClass GetModulationClass(void) const
Get the modulation class specified by this TXVECTOR.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void SetStbc(bool stbc)
Sets if STBC is being used.
bool IsStbc(void) const
Check if STBC is used or not.
bool GetModeInitialized(void) const
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
uint8_t GetNess(void) const
bool IsMu(void) const
Return true if this TX vector is used for a multi-user transmission.
uint16_t GetGuardInterval(void) const
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
void SetLdpc(bool ldpc)
Sets if LDPC FEC coding is being used.
HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const
Get the HE MU user-specific transmission information for the given STA-ID.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static bool DoesOverlap(uint16_t bw, RuSpec ru, const std::vector< RuSpec > &v)
Check whether the given RU overlaps with the given set of RUs.
bool IsLdpc(void) const
Check if LDPC FEC coding is used or not.
uint8_t m_nss
number of spatial streams
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode...
WifiPreamble GetPreambleType(void) const
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
uint8_t m_bssColor
BSS color.
bool IsValid(void) const
The standard disallows certain combinations of WifiMode, number of spatial streams, and channel widths.
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
uint16_t m_guardInterval
guard interval duration in nanoseconds
uint8_t GetNTx(void) const
std::pair< std::size_t, std::size_t > GetNumRusPerHeSigBContentChannel(void) const
Get the number of RUs per HE-SIG-B content channel.
WifiModulationClass GetModulationClass() const
std::string GetUniqueName(void) const
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
void SetNss(uint8_t nss)
Sets the number of Nss.
bool m_modeInitialized
Internal initialization flag.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
void SetNTx(uint8_t nTx)
Sets the number of TX antennas.
bool m_aggregation
Flag whether the PSDU contains A-MPDU.
bool m_stbc
STBC used or not.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
uint16_t m_length
LENGTH field of the L-SIG.
uint16_t GetLength(void) const
Get the LENGTH field of the L-SIG.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
uint8_t GetBssColor(void) const
Get the BSS color.
void SetNess(uint8_t ness)
Sets the Ness number.
HeMuUserInfoMap m_muUserInfos
HE MU specific per-user information indexed by station ID (STA-ID) corresponding to the 11 LSBs of th...
uint8_t GetTxPowerLevel(void) const
uint16_t GetChannelWidth(void) const
uint8_t m_ness
number of spatial streams in beamforming
void SetLength(uint16_t length)
Set the LENGTH field of the L-SIG.
const HeMuUserInfoMap & GetHeMuUserInfoMap(void) const
Get the map HE MU user-specific transmission information indexed by STA-ID.
void SetRu(HeRu::RuSpec ru, uint16_t staId)
Set the RU specification for the STA-ID.
HE MU specific user transmission parameters.
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
WifiMode m_mode
The DATARATE parameter in Table 15-4.
WifiPreamble m_preamble
preamble