A Discrete-Event Network Simulator
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
3 * Copyright (c) 2010 CTTC
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Authors: Nicola Baldo <nbaldo@cttc.es>
19 * Ghada Badawy <gbadawy@gmail.com>
20 */
22#ifndef WIFI_TX_VECTOR_H
23#define WIFI_TX_VECTOR_H
25#include <list>
26#include "wifi-mode.h"
27#include "wifi-phy-common.h"
28#include "ns3/he-ru.h"
30namespace ns3 {
37 uint8_t nss;
45 bool operator== (const HeMuUserInfo& other) const;
52 bool operator!= (const HeMuUserInfo& other) const;
89 typedef std::map <uint16_t /* staId */, HeMuUserInfo /* HE MU specific user info */> HeMuUserInfoMap;
91 WifiTxVector ();
111 uint8_t powerLevel,
112 WifiPreamble preamble,
113 uint16_t guardInterval,
114 uint8_t nTx,
115 uint8_t nss,
116 uint8_t ness,
117 uint16_t channelWidth,
118 bool aggregation,
119 bool stbc = false,
120 bool ldpc = false,
121 uint8_t bssColor = 0,
122 uint16_t length = 0);
127 WifiTxVector (const WifiTxVector& txVector);
132 bool GetModeInitialized (void) const;
142 WifiMode GetMode (uint16_t staId = SU_STA_ID) const;
148 void SetMode (WifiMode mode);
155 void SetMode (WifiMode mode, uint16_t staId);
167 uint8_t GetTxPowerLevel (void) const;
173 void SetTxPowerLevel (uint8_t powerlevel);
177 WifiPreamble GetPreambleType (void) const;
183 void SetPreambleType (WifiPreamble preamble);
187 uint16_t GetChannelWidth (void) const;
193 void SetChannelWidth (uint16_t channelWidth);
197 uint16_t GetGuardInterval (void) const;
203 void SetGuardInterval (uint16_t guardInterval);
207 uint8_t GetNTx (void) const;
213 void SetNTx (uint8_t nTx);
223 uint8_t GetNss (uint16_t staId = SU_STA_ID) const;
227 uint8_t GetNssMax (void) const;
233 void SetNss (uint8_t nss);
240 void SetNss (uint8_t nss, uint16_t staId);
244 uint8_t GetNess (void) const;
250 void SetNess (uint8_t ness);
256 bool IsAggregation (void) const;
262 void SetAggregation (bool aggregation);
269 bool IsStbc (void) const;
275 void SetStbc (bool stbc);
282 bool IsLdpc (void) const;
288 void SetLdpc (bool ldpc);
293 void SetBssColor (uint8_t color);
298 uint8_t GetBssColor (void) const;
303 void SetLength (uint16_t length);
308 uint16_t GetLength (void) const;
316 bool IsValid (void) const;
322 bool IsMu (void) const;
328 bool IsDlMu (void) const;
334 bool IsUlMu (void) const;
342 HeRu::RuSpec GetRu (uint16_t staId) const;
350 void SetRu (HeRu::RuSpec ru, uint16_t staId);
358 HeMuUserInfo GetHeMuUserInfo (uint16_t staId) const;
366 void SetHeMuUserInfo (uint16_t staId, HeMuUserInfo userInfo);
373 const HeMuUserInfoMap& GetHeMuUserInfoMap (void) const;
389 std::pair<std::size_t, std::size_t> GetNumRusPerHeSigBContentChannel (void) const;
400 uint16_t m_channelWidth;
402 uint8_t m_nTx;
403 uint8_t m_nss;
404 uint8_t m_ness;
406 bool m_stbc;
407 bool m_ldpc;
408 uint8_t m_bssColor;
409 uint16_t m_length;
413 //MU information
428std::ostream & operator << (std::ostream & os,const WifiTxVector &v);
430} //namespace ns3
432#endif /* WIFI_TX_VECTOR_H */
RU Specification.
Definition: he-ru.h:68
represent a single transmission mode
Definition: wifi-mode.h:48
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
uint8_t GetBssColor(void) const
Get the BSS color.
uint16_t m_channelWidth
channel width in MHz
void SetStbc(bool stbc)
Sets if STBC is being used.
void SetNess(uint8_t ness)
Sets the Ness number.
bool IsDlMu(void) const
Return true if this TX vector is used for a downlink multi-user transmission.
bool m_aggregation
Flag whether the PSDU contains A-MPDU.
uint8_t GetNTx(void) const
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
void SetLdpc(bool ldpc)
Sets if LDPC FEC coding is being used.
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
WifiMode m_mode
The DATARATE parameter in Table 15-4.
std::map< uint16_t, HeMuUserInfo > HeMuUserInfoMap
map of HE MU specific user info paramters indexed by STA-ID
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
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.
uint8_t GetTxPowerLevel(void) const
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
uint8_t GetNess(void) const
uint16_t GetLength(void) const
Get the LENGTH field of the L-SIG.
HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const
Get the HE MU user-specific transmission information for the given STA-ID.
uint8_t m_nTx
number of TX antennas
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
WifiPreamble GetPreambleType(void) const
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
HeMuUserInfoMap m_muUserInfos
HE MU specific per-user information indexed by station ID (STA-ID) corresponding to the 11 LSBs of th...
bool GetModeInitialized(void) const
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
bool m_ldpc
LDPC FEC coding if true, BCC otherwise.
uint16_t m_guardInterval
guard interval duration in nanoseconds
bool m_stbc
STBC used or not.
uint8_t m_nss
number of spatial streams
void SetRu(HeRu::RuSpec ru, uint16_t staId)
Set the RU specification for the STA-ID.
bool IsValid(void) const
The standard disallows certain combinations of WifiMode, number of spatial streams,...
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 SetLength(uint16_t length)
Set the LENGTH field of the L-SIG.
bool IsAggregation(void) const
Checks whether the PSDU contains A-MPDU.
const HeMuUserInfoMap & GetHeMuUserInfoMap(void) const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
std::pair< std::size_t, std::size_t > GetNumRusPerHeSigBContentChannel(void) const
Get the number of RUs per HE-SIG-B content channel.
uint16_t m_length
LENGTH field of the L-SIG.
uint8_t m_bssColor
BSS color.
bool IsMu(void) const
Return true if this TX vector is used for a multi-user transmission.
void SetBssColor(uint8_t color)
Set the BSS color.
void SetNTx(uint8_t nTx)
Sets the number of TX antennas.
uint16_t GetChannelWidth(void) const
bool IsLdpc(void) const
Check if LDPC FEC coding is used or not.
WifiPreamble m_preamble
bool IsStbc(void) const
Check if STBC is used or not.
bool m_modeInitialized
Internal initialization flag.
uint8_t m_ness
number of spatial streams in beamforming
uint16_t GetGuardInterval(void) const
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
uint8_t GetNssMax(void) const
void SetNss(uint8_t nss)
Sets the number of Nss.
bool IsUlMu(void) const
Return true if this TX vector is used for an uplink multi-user transmission.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
WifiModulationClass GetModulationClass(void) const
Get the modulation class specified by this TXVECTOR.
The type of preamble to be used by an IEEE 802.11 transmission.
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.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:139
HE MU specific user transmission parameters.
HeRu::RuSpec ru
RU specification.
uint8_t nss
number of spatial streams
bool operator!=(const HeMuUserInfo &other) const
Compare this user info to the given user info.
bool operator==(const HeMuUserInfo &other) const
Compare this user info to the given user info.
WifiMode mcs
#define SU_STA_ID
Definition: wifi-mode.h:32
Declaration of the following enums: