A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ofdm-phy.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Rediet <getachew.redieteab@orange.com>
18 * Sébastien Deronne <sebastien.deronne@gmail.com> (for logic ported from wifi-phy)
19 * Mathieu Lacage <mathieu.lacage@sophia.inria.fr> (for logic ported from wifi-phy)
20 */
21
22#ifndef OFDM_PHY_H
23#define OFDM_PHY_H
24
25#include "ns3/phy-entity.h"
26
27/**
28 * \file
29 * \ingroup wifi
30 * Declaration of ns3::OfdmPhy class
31 * and ns3::OfdmPhyVariant enum.
32 */
33
34namespace ns3
35{
36
37/**
38 * \ingroup wifi
39 * The OFDM (11a) PHY variants.
40 *
41 * \see OfdmPhy
42 */
44{
48};
49
50/**
51 * \brief PHY entity for OFDM (11a)
52 * \ingroup wifi
53 *
54 * This class is also used for the 10 MHz and 5 MHz bandwidth
55 * variants addressing vehicular communications (default is 20 MHz
56 * bandwidth).
57 *
58 * Refer to IEEE 802.11-2016, clause 17.
59 */
60class OfdmPhy : public PhyEntity
61{
62 public:
63 /**
64 * Constructor for OFDM PHY
65 *
66 * \param variant the OFDM PHY variant
67 * \param buildModeList flag used to add OFDM modes to list (disabled
68 * by child classes to only add child classes' modes)
69 */
70 OfdmPhy(OfdmPhyVariant variant = OFDM_PHY_DEFAULT, bool buildModeList = true);
71 /**
72 * Destructor for OFDM PHY
73 */
74 ~OfdmPhy() override;
75
76 WifiMode GetSigMode(WifiPpduField field, const WifiTxVector& txVector) const override;
77 const PpduFormats& GetPpduFormats() const override;
78 Time GetDuration(WifiPpduField field, const WifiTxVector& txVector) const override;
80 const WifiTxVector& txVector,
81 WifiPhyBand band,
82 MpduType mpdutype,
83 bool incFlag,
84 uint32_t& totalAmpduSize,
85 double& totalAmpduNumSymbols,
86 uint16_t staId) const override;
88 const WifiTxVector& txVector,
89 Time ppduDuration) override;
90 double GetCcaThreshold(const Ptr<const WifiPpdu> ppdu,
91 WifiChannelListType channelType) const override;
93
94 /**
95 * Initialize all OFDM modes (for all variants).
96 */
97 static void InitializeModes();
98 /**
99 * Return a WifiMode for OFDM
100 * corresponding to the provided rate and
101 * the channel bandwidth (20, 10, or 5 MHz).
102 *
103 * \param rate the rate in bps
104 * \param bw the bandwidth in MHz
105 * \return a WifiMode for OFDM
106 */
107 static WifiMode GetOfdmRate(uint64_t rate, uint16_t bw = 20);
108 /**
109 * Return a WifiMode for OFDM at 6 Mbps.
110 *
111 * \return a WifiMode for OFDM at 6 Mbps
112 */
114 /**
115 * Return a WifiMode for OFDM at 9 Mbps.
116 *
117 * \return a WifiMode for OFDM at 9 Mbps
118 */
120 /**
121 * Return a WifiMode for OFDM at 12Mbps.
122 *
123 * \return a WifiMode for OFDM at 12 Mbps
124 */
126 /**
127 * Return a WifiMode for OFDM at 18 Mbps.
128 *
129 * \return a WifiMode for OFDM at 18 Mbps
130 */
132 /**
133 * Return a WifiMode for OFDM at 24 Mbps.
134 *
135 * \return a WifiMode for OFDM at 24 Mbps
136 */
138 /**
139 * Return a WifiMode for OFDM at 36 Mbps.
140 *
141 * \return a WifiMode for OFDM at 36 Mbps
142 */
144 /**
145 * Return a WifiMode for OFDM at 48 Mbps.
146 *
147 * \return a WifiMode for OFDM at 48 Mbps
148 */
150 /**
151 * Return a WifiMode for OFDM at 54 Mbps.
152 *
153 * \return a WifiMode for OFDM at 54 Mbps
154 */
156 /**
157 * Return a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing.
158 *
159 * \return a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing
160 */
162 /**
163 * Return a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing.
164 *
165 * \return a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing
166 */
168 /**
169 * Return a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing.
170 *
171 * \return a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing
172 */
174 /**
175 * Return a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing.
176 *
177 * \return a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing
178 */
180 /**
181 * Return a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing.
182 *
183 * \return a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing
184 */
186 /**
187 * Return a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing.
188 *
189 * \return a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing
190 */
192 /**
193 * Return a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing.
194 *
195 * \return a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing
196 */
198 /**
199 * Return a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing.
200 *
201 * \return a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing
202 */
204 /**
205 * Return a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing.
206 *
207 * \return a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing
208 */
210 /**
211 * Return a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing.
212 *
213 * \return a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing
214 */
216 /**
217 * Return a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing.
218 *
219 * \return a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing
220 */
222 /**
223 * Return a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing.
224 *
225 * \return a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing
226 */
228 /**
229 * Return a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing.
230 *
231 * \return a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing
232 */
234 /**
235 * Return a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing.
236 *
237 * \return a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing
238 */
240 /**
241 * Return a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing.
242 *
243 * \return a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing
244 */
246 /**
247 * Return a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing.
248 *
249 * \return a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing
250 */
252
253 /**
254 * Return the WifiCodeRate from the OFDM mode's unique name using
255 * ModulationLookupTable. This is mainly used as a callback for
256 * WifiMode operation.
257 *
258 * \param name the unique name of the OFDM mode
259 * \return WifiCodeRate corresponding to the unique name
260 */
261 static WifiCodeRate GetCodeRate(const std::string& name);
262 /**
263 * Return the constellation size from the OFDM mode's unique name using
264 * ModulationLookupTable. This is mainly used as a callback for
265 * WifiMode operation.
266 *
267 * \param name the unique name of the OFDM mode
268 * \return constellation size corresponding to the unique name
269 */
270 static uint16_t GetConstellationSize(const std::string& name);
271 /**
272 * Return the PHY rate from the OFDM mode's unique name and
273 * the supplied parameters. This function calls CalculatePhyRate
274 * and is mainly used as a callback for WifiMode operation.
275 *
276 * \param name the unique name of the OFDM mode
277 * \param channelWidth the considered channel width in MHz
278 *
279 * \return the physical bit rate of this signal in bps.
280 */
281 static uint64_t GetPhyRate(const std::string& name, uint16_t channelWidth);
282
283 /**
284 * Return the PHY rate corresponding to
285 * the supplied TXVECTOR.
286 * This function is mainly used as a callback
287 * for WifiMode operation.
288 *
289 * \param txVector the TXVECTOR used for the transmission
290 * \param staId the station ID (only here to have a common signature for all callbacks)
291 * \return the physical bit rate of this signal in bps.
292 */
293 static uint64_t GetPhyRateFromTxVector(const WifiTxVector& txVector, uint16_t staId);
294 /**
295 * Return the data rate corresponding to
296 * the supplied TXVECTOR.
297 * This function is mainly used as a callback
298 * for WifiMode operation.
299 *
300 * \param txVector the TXVECTOR used for the transmission
301 * \param staId the station ID (only here to have a common signature for all callbacks)
302 * \return the data bit rate in bps.
303 */
304 static uint64_t GetDataRateFromTxVector(const WifiTxVector& txVector, uint16_t staId);
305 /**
306 * Return the data rate from the OFDM mode's unique name and
307 * the supplied parameters. This function calls CalculateDataRate and
308 * is mainly used as a callback for WifiMode operation.
309 *
310 * \param name the unique name of the OFDM mode
311 * \param channelWidth the considered channel width in MHz
312 *
313 * \return the data bit rate of this signal in bps.
314 */
315 static uint64_t GetDataRate(const std::string& name, uint16_t channelWidth);
316 /**
317 * Check whether the combination in TXVECTOR is allowed.
318 * This function is used as a callback for WifiMode operation.
319 *
320 * \param txVector the TXVECTOR
321 * \returns true if this combination is allowed, false otherwise.
322 */
323 static bool IsAllowed(const WifiTxVector& txVector);
324
325 protected:
328 Ptr<const WifiPpdu> ppdu) const override;
329 uint32_t GetMaxPsduSize() const override;
330 uint16_t GetMeasurementChannelWidth(const Ptr<const WifiPpdu> ppdu) const override;
331
332 /**
333 * \param txVector the transmission parameters
334 * \return the WifiMode used for the SIGNAL field
335 */
336 virtual WifiMode GetHeaderMode(const WifiTxVector& txVector) const;
337
338 /**
339 * \param txVector the transmission parameters
340 * \return the duration of the preamble field
341 *
342 * \see WIFI_PPDU_FIELD_PREAMBLE
343 */
344 virtual Time GetPreambleDuration(const WifiTxVector& txVector) const;
345 /**
346 * \param txVector the transmission parameters
347 * \return the duration of the SIGNAL field
348 */
349 virtual Time GetHeaderDuration(const WifiTxVector& txVector) const;
350
351 /**
352 * \return the number of service bits
353 */
354 uint8_t GetNumberServiceBits() const;
355 /**
356 * \param band the frequency band being used
357 * \return the signal extension duration
358 */
360
361 /**
362 * End receiving the header, perform OFDM-specific actions, and
363 * provide the status of the reception.
364 *
365 * \param event the event holding incoming PPDU's information
366 * \return status of the reception of the header
367 */
369
370 /**
371 * Checks if the PPDU's bandwidth is supported by the PHY.
372 *
373 * \param ppdu the received PPDU
374 * \return \c true if supported, \c false otherwise
375 */
376 virtual bool IsChannelWidthSupported(Ptr<const WifiPpdu> ppdu) const;
377 /**
378 * Checks if the signaled configuration (including bandwidth)
379 * is supported by the PHY.
380 *
381 * \param field the current PPDU field (SIG used for checking config)
382 * \param ppdu the received PPDU
383 * \return \c true if supported, \c false otherwise
384 */
385 virtual bool IsAllConfigSupported(WifiPpduField field, Ptr<const WifiPpdu> ppdu) const;
386
387 /**
388 * Calculate the PHY rate in bps from code rate and data rate.
389 *
390 * \param codeRate the WifiCodeRate
391 * \param dataRate the data rate in bps
392 * \return the physical rate in bps from WifiCodeRate and data rate.
393 */
394 static uint64_t CalculatePhyRate(WifiCodeRate codeRate, uint64_t dataRate);
395 /**
396 * Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
397 *
398 * \param codeRate the WifiCodeRate
399 * \return the ratio form of WifiCodeRate.
400 */
401 static double GetCodeRatio(WifiCodeRate codeRate);
402 /**
403 * Calculates data rate from the supplied parameters.
404 *
405 * \param codeRate the code rate of the mode
406 * \param constellationSize the size of modulation constellation
407 * \param channelWidth the considered channel width in MHz
408 *
409 * \return the data bit rate of this signal in bps.
410 */
411 static uint64_t CalculateDataRate(WifiCodeRate codeRate,
412 uint16_t constellationSize,
413 uint16_t channelWidth);
414 /**
415 * Calculates data rate from the supplied parameters.
416 *
417 * \param symbolDuration the symbol duration
418 * \param usableSubCarriers the number of usable subcarriers for data
419 * \param numberOfBitsPerSubcarrier the number of data bits per subcarrier
420 * \param codingRate the coding rate
421 *
422 * \return the data bit rate of this signal in bps.
423 */
424 static uint64_t CalculateDataRate(Time symbolDuration,
425 uint16_t usableSubCarriers,
426 uint16_t numberOfBitsPerSubcarrier,
427 double codingRate);
428
429 /**
430 * \return the number of usable subcarriers for data
431 */
432 static uint16_t GetUsableSubcarriers();
433
434 /**
435 * \param channelWidth the channel width in MHz
436 * \return the symbol duration
437 */
438 static Time GetSymbolDuration(uint16_t channelWidth);
439
440 private:
441 /**
442 * Create an OFDM mode from a unique name, the unique name
443 * must already be contained inside ModulationLookupTable.
444 * This method binds all the callbacks used by WifiMode.
445 *
446 * \param uniqueName the unique name of the WifiMode
447 * \param isMandatory whether the WifiMode is mandatory
448 * \return the OFDM WifiMode
449 */
450 static WifiMode CreateOfdmMode(std::string uniqueName, bool isMandatory);
451
452 static const PpduFormats m_ofdmPpduFormats; //!< OFDM PPDU formats
453
454 static const ModulationLookupTable
455 m_ofdmModulationLookupTable; //!< lookup table to retrieve code rate and constellation size
456 //!< corresponding to a unique name of modulation
457}; // class OfdmPhy
458
459} // namespace ns3
460
461#endif /* OFDM_PHY_H */
PHY entity for OFDM (11a)
Definition: ofdm-phy.h:61
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6 Mbps.
uint32_t GetMaxPsduSize() const override
Get the maximum PSDU size in bytes.
Definition: ofdm-phy.cc:662
~OfdmPhy() override
Destructor for OFDM PHY.
Definition: ofdm-phy.cc:149
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing.
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48 Mbps.
static const PpduFormats m_ofdmPpduFormats
OFDM PPDU formats.
Definition: ofdm-phy.h:452
static uint16_t GetConstellationSize(const std::string &name)
Return the constellation size from the OFDM mode's unique name using ModulationLookupTable.
Definition: ofdm-phy.cc:557
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54 Mbps.
uint8_t GetNumberServiceBits() const
Definition: ofdm-phy.cc:284
static WifiCodeRate GetCodeRate(const std::string &name)
Return the WifiCodeRate from the OFDM mode's unique name using ModulationLookupTable.
Definition: ofdm-phy.cc:551
double GetCcaThreshold(const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType) const override
Return the CCA threshold in dBm for a given channel type.
Definition: ofdm-phy.cc:678
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the PHY rate corresponding to the supplied TXVECTOR.
Definition: ofdm-phy.cc:577
static uint64_t CalculateDataRate(WifiCodeRate codeRate, uint16_t constellationSize, uint16_t channelWidth)
Calculates data rate from the supplied parameters.
Definition: ofdm-phy.cc:615
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36 Mbps.
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing.
static void InitializeModes()
Initialize all OFDM modes (for all variants).
Definition: ofdm-phy.cc:402
virtual bool IsAllConfigSupported(WifiPpduField field, Ptr< const WifiPpdu > ppdu) const
Checks if the signaled configuration (including bandwidth) is supported by the PHY.
Definition: ofdm-phy.cc:358
PhyFieldRxStatus EndReceiveHeader(Ptr< Event > event)
End receiving the header, perform OFDM-specific actions, and provide the status of the reception.
Definition: ofdm-phy.cc:321
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing.
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
Definition: ofdm-phy.cc:188
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
Definition: ofdm-phy.cc:656
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing.
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
Definition: ofdm-phy.cc:601
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing.
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing.
static Time GetSymbolDuration(uint16_t channelWidth)
Definition: ofdm-phy.cc:640
static uint64_t GetPhyRate(const std::string &name, uint16_t channelWidth)
Return the PHY rate from the OFDM mode's unique name and the supplied parameters.
Definition: ofdm-phy.cc:563
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing.
static uint16_t GetUsableSubcarriers()
Definition: ofdm-phy.cc:634
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing.
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing.
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing.
virtual Time GetPreambleDuration(const WifiTxVector &txVector) const
Definition: ofdm-phy.cc:208
Ptr< const WifiPpdu > GetRxPpduFromTxPpdu(Ptr< const WifiPpdu > ppdu) override
The WifiPpdu from the TX PHY is received by each RX PHY attached to the same channel.
Definition: ofdm-phy.cc:691
static WifiMode GetOfdmRate(uint64_t rate, uint16_t bw=20)
Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20,...
Definition: ofdm-phy.cc:414
static WifiMode GetOfdmRate27MbpsBW10MHz()
Return a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing.
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing.
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition: ofdm-phy.cc:296
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
static WifiMode CreateOfdmMode(std::string uniqueName, bool isMandatory)
Create an OFDM mode from a unique name, the unique name must already be contained inside ModulationLo...
Definition: ofdm-phy.cc:533
uint16_t GetMeasurementChannelWidth(const Ptr< const WifiPpdu > ppdu) const override
Return the channel width used to measure the RSSI.
Definition: ofdm-phy.cc:668
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing.
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18 Mbps.
Ptr< SpectrumValue > GetTxPowerSpectralDensity(double txPowerW, Ptr< const WifiPpdu > ppdu) const override
Definition: ofdm-phy.cc:368
static uint64_t CalculatePhyRate(WifiCodeRate codeRate, uint64_t dataRate)
Calculate the PHY rate in bps from code rate and data rate.
Definition: ofdm-phy.cc:571
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing.
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24 Mbps.
Time GetDuration(WifiPpduField field, const WifiTxVector &txVector) const override
Get the duration of the PPDU field (or group of fields) used by this entity for the given transmissio...
Definition: ofdm-phy.cc:194
PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event) override
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
Definition: ofdm-phy.cc:310
virtual Time GetHeaderDuration(const WifiTxVector &txVector) const
Definition: ofdm-phy.cc:232
virtual WifiMode GetHeaderMode(const WifiTxVector &txVector) const
Definition: ofdm-phy.cc:169
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
Definition: ofdm-phy.cc:155
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing.
static const ModulationLookupTable m_ofdmModulationLookupTable
lookup table to retrieve code rate and constellation size corresponding to a unique name of modulatio...
Definition: ofdm-phy.h:455
static uint64_t GetDataRate(const std::string &name, uint16_t channelWidth)
Return the data rate from the OFDM mode's unique name and the supplied parameters.
Definition: ofdm-phy.cc:607
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing.
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9 Mbps.
virtual bool IsChannelWidthSupported(Ptr< const WifiPpdu > ppdu) const
Checks if the PPDU's bandwidth is supported by the PHY.
Definition: ofdm-phy.cc:345
static double GetCodeRatio(WifiCodeRate codeRate)
Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
Definition: ofdm-phy.cc:583
Time GetSignalExtension(WifiPhyBand band) const
Definition: ofdm-phy.cc:290
Time GetPayloadDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const override
Definition: ofdm-phy.cc:256
Abstract class for PHY entities.
Definition: phy-entity.h:96
std::map< std::string, CodeRateConstellationSizePair > ModulationLookupTable
A modulation lookup table using unique name of modulation as key.
Definition: phy-entity.h:571
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition: phy-entity.h:561
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
represent a single transmission mode
Definition: wifi-mode.h:51
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
OfdmPhyVariant
The OFDM (11a) PHY variants.
Definition: ofdm-phy.h:44
WifiChannelListType
Enumeration of the possible channel-list parameter elements defined in Table 8-5 of IEEE 802....
WifiPpduField
The type of PPDU field (grouped for convenience)
MpduType
The type of an MPDU.
@ OFDM_PHY_10_MHZ
Definition: ofdm-phy.h:46
@ OFDM_PHY_DEFAULT
Definition: ofdm-phy.h:45
@ OFDM_PHY_5_MHZ
Definition: ofdm-phy.h:47
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
Status of the reception of the PPDU field.
Definition: phy-entity.h:112