A Discrete-Event Network Simulator
API
wifi-remote-station-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006,2007 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #ifndef WIFI_REMOTE_STATION_MANAGER_H
22 #define WIFI_REMOTE_STATION_MANAGER_H
23 
24 #include <array>
25 #include "ns3/traced-callback.h"
26 #include "ns3/object.h"
27 #include "ns3/data-rate.h"
28 #include "ns3/mac48-address.h"
29 #include "wifi-mode.h"
30 #include "wifi-utils.h"
31 #include "qos-utils.h"
33 #include "ht-capabilities.h"
34 #include "vht-capabilities.h"
35 #include "he-capabilities.h"
36 
37 namespace ns3 {
38 
39 class WifiPhy;
40 class WifiMac;
41 class WifiMacHeader;
42 class Packet;
43 class WifiTxVector;
44 
45 struct WifiRemoteStationState;
46 
59 {
60  virtual ~WifiRemoteStation () {};
62 };
63 
68 {
72  enum
73  {
78  } m_state;
79 
96 
97  uint16_t m_channelWidth;
98  uint16_t m_guardInterval;
99  uint8_t m_ness;
104 };
105 
113 {
114 public:
119  static TypeId GetTypeId (void);
120 
122  virtual ~WifiRemoteStationManager ();
123 
126  {
129  };
130 
134  typedef std::vector <WifiRemoteStation *> Stations;
138  typedef std::vector <WifiRemoteStationState *> StationStates;
139 
146  virtual void SetupPhy (const Ptr<WifiPhy> phy);
153  virtual void SetupMac (const Ptr<WifiMac> mac);
154 
160  void SetMaxSsrc (uint32_t maxSsrc);
166  void SetMaxSlrc (uint32_t maxSlrc);
172  void SetRtsCtsThreshold (uint32_t threshold);
173 
179  uint32_t GetFragmentationThreshold (void) const;
186  void SetFragmentationThreshold (uint32_t threshold);
191  void UpdateFragmentationThreshold (void);
192 
199  void SetQosSupport (Mac48Address from, bool qosSupported);
206  void AddStationHtCapabilities (Mac48Address from, HtCapabilities htCapabilities);
213  void AddStationVhtCapabilities (Mac48Address from, VhtCapabilities vhtCapabilities);
220  void AddStationHeCapabilities (Mac48Address from, HeCapabilities heCapabilities);
247  bool GetHtSupported (void) const;
253  bool GetVhtSupported (void) const;
259  bool GetHeSupported (void) const;
265  void SetPcfSupported (bool enable);
271  bool GetPcfSupported (void) const;
277  bool GetGreenfieldSupported (void) const;
283  bool GetShortGuardIntervalSupported (void) const;
289  uint16_t GetGuardInterval (void) const;
295  void SetUseNonErpProtection (bool enable);
302  bool GetUseNonErpProtection (void) const;
308  void SetUseNonHtProtection (bool enable);
315  bool GetUseNonHtProtection (void) const;
321  void SetUseGreenfieldProtection (bool enable);
328  bool GetUseGreenfieldProtection (void) const;
334  void SetShortPreambleEnabled (bool enable);
341  bool GetShortPreambleEnabled (void) const;
347  void SetShortSlotTimeEnabled (bool enable);
354  bool GetShortSlotTimeEnabled (void) const;
355 
359  void Reset (void);
360 
368  void AddBasicMode (WifiMode mode);
374  WifiMode GetDefaultMode (void) const;
380  uint8_t GetNBasicModes (void) const;
388  WifiMode GetBasicMode (uint8_t i) const;
394  uint32_t GetNNonErpBasicModes (void) const;
402  WifiMode GetNonErpBasicMode (uint8_t i) const;
438  bool GetQosSupported (Mac48Address address) const;
445  void AddBasicMcs (WifiMode mcs);
451  WifiMode GetDefaultMcs (void) const;
457  uint8_t GetNBasicMcs (void) const;
465  WifiMode GetBasicMcs (uint8_t i) const;
505  uint8_t GetNMcsSupported (Mac48Address address) const;
514  bool GetHtSupported (Mac48Address address) const;
523  bool GetVhtSupported (Mac48Address address) const;
532  bool GetHeSupported (Mac48Address address) const;
533 
539  WifiMode GetNonUnicastMode (void) const;
540 
579  void AddSupportedPhyPreamble (Mac48Address address, bool isShortPreambleSupported);
586  void AddSupportedErpSlotTime (Mac48Address address, bool isShortSlotTimeSupported);
595  bool IsBrandNew (Mac48Address address) const;
604  bool IsAssociated (Mac48Address address) const;
614  bool IsWaitAssocTxOk (Mac48Address address) const;
642 
664 
672  void ReportRtsFailed (Mac48Address address, const WifiMacHeader *header);
681  void ReportDataFailed (Mac48Address address, const WifiMacHeader *header,
682  uint32_t packetSize);
694  void ReportRtsOk (Mac48Address address, const WifiMacHeader *header,
695  double ctsSnr, WifiMode ctsMode, double rtsSnr);
708  void ReportDataOk (Mac48Address address, const WifiMacHeader *header,
709  double ackSnr, WifiMode ackMode,
710  double dataSnr, WifiTxVector dataTxVector,
711  uint32_t packetSize);
729  uint32_t packetSize);
742  void ReportAmpduTxStatus (Mac48Address address, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
743  double rxSnr, double dataSnr, WifiTxVector dataTxVector);
744 
752  void ReportRxOk (Mac48Address address, double rxSnr, WifiMode txMode);
753 
761  bool NeedRts (const WifiMacHeader &header, uint32_t size);
770  bool NeedCtsToSelf (WifiTxVector txVector);
771 
781  Ptr<const Packet> packet);
791  Ptr<const Packet> packet);
800  uint32_t GetFragmentSize (Mac48Address address, const WifiMacHeader *header,
801  Ptr<const Packet> packet, uint32_t fragmentNumber);
810  uint32_t GetFragmentOffset (Mac48Address address, const WifiMacHeader *header,
811  Ptr<const Packet> packet, uint32_t fragmentNumber);
820  bool IsLastFragment (Mac48Address address, const WifiMacHeader *header,
821  Ptr<const Packet> packet, uint32_t fragmentNumber);
822 
826  uint8_t GetDefaultTxPowerLevel (void) const;
838  void SetDefaultTxPowerLevel (uint8_t txPower);
842  uint8_t GetNumberOfAntennas (void) const;
846  uint8_t GetMaxNumberOfTransmitStreams (void) const;
854  bool UseGreenfieldForDestination (Mac48Address dest) const;
855 
863  typedef void (*PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress);
864 
872  typedef void (*RateChangeTracedCallback)(DataRate oldRate, DataRate newRate, Mac48Address remoteAddress);
873 
874 
875 protected:
876  virtual void DoDispose (void);
885  WifiMode GetSupported (const WifiRemoteStation *station, uint8_t i) const;
893  uint8_t GetNSupported (const WifiRemoteStation *station) const;
902  bool GetQosSupported (const WifiRemoteStation *station) const;
911  bool GetHtSupported (const WifiRemoteStation *station) const;
920  bool GetVhtSupported (const WifiRemoteStation *station) const;
929  bool GetHeSupported (const WifiRemoteStation *station) const;
939  WifiMode GetMcsSupported (const WifiRemoteStation *station, uint8_t i) const;
947  uint8_t GetNMcsSupported (const WifiRemoteStation *station) const;
956  WifiMode GetNonErpSupported (const WifiRemoteStation *station, uint8_t i) const;
964  uint32_t GetNNonErpSupported (const WifiRemoteStation *station) const;
972  Mac48Address GetAddress (const WifiRemoteStation *station) const;
980  uint16_t GetChannelWidth (const WifiRemoteStation *station) const;
989  bool GetShortGuardIntervalSupported (const WifiRemoteStation *station) const;
997  uint16_t GetGuardInterval (const WifiRemoteStation *station) const;
1006  bool GetAggregation (const WifiRemoteStation *station) const;
1015  bool GetGreenfield (const WifiRemoteStation *station) const;
1016 
1024  uint8_t GetNumberOfSupportedStreams (const WifiRemoteStation *station) const;
1032  uint8_t GetNess (const WifiRemoteStation *station) const;
1033 
1039  Ptr<WifiPhy> GetPhy (void) const;
1045  Ptr<WifiMac> GetMac (void) const;
1046 
1047 
1048 private:
1060  virtual bool DoNeedRts (WifiRemoteStation *station,
1061  uint32_t size, bool normally);
1073  virtual bool DoNeedRetransmission (WifiRemoteStation *station,
1074  Ptr<const Packet> packet, bool normally);
1086  virtual bool DoNeedFragmentation (WifiRemoteStation *station,
1087  Ptr<const Packet> packet, bool normally);
1091  virtual WifiRemoteStation* DoCreateStation (void) const = 0;
1100  virtual WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) = 0;
1109  virtual WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) = 0;
1110 
1117  virtual void DoReportRtsFailed (WifiRemoteStation *station) = 0;
1124  virtual void DoReportDataFailed (WifiRemoteStation *station) = 0;
1134  virtual void DoReportRtsOk (WifiRemoteStation *station,
1135  double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0;
1147  virtual void DoReportDataOk (WifiRemoteStation *station, double ackSnr, WifiMode ackMode,
1148  double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) = 0;
1155  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station) = 0;
1162  virtual void DoReportFinalDataFailed (WifiRemoteStation *station) = 0;
1171  virtual void DoReportRxOk (WifiRemoteStation *station,
1172  double rxSnr, WifiMode txMode) = 0;
1188  virtual void DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
1189  double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss);
1190 
1206 
1213  void DoSetFragmentationThreshold (uint32_t threshold);
1219  uint32_t DoGetFragmentationThreshold (void) const;
1228  uint32_t GetNFragments (const WifiMacHeader *header, Ptr<const Packet> packet);
1229 
1247 
1258 
1261 
1264 
1266  uint32_t m_maxSsrc;
1267  uint32_t m_maxSlrc;
1280 
1281  std::array<uint32_t, AC_BE_NQOS> m_ssrc;
1282  std::array<uint32_t, AC_BE_NQOS> m_slrc;
1283 
1302 };
1303 
1304 } //namespace ns3
1305 
1306 #endif /* WIFI_REMOTE_STATION_MANAGER_H */
std::array< uint32_t, AC_BE_NQOS > m_ssrc
short retry count per AC
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
bool m_useNonHtProtection
flag if protection for non-HT stations against HT transmissions is enabled
bool m_shortPreamble
Flag if short PHY preamble is supported by the remote station.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
uint32_t GetNFragments(const WifiMacHeader *header, Ptr< const Packet > packet)
Return the number of fragments needed for the given packet.
Ptr< WifiMac > GetMac(void) const
Return the WifiMac.
void SetDefaultTxPowerLevel(uint8_t txPower)
Set the default transmission power level.
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
uint8_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given station.
std::vector< WifiRemoteStationState * > StationStates
A vector of WifiRemoteStationStates.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void(* PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress)
TracedCallback signature for power change events.
uint32_t m_rtsCtsThreshold
Threshold for RTS/CTS.
bool m_shortSlotTimeEnabled
flag if short slot time is enabled
enum ns3::WifiRemoteStationState::@77 m_state
State of the station.
bool GetShortPreambleSupported(Mac48Address address) const
Return whether the station supports short PHY preamble or not.
void ReportFinalDataFailed(Mac48Address address, const WifiMacHeader *header, uint32_t packetSize)
Should be invoked after calling ReportDataFailed if NeedRetransmission returns false.
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...
std::array< uint32_t, AC_BE_NQOS > m_slrc
long retry count per AC
void RecordWaitAssocTxOk(Mac48Address address)
Records that we are waiting for an ACK for the association response we sent.
virtual void DoReportRtsFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
static const uint32_t packetSize
WifiMode m_nonUnicastMode
Transmission mode for non-unicast Data frames.
uint32_t m_nextFragmentationThreshold
Threshold for fragmentation that will be used for the next transmission.
Forward calls to a chain of Callback.
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
Ptr< const HeCapabilities > m_heCapabilities
remote station HE capabilities
WifiMode GetDefaultMcs(void) const
Return the default Modulation and Coding Scheme (MCS) index.
uint32_t m_fragmentationThreshold
Current threshold for fragmentation.
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
uint8_t m_defaultTxPowerLevel
Default transmission power level.
void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PHY preamble is supported by the station.
WifiMode GetNonUnicastMode(void) const
Return a mode for non-unicast packets.
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
Mac48Address m_address
Mac48Address of the remote station.
void UpdateFragmentationThreshold(void)
Typically called to update the fragmentation threshold at the start of a new transmission.
void SetPcfSupported(bool enable)
Enable or disable PCF capability support.
bool GetUseNonHtProtection(void) const
Return whether the device supports protection of non-HT stations.
bool IsLastFragment(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
void ReportDataOk(Mac48Address address, const WifiMacHeader *header, double ackSnr, WifiMode ackMode, double dataSnr, WifiTxVector dataTxVector, uint32_t packetSize)
Should be invoked whenever we receive the ACK associated to a data packet we just sent...
TracedCallback< Mac48Address > m_macTxFinalRtsFailed
The trace source fired when the transmission of a RTS has exceeded the maximum number of attempts...
uint32_t GetFragmentationThreshold(void) const
Return the fragmentation threshold.
bool GetUseGreenfieldProtection(void) const
Return whether protection for stations that do not support HT Greenfield format is enabled...
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index. ...
uint8_t GetNBasicMcs(void) const
Return the number of basic MCS index.
uint32_t GetNNonErpSupported(const WifiRemoteStation *station) const
Return the number of non-ERP modes supported by the given station.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
bool m_shortPreambleEnabled
flag if short PHY preamble is enabled
TID independent remote station statistics.
WifiRemoteStationState * m_state
Remote station state.
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
phy
Definition: third.py:93
TracedCallback< Mac48Address > m_macTxFinalDataFailed
The trace source fired when the transmission of a data packet has exceeded the maximum number of atte...
Class for representing data rates.
Definition: data-rate.h:88
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
WifiTxVector GetDataTxVector(const WifiMacHeader &header)
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PHY preambles.
ProtectionMode
ProtectionMode enumeration.
bool GetGreenfield(const WifiRemoteStation *station) const
Return whether the station supports Greenfield or not.
ProtectionMode m_htProtectionMode
Protection mode for HT stations when non-HT stations are detected.
void SetRtsCtsThreshold(uint32_t threshold)
Sets the RTS threshold.
bool m_qosSupported
Flag if QoS is supported by the station.
WifiRemoteStationState * LookupState(Mac48Address address) const
Return the state of the station associated with the given address.
WifiMode m_defaultTxMcs
The default transmission modulation-coding scheme (MCS)
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.
Ptr< WifiPhy > m_wifiPhy
This is a pointer to the WifiPhy associated with this WifiRemoteStationManager that is set on call to...
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.
void ReportRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the RtsTimeout associated to a transmission attempt expires.
bool GetPcfSupported(void) const
Return whether the device has PCF capability support enabled.
bool GetShortSlotTimeSupported(Mac48Address address) const
Return whether the station supports short ERP slot time or not.
The IEEE 802.11ac VHT Capabilities.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
bool m_useNonErpProtection
flag if protection for non-ERP stations against ERP transmissions is enabled
virtual void DoReportDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
void ReportRxOk(Mac48Address address, double rxSnr, WifiMode txMode)
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
mac
Definition: third.py:99
WifiRemoteStationInfo GetInfo(Mac48Address address)
void SetMaxSsrc(uint32_t maxSsrc)
Sets the maximum STA short retry count (SSRC).
void AddStationHeCapabilities(Mac48Address from, HeCapabilities heCapabilities)
Records HE capabilities of the remote station.
uint32_t m_maxSlrc
Maximum STA long retry count (SLRC)
bool m_pcfSupported
Flag if PCF capability is supported.
Ptr< const HeCapabilities > GetStationHeCapabilities(Mac48Address from)
Return the HE capabilities sent by the remote station.
bool NeedRetransmission(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
Ptr< WifiMac > m_wifiMac
This is a pointer to the WifiMac associated with this WifiRemoteStationManager that is set on call to...
Ptr< const VhtCapabilities > m_vhtCapabilities
remote station VHT capabilities
uint32_t GetNNonErpBasicModes(void) const
Return the number of non-ERP basic modes we support.
WifiTxVector GetCtsToSelfTxVector(void)
Since CTS-to-self parameters are not dependent on the station, it is implemented in wifi remote stati...
Ptr< const HtCapabilities > m_htCapabilities
remote station HT capabilities
WifiMode GetNonErpBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes that is not an ERP mode.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
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...
hold a list of per-remote-station state.
bool GetQosSupported(Mac48Address address) const
Return whether the given station is QoS capable.
Ptr< const HtCapabilities > GetStationHtCapabilities(Mac48Address from)
Return the HT capabilities sent by the remote station.
bool NeedRts(const WifiMacHeader &header, uint32_t size)
WifiMode GetDefaultMode(void) const
Return the default transmission mode.
void SetQosSupport(Mac48Address from, bool qosSupported)
Records QoS support of the remote station.
WifiMode m_defaultTxMode
The default transmission mode.
WifiModeList m_bssBasicRateSet
This member is the list of WifiMode objects that comprise the BSSBasicRateSet parameter.
uint32_t GetFragmentOffset(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
bool GetShortSlotTimeEnabled(void) const
Return whether the device uses short slot time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
address
Definition: first.py:44
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...
WifiModeList m_operationalRateSet
This member is the list of WifiMode objects that comprise the OperationalRateSet parameter for this r...
uint32_t GetFragmentSize(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
void DoSetFragmentationThreshold(uint32_t threshold)
Actually sets the fragmentation threshold, it also checks the validity of the given threshold...
void AddBasicMode(WifiMode mode)
Invoked in a STA upon association to store the set of rates which belong to the BSSBasicRateSet of th...
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
bool UseGreenfieldForDestination(Mac48Address dest) const
bool m_useGreenfieldProtection
flag if protection for stations that do not support HT Greenfield format is enabled ...
bool m_aggregation
Flag if MPDU aggregation is used by the remote station.
an EUI-48 address
Definition: mac48-address.h:43
TracedCallback< Mac48Address > m_macTxRtsFailed
The trace source fired when the transmission of a single RTS has failed.
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)=0
This method is a pure virtual method that must be implemented by the sub-class.
Mac48Address GetAddress(const WifiRemoteStation *station) const
Return the address of the station.
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether non-ERP mode associated with the specified station at the specified index...
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:283
bool GetShortGuardIntervalSupported(void) const
Return whether the device has SGI support enabled.
Stations m_stations
Information for each known stations.
void ReportRtsOk(Mac48Address address, const WifiMacHeader *header, double ctsSnr, WifiMode ctsMode, double rtsSnr)
Should be invoked whenever we receive the CTS associated to an RTS we just sent.
TracedCallback< Mac48Address > m_macTxDataFailed
The trace source fired when the transmission of a single data packet has failed.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
uint16_t m_channelWidth
Channel width (in MHz) supported by the remote station.
virtual bool DoNeedRetransmission(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
void AddBasicMcs(WifiMode mcs)
Add a given Modulation and Coding Scheme (MCS) index to the set of basic MCS.
virtual bool DoNeedFragmentation(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
bool NeedCtsToSelf(WifiTxVector txVector)
Return if we need to do CTS-to-self before sending a DATA.
uint8_t GetNBasicModes(void) const
Return the number of basic modes we support.
void SetUseNonHtProtection(bool enable)
Enable or disable protection for non-HT stations.
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 SetMaxSlrc(uint32_t maxSlrc)
Sets the maximum STA long retry count (SLRC).
Ptr< WifiPhy > GetPhy(void) const
Return the WifiPhy.
void ReportDataFailed(Mac48Address address, const WifiMacHeader *header, uint32_t packetSize)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
uint16_t GetGuardInterval(void) const
Return the supported HE guard interval duration (in nanoseconds).
A struct that holds information about each remote station.
WifiModeList m_operationalMcsSet
operational MCS set
static TypeId GetTypeId(void)
Get the type ID.
void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported)
Record whether the short ERP slot time is supported by the station.
void SetFragmentationThreshold(uint32_t threshold)
Sets a fragmentation threshold.
void Reset(void)
Reset the station, invoked in a STA upon dis-association or in an AP upon reboot. ...
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
uint32_t m_maxSsrc
Maximum STA short retry count (SSRC)
virtual void DoDispose(void)
Destructor implementation.
Ptr< const VhtCapabilities > GetStationVhtCapabilities(Mac48Address from)
Return the VHT capabilities sent by the remote station.
bool GetGreenfieldSupported(void) const
Return whether the device has HT Greenfield support enabled.
WifiTxVector GetRtsTxVector(Mac48Address address)
void SetUseGreenfieldProtection(bool enable)
Enable or disable protection for stations that do not support HT Greenfield format.
bool NeedFragmentation(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
virtual void DoReportAmpduTxStatus(WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
uint8_t m_ness
Number of extended spatial streams of the remote station.
bool m_shortSlotTime
Flag if short ERP slot time is supported by the remote station.
A base class which provides memory management and object aggregation.
Definition: object.h:87
StationStates m_states
States of known stations.
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for an ACK for the association response we sent.
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
virtual bool DoNeedRts(WifiRemoteStation *station, uint32_t size, bool normally)
ProtectionMode m_erpProtectionMode
Protection mode for ERP stations when non-ERP stations are detected.
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
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 WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)=0
The IEEE 802.11ax HE Capabilities.
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
void(* RateChangeTracedCallback)(DataRate oldRate, DataRate newRate, Mac48Address remoteAddress)
TracedCallback signature for rate change events.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)=0
bool IsBrandNew(Mac48Address address) const
Return whether the station state is brand new.
a unique identifier for an interface.
Definition: type-id.h:58
void ReportFinalRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked after calling ReportRtsFailed if NeedRetransmission returns false.
WifiRemoteStation * Lookup(Mac48Address address) const
Return the station associated with the given address.
void RemoveAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to delete all of the supported MCS by a destination.
WifiRemoteStationInfo m_info
remote station info
WifiModeList m_bssBasicMcsSet
basic MCS set
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
hold per-remote-station state.
virtual WifiRemoteStation * DoCreateStation(void) const =0
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
Implements the IEEE 802.11 MAC header.
WifiMode GetMcsSupported(const WifiRemoteStation *station, uint8_t i) const
Return the WifiMode supported by the specified station at the specified index.
uint16_t GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
uint8_t GetNess(const WifiRemoteStation *station) const
void ReportAmpduTxStatus(Mac48Address address, uint8_t nSuccessfulMpdus, uint8_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...
uint16_t m_guardInterval
HE Guard interval duration (in nanoseconds) supported by the remote station.
uint32_t DoGetFragmentationThreshold(void) const
Return the current fragmentation threshold.
std::vector< WifiRemoteStation * > Stations
A vector of WifiRemoteStations.