A Discrete-Event Network Simulator
API
wifi-tx-vector.h
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
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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  * Author: Nicola Baldo <nbaldo@cttc.es>
19  * : Ghada Badawy <gbadawy@gmail.com>
20  */
21 
22 #ifndef WIFI_TX_VECTOR_H
23 #define WIFI_TX_VECTOR_H
24 
25 #include <ns3/wifi-mode.h>
26 #include <ostream>
27 
28 namespace ns3 {
29 
30 
62 {
63 public:
64  WifiTxVector ();
76  WifiTxVector (WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool stbc);
80  WifiMode GetMode (void) const;
86  void SetMode (WifiMode mode);
90  uint8_t GetTxPowerLevel (void) const;
96  void SetTxPowerLevel (uint8_t powerlevel);
100  uint8_t GetRetries (void) const;
106  void SetRetries (uint8_t retries);
110  bool IsShortGuardInterval (void) const;
116  void SetShortGuardInterval (bool guardinterval);
120  uint8_t GetNss (void) const;
126  void SetNss (uint8_t nss);
130  uint8_t GetNess (void) const;
136  void SetNess (uint8_t ness);
142  bool IsStbc (void) const;
148  void SetStbc (bool stbc);
149 
150 
151 private:
152 
156  uint8_t m_txPowerLevel;
159  uint8_t m_retries;
162  uint8_t m_nss;
163  uint8_t m_ness;
164  bool m_stbc;
166  bool m_modeInitialized; //*< Internal initialization flag */
167  bool m_txPowerLevelInitialized; //*< Internal initialization flag */
168 
169 };
170 
178 std::ostream & operator << (std::ostream & os,const WifiTxVector &v);
179 
180 } // namespace ns3
181 
182 #endif // WIFI_TX_VECTOR_H
void SetShortGuardInterval(bool guardinterval)
Sets if short gurad interval is being used.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
bool m_shortGuardInterval
true if short GI is going to be used
void SetStbc(bool stbc)
Sets if STBC is being used.
bool IsShortGuardInterval(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:93
uint8_t GetTxPowerLevel(void) const
uint8_t m_nss
number of streams
uint8_t GetNess(void) const
bool IsStbc(void) const
Check if STBC is used or not.
uint8_t m_retries
The DATA_RETRIES/RTS_RETRIES parameter for Click radiotap information.
void SetNss(uint8_t nss)
Sets the number of Nss refer to IEEE 802.11n Table 20-28 for explanation and range.
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 SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
bool m_stbc
STBC used or not.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
uint8_t GetNss(void) const
void SetNess(uint8_t ness)
Sets the Ness number refer to IEEE 802.11n Table 20-6 for explanation.
void SetRetries(uint8_t retries)
Sets the number of retries.
uint8_t GetRetries(void) const
uint8_t m_ness
number of streams in beamforming
WifiMode GetMode(void) const
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
WifiMode m_mode
The DATARATE parameter in Table 15-4.