A Discrete-Event Network Simulator
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
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 "wifi-mode.h"
26 #include "wifi-preamble.h"
28 namespace ns3 {
62 {
63 public:
64  WifiTxVector ();
80  WifiTxVector (WifiMode mode,
81  uint8_t powerLevel,
82  WifiPreamble preamble,
83  uint16_t guardInterval,
84  uint8_t nTx,
85  uint8_t nss,
86  uint8_t ness,
87  uint16_t channelWidth,
88  bool aggregation,
89  bool stbc,
90  uint8_t bssColor = 0);
94  bool GetModeInitialized (void) const;
98  WifiMode GetMode (void) const;
104  void SetMode (WifiMode mode);
108  uint8_t GetTxPowerLevel (void) const;
114  void SetTxPowerLevel (uint8_t powerlevel);
118  WifiPreamble GetPreambleType (void) const;
124  void SetPreambleType (WifiPreamble preamble);
128  uint16_t GetChannelWidth (void) const;
134  void SetChannelWidth (uint16_t channelWidth);
138  uint16_t GetGuardInterval (void) const;
144  void SetGuardInterval (uint16_t guardInterval);
148  uint8_t GetNTx (void) const;
154  void SetNTx (uint8_t nTx);
158  uint8_t GetNss (void) const;
164  void SetNss (uint8_t nss);
168  uint8_t GetNess (void) const;
174  void SetNess (uint8_t ness);
180  bool IsAggregation (void) const;
186  void SetAggregation (bool aggregation);
193  bool IsStbc (void) const;
199  void SetStbc (bool stbc);
204  void SetBssColor (uint8_t color);
209  uint8_t GetBssColor (void) const;
217  bool IsValid (void) const;
220 private:
224  uint8_t m_txPowerLevel;
228  uint16_t m_channelWidth;
229  uint16_t m_guardInterval;
230  uint8_t m_nTx;
231  uint8_t m_nss;
232  uint8_t m_ness;
234  bool m_stbc;
235  uint8_t m_bssColor;
238 };
248 std::ostream & operator << (std::ostream & os,const WifiTxVector &v);
250 } //namespace ns3
252 #endif /* WIFI_TX_VECTOR_H */
uint16_t m_channelWidth
channel width in MHz
bool IsAggregation(void) const
Checks whether the PSDU contains A-MPDU.
uint8_t m_nTx
number of TX antennas
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)
void SetBssColor(uint8_t color)
Set the BSS color.
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
uint8_t GetNess(void) const
uint16_t GetGuardInterval(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
uint8_t m_nss
number of spatial streams
WifiPreamble GetPreambleType(void) const
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:32
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)
WifiMode GetMode(void) const
uint16_t m_guardInterval
guard interval duration in nanoseconds
uint8_t GetNTx(void) const
void SetNss(uint8_t nss)
Sets the number of Nss refer to IEEE 802.11n Table 20-28 for explanation and range.
bool m_modeInitialized
Internal initialization flag.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
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.
uint8_t GetBssColor(void) const
Get the BSS color.
void SetNess(uint8_t ness)
Sets the Ness number refer to IEEE 802.11n Table 20-6 for explanation.
uint8_t GetTxPowerLevel(void) const
uint16_t GetChannelWidth(void) const
uint8_t m_ness
number of spatial streams in beamforming
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
uint8_t GetNss(void) const
WifiMode m_mode
The DATARATE parameter in Table 15-4.
WifiPreamble m_preamble