author | Alexander Krotov <krotov@iitp.ru> |
Sat, 04 Aug 2018 20:02:47 +0300 | |
changeset 13716 | 0b3abcc6f68f |
parent 13496 | df02bf906b2b |
child 13878 | 0cb5fc48c184 |
permissions | -rw-r--r-- |
10139 | 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 |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
10139 | 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 |
* |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
18 |
* Authors: Nicola Baldo <nbaldo@cttc.es> |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
19 |
* Ghada Badawy <gbadawy@gmail.com> |
10139 | 20 |
*/ |
21 |
||
22 |
#ifndef WIFI_TX_VECTOR_H |
|
23 |
#define WIFI_TX_VECTOR_H |
|
24 |
||
12433
89cdf2a76202
wifi: Clean includes
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12431
diff
changeset
|
25 |
#include "wifi-mode.h" |
89cdf2a76202
wifi: Clean includes
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12431
diff
changeset
|
26 |
#include "wifi-preamble.h" |
10139 | 27 |
|
28 |
namespace ns3 { |
|
29 |
||
30 |
||
31 |
/** |
|
32 |
* This class mimics the TXVECTOR which is to be |
|
33 |
* passed to the PHY in order to define the parameters which are to be |
|
34 |
* used for a transmission. See IEEE 802.11-2007 15.2.6 "Transmit PLCP", |
|
35 |
* and also 15.4.4.2 "PMD_SAP peer-to-peer service primitive |
|
36 |
* parameters". |
|
37 |
* |
|
11115
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
38 |
* If this class is constructed with the constructor that takes no |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
39 |
* arguments, then the client must explicitly set the mode and |
11115
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
40 |
* transmit power level parameters before using them. Default |
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
41 |
* member initializers are provided for the other parameters, to |
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
42 |
* conform to a non-MIMO/long guard configuration, although these |
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
43 |
* may also be explicitly set after object construction. |
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
44 |
* |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
45 |
* When used in a infrastructure context, WifiTxVector values should be |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
46 |
* drawn from WifiRemoteStationManager parameters since rate adaptation |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
47 |
* is responsible for picking the mode, number of streams, etc., but in |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
48 |
* the case in which there is no such manager (e.g. mesh), the client |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
49 |
* still needs to initialize at least the mode and transmit power level |
11115
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
50 |
* appropriately. |
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
51 |
* |
10139 | 52 |
* \note the above reference is valid for the DSSS PHY only (clause |
53 |
* 15). TXVECTOR is defined also for the other PHYs, however they |
|
54 |
* don't include the TXPWRLVL explicitly in the TXVECTOR. This is |
|
55 |
* somewhat strange, since all PHYs actually have a |
|
56 |
* PMD_TXPWRLVL.request primitive. We decide to include the power |
|
57 |
* level in WifiTxVector for all PHYs, since it serves better our |
|
58 |
* purposes, and furthermore it seems close to the way real devices |
|
59 |
* work (e.g., madwifi). |
|
60 |
*/ |
|
61 |
class WifiTxVector |
|
62 |
{ |
|
63 |
public: |
|
64 |
WifiTxVector (); |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
65 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
66 |
* Create a TXVECTOR with the given parameters. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
67 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
68 |
* \param mode WifiMode |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
69 |
* \param powerLevel transmission power level |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
70 |
* \param preamble preamble type |
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
71 |
* \param guardInterval the guard interval duration in nanoseconds |
12413
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
72 |
* \param nTx the number of TX antennas |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
73 |
* \param nss the number of spatial STBC streams (NSS) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
74 |
* \param ness the number of extension spatial streams (NESS) |
11628
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
75 |
* \param channelWidth the channel width in MHz |
11570 | 76 |
* \param aggregation enable or disable MPDU aggregation |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
77 |
* \param stbc enable or disable STBC |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
78 |
*/ |
11479
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
79 |
WifiTxVector (WifiMode mode, |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
80 |
uint8_t powerLevel, |
12429
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
81 |
WifiPreamble preamble, |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
82 |
uint16_t guardInterval, |
12413
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
83 |
uint8_t nTx, |
11479
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
84 |
uint8_t nss, |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
85 |
uint8_t ness, |
13496
df02bf906b2b
wifi: Use uint16_t for channel widths to prepare 802.11ad support and silent some Visual Studio compiler warnings
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
13345
diff
changeset
|
86 |
uint16_t channelWidth, |
11479
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
87 |
bool aggregation, |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
88 |
bool stbc); |
10139 | 89 |
/** |
11570 | 90 |
* \returns the selected payload transmission mode |
10139 | 91 |
*/ |
92 |
WifiMode GetMode (void) const; |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
93 |
/** |
10139 | 94 |
* Sets the selected payload transmission mode |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
95 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
96 |
* \param mode |
10139 | 97 |
*/ |
98 |
void SetMode (WifiMode mode); |
|
99 |
/** |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
100 |
* \returns the transmission power level |
10139 | 101 |
*/ |
102 |
uint8_t GetTxPowerLevel (void) const; |
|
103 |
/** |
|
104 |
* Sets the selected transmission power level |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
105 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
106 |
* \param powerlevel |
10139 | 107 |
*/ |
108 |
void SetTxPowerLevel (uint8_t powerlevel); |
|
109 |
/** |
|
12429
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
110 |
* \returns the preamble type |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
111 |
*/ |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
112 |
WifiPreamble GetPreambleType (void) const; |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
113 |
/** |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
114 |
* Sets the preamble type |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
115 |
* |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
116 |
* \param preamble |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
117 |
*/ |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
118 |
void SetPreambleType (WifiPreamble preamble); |
d12f1640acca
wifi: (fixes #2551) Move preamble to TXVECTOR
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12413
diff
changeset
|
119 |
/** |
11628
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
120 |
* \returns the channel width (in MHz) |
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
121 |
*/ |
13496
df02bf906b2b
wifi: Use uint16_t for channel widths to prepare 802.11ad support and silent some Visual Studio compiler warnings
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
13345
diff
changeset
|
122 |
uint16_t GetChannelWidth (void) const; |
11628
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
123 |
/** |
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
124 |
* Sets the selected channelWidth (in MHz) |
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
125 |
* |
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
126 |
* \param channelWidth |
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
127 |
*/ |
13496
df02bf906b2b
wifi: Use uint16_t for channel widths to prepare 802.11ad support and silent some Visual Studio compiler warnings
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
13345
diff
changeset
|
128 |
void SetChannelWidth (uint16_t channelWidth); |
11628
243b71de25a0
add support for IEEE 802.11ac
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11570
diff
changeset
|
129 |
/** |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
130 |
* \returns the guard interval duration (in nanoseconds) |
10139 | 131 |
*/ |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
132 |
uint16_t GetGuardInterval (void) const; |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
133 |
/** |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
134 |
* Sets the guard interval duration (in nanoseconds) |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
135 |
* |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
136 |
* \param guardInterval the guard interval duration (in nanoseconds) |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
137 |
*/ |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
138 |
void SetGuardInterval (uint16_t guardInterval); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
139 |
/** |
12413
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
140 |
* \returns the number of TX antennas |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
141 |
*/ |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
142 |
uint8_t GetNTx (void) const; |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
143 |
/** |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
144 |
* Sets the number of TX antennas |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
145 |
* |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
146 |
* \param nTx |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
147 |
*/ |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
148 |
void SetNTx (uint8_t nTx); |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
149 |
/** |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
150 |
* \returns the number of Nss |
10139 | 151 |
*/ |
152 |
uint8_t GetNss (void) const; |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
153 |
/** |
11083
96e983e7cd5d
fix typos in wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10483
diff
changeset
|
154 |
* Sets the number of Nss refer to IEEE 802.11n Table 20-28 for explanation and range |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
155 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
156 |
* \param nss |
10139 | 157 |
*/ |
158 |
void SetNss (uint8_t nss); |
|
159 |
/** |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
160 |
* \returns the number of Ness |
10139 | 161 |
*/ |
162 |
uint8_t GetNess (void) const; |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
163 |
/** |
11083
96e983e7cd5d
fix typos in wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10483
diff
changeset
|
164 |
* Sets the Ness number refer to IEEE 802.11n Table 20-6 for explanation |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
165 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
166 |
* \param ness |
10139 | 167 |
*/ |
168 |
void SetNess (uint8_t ness); |
|
169 |
/** |
|
11479
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
170 |
* Checks whether the PSDU contains A-MPDU. |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
171 |
* \returns true if this PSDU has A-MPDU aggregation, |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
172 |
* false otherwise. |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
173 |
*/ |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
174 |
bool IsAggregation (void) const; |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
175 |
/** |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
176 |
* Sets if PSDU contains A-MPDU. |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
177 |
* |
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
178 |
* \param aggregation whether the PSDU contains A-MPDU or not. |
11479
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
179 |
*/ |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
180 |
void SetAggregation (bool aggregation); |
a3dcf66928f3
add support for HT MCS and A-MPDU in radiotap headers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11450
diff
changeset
|
181 |
/** |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
182 |
* Check if STBC is used or not |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
183 |
* |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
184 |
* \returns true if STBC is used, |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
185 |
* false otherwise |
10139 | 186 |
*/ |
187 |
bool IsStbc (void) const; |
|
188 |
/** |
|
189 |
* Sets if STBC is being used |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
190 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
191 |
* \param stbc enable or disable STBC |
10139 | 192 |
*/ |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
193 |
void SetStbc (bool stbc); |
13209
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
194 |
/** |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
195 |
* The standard disallows certain combinations of WifiMode, number of |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
196 |
* spatial streams, and channel widths. This method can be used to |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
197 |
* check whether this WifiTxVector contains an invalid combination. |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
198 |
* |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
199 |
* \return true if the WifiTxVector parameters are allowed by the standard |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
200 |
*/ |
630f9d433b41
wifi: Move IsValidTxVector to a member of WifiTxVector
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12691
diff
changeset
|
201 |
bool IsValid (void) const; |
10139 | 202 |
|
203 |
||
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
204 |
private: |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
205 |
WifiMode m_mode; /**< The DATARATE parameter in Table 15-4. |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
206 |
It is the value that will be passed |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
207 |
to PMD_RATE.request */ |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
208 |
uint8_t m_txPowerLevel; /**< The TXPWR_LEVEL parameter in Table 15-4. |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
209 |
It is the value that will be passed |
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
210 |
to PMD_TXPWRLVL.request */ |
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
211 |
WifiPreamble m_preamble; /**< preamble */ |
13496
df02bf906b2b
wifi: Use uint16_t for channel widths to prepare 802.11ad support and silent some Visual Studio compiler warnings
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
13345
diff
changeset
|
212 |
uint16_t m_channelWidth; /**< channel width in MHz */ |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12499
diff
changeset
|
213 |
uint16_t m_guardInterval; /**< guard interval duration in nanoseconds */ |
12413
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
214 |
uint8_t m_nTx; /**< number of TX antennas */ |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
215 |
uint8_t m_nss; /**< number of spatial streams */ |
f379a30efa16
wifi: (fixes #2533) Improve 802.11n MIMO PHY abstraction
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
216 |
uint8_t m_ness; /**< number of spatial streams in beamforming */ |
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
217 |
bool m_aggregation; /**< Flag whether the PSDU contains A-MPDU. */ |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
218 |
bool m_stbc; /**< STBC used or not */ |
11115
ee55cea92a18
bug 2030: provide default values for WifiTxVector
Tom Henderson <tomh@tomh.org>
parents:
11083
diff
changeset
|
219 |
|
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
220 |
bool m_modeInitialized; /**< Internal initialization flag */ |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
221 |
bool m_txPowerLevelInitialized; /**< Internal initialization flag */ |
10139 | 222 |
}; |
223 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
224 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
225 |
* Serialize WifiTxVector to the given ostream. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
226 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
227 |
* \param os |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
228 |
* \param v |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
229 |
* |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
230 |
* \return ostream |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
231 |
*/ |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
232 |
std::ostream & operator << (std::ostream & os,const WifiTxVector &v); |
10139 | 233 |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
234 |
} //namespace ns3 |
10139 | 235 |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11115
diff
changeset
|
236 |
#endif /* WIFI_TX_VECTOR_H */ |