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/common-info-basic-mle.h"
19#include "ns3/data-rate.h"
20#include "ns3/eht-capabilities.h"
21#include "ns3/he-6ghz-band-capabilities.h"
22#include "ns3/he-capabilities.h"
23#include "ns3/ht-capabilities.h"
24#include "ns3/mac48-address.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 * Return the TXVECTOR to use for a groupcast packet.
702 *
703 * @param header the MAC header of the groupcast packet
704 * @param allowedWidth the allowed width in MHz to send this packet
705 * @return the TXVECTOR to use to send the groupcast packet
706 */
707 WifiTxVector GetGroupcastTxVector(const WifiMacHeader& header, MHz_u allowedWidth);
708
709 /**
710 * Invoked in a STA or AP to store the set of
711 * modes supported by a destination which is
712 * also supported locally.
713 * The set of supported modes includes
714 * the BSSBasicRateSet.
715 *
716 * @param address the address of the station being recorded
717 * @param mode the WifiMode supports by the station
718 */
719 void AddSupportedMode(Mac48Address address, WifiMode mode);
720 /**
721 * Invoked in a STA or AP to store all of the modes supported
722 * by a destination which is also supported locally.
723 * The set of supported modes includes the BSSBasicRateSet.
724 *
725 * @param address the address of the station being recorded
726 */
728 /**
729 * Invoked in a STA or AP to store all of the MCS supported
730 * by a destination which is also supported locally.
731 *
732 * @param address the address of the station being recorded
733 */
734 void AddAllSupportedMcs(Mac48Address address);
735 /**
736 * Invoked in a STA or AP to delete all of the supported MCS by a destination.
737 *
738 * @param address the address of the station being recorded
739 */
741 /**
742 * Record whether the short PHY preamble is supported by the station.
743 *
744 * @param address the address of the station
745 * @param isShortPreambleSupported whether or not short PHY preamble is supported by the station
746 */
747 void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported);
748 /**
749 * Record whether the short ERP slot time is supported by the station.
750 *
751 * @param address the address of the station
752 * @param isShortSlotTimeSupported whether or not short ERP slot time is supported by the
753 * station
754 */
755 void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported);
756 /**
757 * Return whether the station state is brand new.
758 *
759 * @param address the address of the station
760 *
761 * @return true if the state of the station is brand new,
762 * false otherwise
763 */
764 bool IsBrandNew(Mac48Address address) const;
765 /**
766 * Return whether the station associated.
767 *
768 * @param address the address of the station
769 *
770 * @return true if the station is associated,
771 * false otherwise
772 */
773 bool IsAssociated(Mac48Address address) const;
774 /**
775 * Return whether we are waiting for an ACK for
776 * the association response we sent.
777 *
778 * @param address the address of the station
779 *
780 * @return true if the station is associated,
781 * false otherwise
782 */
783 bool IsWaitAssocTxOk(Mac48Address address) const;
784 /**
785 * Records that we are waiting for an ACK for
786 * the association response we sent.
787 *
788 * @param address the address of the station
789 */
790 void RecordWaitAssocTxOk(Mac48Address address);
791 /**
792 * Records that we got an ACK for
793 * the association response we sent.
794 *
795 * @param address the address of the station
796 */
797 void RecordGotAssocTxOk(Mac48Address address);
798 /**
799 * Records that we missed an ACK for
800 * the association response we sent.
801 *
802 * @param address the address of the station
803 */
805 /**
806 * Records that the STA was disassociated.
807 *
808 * @param address the address of the station
809 */
810 void RecordDisassociated(Mac48Address address);
811 /**
812 * Return whether we refused an association request from the given station
813 *
814 * @param address the address of the station
815 * @return true if we refused an association request, false otherwise
816 */
817 bool IsAssocRefused(Mac48Address address) const;
818 /**
819 * Records that association request was refused
820 *
821 * @param address the address of the station
822 */
823 void RecordAssocRefused(Mac48Address address);
824
825 /**
826 * Return whether the STA is currently in Power Save mode.
827 *
828 * @param address the address of the station
829 *
830 * @return true if the station is in Power Save mode, false otherwise
831 */
832 bool IsInPsMode(const Mac48Address& address) const;
833 /**
834 * Register whether the STA is in Power Save mode or not.
835 *
836 * @param address the address of the station
837 * @param isInPsMode whether the STA is in PS mode or not
838 */
839 void SetPsMode(const Mac48Address& address, bool isInPsMode);
840
841 /**
842 * Get the address of the MLD the given station is affiliated with, if any.
843 * Note that an MLD address is only present if an ML discovery/setup was performed
844 * with the given station (which requires both this station and the given
845 * station to be MLDs).
846 *
847 * @param address the MAC address of the remote station
848 * @return the address of the MLD the given station is affiliated with, if any
849 */
850 std::optional<Mac48Address> GetMldAddress(const Mac48Address& address) const;
851 /**
852 * Get the address of the remote station operating on this link and affiliated
853 * with the MLD having the given MAC address, if any.
854 *
855 * @param mldAddress the MLD MAC address
856 * @return the address of the remote station operating on this link and
857 * affiliated with the MLD, if any
858 */
859 std::optional<Mac48Address> GetAffiliatedStaAddress(const Mac48Address& mldAddress) const;
860
861 /**
862 * @param header MAC header
863 * @param allowedWidth the allowed width to send this packet
864 * @return the TXVECTOR to use to send this packet
865 */
866 WifiTxVector GetDataTxVector(const WifiMacHeader& header, MHz_u allowedWidth);
867 /**
868 * @param address remote address
869 * @param allowedWidth the allowed width for the data frame being protected
870 *
871 * @return the TXVECTOR to use to send the RTS prior to the
872 * transmission of the data packet itself.
873 */
874 WifiTxVector GetRtsTxVector(Mac48Address address, MHz_u allowedWidth);
875 /**
876 * Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS
877 * used by the sender.
878 *
879 * @param to the MAC address of the CTS receiver
880 * @param rtsTxMode the mode of the RTS used by the sender
881 * @return TXVECTOR for the CTS
882 */
884 /**
885 * Since CTS-to-self parameters are not dependent on the station,
886 * it is implemented in wifi remote station manager
887 *
888 * @return the transmission mode to use to send the CTS-to-self prior to the
889 * transmission of the data packet itself.
890 */
892 /**
893 * Adjust the TXVECTOR for an initial Control frame to ensure that the modulation class
894 * is non-HT and the rate is 6 Mbps, 12 Mbps or 24 Mbps.
895 *
896 * @param txVector the TXVECTOR to adjust
897 */
898 void AdjustTxVectorForIcf(WifiTxVector& txVector) const;
899 /**
900 * Return a TXVECTOR for the Ack frame given the destination and the mode of the Data
901 * used by the sender.
902 *
903 * @param to the MAC address of the Ack receiver
904 * @param dataTxVector the TXVECTOR of the Data used by the sender
905 * @return TXVECTOR for the Ack
906 */
907 WifiTxVector GetAckTxVector(Mac48Address to, const WifiTxVector& dataTxVector) const;
908 /**
909 * Return a TXVECTOR for the BlockAck frame given the destination and the mode of the Data
910 * used by the sender.
911 *
912 * @param to the MAC address of the BlockAck receiver
913 * @param dataTxVector the TXVECTOR of the Data used by the sender
914 * @return TXVECTOR for the BlockAck
915 */
916 WifiTxVector GetBlockAckTxVector(Mac48Address to, const WifiTxVector& dataTxVector) const;
917 /**
918 * Get control answer mode function.
919 *
920 * @param reqMode request mode
921 * @return control answer mode
922 */
924
925 /**
926 * Should be invoked whenever the RtsTimeout associated to a transmission
927 * attempt expires.
928 *
929 * @param header MAC header of the DATA packet
930 */
931 void ReportRtsFailed(const WifiMacHeader& header);
932 /**
933 * Should be invoked whenever the AckTimeout associated to a transmission
934 * attempt expires.
935 *
936 * @param mpdu the MPDU whose transmission failed
937 */
939 /**
940 * Should be invoked whenever we receive the CTS associated to an RTS
941 * we just sent. Note that we also get the SNR of the RTS we sent since
942 * the receiver put a SnrTag in the CTS.
943 *
944 * @param header MAC header of the DATA packet
945 * @param ctsSnr the SNR of the CTS we received
946 * @param ctsMode the WifiMode the receiver used to send the CTS
947 * @param rtsSnr the SNR of the RTS we sent
948 */
949 void ReportRtsOk(const WifiMacHeader& header, double ctsSnr, WifiMode ctsMode, double rtsSnr);
950 /**
951 * Should be invoked whenever we receive the ACK associated to a data packet
952 * we just sent.
953 *
954 * @param mpdu the MPDU
955 * @param ackSnr the SNR of the ACK we received
956 * @param ackMode the WifiMode the receiver used to send the ACK
957 * @param dataSnr the SNR of the DATA we sent
958 * @param dataTxVector the TXVECTOR of the DATA we sent
959 */
961 double ackSnr,
962 WifiMode ackMode,
963 double dataSnr,
964 WifiTxVector dataTxVector);
965 /**
966 * Should be invoked after calling ReportRtsFailed if frames are dropped
967 *
968 * @param header MAC header of the DATA packet
969 */
970 void ReportFinalRtsFailed(const WifiMacHeader& header);
971 /**
972 * Should be invoked after calling ReportDataFailed if frames are dropped
973 *
974 * @param mpdu the MPDU which was discarded
975 */
977 /**
978 * Typically called per A-MPDU, either when a Block ACK was successfully
979 * received or when a BlockAckTimeout has elapsed.
980 *
981 * @param address the address of the receiver
982 * @param nSuccessfulMpdus number of successfully transmitted MPDUs
983 * A value of 0 means that the Block ACK was missed.
984 * @param nFailedMpdus number of unsuccessfuly transmitted MPDUs
985 * @param rxSnr received SNR of the block ack frame itself
986 * @param dataSnr data SNR reported by remote station
987 * @param dataTxVector the TXVECTOR of the MPDUs we sent
988 */
990 uint16_t nSuccessfulMpdus,
991 uint16_t nFailedMpdus,
992 double rxSnr,
993 double dataSnr,
994 WifiTxVector dataTxVector);
995
996 /**
997 * @param address remote address
998 * @param rxSignalInfo the info on the received signal (\see RxSignalInfo)
999 * @param txVector the TXVECTOR used for the packet received
1000 *
1001 * Should be invoked whenever a packet is successfully received.
1002 */
1003 void ReportRxOk(Mac48Address address, RxSignalInfo rxSignalInfo, const WifiTxVector& txVector);
1004
1005 /**
1006 * Increment the retry count for all the MPDUs (if needed) in the given PSDU and find the
1007 * MPDUs to drop based on the frame retry count.
1008 *
1009 * @param psdu the given PSDU, whose transmission failed
1010 * @return the list of MPDUs that have to be dropped
1011 */
1012 std::list<Ptr<WifiMpdu>> GetMpdusToDropOnTxFailure(Ptr<WifiPsdu> psdu);
1013
1014 /**
1015 * @param header MAC header of the data frame to send
1016 * @param txParams the TX parameters for the data frame to send
1017 *
1018 * @return true if we want to use an RTS/CTS handshake for this
1019 * frame before sending it, false otherwise.
1020 */
1021 bool NeedRts(const WifiMacHeader& header, const WifiTxParameters& txParams);
1022 /**
1023 * Return if we need to do CTS-to-self before sending a DATA.
1024 *
1025 * @param txVector the TXVECTOR of the DATA
1026 * @param header the MAC header of the DATA
1027 * @return true if CTS-to-self is needed,
1028 * false otherwise
1029 */
1030 bool NeedCtsToSelf(const WifiTxVector& txVector, const WifiMacHeader& header);
1031
1032 /**
1033 * @param mpdu the MPDU to send
1034 *
1035 * @return true if this packet should be fragmented,
1036 * false otherwise.
1037 */
1039 /**
1040 * @param mpdu the MPDU to send
1041 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1042 *
1043 * @return the size of the corresponding fragment.
1044 */
1046 /**
1047 * @param mpdu the packet to send
1048 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1049 *
1050 * @return the offset within the original packet where this fragment starts.
1051 */
1053 /**
1054 * @param mpdu the packet to send
1055 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1056 *
1057 * @return true if this is the last fragment, false otherwise.
1058 */
1059 bool IsLastFragment(Ptr<const WifiMpdu> mpdu, uint32_t fragmentNumber);
1060
1061 /**
1062 * @return the default transmission power
1063 */
1064 uint8_t GetDefaultTxPowerLevel() const;
1065 /**
1066 * @param address of the remote station
1067 *
1068 * @return information regarding the remote station associated with the given address
1069 */
1071 /**
1072 * @param address of the remote station
1073 *
1074 * @return the RSSI of the most recent packet received from the remote station (irrespective of
1075 * TID)
1076 *
1077 * This method is typically used when the device needs
1078 * to estimate the target UL RSSI info to put in the
1079 * Trigger frame to send to the remote station.
1080 */
1081 std::optional<dBm_u> GetMostRecentRssi(Mac48Address address) const;
1082 /**
1083 * Set the default transmission power level
1084 *
1085 * @param txPower the default transmission power level
1086 */
1087 void SetDefaultTxPowerLevel(uint8_t txPower);
1088 /**
1089 * @return the number of antennas supported by the PHY layer
1090 */
1091 uint8_t GetNumberOfAntennas() const;
1092 /**
1093 * @return the maximum number of spatial streams supported by the PHY layer
1094 */
1095 uint8_t GetMaxNumberOfTransmitStreams() const;
1096 /**
1097 * @returns whether LDPC should be used for a given destination address.
1098 *
1099 * @param dest the destination address
1100 *
1101 * @return whether LDPC should be used for a given destination address
1102 */
1103 bool UseLdpcForDestination(Mac48Address dest) const;
1104
1105 /**
1106 * TracedCallback signature for power change events.
1107 *
1108 * @param [in] oldPower The previous power (in dBm).
1109 * @param [in] newPower The new power (in dBm).
1110 * @param [in] address The remote station MAC address.
1111 */
1112 typedef void (*PowerChangeTracedCallback)(double oldPower,
1113 double newPower,
1114 Mac48Address remoteAddress);
1115
1116 /**
1117 * TracedCallback signature for rate change events.
1118 *
1119 * @param [in] oldRate The previous data rate.
1120 * @param [in] newRate The new data rate.
1121 * @param [in] address The remote station MAC address.
1122 */
1123 typedef void (*RateChangeTracedCallback)(DataRate oldRate,
1124 DataRate newRate,
1125 Mac48Address remoteAddress);
1126
1127 /**
1128 * Return the WifiPhy.
1129 *
1130 * @return a pointer to the WifiPhy
1131 */
1132 Ptr<WifiPhy> GetPhy() const;
1133 /**
1134 * Return the WifiMac.
1135 *
1136 * @return a pointer to the WifiMac
1137 */
1138 Ptr<WifiMac> GetMac() const;
1139
1140 protected:
1141 void DoDispose() override;
1142 /**
1143 * Return whether mode associated with the specified station at the specified index.
1144 *
1145 * @param station the station being queried
1146 * @param i the index
1147 *
1148 * @return WifiMode at the given index of the specified station
1149 */
1150 WifiMode GetSupported(const WifiRemoteStation* station, uint8_t i) const;
1151 /**
1152 * Return the number of modes supported by the given station.
1153 *
1154 * @param station the station being queried
1155 *
1156 * @return the number of modes supported by the given station
1157 */
1158 uint8_t GetNSupported(const WifiRemoteStation* station) const;
1159 /**
1160 * Return whether the given station is QoS capable.
1161 *
1162 * @param station the station being queried
1163 *
1164 * @return true if the station has QoS capabilities,
1165 * false otherwise
1166 */
1167 bool GetQosSupported(const WifiRemoteStation* station) const;
1168 /**
1169 * Return whether the given station is HT capable.
1170 *
1171 * @param station the station being queried
1172 *
1173 * @return true if the station has HT capabilities,
1174 * false otherwise
1175 */
1176 bool GetHtSupported(const WifiRemoteStation* station) const;
1177 /**
1178 * Return whether the given station is VHT capable.
1179 *
1180 * @param station the station being queried
1181 *
1182 * @return true if the station has VHT capabilities,
1183 * false otherwise
1184 */
1185 bool GetVhtSupported(const WifiRemoteStation* station) const;
1186 /**
1187 * Return whether the given station is HE capable.
1188 *
1189 * @param station the station being queried
1190 *
1191 * @return true if the station has HE capabilities,
1192 * false otherwise
1193 */
1194 bool GetHeSupported(const WifiRemoteStation* station) const;
1195 /**
1196 * Return whether the given station is EHT capable.
1197 *
1198 * @param station the station being queried
1199 *
1200 * @return true if the station has EHT capabilities,
1201 * false otherwise
1202 */
1203 bool GetEhtSupported(const WifiRemoteStation* station) const;
1204 /**
1205 * @param station the station of a non-AP MLD
1206 * @return whether the non-AP MLD supports EMLSR
1207 */
1208 bool GetEmlsrSupported(const WifiRemoteStation* station) const;
1209 /**
1210 * @param station the station of a non-AP MLD
1211 * @return whether EMLSR mode is enabled for the non-AP MLD on this link
1212 */
1213 bool GetEmlsrEnabled(const WifiRemoteStation* station) const;
1214 /**
1215 * Return the WifiMode supported by the specified station at the specified index.
1216 *
1217 * @param station the station being queried
1218 * @param i the index
1219 *
1220 * @return the WifiMode at the given index of the specified station
1221 */
1222
1223 WifiMode GetMcsSupported(const WifiRemoteStation* station, uint8_t i) const;
1224 /**
1225 * Return the number of MCS supported by the given station.
1226 *
1227 * @param station the station being queried
1228 *
1229 * @return the number of MCS supported by the given station
1230 */
1231 uint8_t GetNMcsSupported(const WifiRemoteStation* station) const;
1232 /**
1233 * Return whether non-ERP mode associated with the specified station at the specified index.
1234 *
1235 * @param station the station being queried
1236 * @param i the index
1237 *
1238 * @return WifiMode at the given index of the specified station
1239 */
1240 WifiMode GetNonErpSupported(const WifiRemoteStation* station, uint8_t i) const;
1241 /**
1242 * Return the number of non-ERP modes supported by the given station.
1243 *
1244 * @param station the station being queried
1245 *
1246 * @return the number of non-ERP modes supported by the given station
1247 */
1248 uint32_t GetNNonErpSupported(const WifiRemoteStation* station) const;
1249 /**
1250 * Return the address of the station.
1251 *
1252 * @param station the station being queried
1253 *
1254 * @return the address of the station
1255 */
1256 Mac48Address GetAddress(const WifiRemoteStation* station) const;
1257 /**
1258 * Return the channel width supported by the station.
1259 *
1260 * @param station the station being queried
1261 *
1262 * @return the channel width supported by the station
1263 */
1264 MHz_u GetChannelWidth(const WifiRemoteStation* station) const;
1265 /**
1266 * Return whether the given station supports HT/VHT short guard interval.
1267 *
1268 * @param station the station being queried
1269 *
1270 * @return true if the station supports HT/VHT short guard interval,
1271 * false otherwise
1272 */
1273 bool GetShortGuardIntervalSupported(const WifiRemoteStation* station) const;
1274 /**
1275 * Return the shortest HE guard interval duration supported by the station.
1276 *
1277 * @param station the station being queried
1278 *
1279 * @return the shortest HE guard interval duration supported by the station
1280 */
1281 Time GetGuardInterval(const WifiRemoteStation* station) const;
1282 /**
1283 * Return whether the given station supports A-MPDU.
1284 *
1285 * @param station the station being queried
1286 *
1287 * @return true if the station supports MPDU aggregation,
1288 * false otherwise
1289 */
1290 bool GetAggregation(const WifiRemoteStation* station) const;
1291
1292 /**
1293 * Return the number of supported streams the station has.
1294 *
1295 * @param station the station being queried
1296 *
1297 * @return the number of supported streams the station has
1298 */
1299 uint8_t GetNumberOfSupportedStreams(const WifiRemoteStation* station) const;
1300 /**
1301 * @returns the number of Ness the station has.
1302 *
1303 * @param station the station being queried
1304 *
1305 * @return the number of Ness the station has
1306 */
1307 uint8_t GetNess(const WifiRemoteStation* station) const;
1308
1309 uint8_t m_linkId; //!< the ID of the link this object is associated with
1310 bool m_incrRetryCountUnderBa; //!< whether to increment the retry count of frames that are
1311 //!< part of a Block Ack agreement
1312
1313 private:
1314 /**
1315 * If the given TXVECTOR is used for a MU transmission, return the STAID of
1316 * the station with the given address if we are an AP or our own STAID if we
1317 * are a STA associated with some AP. Otherwise, return SU_STA_ID.
1318 *
1319 * @param address the address of the station
1320 * @param txVector the TXVECTOR used for a MU transmission
1321 * @return the STA-ID of the station
1322 */
1323 uint16_t GetStaId(Mac48Address address, const WifiTxVector& txVector) const;
1324
1325 /**
1326 * Increment the retry count (if needed) for the given PSDU, whose transmission failed.
1327 *
1328 * @param station the station the PSDU is addressed to
1329 * @param psdu the given PSDU
1330 */
1332
1333 /**
1334 * Find the MPDUs to drop (possibly based on their frame retry count) in the given PSDU,
1335 * whose transmission failed.
1336 *
1337 * @param station the station the PSDU is addressed to
1338 * @param psdu the given PSDU
1339 * @return the MPDUs in the PSDU to drop
1340 */
1341 virtual std::list<Ptr<WifiMpdu>> DoGetMpdusToDropOnTxFailure(WifiRemoteStation* station,
1342 Ptr<WifiPsdu> psdu);
1343
1344 /**
1345 * @param station the station that we need to communicate
1346 * @param size the size of the frame to send in bytes
1347 * @param normally indicates whether the normal 802.11 RTS enable mechanism would
1348 * request that the RTS is sent or not.
1349 *
1350 * @return true if we want to use an RTS/CTS handshake for this frame before sending it,
1351 * false otherwise.
1352 *
1353 * Note: This method is called before a unicast packet is sent on the medium.
1354 */
1355 virtual bool DoNeedRts(WifiRemoteStation* station, uint32_t size, bool normally);
1356 /**
1357 * @param station the station that we need to communicate
1358 * @param packet the packet to send
1359 * @param normally indicates whether the normal 802.11 data fragmentation mechanism
1360 * would request that the data packet is fragmented or not.
1361 *
1362 * @return true if this packet should be fragmented,
1363 * false otherwise.
1364 *
1365 * Note: This method is called before sending a unicast packet.
1366 */
1367 virtual bool DoNeedFragmentation(WifiRemoteStation* station,
1368 Ptr<const Packet> packet,
1369 bool normally);
1370 /**
1371 * @return a new station data structure
1372 */
1374 /**
1375 * @param station the station that we need to communicate
1376 * @param allowedWidth the allowed width to send a packet to the station
1377 * @return the TXVECTOR to use to send a packet to the station
1378 *
1379 * Note: This method is called before sending a unicast packet or a fragment
1380 * of a unicast packet to decide which transmission mode to use.
1381 */
1382 virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, MHz_u allowedWidth) = 0;
1383 /**
1384 * @param station the station that we need to communicate
1385 *
1386 * @return the transmission mode to use to send an RTS to the station
1387 *
1388 * Note: This method is called before sending an RTS to a station
1389 * to decide which transmission mode to use for the RTS.
1390 */
1392
1393 /**
1394 * This method is a pure virtual method that must be implemented by the sub-class.
1395 * This allows different types of WifiRemoteStationManager to respond differently,
1396 *
1397 * @param station the station that we failed to send RTS
1398 */
1399 virtual void DoReportRtsFailed(WifiRemoteStation* station) = 0;
1400 /**
1401 * This method is a pure virtual method that must be implemented by the sub-class.
1402 * This allows different types of WifiRemoteStationManager to respond differently,
1403 *
1404 * @param station the station that we failed to send DATA
1405 */
1406 virtual void DoReportDataFailed(WifiRemoteStation* station) = 0;
1407 /**
1408 * This method is a pure virtual method that must be implemented by the sub-class.
1409 * This allows different types of WifiRemoteStationManager to respond differently,
1410 *
1411 * @param station the station that we successfully sent RTS
1412 * @param ctsSnr the SNR of the CTS we received
1413 * @param ctsMode the WifiMode the receiver used to send the CTS
1414 * @param rtsSnr the SNR of the RTS we sent
1415 */
1416 virtual void DoReportRtsOk(WifiRemoteStation* station,
1417 double ctsSnr,
1418 WifiMode ctsMode,
1419 double rtsSnr) = 0;
1420 /**
1421 * This method is a pure virtual method that must be implemented by the sub-class.
1422 * This allows different types of WifiRemoteStationManager to respond differently,
1423 *
1424 * @param station the station that we successfully sent RTS
1425 * @param ackSnr the SNR of the ACK we received
1426 * @param ackMode the WifiMode the receiver used to send the ACK
1427 * @param dataSnr the SNR of the DATA we sent
1428 * @param dataChannelWidth the channel width of the DATA we sent
1429 * @param dataNss the number of spatial streams used to send the DATA
1430 */
1431 virtual void DoReportDataOk(WifiRemoteStation* station,
1432 double ackSnr,
1433 WifiMode ackMode,
1434 double dataSnr,
1435 MHz_u dataChannelWidth,
1436 uint8_t dataNss) = 0;
1437 /**
1438 * This method is a pure virtual method that must be implemented by the sub-class.
1439 * This allows different types of WifiRemoteStationManager to respond differently,
1440 *
1441 * @param station the station that we failed to send RTS
1442 */
1443 virtual void DoReportFinalRtsFailed(WifiRemoteStation* station) = 0;
1444 /**
1445 * This method is a pure virtual method that must be implemented by the sub-class.
1446 * This allows different types of WifiRemoteStationManager to respond differently,
1447 *
1448 * @param station the station that we failed to send DATA
1449 */
1450 virtual void DoReportFinalDataFailed(WifiRemoteStation* station) = 0;
1451 /**
1452 * This method is a pure virtual method that must be implemented by the sub-class.
1453 * This allows different types of WifiRemoteStationManager to respond differently,
1454 *
1455 * @param station the station that sent the DATA to us
1456 * @param rxSnr the SNR of the DATA we received
1457 * @param txMode the WifiMode the sender used to send the DATA
1458 */
1459 virtual void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) = 0;
1460 /**
1461 * Typically called per A-MPDU, either when a Block ACK was successfully received
1462 * or when a BlockAckTimeout has elapsed. This method is a virtual method that must
1463 * be implemented by the sub-class intended to handle A-MPDUs. This allows different
1464 * types of WifiRemoteStationManager to respond differently.
1465 *
1466 * @param station the station that sent the DATA to us
1467 * @param nSuccessfulMpdus number of successfully transmitted MPDUs.
1468 * A value of 0 means that the Block ACK was missed.
1469 * @param nFailedMpdus number of unsuccessfuly transmitted MPDUs.
1470 * @param rxSnr received SNR of the block ack frame itself
1471 * @param dataSnr data SNR reported by remote station
1472 * @param dataChannelWidth the channel width of the A-MPDU we sent
1473 * @param dataNss the number of spatial streams used to send the A-MPDU
1474 */
1475 virtual void DoReportAmpduTxStatus(WifiRemoteStation* station,
1476 uint16_t nSuccessfulMpdus,
1477 uint16_t nFailedMpdus,
1478 double rxSnr,
1479 double dataSnr,
1480 MHz_u dataChannelWidth,
1481 uint8_t dataNss);
1482
1483 /**
1484 * Return the state of the station associated with the given address.
1485 *
1486 * @param address the address of the station
1487 * @return WifiRemoteStationState corresponding to the address
1488 */
1489 std::shared_ptr<WifiRemoteStationState> LookupState(Mac48Address address) const;
1490 /**
1491 * Return the station associated with the given address.
1492 *
1493 * @param address the address of the station
1494 *
1495 * @return WifiRemoteStation corresponding to the address
1496 */
1497 WifiRemoteStation* Lookup(Mac48Address address) const;
1498
1499 /**
1500 * Actually sets the fragmentation threshold, it also checks the validity of
1501 * the given threshold.
1502 *
1503 * @param threshold the fragmentation threshold
1504 */
1505 void DoSetFragmentationThreshold(uint32_t threshold);
1506 /**
1507 * Return the current fragmentation threshold
1508 *
1509 * @return the fragmentation threshold
1510 */
1512 /**
1513 * Return the number of fragments needed for the given packet.
1514 *
1515 * @param mpdu the packet to be fragmented
1516 *
1517 * @return the number of fragments needed
1518 */
1520
1521 /**
1522 * This is a pointer to the WifiPhy associated with this
1523 * WifiRemoteStationManager that is set on call to
1524 * WifiRemoteStationManager::SetupPhy(). Through this pointer the
1525 * station manager can determine PHY characteristics, such as the
1526 * set of all transmission rates that may be supported (the
1527 * "DeviceRateSet").
1528 */
1530 /**
1531 * This is a pointer to the WifiMac associated with this
1532 * WifiRemoteStationManager that is set on call to
1533 * WifiRemoteStationManager::SetupMac(). Through this pointer the
1534 * station manager can determine MAC characteristics, such as the
1535 * interframe spaces.
1536 */
1538
1539 /**
1540 * This member is the list of WifiMode objects that comprise the
1541 * BSSBasicRateSet parameter. This list is constructed through calls
1542 * to WifiRemoteStationManager::AddBasicMode(), and an API that
1543 * allows external access to it is available through
1544 * WifiRemoteStationManager::GetNBasicModes() and
1545 * WifiRemoteStationManager::GetBasicMode().
1546 */
1547 WifiModeList m_bssBasicRateSet; //!< basic rate set
1548 WifiModeList m_bssBasicMcsSet; //!< basic MCS set
1549
1550 StationStates m_states; //!< States of known stations
1551 Stations m_stations; //!< Information for each known stations
1552
1553 uint32_t m_maxSsrc; //!< Maximum STA short retry count (SSRC)
1554 uint32_t m_maxSlrc; //!< Maximum STA long retry count (SLRC)
1555 uint32_t m_rtsCtsThreshold; //!< Threshold for RTS/CTS
1556 Time m_rtsCtsTxDurationThresh; //!< TX duration threshold for RTS/CTS
1557 uint32_t m_fragmentationThreshold; //!< Current threshold for fragmentation
1558 uint8_t m_defaultTxPowerLevel; //!< Default transmission power level
1559 WifiMode m_nonUnicastMode; //!< Transmission mode for non-unicast Data frames
1560 bool m_useNonErpProtection; //!< flag if protection for non-ERP stations against ERP
1561 //!< transmissions is enabled
1562 bool m_useNonHtProtection; //!< flag if protection for non-HT stations against HT transmissions
1563 //!< is enabled
1564 bool m_shortPreambleEnabled; //!< flag if short PHY preamble is enabled
1565 bool m_shortSlotTimeEnabled; //!< flag if short slot time is enabled
1566 ProtectionMode m_erpProtectionMode; //!< Protection mode for ERP stations when non-ERP stations
1567 //!< are detected
1569 m_htProtectionMode; //!< Protection mode for HT stations when non-HT stations are detected
1570
1571 std::array<uint32_t, AC_BE_NQOS> m_ssrc; //!< short retry count per AC
1572 std::array<uint32_t, AC_BE_NQOS> m_slrc; //!< long retry count per AC
1573
1574 /**
1575 * The trace source fired when the transmission of a single RTS has failed
1576 */
1578 /**
1579 * The trace source fired when the transmission of a single data packet has failed
1580 */
1582 /**
1583 * The trace source fired when the transmission of a RTS has
1584 * exceeded the maximum number of attempts
1585 */
1587 /**
1588 * The trace source fired when the transmission of a data packet has
1589 * exceeded the maximum number of attempts
1590 */
1592};
1593
1594} // namespace ns3
1595
1596#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:49
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
WifiTxVector GetGroupcastTxVector(const WifiMacHeader &header, MHz_u allowedWidth)
Return the TXVECTOR to use for a groupcast packet.
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.
bool NeedCtsToSelf(const WifiTxVector &txVector, const WifiMacHeader &header)
Return if we need to do CTS-to-self before sending a DATA.
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.
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