A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-remote-station-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005,2006,2007 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#ifndef WIFI_REMOTE_STATION_MANAGER_H
10#define WIFI_REMOTE_STATION_MANAGER_H
11
13#include "qos-utils.h"
14#include "wifi-mode.h"
16#include "wifi-utils.h"
17
18#include "ns3/data-rate.h"
19#include "ns3/eht-capabilities.h"
20#include "ns3/he-6ghz-band-capabilities.h"
21#include "ns3/he-capabilities.h"
22#include "ns3/ht-capabilities.h"
23#include "ns3/mac48-address.h"
24#include "ns3/multi-link-element.h"
25#include "ns3/object.h"
26#include "ns3/traced-callback.h"
27#include "ns3/vht-capabilities.h"
28
29#include <array>
30#include <list>
31#include <memory>
32#include <optional>
33#include <unordered_map>
34
35namespace ns3
36{
37
38class WifiPhy;
39class WifiMac;
40class WifiMacHeader;
41class Packet;
42class WifiMpdu;
43class WifiPsdu;
44class WifiTxVector;
45class WifiTxParameters;
46
47struct WifiRemoteStationState;
48struct RxSignalInfo;
49
50/**
51 * @brief hold per-remote-station state.
52 *
53 * The state in this class is used to keep track
54 * of association status if we are in an infrastructure
55 * network and to perform the selection of TX parameters
56 * on a per-packet basis.
57 *
58 * This class is typically subclassed and extended by
59 * rate control implementations
60 */
62{
64 {
65 }
66
67 WifiRemoteStationState* m_state; //!< Remote station state
68 std::pair<dBm_u, Time>
69 m_rssiAndUpdateTimePair; //!< RSSI of the most recent packet received from
70 //!< the remote station along with update time
71};
72
73/**
74 * A struct that holds information about each remote station.
75 */
77{
78 /**
79 * State of the station
80 */
81 enum
82 {
89
90 /**
91 * This member is the list of WifiMode objects that comprise the
92 * OperationalRateSet parameter for this remote station. This list
93 * is constructed through calls to
94 * WifiRemoteStationManager::AddSupportedMode(), and an API that
95 * allows external access to it is available through
96 * WifiRemoteStationManager::GetNSupported() and
97 * WifiRemoteStationManager::GetSupported().
98 */
99 WifiModeList m_operationalRateSet; //!< operational rate set
100 WifiModeList m_operationalMcsSet; //!< operational MCS set
101 Mac48Address m_address; //!< Mac48Address of the remote station
102 uint16_t m_aid; /**< AID of the remote station (unused if this object
103 is installed on a non-AP station) */
104 WifiRemoteStationInfo m_info; //!< remote station info
105 bool m_dsssSupported; //!< Flag if DSSS is supported by the remote station
106 bool m_erpOfdmSupported; //!< Flag if ERP OFDM is supported by the remote station
107 bool m_ofdmSupported; //!< Flag if OFDM is supported by the remote station
108 Ptr<const HtCapabilities> m_htCapabilities; //!< remote station HT capabilities
110 m_extendedCapabilities; //!< remote station extended capabilities
111 Ptr<const VhtCapabilities> m_vhtCapabilities; //!< remote station VHT capabilities
112 Ptr<const HeCapabilities> m_heCapabilities; //!< remote station HE capabilities
114 m_he6GhzBandCapabilities; //!< remote station HE 6GHz band capabilities
115 Ptr<const EhtCapabilities> m_ehtCapabilities; //!< remote station EHT capabilities
116 /// remote station Multi-Link Element Common Info
117 std::shared_ptr<CommonInfoBasicMle> m_mleCommonInfo;
118 bool m_emlsrEnabled; //!< whether EMLSR mode is enabled on this link
119
120 MHz_u m_channelWidth; //!< Channel width supported by the remote station
121 Time m_guardInterval; //!< HE Guard interval durationsupported by the remote station
122 uint8_t m_ness; //!< Number of extended spatial streams of the remote station
123 bool m_aggregation; //!< Flag if MPDU aggregation is used by the remote station
124 bool m_shortPreamble; //!< Flag if short PHY preamble is supported by the remote station
125 bool m_shortSlotTime; //!< Flag if short ERP slot time is supported by the remote station
126 bool m_qosSupported; //!< Flag if QoS is supported by the station
127 bool m_isInPsMode; //!< Flag if the STA is currently in PS mode
128};
129
130/**
131 * @ingroup wifi
132 * @brief hold a list of per-remote-station state.
133 *
134 * \sa ns3::WifiRemoteStation.
135 */
137{
138 public:
139 /**
140 * @brief Get the type ID.
141 * @return the object TypeId
142 */
143 static TypeId GetTypeId();
144
146 ~WifiRemoteStationManager() override;
147
148 /// ProtectionMode enumeration
154
155 /**
156 * A map of WifiRemoteStations with Mac48Address as key
157 */
158 using Stations = std::unordered_map<Mac48Address, WifiRemoteStation*, WifiAddressHash>;
159 /**
160 * A map of WifiRemoteStationStates with Mac48Address as key
161 */
163 std::unordered_map<Mac48Address, std::shared_ptr<WifiRemoteStationState>, WifiAddressHash>;
164
165 /**
166 * Set up PHY associated with this device since it is the object that
167 * knows the full set of transmit rates that are supported.
168 *
169 * @param phy the PHY of this device
170 */
171 virtual void SetupPhy(const Ptr<WifiPhy> phy);
172 /**
173 * Set up MAC associated with this device since it is the object that
174 * knows the full set of timing parameters (e.g. IFS).
175 *
176 * @param mac the MAC of this device
177 */
178 virtual void SetupMac(const Ptr<WifiMac> mac);
179
180 /**
181 * Set the ID of the link this Remote Station Manager is associated with.
182 *
183 * @param linkId the ID of the link this Remote Station Manager is associated with
184 */
185 void SetLinkId(uint8_t linkId);
186
187 /**
188 * Assign a fixed random variable stream number to the random variables
189 * used by this model. Return the number of streams (possibly zero) that
190 * have been assigned.
191 *
192 * @param stream first stream index to use
193 * @return the number of stream indices assigned by this model
194 */
195 virtual int64_t AssignStreams(int64_t stream);
196
197 /**
198 * Sets the maximum STA short retry count (SSRC).
199 *
200 * @param maxSsrc the maximum SSRC
201 */
202 void SetMaxSsrc(uint32_t maxSsrc);
203 /**
204 * Sets the maximum STA long retry count (SLRC).
205 *
206 * @param maxSlrc the maximum SLRC
207 */
208 void SetMaxSlrc(uint32_t maxSlrc);
209 /**
210 * Sets the RTS threshold.
211 *
212 * @param threshold the RTS threshold
213 */
214 void SetRtsCtsThreshold(uint32_t threshold);
215
216 /**
217 * Return the fragmentation threshold.
218 *
219 * @return the fragmentation threshold
220 */
222 /**
223 * Sets a fragmentation threshold. The method calls a private method
224 * DoSetFragmentationThreshold that checks the validity of the value given.
225 *
226 * @param threshold the fragmentation threshold
227 */
228 void SetFragmentationThreshold(uint32_t threshold);
229
230 /**
231 * Record the AID of a remote station. Should only be called by APs.
232 *
233 * @param remoteAddress the MAC address of the remote station
234 * @param aid the Association ID
235 */
236 void SetAssociationId(Mac48Address remoteAddress, uint16_t aid);
237 /**
238 * Records QoS support of the remote station.
239 *
240 * @param from the address of the station being recorded
241 * @param qosSupported whether the station supports QoS
242 */
243 void SetQosSupport(Mac48Address from, bool qosSupported);
244 /**
245 * @param from the address of the station being recorded
246 * @param emlsrEnabled whether EMLSR mode is enabled for the station on this link
247 */
248 void SetEmlsrEnabled(const Mac48Address& from, bool emlsrEnabled);
249 /**
250 * Records HT capabilities of the remote station.
251 *
252 * @param from the address of the station being recorded
253 * @param htCapabilities the HT capabilities of the station
254 */
255 void AddStationHtCapabilities(Mac48Address from, const HtCapabilities& htCapabilities);
256 /**
257 * Records extended capabilities of the remote station.
258 *
259 * @param from the address of the station being recorded
260 * @param extendedCapabilities the extended capabilities of the station
261 */
263 const ExtendedCapabilities& extendedCapabilities);
264 /**
265 * Records VHT capabilities of the remote station.
266 *
267 * @param from the address of the station being recorded
268 * @param vhtCapabilities the VHT capabilities of the station
269 */
270 void AddStationVhtCapabilities(Mac48Address from, const VhtCapabilities& vhtCapabilities);
271 /**
272 * Records HE capabilities of the remote station.
273 *
274 * @param from the address of the station being recorded
275 * @param heCapabilities the HE capabilities of the station
276 */
277 void AddStationHeCapabilities(Mac48Address from, const HeCapabilities& heCapabilities);
278 /**
279 * Records HE 6 GHz Band Capabilities of a remote station
280 *
281 * @param from the address of the remote station
282 * @param he6GhzCapabilities the HE 6 GHz Band Capabilities of the remote station
283 */
285 const He6GhzBandCapabilities& he6GhzCapabilities);
286 /**
287 * Records EHT capabilities of the remote station.
288 *
289 * @param from the address of the station being recorded
290 * @param ehtCapabilities the EHT capabilities of the station
291 */
292 void AddStationEhtCapabilities(Mac48Address from, const EhtCapabilities& ehtCapabilities);
293 /**
294 * Records the Common Info field advertised by the given remote station in a Multi-Link
295 * Element. It includes the MLD address of the remote station.
296 *
297 * @param from the address of the station being recorded
298 * @param mleCommonInfo the MLE Common Info advertised by the station
299 */
301 const std::shared_ptr<CommonInfoBasicMle>& mleCommonInfo);
302 /**
303 * Return the HT capabilities sent by the remote station.
304 *
305 * @param from the address of the remote station
306 * @return the HT capabilities sent by the remote station
307 */
309 /**
310 * Return the extended capabilities sent by the remote station.
311 *
312 * @param from the address of the remote station
313 * @return the extended capabilities sent by the remote station
314 */
316 /**
317 * Return the VHT capabilities sent by the remote station.
318 *
319 * @param from the address of the remote station
320 * @return the VHT capabilities sent by the remote station
321 */
323 /**
324 * Return the HE capabilities sent by the remote station.
325 *
326 * @param from the address of the remote station
327 * @return the HE capabilities sent by the remote station
328 */
330 /**
331 * Return the HE 6 GHz Band Capabilities sent by a remote station.
332 *
333 * @param from the address of the remote station
334 * @return the HE 6 GHz Band capabilities sent by the remote station
335 */
337 /**
338 * Return the EHT capabilities sent by the remote station.
339 *
340 * @param from the address of the remote station
341 * @return the EHT capabilities sent by the remote station
342 */
344 /**
345 * @param from the (MLD or link) address of the remote non-AP MLD
346 * @return the EML Capabilities advertised by the remote non-AP MLD
347 */
348 std::optional<std::reference_wrapper<CommonInfoBasicMle::EmlCapabilities>>
350 /**
351 * @param from the (MLD or link) address of the remote non-AP MLD
352 * @return the MLD Capabilities advertised by the remote non-AP MLD
353 */
354 std::optional<std::reference_wrapper<CommonInfoBasicMle::MldCapabilities>>
356 /**
357 * Return whether the device has HT capability support enabled on the link this manager is
358 * associated with. Note that this means that this function returns false if this is a
359 * 6 GHz link.
360 *
361 * @return true if HT capability support is enabled, false otherwise
362 */
363 bool GetHtSupported() const;
364 /**
365 * Return whether the device has VHT capability support enabled on the link this manager is
366 * associated with. Note that this means that this function returns false if this is a
367 * 2.4 or 6 GHz link.
368 *
369 * @return true if VHT capability support is enabled, false otherwise
370 */
371 bool GetVhtSupported() const;
372 /**
373 * Return whether the device has HE capability support enabled.
374 *
375 * @return true if HE capability support is enabled, false otherwise
376 */
377 bool GetHeSupported() const;
378 /**
379 * Return whether the device has EHT capability support enabled.
380 *
381 * @return true if EHT capability support is enabled, false otherwise
382 */
383 bool GetEhtSupported() const;
384 /**
385 * Return whether the device has LDPC support enabled.
386 *
387 * @return true if LDPC support is enabled, false otherwise
388 */
389 bool GetLdpcSupported() const;
390 /**
391 * Return whether the device has SGI support enabled.
392 *
393 * @return true if SGI support is enabled, false otherwise
394 */
396 /**
397 * Return the shortest supported HE guard interval duration.
398 *
399 * @return the shortest supported HE guard interval duration
400 */
401 Time GetGuardInterval() const;
402 /**
403 * Enable or disable protection for non-ERP stations.
404 *
405 * @param enable enable or disable protection for non-ERP stations
406 */
407 void SetUseNonErpProtection(bool enable);
408 /**
409 * Return whether the device supports protection of non-ERP stations.
410 *
411 * @return true if protection for non-ERP stations is enabled,
412 * false otherwise
413 */
414 bool GetUseNonErpProtection() const;
415 /**
416 * Enable or disable protection for non-HT stations.
417 *
418 * @param enable enable or disable protection for non-HT stations
419 */
420 void SetUseNonHtProtection(bool enable);
421 /**
422 * Return whether the device supports protection of non-HT stations.
423 *
424 * @return true if protection for non-HT stations is enabled,
425 * false otherwise
426 */
427 bool GetUseNonHtProtection() const;
428 /**
429 * Enable or disable short PHY preambles.
430 *
431 * @param enable enable or disable short PHY preambles
432 */
433 void SetShortPreambleEnabled(bool enable);
434 /**
435 * Return whether the device uses short PHY preambles.
436 *
437 * @return true if short PHY preambles are enabled,
438 * false otherwise
439 */
440 bool GetShortPreambleEnabled() const;
441 /**
442 * Enable or disable short slot time.
443 *
444 * @param enable enable or disable short slot time
445 */
446 void SetShortSlotTimeEnabled(bool enable);
447 /**
448 * Return whether the device uses short slot time.
449 *
450 * @return true if short slot time is enabled,
451 * false otherwise
452 */
453 bool GetShortSlotTimeEnabled() const;
454
455 /**
456 * Reset the station, invoked in a STA upon dis-association or in an AP upon reboot.
457 */
458 void Reset();
459
460 /**
461 * Invoked in a STA upon association to store the set of rates which belong to the
462 * BSSBasicRateSet of the associated AP and which are supported locally.
463 * Invoked in an AP to configure the BSSBasicRateSet.
464 *
465 * @param mode the WifiMode to be added to the basic mode set
466 */
467 void AddBasicMode(WifiMode mode);
468 /**
469 * Return the default transmission mode.
470 *
471 * @return WifiMode the default transmission mode
472 */
473 WifiMode GetDefaultMode() const;
474 /**
475 * Return the number of basic modes we support.
476 *
477 * @return the number of basic modes we support
478 */
479 uint8_t GetNBasicModes() const;
480 /**
481 * Return a basic mode from the set of basic modes.
482 *
483 * @param i index of the basic mode in the basic mode set
484 *
485 * @return the basic mode at the given index
486 */
487 WifiMode GetBasicMode(uint8_t i) const;
488 /**
489 * Return the number of non-ERP basic modes we support.
490 *
491 * @return the number of basic modes we support
492 */
494 /**
495 * Return a basic mode from the set of basic modes that is not an ERP mode.
496 *
497 * @param i index of the basic mode in the basic mode set
498 *
499 * @return the basic mode at the given index
500 */
501 WifiMode GetNonErpBasicMode(uint8_t i) const;
502 /**
503 * Return whether the station supports LDPC or not.
504 *
505 * @param address the address of the station
506 *
507 * @return true if LDPC is supported by the station,
508 * false otherwise
509 */
510 bool GetLdpcSupported(Mac48Address address) const;
511 /**
512 * Return whether the station supports short PHY preamble or not.
513 *
514 * @param address the address of the station
515 *
516 * @return true if short PHY preamble is supported by the station,
517 * false otherwise
518 */
519 bool GetShortPreambleSupported(Mac48Address address) const;
520 /**
521 * Return whether the station supports short ERP slot time or not.
522 *
523 * @param address the address of the station
524 *
525 * @return true if short ERP slot time is supported by the station,
526 * false otherwise
527 */
528 bool GetShortSlotTimeSupported(Mac48Address address) const;
529 /**
530 * Return whether the given station is QoS capable.
531 *
532 * @param address the address of the station
533 *
534 * @return true if the station has QoS capabilities,
535 * false otherwise
536 */
537 bool GetQosSupported(Mac48Address address) const;
538 /**
539 * Get the AID of a remote station. Should only be called by APs.
540 *
541 * @param remoteAddress the MAC address of the remote station
542 * @return the Association ID if the station is associated, SU_STA_ID otherwise
543 */
544 uint16_t GetAssociationId(Mac48Address remoteAddress) const;
545 /**
546 * Add a given Modulation and Coding Scheme (MCS) index to
547 * the set of basic MCS.
548 *
549 * @param mcs the WifiMode to be added to the basic MCS set
550 */
551 void AddBasicMcs(WifiMode mcs);
552 /**
553 * Return the default Modulation and Coding Scheme (MCS) index.
554 *
555 * @return the default WifiMode
556 */
557 WifiMode GetDefaultMcs() const;
558 /**
559 * Return the default MCS to use to transmit frames to the given station.
560 *
561 * @param st the given station
562 * @return the default MCS to use to transmit frames to the given station
563 */
565 /**
566 * Return the number of basic MCS index.
567 *
568 * @return the number of basic MCS index
569 */
570 uint8_t GetNBasicMcs() const;
571 /**
572 * Return the MCS at the given <i>list</i> index.
573 *
574 * @param i the position in the list
575 *
576 * @return the basic MCS at the given list index
577 */
578 WifiMode GetBasicMcs(uint8_t i) const;
579 /**
580 * Record the MCS index supported by the station.
581 *
582 * @param address the address of the station
583 * @param mcs the WifiMode supported by the station
584 */
585 void AddSupportedMcs(Mac48Address address, WifiMode mcs);
586 /**
587 * Return the channel width supported by the station.
588 *
589 * @param address the address of the station
590 *
591 * @return the channel width supported by the station
592 */
594 /**
595 * Return whether the station supports HT/VHT short guard interval.
596 *
597 * @param address the address of the station
598 *
599 * @return true if the station supports HT/VHT short guard interval,
600 * false otherwise
601 */
603 /**
604 * Return the number of spatial streams supported by the station.
605 *
606 * @param address the address of the station
607 *
608 * @return the number of spatial streams supported by the station
609 */
610 uint8_t GetNumberOfSupportedStreams(Mac48Address address) const;
611 /**
612 * Return the number of MCS supported by the station.
613 *
614 * @param address the address of the station
615 *
616 * @return the number of MCS supported by the station
617 */
618 uint8_t GetNMcsSupported(Mac48Address address) const;
619 /**
620 * Return whether the station supports DSSS or not.
621 *
622 * @param address the address of the station
623 *
624 * @return true if DSSS is supported by the station,
625 * false otherwise
626 */
627 bool GetDsssSupported(const Mac48Address& address) const;
628 /**
629 * Return whether the station supports ERP OFDM or not.
630 *
631 * @param address the address of the station
632 *
633 * @return true if ERP OFDM is supported by the station,
634 * false otherwise
635 */
636 bool GetErpOfdmSupported(const Mac48Address& address) const;
637 /**
638 * Return whether the station supports OFDM or not.
639 *
640 * @param address the address of the station
641 *
642 * @return true if OFDM is supported by the station,
643 * false otherwise
644 */
645 bool GetOfdmSupported(const Mac48Address& address) const;
646 /**
647 * Return whether the station supports HT or not.
648 *
649 * @param address the address of the station
650 *
651 * @return true if HT is supported by the station,
652 * false otherwise
653 */
654 bool GetHtSupported(Mac48Address address) const;
655 /**
656 * Return whether the station supports VHT or not.
657 *
658 * @param address the address of the station
659 *
660 * @return true if VHT is supported by the station,
661 * false otherwise
662 */
663 bool GetVhtSupported(Mac48Address address) const;
664 /**
665 * Return whether the station supports HE or not.
666 *
667 * @param address the address of the station
668 *
669 * @return true if HE is supported by the station,
670 * false otherwise
671 */
672 bool GetHeSupported(Mac48Address address) const;
673 /**
674 * Return whether the station supports EHT or not.
675 *
676 * @param address the address of the station
677 *
678 * @return true if EHT is supported by the station,
679 * false otherwise
680 */
681 bool GetEhtSupported(Mac48Address address) const;
682 /**
683 * @param address the (MLD or link) address of the non-AP MLD
684 * @return whether the non-AP MLD supports EMLSR
685 */
686 bool GetEmlsrSupported(const Mac48Address& address) const;
687 /**
688 * @param address the (MLD or link) address of the non-AP MLD
689 * @return whether EMLSR mode is enabled for the non-AP MLD on this link
690 */
691 bool GetEmlsrEnabled(const Mac48Address& address) const;
692
693 /**
694 * Return a mode for non-unicast packets.
695 *
696 * @return WifiMode for non-unicast packets
697 */
699
700 /**
701 * Invoked in a STA or AP to store the set of
702 * modes supported by a destination which is
703 * also supported locally.
704 * The set of supported modes includes
705 * the BSSBasicRateSet.
706 *
707 * @param address the address of the station being recorded
708 * @param mode the WifiMode supports by the station
709 */
710 void AddSupportedMode(Mac48Address address, WifiMode mode);
711 /**
712 * Invoked in a STA or AP to store all of the modes supported
713 * by a destination which is also supported locally.
714 * The set of supported modes includes the BSSBasicRateSet.
715 *
716 * @param address the address of the station being recorded
717 */
719 /**
720 * Invoked in a STA or AP to store all of the MCS supported
721 * by a destination which is also supported locally.
722 *
723 * @param address the address of the station being recorded
724 */
725 void AddAllSupportedMcs(Mac48Address address);
726 /**
727 * Invoked in a STA or AP to delete all of the supported MCS by a destination.
728 *
729 * @param address the address of the station being recorded
730 */
732 /**
733 * Record whether the short PHY preamble is supported by the station.
734 *
735 * @param address the address of the station
736 * @param isShortPreambleSupported whether or not short PHY preamble is supported by the station
737 */
738 void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported);
739 /**
740 * Record whether the short ERP slot time is supported by the station.
741 *
742 * @param address the address of the station
743 * @param isShortSlotTimeSupported whether or not short ERP slot time is supported by the
744 * station
745 */
746 void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported);
747 /**
748 * Return whether the station state is brand new.
749 *
750 * @param address the address of the station
751 *
752 * @return true if the state of the station is brand new,
753 * false otherwise
754 */
755 bool IsBrandNew(Mac48Address address) const;
756 /**
757 * Return whether the station associated.
758 *
759 * @param address the address of the station
760 *
761 * @return true if the station is associated,
762 * false otherwise
763 */
764 bool IsAssociated(Mac48Address address) const;
765 /**
766 * Return whether we are waiting for an ACK for
767 * the association response we sent.
768 *
769 * @param address the address of the station
770 *
771 * @return true if the station is associated,
772 * false otherwise
773 */
774 bool IsWaitAssocTxOk(Mac48Address address) const;
775 /**
776 * Records that we are waiting for an ACK for
777 * the association response we sent.
778 *
779 * @param address the address of the station
780 */
781 void RecordWaitAssocTxOk(Mac48Address address);
782 /**
783 * Records that we got an ACK for
784 * the association response we sent.
785 *
786 * @param address the address of the station
787 */
788 void RecordGotAssocTxOk(Mac48Address address);
789 /**
790 * Records that we missed an ACK for
791 * the association response we sent.
792 *
793 * @param address the address of the station
794 */
796 /**
797 * Records that the STA was disassociated.
798 *
799 * @param address the address of the station
800 */
801 void RecordDisassociated(Mac48Address address);
802 /**
803 * Return whether we refused an association request from the given station
804 *
805 * @param address the address of the station
806 * @return true if we refused an association request, false otherwise
807 */
808 bool IsAssocRefused(Mac48Address address) const;
809 /**
810 * Records that association request was refused
811 *
812 * @param address the address of the station
813 */
814 void RecordAssocRefused(Mac48Address address);
815
816 /**
817 * Return whether the STA is currently in Power Save mode.
818 *
819 * @param address the address of the station
820 *
821 * @return true if the station is in Power Save mode, false otherwise
822 */
823 bool IsInPsMode(const Mac48Address& address) const;
824 /**
825 * Register whether the STA is in Power Save mode or not.
826 *
827 * @param address the address of the station
828 * @param isInPsMode whether the STA is in PS mode or not
829 */
830 void SetPsMode(const Mac48Address& address, bool isInPsMode);
831
832 /**
833 * Get the address of the MLD the given station is affiliated with, if any.
834 * Note that an MLD address is only present if an ML discovery/setup was performed
835 * with the given station (which requires both this station and the given
836 * station to be MLDs).
837 *
838 * @param address the MAC address of the remote station
839 * @return the address of the MLD the given station is affiliated with, if any
840 */
841 std::optional<Mac48Address> GetMldAddress(const Mac48Address& address) const;
842 /**
843 * Get the address of the remote station operating on this link and affiliated
844 * with the MLD having the given MAC address, if any.
845 *
846 * @param mldAddress the MLD MAC address
847 * @return the address of the remote station operating on this link and
848 * affiliated with the MLD, if any
849 */
850 std::optional<Mac48Address> GetAffiliatedStaAddress(const Mac48Address& mldAddress) const;
851
852 /**
853 * @param header MAC header
854 * @param allowedWidth the allowed width to send this packet
855 * @return the TXVECTOR to use to send this packet
856 */
857 WifiTxVector GetDataTxVector(const WifiMacHeader& header, MHz_u allowedWidth);
858 /**
859 * @param address remote address
860 * @param allowedWidth the allowed width for the data frame being protected
861 *
862 * @return the TXVECTOR to use to send the RTS prior to the
863 * transmission of the data packet itself.
864 */
865 WifiTxVector GetRtsTxVector(Mac48Address address, MHz_u allowedWidth);
866 /**
867 * Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS
868 * used by the sender.
869 *
870 * @param to the MAC address of the CTS receiver
871 * @param rtsTxMode the mode of the RTS used by the sender
872 * @return TXVECTOR for the CTS
873 */
875 /**
876 * Since CTS-to-self parameters are not dependent on the station,
877 * it is implemented in wifi remote station manager
878 *
879 * @return the transmission mode to use to send the CTS-to-self prior to the
880 * transmission of the data packet itself.
881 */
883 /**
884 * Adjust the TXVECTOR for an initial Control frame to ensure that the modulation class
885 * is non-HT and the rate is 6 Mbps, 12 Mbps or 24 Mbps.
886 *
887 * @param txVector the TXVECTOR to adjust
888 */
889 void AdjustTxVectorForIcf(WifiTxVector& txVector) const;
890 /**
891 * Return a TXVECTOR for the Ack frame given the destination and the mode of the Data
892 * used by the sender.
893 *
894 * @param to the MAC address of the Ack receiver
895 * @param dataTxVector the TXVECTOR of the Data used by the sender
896 * @return TXVECTOR for the Ack
897 */
898 WifiTxVector GetAckTxVector(Mac48Address to, const WifiTxVector& dataTxVector) const;
899 /**
900 * Return a TXVECTOR for the BlockAck frame given the destination and the mode of the Data
901 * used by the sender.
902 *
903 * @param to the MAC address of the BlockAck receiver
904 * @param dataTxVector the TXVECTOR of the Data used by the sender
905 * @return TXVECTOR for the BlockAck
906 */
907 WifiTxVector GetBlockAckTxVector(Mac48Address to, const WifiTxVector& dataTxVector) const;
908 /**
909 * Get control answer mode function.
910 *
911 * @param reqMode request mode
912 * @return control answer mode
913 */
915
916 /**
917 * Should be invoked whenever the RtsTimeout associated to a transmission
918 * attempt expires.
919 *
920 * @param header MAC header of the DATA packet
921 */
922 void ReportRtsFailed(const WifiMacHeader& header);
923 /**
924 * Should be invoked whenever the AckTimeout associated to a transmission
925 * attempt expires.
926 *
927 * @param mpdu the MPDU whose transmission failed
928 */
930 /**
931 * Should be invoked whenever we receive the CTS associated to an RTS
932 * we just sent. Note that we also get the SNR of the RTS we sent since
933 * the receiver put a SnrTag in the CTS.
934 *
935 * @param header MAC header of the DATA packet
936 * @param ctsSnr the SNR of the CTS we received
937 * @param ctsMode the WifiMode the receiver used to send the CTS
938 * @param rtsSnr the SNR of the RTS we sent
939 */
940 void ReportRtsOk(const WifiMacHeader& header, double ctsSnr, WifiMode ctsMode, double rtsSnr);
941 /**
942 * Should be invoked whenever we receive the ACK associated to a data packet
943 * we just sent.
944 *
945 * @param mpdu the MPDU
946 * @param ackSnr the SNR of the ACK we received
947 * @param ackMode the WifiMode the receiver used to send the ACK
948 * @param dataSnr the SNR of the DATA we sent
949 * @param dataTxVector the TXVECTOR of the DATA we sent
950 */
952 double ackSnr,
953 WifiMode ackMode,
954 double dataSnr,
955 WifiTxVector dataTxVector);
956 /**
957 * Should be invoked after calling ReportRtsFailed if frames are dropped
958 *
959 * @param header MAC header of the DATA packet
960 */
961 void ReportFinalRtsFailed(const WifiMacHeader& header);
962 /**
963 * Should be invoked after calling ReportDataFailed if frames are dropped
964 *
965 * @param mpdu the MPDU which was discarded
966 */
968 /**
969 * Typically called per A-MPDU, either when a Block ACK was successfully
970 * received or when a BlockAckTimeout has elapsed.
971 *
972 * @param address the address of the receiver
973 * @param nSuccessfulMpdus number of successfully transmitted MPDUs
974 * A value of 0 means that the Block ACK was missed.
975 * @param nFailedMpdus number of unsuccessfuly transmitted MPDUs
976 * @param rxSnr received SNR of the block ack frame itself
977 * @param dataSnr data SNR reported by remote station
978 * @param dataTxVector the TXVECTOR of the MPDUs we sent
979 */
981 uint16_t nSuccessfulMpdus,
982 uint16_t nFailedMpdus,
983 double rxSnr,
984 double dataSnr,
985 WifiTxVector dataTxVector);
986
987 /**
988 * @param address remote address
989 * @param rxSignalInfo the info on the received signal (\see RxSignalInfo)
990 * @param txVector the TXVECTOR used for the packet received
991 *
992 * Should be invoked whenever a packet is successfully received.
993 */
994 void ReportRxOk(Mac48Address address, RxSignalInfo rxSignalInfo, const WifiTxVector& txVector);
995
996 /**
997 * Increment the retry count for all the MPDUs (if needed) in the given PSDU and find the
998 * MPDUs to drop based on the frame retry count.
999 *
1000 * @param psdu the given PSDU, whose transmission failed
1001 * @return the list of MPDUs that have to be dropped
1002 */
1003 std::list<Ptr<WifiMpdu>> GetMpdusToDropOnTxFailure(Ptr<WifiPsdu> psdu);
1004
1005 /**
1006 * @param header MAC header of the data frame to send
1007 * @param txParams the TX parameters for the data frame to send
1008 *
1009 * @return true if we want to use an RTS/CTS handshake for this
1010 * frame before sending it, false otherwise.
1011 */
1012 bool NeedRts(const WifiMacHeader& header, const WifiTxParameters& txParams);
1013 /**
1014 * Return if we need to do CTS-to-self before sending a DATA.
1015 *
1016 * @param txVector the TXVECTOR of the packet to be sent
1017 *
1018 * @return true if CTS-to-self is needed,
1019 * false otherwise
1020 */
1021 bool NeedCtsToSelf(const WifiTxVector& txVector);
1022
1023 /**
1024 * @param mpdu the MPDU to send
1025 *
1026 * @return true if this packet should be fragmented,
1027 * false otherwise.
1028 */
1030 /**
1031 * @param mpdu the MPDU to send
1032 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1033 *
1034 * @return the size of the corresponding fragment.
1035 */
1037 /**
1038 * @param mpdu the packet to send
1039 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1040 *
1041 * @return the offset within the original packet where this fragment starts.
1042 */
1044 /**
1045 * @param mpdu the packet to send
1046 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1047 *
1048 * @return true if this is the last fragment, false otherwise.
1049 */
1050 bool IsLastFragment(Ptr<const WifiMpdu> mpdu, uint32_t fragmentNumber);
1051
1052 /**
1053 * @return the default transmission power
1054 */
1055 uint8_t GetDefaultTxPowerLevel() const;
1056 /**
1057 * @param address of the remote station
1058 *
1059 * @return information regarding the remote station associated with the given address
1060 */
1062 /**
1063 * @param address of the remote station
1064 *
1065 * @return the RSSI of the most recent packet received from the remote station (irrespective of
1066 * TID)
1067 *
1068 * This method is typically used when the device needs
1069 * to estimate the target UL RSSI info to put in the
1070 * Trigger frame to send to the remote station.
1071 */
1072 std::optional<dBm_u> GetMostRecentRssi(Mac48Address address) const;
1073 /**
1074 * Set the default transmission power level
1075 *
1076 * @param txPower the default transmission power level
1077 */
1078 void SetDefaultTxPowerLevel(uint8_t txPower);
1079 /**
1080 * @return the number of antennas supported by the PHY layer
1081 */
1082 uint8_t GetNumberOfAntennas() const;
1083 /**
1084 * @return the maximum number of spatial streams supported by the PHY layer
1085 */
1086 uint8_t GetMaxNumberOfTransmitStreams() const;
1087 /**
1088 * @returns whether LDPC should be used for a given destination address.
1089 *
1090 * @param dest the destination address
1091 *
1092 * @return whether LDPC should be used for a given destination address
1093 */
1094 bool UseLdpcForDestination(Mac48Address dest) const;
1095
1096 /**
1097 * TracedCallback signature for power change events.
1098 *
1099 * @param [in] oldPower The previous power (in dBm).
1100 * @param [in] newPower The new power (in dBm).
1101 * @param [in] address The remote station MAC address.
1102 */
1103 typedef void (*PowerChangeTracedCallback)(double oldPower,
1104 double newPower,
1105 Mac48Address remoteAddress);
1106
1107 /**
1108 * TracedCallback signature for rate change events.
1109 *
1110 * @param [in] oldRate The previous data rate.
1111 * @param [in] newRate The new data rate.
1112 * @param [in] address The remote station MAC address.
1113 */
1114 typedef void (*RateChangeTracedCallback)(DataRate oldRate,
1115 DataRate newRate,
1116 Mac48Address remoteAddress);
1117
1118 /**
1119 * Return the WifiPhy.
1120 *
1121 * @return a pointer to the WifiPhy
1122 */
1123 Ptr<WifiPhy> GetPhy() const;
1124 /**
1125 * Return the WifiMac.
1126 *
1127 * @return a pointer to the WifiMac
1128 */
1129 Ptr<WifiMac> GetMac() const;
1130
1131 protected:
1132 void DoDispose() override;
1133 /**
1134 * Return whether mode associated with the specified station at the specified index.
1135 *
1136 * @param station the station being queried
1137 * @param i the index
1138 *
1139 * @return WifiMode at the given index of the specified station
1140 */
1141 WifiMode GetSupported(const WifiRemoteStation* station, uint8_t i) const;
1142 /**
1143 * Return the number of modes supported by the given station.
1144 *
1145 * @param station the station being queried
1146 *
1147 * @return the number of modes supported by the given station
1148 */
1149 uint8_t GetNSupported(const WifiRemoteStation* station) const;
1150 /**
1151 * Return whether the given station is QoS capable.
1152 *
1153 * @param station the station being queried
1154 *
1155 * @return true if the station has QoS capabilities,
1156 * false otherwise
1157 */
1158 bool GetQosSupported(const WifiRemoteStation* station) const;
1159 /**
1160 * Return whether the given station is HT capable.
1161 *
1162 * @param station the station being queried
1163 *
1164 * @return true if the station has HT capabilities,
1165 * false otherwise
1166 */
1167 bool GetHtSupported(const WifiRemoteStation* station) const;
1168 /**
1169 * Return whether the given station is VHT capable.
1170 *
1171 * @param station the station being queried
1172 *
1173 * @return true if the station has VHT capabilities,
1174 * false otherwise
1175 */
1176 bool GetVhtSupported(const WifiRemoteStation* station) const;
1177 /**
1178 * Return whether the given station is HE capable.
1179 *
1180 * @param station the station being queried
1181 *
1182 * @return true if the station has HE capabilities,
1183 * false otherwise
1184 */
1185 bool GetHeSupported(const WifiRemoteStation* station) const;
1186 /**
1187 * Return whether the given station is EHT capable.
1188 *
1189 * @param station the station being queried
1190 *
1191 * @return true if the station has EHT capabilities,
1192 * false otherwise
1193 */
1194 bool GetEhtSupported(const WifiRemoteStation* station) const;
1195 /**
1196 * @param station the station of a non-AP MLD
1197 * @return whether the non-AP MLD supports EMLSR
1198 */
1199 bool GetEmlsrSupported(const WifiRemoteStation* station) const;
1200 /**
1201 * @param station the station of a non-AP MLD
1202 * @return whether EMLSR mode is enabled for the non-AP MLD on this link
1203 */
1204 bool GetEmlsrEnabled(const WifiRemoteStation* station) const;
1205 /**
1206 * Return the WifiMode supported by the specified station at the specified index.
1207 *
1208 * @param station the station being queried
1209 * @param i the index
1210 *
1211 * @return the WifiMode at the given index of the specified station
1212 */
1213
1214 WifiMode GetMcsSupported(const WifiRemoteStation* station, uint8_t i) const;
1215 /**
1216 * Return the number of MCS supported by the given station.
1217 *
1218 * @param station the station being queried
1219 *
1220 * @return the number of MCS supported by the given station
1221 */
1222 uint8_t GetNMcsSupported(const WifiRemoteStation* station) const;
1223 /**
1224 * Return whether non-ERP mode associated with the specified station at the specified index.
1225 *
1226 * @param station the station being queried
1227 * @param i the index
1228 *
1229 * @return WifiMode at the given index of the specified station
1230 */
1231 WifiMode GetNonErpSupported(const WifiRemoteStation* station, uint8_t i) const;
1232 /**
1233 * Return the number of non-ERP modes supported by the given station.
1234 *
1235 * @param station the station being queried
1236 *
1237 * @return the number of non-ERP modes supported by the given station
1238 */
1239 uint32_t GetNNonErpSupported(const WifiRemoteStation* station) const;
1240 /**
1241 * Return the address of the station.
1242 *
1243 * @param station the station being queried
1244 *
1245 * @return the address of the station
1246 */
1247 Mac48Address GetAddress(const WifiRemoteStation* station) const;
1248 /**
1249 * Return the channel width supported by the station.
1250 *
1251 * @param station the station being queried
1252 *
1253 * @return the channel width supported by the station
1254 */
1255 MHz_u GetChannelWidth(const WifiRemoteStation* station) const;
1256 /**
1257 * Return whether the given station supports HT/VHT short guard interval.
1258 *
1259 * @param station the station being queried
1260 *
1261 * @return true if the station supports HT/VHT short guard interval,
1262 * false otherwise
1263 */
1264 bool GetShortGuardIntervalSupported(const WifiRemoteStation* station) const;
1265 /**
1266 * Return the shortest HE guard interval duration supported by the station.
1267 *
1268 * @param station the station being queried
1269 *
1270 * @return the shortest HE guard interval duration supported by the station
1271 */
1272 Time GetGuardInterval(const WifiRemoteStation* station) const;
1273 /**
1274 * Return whether the given station supports A-MPDU.
1275 *
1276 * @param station the station being queried
1277 *
1278 * @return true if the station supports MPDU aggregation,
1279 * false otherwise
1280 */
1281 bool GetAggregation(const WifiRemoteStation* station) const;
1282
1283 /**
1284 * Return the number of supported streams the station has.
1285 *
1286 * @param station the station being queried
1287 *
1288 * @return the number of supported streams the station has
1289 */
1290 uint8_t GetNumberOfSupportedStreams(const WifiRemoteStation* station) const;
1291 /**
1292 * @returns the number of Ness the station has.
1293 *
1294 * @param station the station being queried
1295 *
1296 * @return the number of Ness the station has
1297 */
1298 uint8_t GetNess(const WifiRemoteStation* station) const;
1299
1300 uint8_t m_linkId; //!< the ID of the link this object is associated with
1301 bool m_incrRetryCountUnderBa; //!< whether to increment the retry count of frames that are
1302 //!< part of a Block Ack agreement
1303
1304 private:
1305 /**
1306 * If the given TXVECTOR is used for a MU transmission, return the STAID of
1307 * the station with the given address if we are an AP or our own STAID if we
1308 * are a STA associated with some AP. Otherwise, return SU_STA_ID.
1309 *
1310 * @param address the address of the station
1311 * @param txVector the TXVECTOR used for a MU transmission
1312 * @return the STA-ID of the station
1313 */
1314 uint16_t GetStaId(Mac48Address address, const WifiTxVector& txVector) const;
1315
1316 /**
1317 * Increment the retry count (if needed) for the given PSDU, whose transmission failed.
1318 *
1319 * @param station the station the PSDU is addressed to
1320 * @param psdu the given PSDU
1321 */
1323
1324 /**
1325 * Find the MPDUs to drop (possibly based on their frame retry count) in the given PSDU,
1326 * whose transmission failed.
1327 *
1328 * @param station the station the PSDU is addressed to
1329 * @param psdu the given PSDU
1330 * @return the MPDUs in the PSDU to drop
1331 */
1332 virtual std::list<Ptr<WifiMpdu>> DoGetMpdusToDropOnTxFailure(WifiRemoteStation* station,
1333 Ptr<WifiPsdu> psdu);
1334
1335 /**
1336 * @param station the station that we need to communicate
1337 * @param size the size of the frame to send in bytes
1338 * @param normally indicates whether the normal 802.11 RTS enable mechanism would
1339 * request that the RTS is sent or not.
1340 *
1341 * @return true if we want to use an RTS/CTS handshake for this frame before sending it,
1342 * false otherwise.
1343 *
1344 * Note: This method is called before a unicast packet is sent on the medium.
1345 */
1346 virtual bool DoNeedRts(WifiRemoteStation* station, uint32_t size, bool normally);
1347 /**
1348 * @param station the station that we need to communicate
1349 * @param packet the packet to send
1350 * @param normally indicates whether the normal 802.11 data fragmentation mechanism
1351 * would request that the data packet is fragmented or not.
1352 *
1353 * @return true if this packet should be fragmented,
1354 * false otherwise.
1355 *
1356 * Note: This method is called before sending a unicast packet.
1357 */
1358 virtual bool DoNeedFragmentation(WifiRemoteStation* station,
1359 Ptr<const Packet> packet,
1360 bool normally);
1361 /**
1362 * @return a new station data structure
1363 */
1365 /**
1366 * @param station the station that we need to communicate
1367 * @param allowedWidth the allowed width to send a packet to the station
1368 * @return the TXVECTOR to use to send a packet to the station
1369 *
1370 * Note: This method is called before sending a unicast packet or a fragment
1371 * of a unicast packet to decide which transmission mode to use.
1372 */
1373 virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, MHz_u allowedWidth) = 0;
1374 /**
1375 * @param station the station that we need to communicate
1376 *
1377 * @return the transmission mode to use to send an RTS to the station
1378 *
1379 * Note: This method is called before sending an RTS to a station
1380 * to decide which transmission mode to use for the RTS.
1381 */
1383
1384 /**
1385 * This method is a pure virtual method that must be implemented by the sub-class.
1386 * This allows different types of WifiRemoteStationManager to respond differently,
1387 *
1388 * @param station the station that we failed to send RTS
1389 */
1390 virtual void DoReportRtsFailed(WifiRemoteStation* station) = 0;
1391 /**
1392 * This method is a pure virtual method that must be implemented by the sub-class.
1393 * This allows different types of WifiRemoteStationManager to respond differently,
1394 *
1395 * @param station the station that we failed to send DATA
1396 */
1397 virtual void DoReportDataFailed(WifiRemoteStation* station) = 0;
1398 /**
1399 * This method is a pure virtual method that must be implemented by the sub-class.
1400 * This allows different types of WifiRemoteStationManager to respond differently,
1401 *
1402 * @param station the station that we successfully sent RTS
1403 * @param ctsSnr the SNR of the CTS we received
1404 * @param ctsMode the WifiMode the receiver used to send the CTS
1405 * @param rtsSnr the SNR of the RTS we sent
1406 */
1407 virtual void DoReportRtsOk(WifiRemoteStation* station,
1408 double ctsSnr,
1409 WifiMode ctsMode,
1410 double rtsSnr) = 0;
1411 /**
1412 * This method is a pure virtual method that must be implemented by the sub-class.
1413 * This allows different types of WifiRemoteStationManager to respond differently,
1414 *
1415 * @param station the station that we successfully sent RTS
1416 * @param ackSnr the SNR of the ACK we received
1417 * @param ackMode the WifiMode the receiver used to send the ACK
1418 * @param dataSnr the SNR of the DATA we sent
1419 * @param dataChannelWidth the channel width of the DATA we sent
1420 * @param dataNss the number of spatial streams used to send the DATA
1421 */
1422 virtual void DoReportDataOk(WifiRemoteStation* station,
1423 double ackSnr,
1424 WifiMode ackMode,
1425 double dataSnr,
1426 MHz_u dataChannelWidth,
1427 uint8_t dataNss) = 0;
1428 /**
1429 * This method is a pure virtual method that must be implemented by the sub-class.
1430 * This allows different types of WifiRemoteStationManager to respond differently,
1431 *
1432 * @param station the station that we failed to send RTS
1433 */
1434 virtual void DoReportFinalRtsFailed(WifiRemoteStation* station) = 0;
1435 /**
1436 * This method is a pure virtual method that must be implemented by the sub-class.
1437 * This allows different types of WifiRemoteStationManager to respond differently,
1438 *
1439 * @param station the station that we failed to send DATA
1440 */
1441 virtual void DoReportFinalDataFailed(WifiRemoteStation* station) = 0;
1442 /**
1443 * This method is a pure virtual method that must be implemented by the sub-class.
1444 * This allows different types of WifiRemoteStationManager to respond differently,
1445 *
1446 * @param station the station that sent the DATA to us
1447 * @param rxSnr the SNR of the DATA we received
1448 * @param txMode the WifiMode the sender used to send the DATA
1449 */
1450 virtual void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) = 0;
1451 /**
1452 * Typically called per A-MPDU, either when a Block ACK was successfully received
1453 * or when a BlockAckTimeout has elapsed. This method is a virtual method that must
1454 * be implemented by the sub-class intended to handle A-MPDUs. This allows different
1455 * types of WifiRemoteStationManager to respond differently.
1456 *
1457 * @param station the station that sent the DATA to us
1458 * @param nSuccessfulMpdus number of successfully transmitted MPDUs.
1459 * A value of 0 means that the Block ACK was missed.
1460 * @param nFailedMpdus number of unsuccessfuly transmitted MPDUs.
1461 * @param rxSnr received SNR of the block ack frame itself
1462 * @param dataSnr data SNR reported by remote station
1463 * @param dataChannelWidth the channel width of the A-MPDU we sent
1464 * @param dataNss the number of spatial streams used to send the A-MPDU
1465 */
1466 virtual void DoReportAmpduTxStatus(WifiRemoteStation* station,
1467 uint16_t nSuccessfulMpdus,
1468 uint16_t nFailedMpdus,
1469 double rxSnr,
1470 double dataSnr,
1471 MHz_u dataChannelWidth,
1472 uint8_t dataNss);
1473
1474 /**
1475 * Return the state of the station associated with the given address.
1476 *
1477 * @param address the address of the station
1478 * @return WifiRemoteStationState corresponding to the address
1479 */
1480 std::shared_ptr<WifiRemoteStationState> LookupState(Mac48Address address) const;
1481 /**
1482 * Return the station associated with the given address.
1483 *
1484 * @param address the address of the station
1485 *
1486 * @return WifiRemoteStation corresponding to the address
1487 */
1488 WifiRemoteStation* Lookup(Mac48Address address) const;
1489
1490 /**
1491 * Actually sets the fragmentation threshold, it also checks the validity of
1492 * the given threshold.
1493 *
1494 * @param threshold the fragmentation threshold
1495 */
1496 void DoSetFragmentationThreshold(uint32_t threshold);
1497 /**
1498 * Return the current fragmentation threshold
1499 *
1500 * @return the fragmentation threshold
1501 */
1503 /**
1504 * Return the number of fragments needed for the given packet.
1505 *
1506 * @param mpdu the packet to be fragmented
1507 *
1508 * @return the number of fragments needed
1509 */
1511
1512 /**
1513 * This is a pointer to the WifiPhy associated with this
1514 * WifiRemoteStationManager that is set on call to
1515 * WifiRemoteStationManager::SetupPhy(). Through this pointer the
1516 * station manager can determine PHY characteristics, such as the
1517 * set of all transmission rates that may be supported (the
1518 * "DeviceRateSet").
1519 */
1521 /**
1522 * This is a pointer to the WifiMac associated with this
1523 * WifiRemoteStationManager that is set on call to
1524 * WifiRemoteStationManager::SetupMac(). Through this pointer the
1525 * station manager can determine MAC characteristics, such as the
1526 * interframe spaces.
1527 */
1529
1530 /**
1531 * This member is the list of WifiMode objects that comprise the
1532 * BSSBasicRateSet parameter. This list is constructed through calls
1533 * to WifiRemoteStationManager::AddBasicMode(), and an API that
1534 * allows external access to it is available through
1535 * WifiRemoteStationManager::GetNBasicModes() and
1536 * WifiRemoteStationManager::GetBasicMode().
1537 */
1538 WifiModeList m_bssBasicRateSet; //!< basic rate set
1539 WifiModeList m_bssBasicMcsSet; //!< basic MCS set
1540
1541 StationStates m_states; //!< States of known stations
1542 Stations m_stations; //!< Information for each known stations
1543
1544 uint32_t m_maxSsrc; //!< Maximum STA short retry count (SSRC)
1545 uint32_t m_maxSlrc; //!< Maximum STA long retry count (SLRC)
1546 uint32_t m_rtsCtsThreshold; //!< Threshold for RTS/CTS
1547 Time m_rtsCtsTxDurationThresh; //!< TX duration threshold for RTS/CTS
1548 uint32_t m_fragmentationThreshold; //!< Current threshold for fragmentation
1549 uint8_t m_defaultTxPowerLevel; //!< Default transmission power level
1550 WifiMode m_nonUnicastMode; //!< Transmission mode for non-unicast Data frames
1551 bool m_useNonErpProtection; //!< flag if protection for non-ERP stations against ERP
1552 //!< transmissions is enabled
1553 bool m_useNonHtProtection; //!< flag if protection for non-HT stations against HT transmissions
1554 //!< is enabled
1555 bool m_shortPreambleEnabled; //!< flag if short PHY preamble is enabled
1556 bool m_shortSlotTimeEnabled; //!< flag if short slot time is enabled
1557 ProtectionMode m_erpProtectionMode; //!< Protection mode for ERP stations when non-ERP stations
1558 //!< are detected
1560 m_htProtectionMode; //!< Protection mode for HT stations when non-HT stations are detected
1561
1562 std::array<uint32_t, AC_BE_NQOS> m_ssrc; //!< short retry count per AC
1563 std::array<uint32_t, AC_BE_NQOS> m_slrc; //!< long retry count per AC
1564
1565 /**
1566 * The trace source fired when the transmission of a single RTS has failed
1567 */
1569 /**
1570 * The trace source fired when the transmission of a single data packet has failed
1571 */
1573 /**
1574 * The trace source fired when the transmission of a RTS has
1575 * exceeded the maximum number of attempts
1576 */
1578 /**
1579 * The trace source fired when the transmission of a data packet has
1580 * exceeded the maximum number of attempts
1581 */
1583};
1584
1585} // namespace ns3
1586
1587#endif /* WIFI_REMOTE_STATION_MANAGER_H */
Class for representing data rates.
Definition data-rate.h:78
The IEEE 802.11be EHT Capabilities.
The Extended Capabilities Information Element.
The HE 6 GHz Band Capabilities (IEEE 802.11ax-2021 9.4.2.263)
The IEEE 802.11ax HE Capabilities.
The HT Capabilities Information Element.
an EUI-48 address
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:48
The IEEE 802.11ac VHT Capabilities.
Implements the IEEE 802.11 MAC header.
represent a single transmission mode
Definition wifi-mode.h:40
TID independent remote station statistics.
hold a list of per-remote-station state.
std::unordered_map< Mac48Address, std::shared_ptr< WifiRemoteStationState >, WifiAddressHash > StationStates
A map of WifiRemoteStationStates with Mac48Address as key.
void ReportDataFailed(Ptr< const WifiMpdu > mpdu)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
bool GetQosSupported(Mac48Address address) const
Return whether the given station is QoS capable.
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, MHz_u allowedWidth)=0
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
WifiTxVector GetAckTxVector(Mac48Address to, const WifiTxVector &dataTxVector) const
Return a TXVECTOR for the Ack frame given the destination and the mode of the Data used by the sender...
virtual bool DoNeedFragmentation(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
uint32_t m_fragmentationThreshold
Current threshold for fragmentation.
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
void SetPsMode(const Mac48Address &address, bool isInPsMode)
Register whether the STA is in Power Save mode or not.
uint8_t GetNess(const WifiRemoteStation *station) const
void AddBasicMode(WifiMode mode)
Invoked in a STA upon association to store the set of rates which belong to the BSSBasicRateSet of th...
bool GetEmlsrEnabled(const Mac48Address &address) const
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
uint32_t GetNFragments(Ptr< const WifiMpdu > mpdu)
Return the number of fragments needed for the given packet.
uint16_t GetAssociationId(Mac48Address remoteAddress) const
Get the AID of a remote station.
virtual void DoIncrementRetryCountOnTxFailure(WifiRemoteStation *station, Ptr< WifiPsdu > psdu)
Increment the retry count (if needed) for the given PSDU, whose transmission failed.
ProtectionMode m_htProtectionMode
Protection mode for HT stations when non-HT stations are detected.
WifiMode GetDefaultModeForSta(const WifiRemoteStation *st) const
Return the default MCS to use to transmit frames to the given station.
void AdjustTxVectorForIcf(WifiTxVector &txVector) const
Adjust the TXVECTOR for an initial Control frame to ensure that the modulation class is non-HT and th...
std::array< uint32_t, AC_BE_NQOS > m_slrc
long retry count per AC
WifiRemoteStation * Lookup(Mac48Address address) const
Return the station associated with the given address.
uint32_t GetFragmentationThreshold() const
Return the fragmentation threshold.
uint8_t GetNBasicModes() const
Return the number of basic modes we support.
bool UseLdpcForDestination(Mac48Address dest) const
uint32_t m_maxSsrc
Maximum STA short retry count (SSRC)
void SetRtsCtsThreshold(uint32_t threshold)
Sets the RTS threshold.
void AddAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to store all of the MCS supported by a destination which is also supported loc...
TracedCallback< Mac48Address > m_macTxRtsFailed
The trace source fired when the transmission of a single RTS has failed.
virtual bool DoNeedRts(WifiRemoteStation *station, uint32_t size, bool normally)
Time GetGuardInterval() const
Return the shortest supported HE guard interval duration.
WifiTxVector GetRtsTxVector(Mac48Address address, MHz_u allowedWidth)
void AddStationHeCapabilities(Mac48Address from, const HeCapabilities &heCapabilities)
Records HE capabilities of the remote station.
void DoSetFragmentationThreshold(uint32_t threshold)
Actually sets the fragmentation threshold, it also checks the validity of the given threshold.
bool IsBrandNew(Mac48Address address) const
Return whether the station state is brand new.
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
virtual void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)=0
This method is a pure virtual method that must be implemented by the sub-class.
Time m_rtsCtsTxDurationThresh
TX duration threshold for RTS/CTS.
bool GetShortSlotTimeEnabled() const
Return whether the device uses short slot time.
void DoDispose() override
Destructor implementation.
void AddStationMleCommonInfo(Mac48Address from, const std::shared_ptr< CommonInfoBasicMle > &mleCommonInfo)
Records the Common Info field advertised by the given remote station in a Multi-Link Element.
virtual void DoReportDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
bool IsLastFragment(Ptr< const WifiMpdu > mpdu, uint32_t fragmentNumber)
void ReportFinalDataFailed(Ptr< const WifiMpdu > mpdu)
Should be invoked after calling ReportDataFailed if frames are dropped.
uint32_t GetNNonErpBasicModes() const
Return the number of non-ERP basic modes we support.
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
uint8_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given station.
bool m_useNonHtProtection
flag if protection for non-HT stations against HT transmissions is enabled
bool GetShortPreambleSupported(Mac48Address address) const
Return whether the station supports short PHY preamble or not.
void(* PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress)
TracedCallback signature for power change events.
void AddAllSupportedModes(Mac48Address address)
Invoked in a STA or AP to store all of the modes supported by a destination which is also supported l...
virtual void DoReportAmpduTxStatus(WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus, double rxSnr, double dataSnr, MHz_u dataChannelWidth, uint8_t dataNss)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
std::optional< Mac48Address > GetAffiliatedStaAddress(const Mac48Address &mldAddress) const
Get the address of the remote station operating on this link and affiliated with the MLD having the g...
WifiMode GetNonErpBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes that is not an ERP mode.
std::list< Ptr< WifiMpdu > > GetMpdusToDropOnTxFailure(Ptr< WifiPsdu > psdu)
Increment the retry count for all the MPDUs (if needed) in the given PSDU and find the MPDUs to drop ...
WifiTxVector GetDataTxVector(const WifiMacHeader &header, MHz_u allowedWidth)
std::optional< dBm_u > GetMostRecentRssi(Mac48Address address) const
void ReportRtsOk(const WifiMacHeader &header, double ctsSnr, WifiMode ctsMode, double rtsSnr)
Should be invoked whenever we receive the CTS associated to an RTS we just sent.
Ptr< WifiPhy > GetPhy() const
Return the WifiPhy.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
std::optional< std::reference_wrapper< CommonInfoBasicMle::EmlCapabilities > > GetStationEmlCapabilities(const Mac48Address &from)
WifiTxVector GetBlockAckTxVector(Mac48Address to, const WifiTxVector &dataTxVector) const
Return a TXVECTOR for the BlockAck frame given the destination and the mode of the Data used by the s...
void RemoveAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to delete all of the supported MCS by a destination.
void ReportRxOk(Mac48Address address, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector)
uint32_t DoGetFragmentationThreshold() const
Return the current fragmentation threshold.
MHz_u GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
TracedCallback< Mac48Address > m_macTxFinalRtsFailed
The trace source fired when the transmission of a RTS has exceeded the maximum number of attempts.
WifiMode GetNonUnicastMode() const
Return a mode for non-unicast packets.
bool m_shortPreambleEnabled
flag if short PHY preamble is enabled
bool GetShortSlotTimeSupported(Mac48Address address) const
Return whether the station supports short ERP slot time or not.
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
WifiMode GetDefaultMcs() const
Return the default Modulation and Coding Scheme (MCS) index.
Ptr< WifiPhy > m_wifiPhy
This is a pointer to the WifiPhy associated with this WifiRemoteStationManager that is set on call to...
void AddBasicMcs(WifiMode mcs)
Add a given Modulation and Coding Scheme (MCS) index to the set of basic MCS.
uint8_t m_defaultTxPowerLevel
Default transmission power level.
bool GetErpOfdmSupported(const Mac48Address &address) const
Return whether the station supports ERP OFDM or not.
static TypeId GetTypeId()
Get the type ID.
WifiMode m_nonUnicastMode
Transmission mode for non-unicast Data frames.
void SetUseNonHtProtection(bool enable)
Enable or disable protection for non-HT stations.
MHz_u GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
Ptr< const HtCapabilities > GetStationHtCapabilities(Mac48Address from)
Return the HT capabilities sent by the remote station.
bool NeedFragmentation(Ptr< const WifiMpdu > mpdu)
void ReportAmpduTxStatus(Mac48Address address, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus, double rxSnr, double dataSnr, WifiTxVector dataTxVector)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
Ptr< const He6GhzBandCapabilities > GetStationHe6GhzCapabilities(const Mac48Address &from) const
Return the HE 6 GHz Band Capabilities sent by a remote station.
bool GetDsssSupported(const Mac48Address &address) const
Return whether the station supports DSSS or not.
uint32_t GetFragmentOffset(Ptr< const WifiMpdu > mpdu, uint32_t fragmentNumber)
void SetQosSupport(Mac48Address from, bool qosSupported)
Records QoS support of the remote station.
void AddStationHe6GhzCapabilities(const Mac48Address &from, const He6GhzBandCapabilities &he6GhzCapabilities)
Records HE 6 GHz Band Capabilities of a remote station.
WifiRemoteStationInfo GetInfo(Mac48Address address)
bool GetOfdmSupported(const Mac48Address &address) const
Return whether the station supports OFDM or not.
void(* RateChangeTracedCallback)(DataRate oldRate, DataRate newRate, Mac48Address remoteAddress)
TracedCallback signature for rate change events.
uint32_t GetFragmentSize(Ptr< const WifiMpdu > mpdu, uint32_t fragmentNumber)
WifiTxVector GetCtsToSelfTxVector()
Since CTS-to-self parameters are not dependent on the station, it is implemented in wifi remote stati...
uint8_t GetNBasicMcs() const
Return the number of basic MCS index.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
bool GetHtSupported() const
Return whether the device has HT capability support enabled on the link this manager is associated wi...
void RecordWaitAssocTxOk(Mac48Address address)
Records that we are waiting for an ACK for the association response we sent.
void SetFragmentationThreshold(uint32_t threshold)
Sets a fragmentation threshold.
Ptr< WifiMac > m_wifiMac
This is a pointer to the WifiMac associated with this WifiRemoteStationManager that is set on call to...
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
void AddStationVhtCapabilities(Mac48Address from, const VhtCapabilities &vhtCapabilities)
Records VHT capabilities of the remote station.
bool GetLdpcSupported() const
Return whether the device has LDPC support enabled.
bool GetEhtSupported() const
Return whether the device has EHT capability support enabled.
void AddSupportedMode(Mac48Address address, WifiMode mode)
Invoked in a STA or AP to store the set of modes supported by a destination which is also supported l...
std::shared_ptr< WifiRemoteStationState > LookupState(Mac48Address address) const
Return the state of the station associated with the given address.
Ptr< WifiMac > GetMac() const
Return the WifiMac.
bool m_incrRetryCountUnderBa
whether to increment the retry count of frames that are part of a Block Ack agreement
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether non-ERP mode associated with the specified station at the specified index.
std::array< uint32_t, AC_BE_NQOS > m_ssrc
short retry count per AC
void AddStationEhtCapabilities(Mac48Address from, const EhtCapabilities &ehtCapabilities)
Records EHT capabilities of the remote station.
Ptr< const EhtCapabilities > GetStationEhtCapabilities(Mac48Address from)
Return the EHT capabilities sent by the remote station.
virtual std::list< Ptr< WifiMpdu > > DoGetMpdusToDropOnTxFailure(WifiRemoteStation *station, Ptr< WifiPsdu > psdu)
Find the MPDUs to drop (possibly based on their frame retry count) in the given PSDU,...
void RecordAssocRefused(Mac48Address address)
Records that association request was refused.
bool IsInPsMode(const Mac48Address &address) const
Return whether the STA is currently in Power Save mode.
void ReportFinalRtsFailed(const WifiMacHeader &header)
Should be invoked after calling ReportRtsFailed if frames are dropped.
StationStates m_states
States of known stations.
std::unordered_map< Mac48Address, WifiRemoteStation *, WifiAddressHash > Stations
A map of WifiRemoteStations with Mac48Address as key.
WifiTxVector GetCtsTxVector(Mac48Address to, WifiMode rtsTxMode) const
Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender.
void SetMaxSsrc(uint32_t maxSsrc)
Sets the maximum STA short retry count (SSRC).
Ptr< const HeCapabilities > GetStationHeCapabilities(Mac48Address from)
Return the HE capabilities sent by the remote station.
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
TracedCallback< Mac48Address > m_macTxDataFailed
The trace source fired when the transmission of a single data packet has failed.
uint16_t GetStaId(Mac48Address address, const WifiTxVector &txVector) const
If the given TXVECTOR is used for a MU transmission, return the STAID of the station with the given a...
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, MHz_u dataChannelWidth, uint8_t dataNss)=0
This method is a pure virtual method that must be implemented by the sub-class.
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PHY preamble is supported by the station.
bool GetEmlsrSupported(const Mac48Address &address) const
Ptr< const ExtendedCapabilities > GetStationExtendedCapabilities(const Mac48Address &from)
Return the extended capabilities sent by the remote station.
bool GetShortGuardIntervalSupported() const
Return whether the device has SGI support enabled.
Mac48Address GetAddress(const WifiRemoteStation *station) const
Return the address of the station.
virtual void SetupPhy(const Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
virtual void DoReportRtsFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
void SetDefaultTxPowerLevel(uint8_t txPower)
Set the default transmission power level.
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
Stations m_stations
Information for each known stations.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)=0
WifiMode GetMcsSupported(const WifiRemoteStation *station, uint8_t i) const
Return the WifiMode supported by the specified station at the specified index.
std::optional< std::reference_wrapper< CommonInfoBasicMle::MldCapabilities > > GetStationMldCapabilities(const Mac48Address &from)
uint32_t GetNNonErpSupported(const WifiRemoteStation *station) const
Return the number of non-ERP modes supported by the given station.
uint32_t m_maxSlrc
Maximum STA long retry count (SLRC)
virtual WifiRemoteStation * DoCreateStation() const =0
void Reset()
Reset the station, invoked in a STA upon dis-association or in an AP upon reboot.
bool GetUseNonErpProtection() const
Return whether the device supports protection of non-ERP stations.
bool IsAssocRefused(Mac48Address address) const
Return whether we refused an association request from the given station.
void SetAssociationId(Mac48Address remoteAddress, uint16_t aid)
Record the AID of a remote station.
bool GetVhtSupported() const
Return whether the device has VHT capability support enabled on the link this manager is associated w...
Ptr< const VhtCapabilities > GetStationVhtCapabilities(Mac48Address from)
Return the VHT capabilities sent by the remote station.
bool NeedCtsToSelf(const WifiTxVector &txVector)
Return if we need to do CTS-to-self before sending a DATA.
void AddStationHtCapabilities(Mac48Address from, const HtCapabilities &htCapabilities)
Records HT capabilities of the remote station.
ProtectionMode m_erpProtectionMode
Protection mode for ERP stations when non-ERP stations are detected.
WifiModeList m_bssBasicRateSet
This member is the list of WifiMode objects that comprise the BSSBasicRateSet parameter.
ProtectionMode
ProtectionMode enumeration.
void ReportDataOk(Ptr< const WifiMpdu > mpdu, double ackSnr, WifiMode ackMode, double dataSnr, WifiTxVector dataTxVector)
Should be invoked whenever we receive the ACK associated to a data packet we just sent.
void ReportRtsFailed(const WifiMacHeader &header)
Should be invoked whenever the RtsTimeout associated to a transmission attempt expires.
void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported)
Record whether the short ERP slot time is supported by the station.
bool GetShortPreambleEnabled() const
Return whether the device uses short PHY preambles.
uint8_t m_linkId
the ID of the link this object is associated with
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index.
bool GetHeSupported() const
Return whether the device has HE capability support enabled.
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)=0
This method is a pure virtual method that must be implemented by the sub-class.
WifiMode GetDefaultMode() const
Return the default transmission mode.
void SetEmlsrEnabled(const Mac48Address &from, bool emlsrEnabled)
void AddStationExtendedCapabilities(Mac48Address from, const ExtendedCapabilities &extendedCapabilities)
Records extended capabilities of the remote station.
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
std::optional< Mac48Address > GetMldAddress(const Mac48Address &address) const
Get the address of the MLD the given station is affiliated with, if any.
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
virtual void SetupMac(const Ptr< WifiMac > mac)
Set up MAC associated with this device since it is the object that knows the full set of timing param...
void SetLinkId(uint8_t linkId)
Set the ID of the link this Remote Station Manager is associated with.
bool NeedRts(const WifiMacHeader &header, const WifiTxParameters &txParams)
uint32_t m_rtsCtsThreshold
Threshold for RTS/CTS.
bool m_useNonErpProtection
flag if protection for non-ERP stations against ERP transmissions is enabled
WifiMode GetControlAnswerMode(WifiMode reqMode) const
Get control answer mode function.
bool m_shortSlotTimeEnabled
flag if short slot time is enabled
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for an ACK for the association response we sent.
void SetMaxSlrc(uint32_t maxSlrc)
Sets the maximum STA long retry count (SLRC).
TracedCallback< Mac48Address > m_macTxFinalDataFailed
The trace source fired when the transmission of a data packet has exceeded the maximum number of atte...
bool GetUseNonHtProtection() const
Return whether the device supports protection of non-HT stations.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes.
Definition wifi-mode.h:251
RxSignalInfo structure containing info on the received signal.
Definition wifi-types.h:72
Function object to compute the hash of a MAC address.
Definition qos-utils.h:45
hold per-remote-station state.
WifiRemoteStationState * m_state
Remote station state.
std::pair< dBm_u, Time > m_rssiAndUpdateTimePair
RSSI of the most recent packet received from the remote station along with update time.
A struct that holds information about each remote station.
std::shared_ptr< CommonInfoBasicMle > m_mleCommonInfo
remote station Multi-Link Element Common Info
Mac48Address m_address
Mac48Address of the remote station.
bool m_shortSlotTime
Flag if short ERP slot time is supported by the remote station.
bool m_dsssSupported
Flag if DSSS is supported by the remote station.
MHz_u m_channelWidth
Channel width supported by the remote station.
uint16_t m_aid
AID of the remote station (unused if this object is installed on a non-AP station)
bool m_ofdmSupported
Flag if OFDM is supported by the remote station.
enum ns3::WifiRemoteStationState::@75 m_state
State of the station.
uint8_t m_ness
Number of extended spatial streams of the remote station.
bool m_aggregation
Flag if MPDU aggregation is used by the remote station.
bool m_qosSupported
Flag if QoS is supported by the station.
WifiModeList m_operationalRateSet
This member is the list of WifiMode objects that comprise the OperationalRateSet parameter for this r...
WifiModeList m_operationalMcsSet
operational MCS set
bool m_isInPsMode
Flag if the STA is currently in PS mode.
Ptr< const EhtCapabilities > m_ehtCapabilities
remote station EHT capabilities
bool m_shortPreamble
Flag if short PHY preamble is supported by the remote station.
bool m_erpOfdmSupported
Flag if ERP OFDM is supported by the remote station.
Ptr< const VhtCapabilities > m_vhtCapabilities
remote station VHT capabilities
Ptr< const He6GhzBandCapabilities > m_he6GhzBandCapabilities
remote station HE 6GHz band capabilities
WifiRemoteStationInfo m_info
remote station info
bool m_emlsrEnabled
whether EMLSR mode is enabled on this link
Ptr< const HtCapabilities > m_htCapabilities
remote station HT capabilities
Time m_guardInterval
HE Guard interval durationsupported by the remote station.
Ptr< const ExtendedCapabilities > m_extendedCapabilities
remote station extended capabilities
Ptr< const HeCapabilities > m_heCapabilities
remote station HE capabilities