A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
he-phy.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Rediet <getachew.redieteab@orange.com>
7 * Sébastien Deronne <sebastien.deronne@gmail.com> (for logic ported from wifi-phy and
8 * spectrum-wifi-phy)
9 */
10
11#ifndef HE_PHY_H
12#define HE_PHY_H
13
14#include "he-ppdu.h"
15
16#include "ns3/callback.h"
17#include "ns3/vht-phy.h"
18#include "ns3/wifi-export.h"
19#include "ns3/wifi-phy-band.h"
20#include "ns3/wifi-types.h"
21
22#include <optional>
23
24/**
25 * @file
26 * @ingroup wifi
27 * Declaration of ns3::HePhy class
28 * and ns3::HeSigAParameters struct.
29 */
30
31namespace ns3
32{
33
34class ObssPdAlgorithm;
35
36/**
37 * This defines the BSS membership value for HE PHY.
38 */
39#define HE_PHY 122
40
41/**
42 * Parameters for received HE-SIG-A for OBSS_PD based SR
43 */
44struct WIFI_EXPORT HeSigAParameters
45{
46 dBm_u rssi; ///< RSSI
47 uint8_t bssColor; ///< BSS color
48};
49
50/**
51 * @brief PHY entity for HE (11ax)
52 * @ingroup wifi
53 *
54 * HE PHY is based on VHT PHY.
55 *
56 * Refer to P802.11ax/D4.0, clause 27.
57 */
58class WIFI_EXPORT HePhy : public VhtPhy
59{
60 public:
61 /**
62 * Callback upon end of HE-SIG-A
63 *
64 * arg1: Parameters of HE-SIG-A
65 */
67
68 /**
69 * Constructor for HE PHY
70 *
71 * @param buildModeList flag used to add HE modes to list (disabled
72 * by child classes to only add child classes' modes)
73 */
74 HePhy(bool buildModeList = true);
75 /**
76 * Destructor for HE PHY
77 */
78 ~HePhy() override;
79
80 WifiMode GetSigMode(WifiPpduField field, const WifiTxVector& txVector) const override;
81 WifiMode GetSigAMode() const override;
82 WifiMode GetSigBMode(const WifiTxVector& txVector) const override;
83 const PpduFormats& GetPpduFormats() const override;
84 Time GetLSigDuration(WifiPreamble preamble) const override;
86 uint8_t nDataLtf,
87 uint8_t nExtensionLtf = 0) const override;
88 Time GetSigADuration(WifiPreamble preamble) const override;
89 Time GetSigBDuration(const WifiTxVector& txVector) const override;
91 const WifiTxVector& txVector,
92 Time ppduDuration) override;
96 Time rxDuration) override;
97 void CancelAllEvents() override;
98 uint16_t GetStaId(const Ptr<const WifiPpdu> ppdu) const override;
99 MHz_u GetMeasurementChannelWidth(const Ptr<const WifiPpdu> ppdu) const override;
100 void StartTx(Ptr<const WifiPpdu> ppdu) override;
102 const WifiTxVector& txVector,
103 WifiPhyBand band) const override;
104 void SwitchMaybeToCcaBusy(const Ptr<const WifiPpdu> ppdu = nullptr) override;
106 WifiChannelListType channelType) const override;
107 void NotifyCcaBusy(const Ptr<const WifiPpdu> ppdu,
108 Time duration,
109 WifiChannelListType channelType) override;
110 bool CanStartRx(Ptr<const WifiPpdu> ppdu) const override;
112
113 /**
114 * @return the BSS color of this PHY.
115 */
116 uint8_t GetBssColor() const;
117
118 /**
119 * Compute the L-SIG length value corresponding to the given HE TB PPDU duration.
120 * If the latter is not a feasible duration (considering the selected guard interval),
121 * a proper duration is computed and returned along with the L-SIG length value.
122 *
123 * @param ppduDuration the duration of the HE TB PPDU
124 * @param txVector the TXVECTOR used for the transmission of this HE TB PPDU
125 * @param band the frequency band being used
126 *
127 * @return the L-SIG length value and the adjusted HE TB PPDU duration.
128 */
129 static std::pair<uint16_t, Time> ConvertHeTbPpduDurationToLSigLength(
130 Time ppduDuration,
131 const WifiTxVector& txVector,
132 WifiPhyBand band);
133 /**
134 * @param length the L-SIG length value
135 * @param txVector the TXVECTOR used for the transmission of this HE TB PPDU
136 * @param band the frequency band being used
137 *
138 * @return the duration of the HE TB PPDU corresponding to that L-SIG length value.
139 */
140 static Time ConvertLSigLengthToHeTbPpduDuration(uint16_t length,
141 const WifiTxVector& txVector,
142 WifiPhyBand band);
143 /**
144 * @param txVector the transmission parameters used for the HE TB PPDU
145 *
146 * @return the duration of the non-HE portion of the HE TB PPDU.
147 */
148 virtual Time CalculateNonHeDurationForHeTb(const WifiTxVector& txVector) const;
149
150 /**
151 * @param txVector the transmission parameters used for the HE MU PPDU
152 *
153 * @return the duration of the non-HE portion of the HE MU PPDU.
154 */
155 virtual Time CalculateNonHeDurationForHeMu(const WifiTxVector& txVector) const;
156
157 /**
158 * Get the band in the TX spectrum associated with the RU used by the PSDU
159 * transmitted to/by a given STA in a DL MU PPDU/HE TB PPDU
160 *
161 * @param txVector the TXVECTOR used for the transmission
162 * @param staId the STA-ID of the station
163 *
164 * @return the RU band in the TX spectrum
165 */
166 WifiSpectrumBandInfo GetRuBandForTx(const WifiTxVector& txVector, uint16_t staId) const;
167 /**
168 * Get the band in the RX spectrum associated with the RU used by the PSDU
169 * transmitted to/by a given STA in a DL MU PPDU/HE TB PPDU
170 *
171 * @param txVector the TXVECTOR used for the transmission
172 * @param staId the STA-ID of the station
173 *
174 * @return the RU band in the RX spectrum
175 */
176 WifiSpectrumBandInfo GetRuBandForRx(const WifiTxVector& txVector, uint16_t staId) const;
177 /**
178 * Get the width of the non-OFDMA portion of an HE TB PPDU
179 *
180 * @param ru the RU in which the HE TB PPDU is sent
181 * @return the width of the non-OFDMA portion of an HE TB PPDU
182 */
184
185 /**
186 * @return the UID of the HE TB PPDU being received
187 */
188 uint64_t GetCurrentHeTbPpduUid() const;
189
190 /**
191 * Set the TRIGVECTOR and the associated expiration time. A TRIGVECTOR shall expire
192 * when the TX timer associated with the transmission of the Trigger Frame expires.
193 *
194 * @param trigVector the TRIGVECTOR
195 * @param validity the amount of time (from now) until expiration of the TRIGVECTOR
196 */
197 void SetTrigVector(const WifiTxVector& trigVector, Time validity);
198
199 /**
200 * Get the center frequency per segment of the non-HE portion of the current PPDU for the given
201 * STA-ID. Note this method is only to be used for UL MU.
202 *
203 * @param ppdu the PPDU
204 * @param staId the STA-ID of the station taking part of the UL MU
205 * @return the center frequency corresponding to the non-HE portion of the HE TB PPDU
206 */
207 std::vector<MHz_u> GetCenterFrequenciesForNonHePart(const Ptr<const WifiPpdu> ppdu,
208 uint16_t staId) const;
209
210 /**
211 * Sets the OBSS-PD algorithm.
212 *
213 * @param algorithm the OBSS-PD algorithm
214 */
215 void SetObssPdAlgorithm(const Ptr<ObssPdAlgorithm> algorithm);
216
217 /**
218 * Gets the OBSS-PD algorithm.
219 *
220 * @return the OBSS-PD algorithm
221 */
223
224 /**
225 * Set a callback for a end of HE-SIG-A.
226 *
227 * @param callback the EndOfHeSigACallback to set
228 */
230
231 /**
232 * Fire a EndOfHeSigA callback (if connected) once HE-SIG-A field has been received.
233 * This method is scheduled immediately after end of HE-SIG-A, once
234 * field processing is finished.
235 *
236 * @param params the HE-SIG-A parameters
237 */
239
240 /**
241 * Initialize all HE modes.
242 */
243 static void InitializeModes();
244 /**
245 * Return the HE MCS corresponding to
246 * the provided index.
247 *
248 * @param index the index of the MCS
249 * @return an HE MCS
250 */
251 static WifiMode GetHeMcs(uint8_t index);
252
253 /**
254 * @return MCS 0 from HE MCS values
255 */
257 /**
258 * @return MCS 1 from HE MCS values
259 */
261 /**
262 * @return MCS 2 from HE MCS values
263 */
265 /**
266 * @return MCS 3 from HE MCS values
267 */
269 /**
270 * @return MCS 4 from HE MCS values
271 */
273 /**
274 * @return MCS 5 from HE MCS values
275 */
277 /**
278 * @return MCS 6 from HE MCS values
279 */
281 /**
282 * @return MCS 7 from HE MCS values
283 */
285 /**
286 * @return MCS 8 from HE MCS values
287 */
289 /**
290 * @return MCS 9 from HE MCS values
291 */
293 /**
294 * @return MCS 10 from HE MCS values
295 */
297 /**
298 * @return MCS 11 from HE MCS values
299 */
301
302 /**
303 * Return the coding rate corresponding to
304 * the supplied HE MCS index. This function is used
305 * as a callback for WifiMode operation.
306 *
307 * @param mcsValue the MCS index
308 * @return the coding rate.
309 */
310 static WifiCodeRate GetCodeRate(uint8_t mcsValue);
311 /**
312 * Return the constellation size corresponding
313 * to the supplied HE MCS index. This function is used
314 * as a callback for WifiMode operation.
315 *
316 * @param mcsValue the MCS index
317 * @return the size of modulation constellation.
318 */
319 static uint16_t GetConstellationSize(uint8_t mcsValue);
320 /**
321 * Return the PHY rate corresponding to the supplied HE MCS
322 * index, channel width, guard interval, and number of
323 * spatial stream. This function calls HtPhy::CalculatePhyRate
324 * and is mainly used as a callback for WifiMode operation.
325 *
326 * @param mcsValue the HE MCS index
327 * @param channelWidth the considered channel width
328 * @param guardInterval the considered guard interval duration
329 * @param nss the considered number of stream
330 *
331 * @return the physical bit rate of this signal in bps.
332 */
333 static uint64_t GetPhyRate(uint8_t mcsValue,
334 MHz_u channelWidth,
335 Time guardInterval,
336 uint8_t nss);
337 /**
338 * Return the PHY rate corresponding to
339 * the supplied TXVECTOR for the STA-ID.
340 *
341 * @param txVector the TXVECTOR used for the transmission
342 * @param staId the station ID for MU (unused if SU)
343 * @return the physical bit rate of this signal in bps.
344 */
345 static uint64_t GetPhyRateFromTxVector(const WifiTxVector& txVector,
346 uint16_t staId = SU_STA_ID);
347 /**
348 * Return the data rate corresponding to
349 * the supplied TXVECTOR for the STA-ID.
350 *
351 * @param txVector the TXVECTOR used for the transmission
352 * @param staId the station ID for MU (unused if SU)
353 * @return the data bit rate in bps.
354 */
355 static uint64_t GetDataRateFromTxVector(const WifiTxVector& txVector,
356 uint16_t staId = SU_STA_ID);
357 /**
358 * Return the data rate corresponding to
359 * the supplied HE MCS index, channel width,
360 * guard interval, and number of spatial
361 * streams.
362 *
363 * @param mcsValue the MCS index
364 * @param channelWidth the channel width
365 * @param guardInterval the guard interval duration
366 * @param nss the number of spatial streams
367 * @return the data bit rate in bps.
368 */
369 static uint64_t GetDataRate(uint8_t mcsValue,
370 MHz_u channelWidth,
371 Time guardInterval,
372 uint8_t nss);
373 /**
374 * Calculate the rate in bps of the non-HT Reference Rate corresponding
375 * to the supplied HE MCS index. This function calls CalculateNonHtReferenceRate
376 * and is used as a callback for WifiMode operation.
377 *
378 * @param mcsValue the HE MCS index
379 * @return the rate in bps of the non-HT Reference Rate.
380 */
381 static uint64_t GetNonHtReferenceRate(uint8_t mcsValue);
382 /**
383 * Check whether the combination in TXVECTOR is allowed.
384 * This function is used as a callback for WifiMode operation.
385 *
386 * @param txVector the TXVECTOR
387 * @returns true if this combination is allowed, false otherwise.
388 */
389 static bool IsAllowed(const WifiTxVector& txVector);
390
391 /**
392 * Create and return the HE MCS corresponding to
393 * the provided index.
394 * This method binds all the callbacks used by WifiMode.
395 *
396 * @param index the index of the MCS
397 * @return an HE MCS
398 */
399 static WifiMode CreateHeMcs(uint8_t index);
400
401 /**
402 * @param guardInterval the guard interval duration
403 * @return the symbol duration
404 */
405 static Time GetSymbolDuration(Time guardInterval);
406
407 /// structure containing the information about the RU subcarriers to be able to converted to the
408 /// indices used by the Spectrum model
409 struct WIFI_EXPORT RuSubcarriersInfo
410 {
411 MHz_u bandWidth; ///< width of the band used for the OFDMA transmission. Must be a multiple
412 ///< of 20 MHz
413 MHz_u guardBandwidth; ///< width of the guard band
414 const std::vector<MHz_u>& centerFrequencies; ///< center frequency of each segment
415 MHz_u totalWidth; ///< width of the operating channel
416 Hz_u subcarrierSpacing; ///< subcarrier spacing
417 WifiModulationClass mc; ///< modulation class used for the transmission
418 SubcarrierRange subcarrierRange; ///< subcarrier range of the RU
419 uint8_t bandIndex{0}; ///< index (starting at 0) of the band within the operating channel
420 };
421
422 /**
423 * This is a helper function to convert RU subcarriers, which are relative to the center
424 * frequency subcarrier, to the indices used by the Spectrum model. The size of the returned
425 * vector corresponds to the number of segments covered by the RU.
426 *
427 * @param info the information about the RU subcarrier to convert
428 * @return the indices used by the Spectrum model for the provided RU subcarrier
429 */
430 static std::vector<WifiSpectrumBandIndices> ConvertRuSubcarriers(const RuSubcarriersInfo& info);
431
432 protected:
433 PhyFieldRxStatus ProcessSig(Ptr<Event> event,
434 PhyFieldRxStatus status,
435 WifiPpduField field) override;
436 Ptr<Event> DoGetEvent(Ptr<const WifiPpdu> ppdu, RxPowerWattPerChannelBand& rxPowersW) override;
437 bool IsConfigSupported(Ptr<const WifiPpdu> ppdu) const override;
438 Time DoStartReceivePayload(Ptr<Event> event) override;
439 std::pair<MHz_u, WifiSpectrumBandInfo> GetChannelWidthAndBand(const WifiTxVector& txVector,
440 uint16_t staId) const override;
441 void RxPayloadSucceeded(Ptr<const WifiPsdu> psdu,
442 RxSignalInfo rxSignalInfo,
443 const WifiTxVector& txVector,
444 uint16_t staId,
445 const std::vector<bool>& statusPerMpdu) override;
446 void RxPayloadFailed(Ptr<const WifiPsdu> psdu,
447 double snr,
448 const WifiTxVector& txVector) override;
449 void DoEndReceivePayload(Ptr<const WifiPpdu> ppdu) override;
450 void DoResetReceive(Ptr<Event> event) override;
451 void DoAbortCurrentReception(WifiPhyRxfailureReason reason) override;
452 uint64_t ObtainNextUid(const WifiTxVector& txVector) override;
453 Time GetMaxDelayPpduSameUid(const WifiTxVector& txVector) override;
454 Ptr<SpectrumValue> GetTxPowerSpectralDensity(Watt_u txPower,
455 Ptr<const WifiPpdu> ppdu) const override;
456 uint32_t GetMaxPsduSize() const override;
457 WifiConstPsduMap GetWifiConstPsduMap(Ptr<const WifiPsdu> psdu,
458 const WifiTxVector& txVector) const override;
459 void HandleRxPpduWithSameContent(Ptr<Event> event,
461 RxPowerWattPerChannelBand& rxPower) override;
462
463 /**
464 * Process SIG-A, perform amendment-specific actions, and
465 * provide an updated status of the reception.
466 *
467 * @param event the event holding incoming PPDU's information
468 * @param status the status of the reception of the correctly received SIG-A after the
469 * configuration support check
470 * @return the updated status of the reception of the SIG-A
471 */
472 virtual PhyFieldRxStatus ProcessSigA(Ptr<Event> event, PhyFieldRxStatus status);
473
474 /**
475 * Process SIG-B, perform amendment-specific actions, and
476 * provide an updated status of the reception.
477 *
478 * @param event the event holding incoming PPDU's information
479 * @param status the status of the reception of the correctly received SIG-A after the
480 * configuration support check
481 * @return the updated status of the reception of the SIG-B
482 */
483 virtual PhyFieldRxStatus ProcessSigB(Ptr<Event> event, PhyFieldRxStatus status);
484
485 /**
486 * @param txVector the transmission parameters
487 * @return the number of bits of the HE-SIG-B
488 */
489 virtual uint32_t GetSigBSize(const WifiTxVector& txVector) const;
490
491 /**
492 * Start receiving the PSDU (i.e. the first symbol of the PSDU has arrived) of an MU
493 * transmission. This function is called upon the RX event corresponding to the HE portion of
494 * the MU PPDU.
495 *
496 * @param event the event holding incoming HE portion of the PPDU's information
497 */
498 void StartReceiveMuPayload(Ptr<Event> event);
499
500 /**
501 * Return the rate (in bps) of the non-HT Reference Rate
502 * which corresponds to the supplied code rate and
503 * constellation size.
504 *
505 * @param codeRate the convolutional coding rate
506 * @param constellationSize the size of modulation constellation
507 * @returns the rate in bps.
508 *
509 * To convert an HE MCS to its corresponding non-HT Reference Rate
510 * use the modulation and coding rate of the HT MCS
511 * and lookup in Table 10-10 of IEEE P802.11ax/D6.0.
512 */
513 static uint64_t CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize);
514
515 /**
516 * @param channelWidth the channel width
517 * @return the number of usable subcarriers for data
518 */
519 static uint16_t GetUsableSubcarriers(MHz_u channelWidth);
520
521 /**
522 * Compute the per-20 MHz CCA durations vector that indicates
523 * for how long each 20 MHz subchannel (corresponding to the
524 * index of the element in the vector) is busy and where a zero duration
525 * indicates that the subchannel is idle. The vector is non-empty if the
526 * operational channel width is larger than 20 MHz.
527 *
528 * @param ppdu the incoming PPDU or nullptr for any signal
529 * @return the per-20 MHz CCA durations vector
530 */
531 virtual std::vector<Time> GetPer20MHzDurations(const Ptr<const WifiPpdu> ppdu);
532
533 uint64_t m_previouslyTxPpduUid; //!< UID of the previously sent PPDU, used by AP to recognize
534 //!< response HE TB PPDUs
535 uint64_t m_currentMuPpduUid; //!< UID of the HE MU or HE TB PPDU being received
536
537 std::map<uint16_t /* STA-ID */, EventId>
538 m_beginMuPayloadRxEvents; //!< the beginning of the MU payload reception events (indexed by
539 //!< STA-ID)
540
541 EndOfHeSigACallback m_endOfHeSigACallback; //!< end of HE-SIG-A callback
542 std::optional<WifiTxVector> m_trigVector; //!< the TRIGVECTOR
543 std::optional<Time> m_trigVectorExpirationTime; //!< expiration time of the TRIGVECTOR
544 std::optional<WifiTxVector> m_currentTxVector; //!< If the STA is an AP STA, this holds the
545 //!< TXVECTOR of the PPDU that has been sent
546
547 private:
548 void BuildModeList() override;
549 uint8_t GetNumberBccEncoders(const WifiTxVector& txVector) const override;
550 Time GetSymbolDuration(const WifiTxVector& txVector) const override;
551
552 /**
553 * This is a helper function to create the TX PSD of the non-HE and HE portions.
554 *
555 * @param txPower power to spread across the bands
556 * @param ppdu the PPDU that will be transmitted
557 * @param flag flag indicating whether the PSD is for non-HE portion or HE portion
558 * @return Pointer to SpectrumValue
559 */
562 HePpdu::TxPsdFlag flag) const;
563
564 /**
565 * Start the transmission of the HE portion of the MU PPDU.
566 *
567 * @param ppdu the PPDU
568 * @param txPower the total TX power
569 * @param txPowerSpectrum the TX PSD
570 * @param hePortionDuration the duration of the HE portion
571 */
573 dBm_u txPower,
574 Ptr<SpectrumValue> txPowerSpectrum,
575 Time hePortionDuration);
576
577 /**
578 * Notify PHY state helper to switch to CCA busy state,
579 *
580 * @param duration the duration of the CCA state
581 * @param channelType the channel type for which the CCA busy state is reported.
582 * @param per20MHzDurations the per-20 MHz CCA durations vector
583 */
584 void NotifyCcaBusy(Time duration,
585 WifiChannelListType channelType,
586 const std::vector<Time>& per20MHzDurations);
587
588 /**
589 * Given a PPDU duration value, the TXVECTOR used to transmit the PPDU and
590 * the PHY band, compute a valid PPDU duration considering the number and
591 * duration of symbols, the preamble duration and the guard interval.
592 *
593 * @param ppduDuration the given PPDU duration
594 * @param txVector the given TXVECTOR
595 * @param band the PHY band
596 * @return a valid PPDU duration
597 */
598 static Time GetValidPpduDuration(Time ppduDuration,
599 const WifiTxVector& txVector,
600 WifiPhyBand band);
601
602 static const PpduFormats m_hePpduFormats; //!< HE PPDU formats
603
604 std::size_t m_rxHeTbPpdus; //!< Number of successfully received HE TB PPDUS
606 std::vector<Time> m_lastPer20MHzDurations; //!< Hold the last per-20 MHz CCA durations vector
607};
608
609} // namespace ns3
610
611#endif /* HE_PHY_H */
Callback template class.
Definition callback.h:428
An identifier for simulation events.
Definition event-id.h:45
std::optional< WifiTxVector > m_trigVector
the TRIGVECTOR
Definition he-phy.h:542
Time GetLSigDuration(WifiPreamble preamble) const override
Definition he-phy.cc:177
virtual Time CalculateNonHeDurationForHeTb(const WifiTxVector &txVector) const
Definition he-phy.cc:296
static uint64_t GetDataRate(uint8_t mcsValue, MHz_u channelWidth, Time guardInterval, uint8_t nss)
Return the data rate corresponding to the supplied HE MCS index, channel width, guard interval,...
Definition he-phy.cc:1709
static Time ConvertLSigLengthToHeTbPpduDuration(uint16_t length, const WifiTxVector &txVector, WifiPhyBand band)
Definition he-phy.cc:282
static WifiMode GetHeMcs8()
static uint64_t GetPhyRate(uint8_t mcsValue, MHz_u channelWidth, Time guardInterval, uint8_t nss)
Return the PHY rate corresponding to the supplied HE MCS index, channel width, guard interval,...
Definition he-phy.cc:1673
uint64_t GetCurrentHeTbPpduUid() const
Definition he-phy.cc:1067
void CancelAllEvents() override
Cancel and clear all running events.
Definition he-phy.cc:407
void SetObssPdAlgorithm(const Ptr< ObssPdAlgorithm > algorithm)
Sets the OBSS-PD algorithm.
Definition he-phy.cc:696
static void InitializeModes()
Initialize all HE modes.
Definition he-phy.cc:1572
static WifiMode GetHeMcs9()
void SwitchMaybeToCcaBusy(const Ptr< const WifiPpdu > ppdu=nullptr) override
Check if PHY state should move to CCA busy state based on current state of interference tracker.
Definition he-phy.cc:1121
WifiSpectrumBandInfo GetRuBandForRx(const WifiTxVector &txVector, uint16_t staId) const
Get the band in the RX spectrum associated with the RU used by the PSDU transmitted to/by a given STA...
Definition he-phy.cc:1017
static WifiMode GetHeMcs11()
virtual Time CalculateNonHeDurationForHeMu(const WifiTxVector &txVector) const
Definition he-phy.cc:305
std::optional< WifiTxVector > m_currentTxVector
If the STA is an AP STA, this holds the TXVECTOR of the PPDU that has been sent.
Definition he-phy.h:544
Time GetSigBDuration(const WifiTxVector &txVector) const override
Definition he-phy.cc:230
static WifiMode CreateHeMcs(uint8_t index)
Create and return the HE MCS corresponding to the provided index.
Definition he-phy.cc:1630
static WifiMode GetHeMcs(uint8_t index)
Return the HE MCS corresponding to the provided index.
Definition he-phy.cc:1581
static WifiMode GetHeMcs0()
void BuildModeList() override
Build mode list.
Definition he-phy.cc:96
void StartTxHePortion(Ptr< const WifiPpdu > ppdu, dBm_u txPower, Ptr< SpectrumValue > txPowerSpectrum, Time hePortionDuration)
Start the transmission of the HE portion of the MU PPDU.
Definition he-phy.cc:1525
MHz_u GetNonOfdmaWidth(WifiRu::RuSpec ru) const
Get the width of the non-OFDMA portion of an HE TB PPDU.
Definition he-phy.cc:1054
bool CanStartRx(Ptr< const WifiPpdu > ppdu) const override
Determine whether the PHY shall issue a PHY-RXSTART.indication primitive in response to a given PPDU.
Definition he-phy.cc:1810
void SetEndOfHeSigACallback(EndOfHeSigACallback callback)
Set a callback for a end of HE-SIG-A.
Definition he-phy.cc:708
uint64_t m_previouslyTxPpduUid
UID of the previously sent PPDU, used by AP to recognize response HE TB PPDUs.
Definition he-phy.h:533
static WifiCodeRate GetCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HE MCS index.
Definition he-phy.cc:1646
static WifiMode GetHeMcs6()
void StartTx(Ptr< const WifiPpdu > ppdu) override
This function is called by SpectrumWifiPhy to send the PPDU while performing amendment-specific actio...
Definition he-phy.cc:1473
EndOfHeSigACallback m_endOfHeSigACallback
end of HE-SIG-A callback
Definition he-phy.h:541
static WifiMode GetHeMcs4()
Ptr< const WifiPsdu > GetAddressedPsduInPpdu(Ptr< const WifiPpdu > ppdu) const override
Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
Definition he-phy.cc:540
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
Definition he-phy.cc:109
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
Definition he-phy.cc:171
Time CalculateTxDuration(const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, WifiPhyBand band) const override
Definition he-phy.cc:1538
static WifiMode GetHeMcs10()
Callback< void, HeSigAParameters > EndOfHeSigACallback
Callback upon end of HE-SIG-A.
Definition he-phy.h:66
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
Return the PHY rate corresponding to the supplied TXVECTOR for the STA-ID.
Definition he-phy.cc:1681
Ptr< ObssPdAlgorithm > m_obssPdAlgorithm
OBSS-PD algorithm.
Definition he-phy.h:605
dBm_u GetCcaThreshold(const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType) const override
Return the CCA threshold for a given channel type.
Definition he-phy.cc:1091
MHz_u GetMeasurementChannelWidth(const Ptr< const WifiPpdu > ppdu) const override
Return the channel width used to measure the RSSI.
Definition he-phy.cc:1073
Ptr< ObssPdAlgorithm > GetObssPdAlgorithm() const
Gets the OBSS-PD algorithm.
Definition he-phy.cc:702
uint8_t GetBssColor() const
Definition he-phy.cc:552
static Time GetValidPpduDuration(Time ppduDuration, const WifiTxVector &txVector, WifiPhyBand band)
Given a PPDU duration value, the TXVECTOR used to transmit the PPDU and the PHY band,...
Definition he-phy.cc:250
uint8_t GetNumberBccEncoders(const WifiTxVector &txVector) const override
Definition he-phy.cc:315
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
Definition he-phy.cc:1784
std::size_t m_rxHeTbPpdus
Number of successfully received HE TB PPDUS.
Definition he-phy.h:604
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition he-phy.cc:345
void NotifyEndOfHeSigA(HeSigAParameters params)
Fire a EndOfHeSigA callback (if connected) once HE-SIG-A field has been received.
Definition he-phy.cc:714
Ptr< SpectrumValue > GetTxPowerSpectralDensity(Watt_u txPower, Ptr< const WifiPpdu > ppdu) const override
Definition he-phy.cc:1333
static WifiMode GetHeMcs7()
uint64_t m_currentMuPpduUid
UID of the HE MU or HE TB PPDU being received.
Definition he-phy.h:535
static WifiMode GetHeMcs3()
static const PpduFormats m_hePpduFormats
HE PPDU formats.
Definition he-phy.h:602
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
Return the data rate corresponding to the supplied TXVECTOR for the STA-ID.
Definition he-phy.cc:1695
std::map< uint16_t, EventId > m_beginMuPayloadRxEvents
the beginning of the MU payload reception events (indexed by STA-ID)
Definition he-phy.h:538
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 he-phy.cc:1829
HePhy(bool buildModeList=true)
Constructor for HE PHY.
Definition he-phy.cc:70
uint16_t GetStaId(const Ptr< const WifiPpdu > ppdu) const override
Return the STA ID that has been assigned to the station this PHY belongs to.
Definition he-phy.cc:567
static Time GetSymbolDuration(Time guardInterval)
Definition he-phy.cc:1747
void SetTrigVector(const WifiTxVector &trigVector, Time validity)
Set the TRIGVECTOR and the associated expiration time.
Definition he-phy.cc:330
static WifiMode GetHeMcs1()
static std::pair< uint16_t, Time > ConvertHeTbPpduDurationToLSigLength(Time ppduDuration, const WifiTxVector &txVector, WifiPhyBand band)
Compute the L-SIG length value corresponding to the given HE TB PPDU duration.
Definition he-phy.cc:263
static uint64_t GetNonHtReferenceRate(uint8_t mcsValue)
Calculate the rate in bps of the non-HT Reference Rate corresponding to the supplied HE MCS index.
Definition he-phy.cc:1753
WifiMode GetSigBMode(const WifiTxVector &txVector) const override
Definition he-phy.cc:138
void StartReceivePreamble(Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW, Time rxDuration) override
Start receiving the PHY preamble of a PPDU (i.e.
Definition he-phy.cc:357
std::optional< Time > m_trigVectorExpirationTime
expiration time of the TRIGVECTOR
Definition he-phy.h:543
static WifiMode GetHeMcs5()
static WifiMode GetHeMcs2()
WifiMode GetSigAMode() const override
Definition he-phy.cc:132
std::vector< MHz_u > GetCenterFrequenciesForNonHePart(const Ptr< const WifiPpdu > ppdu, uint16_t staId) const
Get the center frequency per segment of the non-HE portion of the current PPDU for the given STA-ID.
Definition he-phy.cc:1442
Time GetSigADuration(WifiPreamble preamble) const override
Definition he-phy.cc:204
Time GetTrainingDuration(const WifiTxVector &txVector, uint8_t nDataLtf, uint8_t nExtensionLtf=0) const override
Definition he-phy.cc:183
std::vector< Time > m_lastPer20MHzDurations
Hold the last per-20 MHz CCA durations vector.
Definition he-phy.h:606
void NotifyCcaBusy(const Ptr< const WifiPpdu > ppdu, Time duration, WifiChannelListType channelType) override
Notify PHY state helper to switch to CCA busy state,.
Definition he-phy.cc:1174
static uint16_t GetConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HE MCS index.
Definition he-phy.cc:1660
WifiSpectrumBandInfo GetRuBandForTx(const WifiTxVector &txVector, uint16_t staId) const
Get the band in the TX spectrum associated with the RU used by the PSDU transmitted to/by a given STA...
Definition he-phy.cc:981
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE porti...
Definition he-ppdu.h:102
OBSS PD algorithm interface.
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition phy-entity.h:492
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
Received power (W) per spectrum band.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:95
VhtPhy(bool buildModeList=true)
Constructor for VHT PHY.
Definition vht-phy.cc:79
represent a single transmission mode
Definition wifi-mode.h:39
std::variant< HeRu::RuSpec, EhtRu::RuSpec > RuSpec
variant of the RU specification
Definition wifi-ru.h:28
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
WifiPhyBand
Identifies the PHY band.
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
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).
Declaration of ns3::HePpdu class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::pair< int16_t, int16_t > SubcarrierRange
(lowest index, highest index) pair defining a subcarrier range
Definition wifi-types.h:341
double Hz_u
Hz weak type.
Definition wifi-units.h:30
double MHz_u
MHz weak type.
Definition wifi-units.h:31
double dBm_u
dBm weak type
Definition wifi-units.h:27
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition wifi-ppdu.h:39
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU).
double Watt_u
Watt weak type.
Definition wifi-units.h:25
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
structure containing the information about the RU subcarriers to be able to converted to the indices ...
Definition he-phy.h:410
MHz_u bandWidth
width of the band used for the OFDMA transmission.
Definition he-phy.h:411
Hz_u subcarrierSpacing
subcarrier spacing
Definition he-phy.h:416
MHz_u totalWidth
width of the operating channel
Definition he-phy.h:415
const std::vector< MHz_u > & centerFrequencies
center frequency of each segment
Definition he-phy.h:414
uint8_t bandIndex
index (starting at 0) of the band within the operating channel
Definition he-phy.h:419
MHz_u guardBandwidth
width of the guard band
Definition he-phy.h:413
WifiModulationClass mc
modulation class used for the transmission
Definition he-phy.h:417
SubcarrierRange subcarrierRange
subcarrier range of the RU
Definition he-phy.h:418
Parameters for received HE-SIG-A for OBSS_PD based SR.
Definition he-phy.h:45
uint8_t bssColor
BSS color.
Definition he-phy.h:47
dBm_u rssi
RSSI.
Definition he-phy.h:46
RxSignalInfo structure containing info on the received signal.
Definition wifi-types.h:85
WifiSpectrumBandInfo structure containing info about a spectrum band.