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 a control response frame to ensure that, if appropriate, the non-HT
894 * duplicate format is used and the TX width matches that of the data frame transmitted (in case
895 * of, e.g., Ack or BlockAck) or to transmit (in case of, e.g., RTS or BlockAckReq) in the same
896 * frame exchange sequence.
897 *
898 * @param txVector the TXVECTOR to adjust
899 * @param allowedWidth the allowed width for the data frame in the same frame exchange sequence
900 */
901 void AdjustTxVectorForCtlResponse(WifiTxVector& txVector, MHz_u allowedWidth) const;
902 /**
903 * Adjust the TXVECTOR for an initial Control frame to ensure that the modulation class
904 * is non-HT and the rate is 6 Mbps, 12 Mbps or 24 Mbps.
905 *
906 * @param txVector the TXVECTOR to adjust
907 */
908 void AdjustTxVectorForIcf(WifiTxVector& txVector) const;
909 /**
910 * Return a TXVECTOR for the Ack frame given the destination and the mode of the Data
911 * used by the sender.
912 *
913 * @param to the MAC address of the Ack receiver
914 * @param dataTxVector the TXVECTOR of the Data used by the sender
915 * @return TXVECTOR for the Ack
916 */
917 WifiTxVector GetAckTxVector(Mac48Address to, const WifiTxVector& dataTxVector) const;
918 /**
919 * Return a TXVECTOR for the BlockAck frame given the destination and the mode of the Data
920 * used by the sender.
921 *
922 * @param to the MAC address of the BlockAck receiver
923 * @param dataTxVector the TXVECTOR of the Data used by the sender
924 * @return TXVECTOR for the BlockAck
925 */
926 WifiTxVector GetBlockAckTxVector(Mac48Address to, const WifiTxVector& dataTxVector) const;
927 /**
928 * Get control answer mode function.
929 *
930 * @param reqMode request mode
931 * @return control answer mode
932 */
934
935 /**
936 * Should be invoked whenever the RtsTimeout associated to a transmission
937 * attempt expires.
938 *
939 * @param header MAC header of the DATA packet
940 */
941 void ReportRtsFailed(const WifiMacHeader& header);
942 /**
943 * Should be invoked whenever the AckTimeout associated to a transmission
944 * attempt expires.
945 *
946 * @param mpdu the MPDU whose transmission failed
947 */
949 /**
950 * Should be invoked whenever we receive the CTS associated to an RTS
951 * we just sent. Note that we also get the SNR of the RTS we sent since
952 * the receiver put a SnrTag in the CTS.
953 *
954 * @param header MAC header of the DATA packet
955 * @param ctsSnr the SNR of the CTS we received
956 * @param ctsMode the WifiMode the receiver used to send the CTS
957 * @param rtsSnr the SNR of the RTS we sent
958 */
959 void ReportRtsOk(const WifiMacHeader& header, double ctsSnr, WifiMode ctsMode, double rtsSnr);
960 /**
961 * Should be invoked whenever we receive the ACK associated to a data packet
962 * we just sent.
963 *
964 * @param mpdu the MPDU
965 * @param ackSnr the SNR of the ACK we received
966 * @param ackMode the WifiMode the receiver used to send the ACK
967 * @param dataSnr the SNR of the DATA we sent
968 * @param dataTxVector the TXVECTOR of the DATA we sent
969 */
971 double ackSnr,
972 WifiMode ackMode,
973 double dataSnr,
974 WifiTxVector dataTxVector);
975 /**
976 * Should be invoked after calling ReportRtsFailed if frames are dropped
977 *
978 * @param header MAC header of the DATA packet
979 */
980 void ReportFinalRtsFailed(const WifiMacHeader& header);
981 /**
982 * Should be invoked after calling ReportDataFailed if frames are dropped
983 *
984 * @param mpdu the MPDU which was discarded
985 */
987 /**
988 * Typically called per A-MPDU, either when a Block ACK was successfully
989 * received or when a BlockAckTimeout has elapsed.
990 *
991 * @param address the address of the receiver
992 * @param nSuccessfulMpdus number of successfully transmitted MPDUs
993 * A value of 0 means that the Block ACK was missed.
994 * @param nFailedMpdus number of unsuccessfuly transmitted MPDUs
995 * @param rxSnr received SNR of the block ack frame itself
996 * @param dataSnr data SNR reported by remote station
997 * @param dataTxVector the TXVECTOR of the MPDUs we sent
998 */
1000 uint16_t nSuccessfulMpdus,
1001 uint16_t nFailedMpdus,
1002 double rxSnr,
1003 double dataSnr,
1004 WifiTxVector dataTxVector);
1005
1006 /**
1007 * @param address remote address
1008 * @param rxSignalInfo the info on the received signal (\see RxSignalInfo)
1009 * @param txVector the TXVECTOR used for the packet received
1010 *
1011 * Should be invoked whenever a packet is successfully received.
1012 */
1013 void ReportRxOk(Mac48Address address, RxSignalInfo rxSignalInfo, const WifiTxVector& txVector);
1014
1015 /**
1016 * Increment the retry count for all the MPDUs (if needed) in the given PSDU and find the
1017 * MPDUs to drop based on the frame retry count.
1018 *
1019 * @param psdu the given PSDU, whose transmission failed
1020 * @return the list of MPDUs that have to be dropped
1021 */
1022 std::list<Ptr<WifiMpdu>> GetMpdusToDropOnTxFailure(Ptr<WifiPsdu> psdu);
1023
1024 /**
1025 * @param header MAC header of the data frame to send
1026 * @param txParams the TX parameters for the data frame to send
1027 *
1028 * @return true if we want to use an RTS/CTS handshake for this
1029 * frame before sending it, false otherwise.
1030 */
1031 bool NeedRts(const WifiMacHeader& header, const WifiTxParameters& txParams);
1032 /**
1033 * Return if we need to do CTS-to-self before sending a DATA.
1034 *
1035 * @param txVector the TXVECTOR of the DATA
1036 * @param header the MAC header of the DATA
1037 * @return true if CTS-to-self is needed,
1038 * false otherwise
1039 */
1040 bool NeedCtsToSelf(const WifiTxVector& txVector, const WifiMacHeader& header);
1041
1042 /**
1043 * @param mpdu the MPDU to send
1044 *
1045 * @return true if this packet should be fragmented,
1046 * false otherwise.
1047 */
1049 /**
1050 * @param mpdu the MPDU to send
1051 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1052 *
1053 * @return the size of the corresponding fragment.
1054 */
1056 /**
1057 * @param mpdu the packet to send
1058 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1059 *
1060 * @return the offset within the original packet where this fragment starts.
1061 */
1063 /**
1064 * @param mpdu the packet to send
1065 * @param fragmentNumber the fragment index of the next fragment to send (starts at zero).
1066 *
1067 * @return true if this is the last fragment, false otherwise.
1068 */
1069 bool IsLastFragment(Ptr<const WifiMpdu> mpdu, uint32_t fragmentNumber);
1070
1071 /**
1072 * @return the default transmission power
1073 */
1074 uint8_t GetDefaultTxPowerLevel() const;
1075 /**
1076 * @param address of the remote station
1077 *
1078 * @return information regarding the remote station associated with the given address
1079 */
1081 /**
1082 * @param address of the remote station
1083 *
1084 * @return the RSSI of the most recent packet received from the remote station (irrespective of
1085 * TID)
1086 *
1087 * This method is typically used when the device needs
1088 * to estimate the target UL RSSI info to put in the
1089 * Trigger frame to send to the remote station.
1090 */
1091 std::optional<dBm_u> GetMostRecentRssi(Mac48Address address) const;
1092 /**
1093 * Set the default transmission power level
1094 *
1095 * @param txPower the default transmission power level
1096 */
1097 void SetDefaultTxPowerLevel(uint8_t txPower);
1098 /**
1099 * @return the number of antennas supported by the PHY layer
1100 */
1101 uint8_t GetNumberOfAntennas() const;
1102 /**
1103 * @return the maximum number of spatial streams supported by the PHY layer
1104 */
1105 uint8_t GetMaxNumberOfTransmitStreams() const;
1106 /**
1107 * @returns whether LDPC should be used for a given destination address.
1108 *
1109 * @param dest the destination address
1110 *
1111 * @return whether LDPC should be used for a given destination address
1112 */
1113 bool UseLdpcForDestination(Mac48Address dest) const;
1114
1115 /**
1116 * TracedCallback signature for power change events.
1117 *
1118 * @param [in] oldPower The previous power (in dBm).
1119 * @param [in] newPower The new power (in dBm).
1120 * @param [in] address The remote station MAC address.
1121 */
1122 typedef void (*PowerChangeTracedCallback)(double oldPower,
1123 double newPower,
1124 Mac48Address remoteAddress);
1125
1126 /**
1127 * TracedCallback signature for rate change events.
1128 *
1129 * @param [in] oldRate The previous data rate.
1130 * @param [in] newRate The new data rate.
1131 * @param [in] address The remote station MAC address.
1132 */
1133 typedef void (*RateChangeTracedCallback)(DataRate oldRate,
1134 DataRate newRate,
1135 Mac48Address remoteAddress);
1136
1137 /**
1138 * Return the WifiPhy.
1139 *
1140 * @return a pointer to the WifiPhy
1141 */
1142 Ptr<WifiPhy> GetPhy() const;
1143 /**
1144 * Return the WifiMac.
1145 *
1146 * @return a pointer to the WifiMac
1147 */
1148 Ptr<WifiMac> GetMac() const;
1149
1150 protected:
1151 void DoDispose() override;
1152 /**
1153 * Return whether mode associated with the specified station at the specified index.
1154 *
1155 * @param station the station being queried
1156 * @param i the index
1157 *
1158 * @return WifiMode at the given index of the specified station
1159 */
1160 WifiMode GetSupported(const WifiRemoteStation* station, uint8_t i) const;
1161 /**
1162 * Return the number of modes supported by the given station.
1163 *
1164 * @param station the station being queried
1165 *
1166 * @return the number of modes supported by the given station
1167 */
1168 uint8_t GetNSupported(const WifiRemoteStation* station) const;
1169 /**
1170 * Return whether the given station is QoS capable.
1171 *
1172 * @param station the station being queried
1173 *
1174 * @return true if the station has QoS capabilities,
1175 * false otherwise
1176 */
1177 bool GetQosSupported(const WifiRemoteStation* station) const;
1178 /**
1179 * Return whether the given station is HT capable.
1180 *
1181 * @param station the station being queried
1182 *
1183 * @return true if the station has HT capabilities,
1184 * false otherwise
1185 */
1186 bool GetHtSupported(const WifiRemoteStation* station) const;
1187 /**
1188 * Return whether the given station is VHT capable.
1189 *
1190 * @param station the station being queried
1191 *
1192 * @return true if the station has VHT capabilities,
1193 * false otherwise
1194 */
1195 bool GetVhtSupported(const WifiRemoteStation* station) const;
1196 /**
1197 * Return whether the given station is HE capable.
1198 *
1199 * @param station the station being queried
1200 *
1201 * @return true if the station has HE capabilities,
1202 * false otherwise
1203 */
1204 bool GetHeSupported(const WifiRemoteStation* station) const;
1205 /**
1206 * Return whether the given station is EHT capable.
1207 *
1208 * @param station the station being queried
1209 *
1210 * @return true if the station has EHT capabilities,
1211 * false otherwise
1212 */
1213 bool GetEhtSupported(const WifiRemoteStation* station) const;
1214 /**
1215 * @param station the station of a non-AP MLD
1216 * @return whether the non-AP MLD supports EMLSR
1217 */
1218 bool GetEmlsrSupported(const WifiRemoteStation* station) const;
1219 /**
1220 * @param station the station of a non-AP MLD
1221 * @return whether EMLSR mode is enabled for the non-AP MLD on this link
1222 */
1223 bool GetEmlsrEnabled(const WifiRemoteStation* station) const;
1224 /**
1225 * Return the WifiMode supported by the specified station at the specified index.
1226 *
1227 * @param station the station being queried
1228 * @param i the index
1229 *
1230 * @return the WifiMode at the given index of the specified station
1231 */
1232
1233 WifiMode GetMcsSupported(const WifiRemoteStation* station, uint8_t i) const;
1234 /**
1235 * Return the number of MCS supported by the given station.
1236 *
1237 * @param station the station being queried
1238 *
1239 * @return the number of MCS supported by the given station
1240 */
1241 uint8_t GetNMcsSupported(const WifiRemoteStation* station) const;
1242 /**
1243 * Return whether non-ERP mode associated with the specified station at the specified index.
1244 *
1245 * @param station the station being queried
1246 * @param i the index
1247 *
1248 * @return WifiMode at the given index of the specified station
1249 */
1250 WifiMode GetNonErpSupported(const WifiRemoteStation* station, uint8_t i) const;
1251 /**
1252 * Return the number of non-ERP modes supported by the given station.
1253 *
1254 * @param station the station being queried
1255 *
1256 * @return the number of non-ERP modes supported by the given station
1257 */
1258 uint32_t GetNNonErpSupported(const WifiRemoteStation* station) const;
1259 /**
1260 * Return the address of the station.
1261 *
1262 * @param station the station being queried
1263 *
1264 * @return the address of the station
1265 */
1266 Mac48Address GetAddress(const WifiRemoteStation* station) const;
1267 /**
1268 * Return the channel width supported by the station.
1269 *
1270 * @param station the station being queried
1271 *
1272 * @return the channel width supported by the station
1273 */
1274 MHz_u GetChannelWidth(const WifiRemoteStation* station) const;
1275 /**
1276 * Return whether the given station supports HT/VHT short guard interval.
1277 *
1278 * @param station the station being queried
1279 *
1280 * @return true if the station supports HT/VHT short guard interval,
1281 * false otherwise
1282 */
1283 bool GetShortGuardIntervalSupported(const WifiRemoteStation* station) const;
1284 /**
1285 * Return the shortest HE guard interval duration supported by the station.
1286 *
1287 * @param station the station being queried
1288 *
1289 * @return the shortest HE guard interval duration supported by the station
1290 */
1291 Time GetGuardInterval(const WifiRemoteStation* station) const;
1292 /**
1293 * Return whether the given station supports A-MPDU.
1294 *
1295 * @param station the station being queried
1296 *
1297 * @return true if the station supports MPDU aggregation,
1298 * false otherwise
1299 */
1300 bool GetAggregation(const WifiRemoteStation* station) const;
1301
1302 /**
1303 * Return the number of supported streams the station has.
1304 *
1305 * @param station the station being queried
1306 *
1307 * @return the number of supported streams the station has
1308 */
1309 uint8_t GetNumberOfSupportedStreams(const WifiRemoteStation* station) const;
1310 /**
1311 * @returns the number of Ness the station has.
1312 *
1313 * @param station the station being queried
1314 *
1315 * @return the number of Ness the station has
1316 */
1317 uint8_t GetNess(const WifiRemoteStation* station) const;
1318
1319 uint8_t m_linkId; //!< the ID of the link this object is associated with
1320 bool m_incrRetryCountUnderBa; //!< whether to increment the retry count of frames that are
1321 //!< part of a Block Ack agreement
1322
1323 private:
1324 /**
1325 * If the given TXVECTOR is used for a MU transmission, return the STAID of
1326 * the station with the given address if we are an AP or our own STAID if we
1327 * are a STA associated with some AP. Otherwise, return SU_STA_ID.
1328 *
1329 * @param address the address of the station
1330 * @param txVector the TXVECTOR used for a MU transmission
1331 * @return the STA-ID of the station
1332 */
1333 uint16_t GetStaId(Mac48Address address, const WifiTxVector& txVector) const;
1334
1335 /**
1336 * Increment the retry count (if needed) for the given PSDU, whose transmission failed.
1337 *
1338 * @param station the station the PSDU is addressed to
1339 * @param psdu the given PSDU
1340 */
1342
1343 /**
1344 * Find the MPDUs to drop (possibly based on their frame retry count) in the given PSDU,
1345 * whose transmission failed.
1346 *
1347 * @param station the station the PSDU is addressed to
1348 * @param psdu the given PSDU
1349 * @return the MPDUs in the PSDU to drop
1350 */
1351 virtual std::list<Ptr<WifiMpdu>> DoGetMpdusToDropOnTxFailure(WifiRemoteStation* station,
1352 Ptr<WifiPsdu> psdu);
1353
1354 /**
1355 * @param station the station that we need to communicate
1356 * @param size the size of the frame to send in bytes
1357 * @param normally indicates whether the normal 802.11 RTS enable mechanism would
1358 * request that the RTS is sent or not.
1359 *
1360 * @return true if we want to use an RTS/CTS handshake for this frame before sending it,
1361 * false otherwise.
1362 *
1363 * Note: This method is called before a unicast packet is sent on the medium.
1364 */
1365 virtual bool DoNeedRts(WifiRemoteStation* station, uint32_t size, bool normally);
1366 /**
1367 * @param station the station that we need to communicate
1368 * @param packet the packet to send
1369 * @param normally indicates whether the normal 802.11 data fragmentation mechanism
1370 * would request that the data packet is fragmented or not.
1371 *
1372 * @return true if this packet should be fragmented,
1373 * false otherwise.
1374 *
1375 * Note: This method is called before sending a unicast packet.
1376 */
1377 virtual bool DoNeedFragmentation(WifiRemoteStation* station,
1378 Ptr<const Packet> packet,
1379 bool normally);
1380 /**
1381 * @return a new station data structure
1382 */
1384 /**
1385 * @param station the station that we need to communicate
1386 * @param allowedWidth the allowed width to send a packet to the station
1387 * @return the TXVECTOR to use to send a packet to the station
1388 *
1389 * Note: This method is called before sending a unicast packet or a fragment
1390 * of a unicast packet to decide which transmission mode to use.
1391 */
1392 virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, MHz_u allowedWidth) = 0;
1393 /**
1394 * @param station the station that we need to communicate
1395 *
1396 * @return the transmission mode to use to send an RTS to the station
1397 *
1398 * Note: This method is called before sending an RTS to a station
1399 * to decide which transmission mode to use for the RTS.
1400 */
1402
1403 /**
1404 * This method is a pure virtual method that must be implemented by the sub-class.
1405 * This allows different types of WifiRemoteStationManager to respond differently,
1406 *
1407 * @param station the station that we failed to send RTS
1408 */
1409 virtual void DoReportRtsFailed(WifiRemoteStation* station) = 0;
1410 /**
1411 * This method is a pure virtual method that must be implemented by the sub-class.
1412 * This allows different types of WifiRemoteStationManager to respond differently,
1413 *
1414 * @param station the station that we failed to send DATA
1415 */
1416 virtual void DoReportDataFailed(WifiRemoteStation* station) = 0;
1417 /**
1418 * This method is a pure virtual method that must be implemented by the sub-class.
1419 * This allows different types of WifiRemoteStationManager to respond differently,
1420 *
1421 * @param station the station that we successfully sent RTS
1422 * @param ctsSnr the SNR of the CTS we received
1423 * @param ctsMode the WifiMode the receiver used to send the CTS
1424 * @param rtsSnr the SNR of the RTS we sent
1425 */
1426 virtual void DoReportRtsOk(WifiRemoteStation* station,
1427 double ctsSnr,
1428 WifiMode ctsMode,
1429 double rtsSnr) = 0;
1430 /**
1431 * This method is a pure virtual method that must be implemented by the sub-class.
1432 * This allows different types of WifiRemoteStationManager to respond differently,
1433 *
1434 * @param station the station that we successfully sent RTS
1435 * @param ackSnr the SNR of the ACK we received
1436 * @param ackMode the WifiMode the receiver used to send the ACK
1437 * @param dataSnr the SNR of the DATA we sent
1438 * @param dataChannelWidth the channel width of the DATA we sent
1439 * @param dataNss the number of spatial streams used to send the DATA
1440 */
1441 virtual void DoReportDataOk(WifiRemoteStation* station,
1442 double ackSnr,
1443 WifiMode ackMode,
1444 double dataSnr,
1445 MHz_u dataChannelWidth,
1446 uint8_t dataNss) = 0;
1447 /**
1448 * This method is a pure virtual method that must be implemented by the sub-class.
1449 * This allows different types of WifiRemoteStationManager to respond differently,
1450 *
1451 * @param station the station that we failed to send RTS
1452 */
1453 virtual void DoReportFinalRtsFailed(WifiRemoteStation* station) = 0;
1454 /**
1455 * This method is a pure virtual method that must be implemented by the sub-class.
1456 * This allows different types of WifiRemoteStationManager to respond differently,
1457 *
1458 * @param station the station that we failed to send DATA
1459 */
1460 virtual void DoReportFinalDataFailed(WifiRemoteStation* station) = 0;
1461 /**
1462 * This method is a pure virtual method that must be implemented by the sub-class.
1463 * This allows different types of WifiRemoteStationManager to respond differently,
1464 *
1465 * @param station the station that sent the DATA to us
1466 * @param rxSnr the SNR of the DATA we received
1467 * @param txMode the WifiMode the sender used to send the DATA
1468 */
1469 virtual void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) = 0;
1470 /**
1471 * Typically called per A-MPDU, either when a Block ACK was successfully received
1472 * or when a BlockAckTimeout has elapsed. This method is a virtual method that must
1473 * be implemented by the sub-class intended to handle A-MPDUs. This allows different
1474 * types of WifiRemoteStationManager to respond differently.
1475 *
1476 * @param station the station that sent the DATA to us
1477 * @param nSuccessfulMpdus number of successfully transmitted MPDUs.
1478 * A value of 0 means that the Block ACK was missed.
1479 * @param nFailedMpdus number of unsuccessfuly transmitted MPDUs.
1480 * @param rxSnr received SNR of the block ack frame itself
1481 * @param dataSnr data SNR reported by remote station
1482 * @param dataChannelWidth the channel width of the A-MPDU we sent
1483 * @param dataNss the number of spatial streams used to send the A-MPDU
1484 */
1485 virtual void DoReportAmpduTxStatus(WifiRemoteStation* station,
1486 uint16_t nSuccessfulMpdus,
1487 uint16_t nFailedMpdus,
1488 double rxSnr,
1489 double dataSnr,
1490 MHz_u dataChannelWidth,
1491 uint8_t dataNss);
1492
1493 /**
1494 * Return the state of the station associated with the given address.
1495 *
1496 * @param address the address of the station
1497 * @return WifiRemoteStationState corresponding to the address
1498 */
1499 std::shared_ptr<WifiRemoteStationState> LookupState(Mac48Address address) const;
1500 /**
1501 * Return the station associated with the given address.
1502 *
1503 * @param address the address of the station
1504 *
1505 * @return WifiRemoteStation corresponding to the address
1506 */
1507 WifiRemoteStation* Lookup(Mac48Address address) const;
1508
1509 /**
1510 * Actually sets the fragmentation threshold, it also checks the validity of
1511 * the given threshold.
1512 *
1513 * @param threshold the fragmentation threshold
1514 */
1515 void DoSetFragmentationThreshold(uint32_t threshold);
1516 /**
1517 * Return the current fragmentation threshold
1518 *
1519 * @return the fragmentation threshold
1520 */
1522 /**
1523 * Return the number of fragments needed for the given packet.
1524 *
1525 * @param mpdu the packet to be fragmented
1526 *
1527 * @return the number of fragments needed
1528 */
1530
1531 /**
1532 * This is a pointer to the WifiPhy associated with this
1533 * WifiRemoteStationManager that is set on call to
1534 * WifiRemoteStationManager::SetupPhy(). Through this pointer the
1535 * station manager can determine PHY characteristics, such as the
1536 * set of all transmission rates that may be supported (the
1537 * "DeviceRateSet").
1538 */
1540 /**
1541 * This is a pointer to the WifiMac associated with this
1542 * WifiRemoteStationManager that is set on call to
1543 * WifiRemoteStationManager::SetupMac(). Through this pointer the
1544 * station manager can determine MAC characteristics, such as the
1545 * interframe spaces.
1546 */
1548
1549 /**
1550 * This member is the list of WifiMode objects that comprise the
1551 * BSSBasicRateSet parameter. This list is constructed through calls
1552 * to WifiRemoteStationManager::AddBasicMode(), and an API that
1553 * allows external access to it is available through
1554 * WifiRemoteStationManager::GetNBasicModes() and
1555 * WifiRemoteStationManager::GetBasicMode().
1556 */
1557 WifiModeList m_bssBasicRateSet; //!< basic rate set
1558 WifiModeList m_bssBasicMcsSet; //!< basic MCS set
1559
1560 StationStates m_states; //!< States of known stations
1561 Stations m_stations; //!< Information for each known stations
1562
1563 uint32_t m_maxSsrc; //!< Maximum STA short retry count (SSRC)
1564 uint32_t m_maxSlrc; //!< Maximum STA long retry count (SLRC)
1565 uint32_t m_rtsCtsThreshold; //!< Threshold for RTS/CTS
1566 Time m_rtsCtsTxDurationThresh; //!< TX duration threshold for RTS/CTS
1567 uint32_t m_fragmentationThreshold; //!< Current threshold for fragmentation
1568 uint8_t m_defaultTxPowerLevel; //!< Default transmission power level
1569 WifiMode m_nonUnicastMode; //!< Transmission mode for non-unicast Data frames
1570 bool m_useNonErpProtection; //!< flag if protection for non-ERP stations against ERP
1571 //!< transmissions is enabled
1572 bool m_useNonHtProtection; //!< flag if protection for non-HT stations against HT transmissions
1573 //!< is enabled
1574 bool m_shortPreambleEnabled; //!< flag if short PHY preamble is enabled
1575 bool m_shortSlotTimeEnabled; //!< flag if short slot time is enabled
1576 ProtectionMode m_erpProtectionMode; //!< Protection mode for ERP stations when non-ERP stations
1577 //!< are detected
1579 m_htProtectionMode; //!< Protection mode for HT stations when non-HT stations are detected
1580
1581 std::array<uint32_t, AC_BE_NQOS> m_ssrc; //!< short retry count per AC
1582 std::array<uint32_t, AC_BE_NQOS> m_slrc; //!< long retry count per AC
1583
1584 /**
1585 * The trace source fired when the transmission of a single RTS has failed
1586 */
1588 /**
1589 * The trace source fired when the transmission of a single data packet has failed
1590 */
1592 /**
1593 * The trace source fired when the transmission of a RTS has
1594 * exceeded the maximum number of attempts
1595 */
1597 /**
1598 * The trace source fired when the transmission of a data packet has
1599 * exceeded the maximum number of attempts
1600 */
1602};
1603
1604} // namespace ns3
1605
1606#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.
void AdjustTxVectorForCtlResponse(WifiTxVector &txVector, MHz_u allowedWidth) const
Adjust the TXVECTOR for a control response frame to ensure that, if appropriate, the non-HT duplicate...
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:254
RxSignalInfo structure containing info on the received signal.
Definition wifi-types.h:78
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