|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
24 #include "ns3/abort.h"
31 m_guardInterval (800),
35 m_aggregation (false),
40 m_modeInitialized (false)
47 uint16_t guardInterval,
51 uint16_t channelWidth,
58 m_txPowerLevel (powerLevel),
59 m_preamble (preamble),
60 m_channelWidth (channelWidth),
61 m_guardInterval (guardInterval),
65 m_aggregation (aggregation),
68 m_bssColor (bssColor),
70 m_modeInitialized (true)
75 : m_mode (txVector.m_mode),
76 m_txPowerLevel (txVector.m_txPowerLevel),
77 m_preamble (txVector.m_preamble),
78 m_channelWidth (txVector.m_channelWidth),
79 m_guardInterval (txVector.m_guardInterval),
80 m_nTx (txVector.m_nTx),
81 m_nss (txVector.m_nss),
82 m_ness (txVector.m_ness),
83 m_aggregation (txVector.m_aggregation),
84 m_stbc (txVector.m_stbc),
85 m_ldpc (txVector.m_ldpc),
86 m_bssColor (txVector.m_bssColor),
87 m_length (txVector.m_length),
88 m_modeInitialized (txVector.m_modeInitialized)
95 m_muUserInfos.insert (std::make_pair (info.first, info.second));
120 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU (" << staId <<
")");
136 return m_muUserInfos.begin ()->second.mcs.GetModulationClass ();
176 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU (" << staId <<
")");
191 nss = (nss < info.second.nss) ? info.second.nss : nss;
236 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU");
281 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU");
345 return (modeName !=
"VhtMcs9");
352 return (modeName !=
"VhtMcs6");
356 return (modeName !=
"VhtMcs9");
363 return (modeName !=
"VhtMcs9");
391 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU");
399 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU");
414 NS_ABORT_MSG_IF (staId > 2048,
"STA-ID should be correctly set for MU");
434 std::pair<std::size_t, std::size_t>
449 toneRangesContentChannel1.push_back (std::make_pair (-244, -3));
450 toneRangesContentChannel2.push_back (std::make_pair (3, 244));
453 toneRangesContentChannel1.push_back (std::make_pair (-500, -259));
454 toneRangesContentChannel2.push_back (std::make_pair (-258, -17));
455 toneRangesContentChannel1.push_back (std::make_pair (-16, -4));
456 toneRangesContentChannel1.push_back (std::make_pair (4, 16));
457 toneRangesContentChannel1.push_back (std::make_pair (17, 258));
458 toneRangesContentChannel2.push_back (std::make_pair (259, 500));
461 toneRangesContentChannel1.push_back (std::make_pair (-1012, -771));
462 toneRangesContentChannel2.push_back (std::make_pair (-770, -529));
463 toneRangesContentChannel1.push_back (std::make_pair (-528, -516));
464 toneRangesContentChannel1.push_back (std::make_pair (-508, -496));
465 toneRangesContentChannel1.push_back (std::make_pair (-495, -254));
466 toneRangesContentChannel2.push_back (std::make_pair (-253, -12));
467 toneRangesContentChannel1.push_back (std::make_pair (12, 253));
468 toneRangesContentChannel2.push_back (std::make_pair (254, 495));
469 toneRangesContentChannel2.push_back (std::make_pair (496, 508));
470 toneRangesContentChannel2.push_back (std::make_pair (516, 528));
471 toneRangesContentChannel1.push_back (std::make_pair (529, 770));
472 toneRangesContentChannel2.push_back (std::make_pair (771, 1012));
478 std::size_t numRusContentChannel1 = 0;
479 std::size_t numRusContentChannel2 = 0;
491 numRusContentChannel1++;
495 numRusContentChannel2++;
498 return std::make_pair (numRusContentChannel1, numRusContentChannel2);
505 os <<
"TXVECTOR not valid";
512 <<
" NTx: " << +v.
GetNTx ()
515 <<
" STBC: " << v.
IsStbc ()
516 <<
" FEC coding: " << (v.
IsLdpc () ?
"LDPC" :
"BCC");
528 os <<
" num User Infos: " << userInfoMap.size ();
529 for (
auto & ui : userInfoMap)
531 os <<
", {STA-ID: " << ui.first
532 <<
", " << ui.second.ru
533 <<
", MCS: " << ui.second.mcs
534 <<
", Nss: " << +ui.second.nss <<
"}";
539 os <<
" mode: " << v.
GetMode ()
540 <<
" Nss: " << +v.
GetNss ();
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 IsStbc(void) const
Check if STBC is used or not.
uint8_t GetBssColor(void) const
Get the BSS color.
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
bool m_aggregation
Flag whether the PSDU contains A-MPDU.
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
bool IsMu(WifiPreamble preamble)
Return true if a preamble corresponds to a multi-user transmission.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
bool IsValid(void) const
The standard disallows certain combinations of WifiMode, number of spatial streams,...
std::vector< SubcarrierRange > SubcarrierGroup
a vector of subcarrier ranges defining a subcarrier group
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
bool IsLdpc(void) const
Check if LDPC FEC coding is used or not.
uint8_t GetNssMax(void) const
uint16_t m_channelWidth
channel width in MHz
WifiModulationClass GetModulationClass() const
void SetNss(uint8_t nss)
Sets the number of Nss.
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
Declaration of the following enums:
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiMode m_mode
The DATARATE parameter in Table 15-4.
bool IsUlMu(void) const
Return true if this TX vector is used for an uplink multi-user transmission.
bool IsPhyIndexSet(void) const
Return true if the RU PHY index has been set, false otherwise.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void SetLength(uint16_t length)
Set the LENGTH field of the L-SIG.
WifiModulationClass GetModulationClass(void) const
Get the modulation class specified by this TXVECTOR.
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
HE MU specific user transmission parameters.
uint8_t m_nss
number of spatial streams
represent a single transmission mode
void SetNess(uint8_t ness)
Sets the Ness number.
uint8_t m_ness
number of spatial streams in beamforming
const HeMuUserInfoMap & GetHeMuUserInfoMap(void) const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
bool IsAggregation(void) const
Checks whether the PSDU contains A-MPDU.
bool m_ldpc
LDPC FEC coding if true, BCC otherwise.
std::string GetUniqueName(void) const
uint8_t GetNess(void) const
WifiPreamble GetPreambleType(void) const
HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const
Get the HE MU user-specific transmission information for the given STA-ID.
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
uint16_t m_length
LENGTH field of the L-SIG.
uint16_t GetChannelWidth(void) const
std::map< uint16_t, HeMuUserInfo > HeMuUserInfoMap
map of HE MU specific user info paramters indexed by STA-ID
uint16_t m_guardInterval
guard interval duration in nanoseconds
bool IsMu(void) const
Return true if this TX vector is used for a multi-user transmission.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 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 SetPhyIndex(uint16_t bw, uint8_t p20Index)
Set the RU PHY index.
HeMuUserInfoMap m_muUserInfos
HE MU specific per-user information indexed by station ID (STA-ID) corresponding to the 11 LSBs of th...
uint8_t m_nTx
number of TX antennas
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
uint8_t GetTxPowerLevel(void) const
WifiPreamble m_preamble
preamble
void SetNTx(uint8_t nTx)
Sets the number of TX antennas.
void SetStbc(bool stbc)
Sets if STBC is being used.
uint16_t GetLength(void) const
Get the LENGTH field of the L-SIG.
uint8_t GetNTx(void) const
bool IsUlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a uplink multi-user transmission.
void SetRu(HeRu::RuSpec ru, uint16_t staId)
Set the RU specification for the STA-ID.
void SetBssColor(uint8_t color)
Set the BSS color.
bool m_stbc
STBC used or not.
std::pair< std::size_t, std::size_t > GetNumRusPerHeSigBContentChannel(void) const
Get the number of RUs per HE-SIG-B content channel.
std::ostream & operator<<(std::ostream &os, const Angles &a)
uint8_t m_bssColor
BSS color.
bool m_modeInitialized
Internal initialization flag.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
bool IsDlMu(void) const
Return true if this TX vector is used for a downlink multi-user transmission.
bool GetModeInitialized(void) const
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.
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
void SetLdpc(bool ldpc)
Sets if LDPC FEC coding is being used.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
bool IsDlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a downlink multi-user transmission.