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 "ns3/ht-capabilities.h"
34 #include "ns3/vht-capabilities.h"
35 #include "ns3/he-capabilities.h"
36 
37 namespace ns3 {
38 
39 class WifiPhy;
40 class WifiMac;
41 class WifiMacHeader;
42 class Packet;
43 class WifiMacQueueItem;
44 class WifiTxVector;
45 
46 struct WifiRemoteStationState;
47 struct RxSignalInfo;
48 
61 {
62  virtual ~WifiRemoteStation () {};
64  std::pair<double, Time> m_rssiAndUpdateTimePair;
65 };
66 
71 {
75  enum
76  {
82 
102  uint16_t m_channelWidth;
103  uint16_t m_guardInterval;
104  uint8_t m_ness;
109 };
110 
118 {
119 public:
124  static TypeId GetTypeId (void);
125 
127  virtual ~WifiRemoteStationManager ();
128 
131  {
134  };
135 
139  typedef std::vector <WifiRemoteStation *> Stations;
143  typedef std::vector <WifiRemoteStationState *> StationStates;
144 
151  virtual void SetupPhy (const Ptr<WifiPhy> phy);
158  virtual void SetupMac (const Ptr<WifiMac> mac);
159 
168  virtual int64_t AssignStreams (int64_t stream);
169 
175  void SetMaxSsrc (uint32_t maxSsrc);
181  void SetMaxSlrc (uint32_t maxSlrc);
187  void SetRtsCtsThreshold (uint32_t threshold);
188 
194  uint32_t GetFragmentationThreshold (void) const;
201  void SetFragmentationThreshold (uint32_t threshold);
202 
209  void SetQosSupport (Mac48Address from, bool qosSupported);
216  void AddStationHtCapabilities (Mac48Address from, HtCapabilities htCapabilities);
223  void AddStationVhtCapabilities (Mac48Address from, VhtCapabilities vhtCapabilities);
230  void AddStationHeCapabilities (Mac48Address from, HeCapabilities heCapabilities);
257  bool GetHtSupported (void) const;
263  bool GetVhtSupported (void) const;
269  bool GetHeSupported (void) const;
275  bool GetLdpcSupported (void) const;
281  bool GetShortGuardIntervalSupported (void) const;
287  uint16_t GetGuardInterval (void) const;
293  void SetUseNonErpProtection (bool enable);
300  bool GetUseNonErpProtection (void) const;
306  void SetUseNonHtProtection (bool enable);
313  bool GetUseNonHtProtection (void) const;
319  void SetShortPreambleEnabled (bool enable);
326  bool GetShortPreambleEnabled (void) const;
332  void SetShortSlotTimeEnabled (bool enable);
339  bool GetShortSlotTimeEnabled (void) const;
340 
344  void Reset (void);
345 
353  void AddBasicMode (WifiMode mode);
359  WifiMode GetDefaultMode (void) const;
365  uint8_t GetNBasicModes (void) const;
373  WifiMode GetBasicMode (uint8_t i) const;
379  uint32_t GetNNonErpBasicModes (void) const;
387  WifiMode GetNonErpBasicMode (uint8_t i) const;
423  bool GetQosSupported (Mac48Address address) const;
430  void AddBasicMcs (WifiMode mcs);
436  WifiMode GetDefaultMcs (void) const;
442  uint8_t GetNBasicMcs (void) const;
450  WifiMode GetBasicMcs (uint8_t i) const;
490  uint8_t GetNMcsSupported (Mac48Address address) const;
499  bool GetDsssSupported (const Mac48Address& address) const;
508  bool GetErpOfdmSupported (const Mac48Address& address) const;
517  bool GetOfdmSupported (const Mac48Address& address) const;
526  bool GetHtSupported (Mac48Address address) const;
535  bool GetVhtSupported (Mac48Address address) const;
544  bool GetHeSupported (Mac48Address address) const;
545 
551  WifiMode GetNonUnicastMode (void) const;
552 
591  void AddSupportedPhyPreamble (Mac48Address address, bool isShortPreambleSupported);
598  void AddSupportedErpSlotTime (Mac48Address address, bool isShortSlotTimeSupported);
607  bool IsBrandNew (Mac48Address address) const;
616  bool IsAssociated (Mac48Address address) const;
626  bool IsWaitAssocTxOk (Mac48Address address) const;
654 
676  WifiTxVector GetCtsTxVector (Mac48Address to, WifiMode rtsTxMode) const;
693  WifiTxVector GetAckTxVector (Mac48Address to, const WifiTxVector& dataTxVector) const;
702  WifiTxVector GetBlockAckTxVector (Mac48Address to, const WifiTxVector& dataTxVector) const;
709  WifiMode GetControlAnswerMode (WifiMode reqMode) const;
710 
717  void ReportRtsFailed (const WifiMacHeader& header);
735  void ReportRtsOk (const WifiMacHeader& header,
736  double ctsSnr, WifiMode ctsMode, double rtsSnr);
747  void ReportDataOk (Ptr<const WifiMacQueueItem> mpdu, double ackSnr,
748  WifiMode ackMode, double dataSnr, WifiTxVector dataTxVector);
755  void ReportFinalRtsFailed (const WifiMacHeader& header);
775  void ReportAmpduTxStatus (Mac48Address address, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus,
776  double rxSnr, double dataSnr, WifiTxVector dataTxVector);
777 
785  void ReportRxOk (Mac48Address address, RxSignalInfo rxSignalInfo, WifiTxVector txVector);
786 
794  bool NeedRts (const WifiMacHeader &header, uint32_t size);
803  bool NeedCtsToSelf (WifiTxVector txVector);
804 
825  uint32_t GetFragmentSize (Ptr<const WifiMacQueueItem> mpdu, uint32_t fragmentNumber);
832  uint32_t GetFragmentOffset (Ptr<const WifiMacQueueItem> mpdu, uint32_t fragmentNumber);
839  bool IsLastFragment (Ptr<const WifiMacQueueItem> mpdu, uint32_t fragmentNumber);
840 
844  uint8_t GetDefaultTxPowerLevel (void) const;
860  double GetMostRecentRssi (Mac48Address address) const;
866  void SetDefaultTxPowerLevel (uint8_t txPower);
870  uint8_t GetNumberOfAntennas (void) const;
874  uint8_t GetMaxNumberOfTransmitStreams (void) const;
882  bool UseLdpcForDestination (Mac48Address dest) const;
883 
891  typedef void (*PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress);
892 
900  typedef void (*RateChangeTracedCallback)(DataRate oldRate, DataRate newRate, Mac48Address remoteAddress);
901 
907  Ptr<WifiPhy> GetPhy (void) const;
913  Ptr<WifiMac> GetMac (void) const;
914 
915 
916 protected:
917  virtual void DoDispose (void);
926  WifiMode GetSupported (const WifiRemoteStation *station, uint8_t i) const;
934  uint8_t GetNSupported (const WifiRemoteStation *station) const;
943  bool GetQosSupported (const WifiRemoteStation *station) const;
952  bool GetHtSupported (const WifiRemoteStation *station) const;
961  bool GetVhtSupported (const WifiRemoteStation *station) const;
970  bool GetHeSupported (const WifiRemoteStation *station) const;
980  WifiMode GetMcsSupported (const WifiRemoteStation *station, uint8_t i) const;
988  uint8_t GetNMcsSupported (const WifiRemoteStation *station) const;
997  WifiMode GetNonErpSupported (const WifiRemoteStation *station, uint8_t i) const;
1005  uint32_t GetNNonErpSupported (const WifiRemoteStation *station) const;
1013  Mac48Address GetAddress (const WifiRemoteStation *station) const;
1021  uint16_t GetChannelWidth (const WifiRemoteStation *station) const;
1030  bool GetShortGuardIntervalSupported (const WifiRemoteStation *station) const;
1038  uint16_t GetGuardInterval (const WifiRemoteStation *station) const;
1047  bool GetAggregation (const WifiRemoteStation *station) const;
1048 
1056  uint8_t GetNumberOfSupportedStreams (const WifiRemoteStation *station) const;
1064  uint8_t GetNess (const WifiRemoteStation *station) const;
1065 
1066 
1067 private:
1077  uint16_t GetStaId (Mac48Address address, const WifiTxVector& txVector) const;
1078 
1090  virtual bool DoNeedRts (WifiRemoteStation *station,
1091  uint32_t size, bool normally);
1103  virtual bool DoNeedRetransmission (WifiRemoteStation *station,
1104  Ptr<const Packet> packet, bool normally);
1116  virtual bool DoNeedFragmentation (WifiRemoteStation *station,
1117  Ptr<const Packet> packet, bool normally);
1121  virtual WifiRemoteStation* DoCreateStation (void) const = 0;
1140 
1147  virtual void DoReportRtsFailed (WifiRemoteStation *station) = 0;
1154  virtual void DoReportDataFailed (WifiRemoteStation *station) = 0;
1164  virtual void DoReportRtsOk (WifiRemoteStation *station,
1165  double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0;
1177  virtual void DoReportDataOk (WifiRemoteStation *station, double ackSnr, WifiMode ackMode,
1178  double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) = 0;
1185  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station) = 0;
1192  virtual void DoReportFinalDataFailed (WifiRemoteStation *station) = 0;
1201  virtual void DoReportRxOk (WifiRemoteStation *station,
1202  double rxSnr, WifiMode txMode) = 0;
1218  virtual void DoReportAmpduTxStatus (WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus,
1219  double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss);
1220 
1236 
1243  void DoSetFragmentationThreshold (uint32_t threshold);
1249  uint32_t DoGetFragmentationThreshold (void) const;
1258 
1276 
1287 
1290 
1293 
1294  uint32_t m_maxSsrc;
1295  uint32_t m_maxSlrc;
1306 
1307  std::array<uint32_t, AC_BE_NQOS> m_ssrc;
1308  std::array<uint32_t, AC_BE_NQOS> m_slrc;
1309 
1328 };
1329 
1330 } //namespace ns3
1331 
1332 #endif /* WIFI_REMOTE_STATION_MANAGER_H */
Class for representing data rates.
Definition: data-rate.h:89
The IEEE 802.11ax HE Capabilities.
The HT Capabilities Information Element.
an EUI-48 address
Definition: mac48-address.h:44
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
The IEEE 802.11ac VHT Capabilities.
Implements the IEEE 802.11 MAC header.
represent a single transmission mode
Definition: wifi-mode.h:48
TID independent remote station statistics.
hold a list of per-remote-station state.
bool GetQosSupported(Mac48Address address) const
Return whether the given station is QoS capable.
bool GetLdpcSupported(void) const
Return whether the device has LDPC support enabled.
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)
WifiMode GetDefaultMode(void) const
Return the default transmission mode.
uint32_t m_fragmentationThreshold
Current threshold for fragmentation.
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
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...
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
bool NeedFragmentation(Ptr< const WifiMacQueueItem > mpdu)
WifiMode m_defaultTxMcs
The default transmission modulation-coding scheme (MCS)
ProtectionMode m_htProtectionMode
Protection mode for HT stations when non-HT stations are detected.
std::vector< WifiRemoteStationState * > StationStates
A vector of WifiRemoteStationStates.
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.
WifiMode GetDefaultMcs(void) const
Return the default Modulation and Coding Scheme (MCS) index.
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)
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the 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.
uint32_t DoGetFragmentationThreshold(void) const
Return the current fragmentation threshold.
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.
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
uint8_t GetNBasicMcs(void) const
Return the number of basic MCS index.
virtual void DoReportDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
bool NeedRts(const WifiMacHeader &header, uint32_t size)
virtual void DoDispose(void)
Destructor implementation.
Ptr< WifiPhy > GetPhy(void) const
Return the WifiPhy.
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.
uint32_t GetFragmentSize(Ptr< const WifiMacQueueItem > mpdu, uint32_t fragmentNumber)
void(* PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress)
TracedCallback signature for power change events.
uint8_t GetNBasicModes(void) const
Return the number of basic modes we support.
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...
WifiMode GetNonErpBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes that is not an ERP mode.
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.
uint32_t GetFragmentOffset(Ptr< const WifiMacQueueItem > mpdu, uint32_t fragmentNumber)
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
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...
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
void RemoveAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to delete all of the supported MCS by a destination.
WifiModeList m_bssBasicMcsSet
basic MCS set
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)=0
TracedCallback< Mac48Address > m_macTxFinalRtsFailed
The trace source fired when the transmission of a RTS has exceeded the maximum number of attempts.
void ReportDataFailed(Ptr< const WifiMacQueueItem > mpdu)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
bool m_shortPreambleEnabled
flag if short PHY preamble is enabled
virtual WifiRemoteStation * DoCreateStation(void) const =0
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
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 GetNonUnicastMode(void) const
Return a mode for non-unicast packets.
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.
WifiTxVector GetDataTxVector(const WifiMacHeader &header)
void ReportRxOk(Mac48Address address, RxSignalInfo rxSignalInfo, WifiTxVector txVector)
WifiRemoteStationState * LookupState(Mac48Address address) const
Return the state of the station associated with the given address.
uint8_t m_defaultTxPowerLevel
Default transmission power level.
bool GetErpOfdmSupported(const Mac48Address &address) const
Return whether the station supports ERP OFDM or not.
WifiMode m_nonUnicastMode
Transmission mode for non-unicast Data frames.
void SetUseNonHtProtection(bool enable)
Enable or disable protection for non-HT stations.
void ReportDataOk(Ptr< const WifiMacQueueItem > 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.
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.
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...
std::vector< WifiRemoteStation * > Stations
A vector of WifiRemoteStations.
bool GetDsssSupported(const Mac48Address &address) const
Return whether the station supports DSSS or not.
double GetMostRecentRssi(Mac48Address address) const
void SetQosSupport(Mac48Address from, bool qosSupported)
Records QoS support of the remote station.
uint32_t GetNFragments(Ptr< const WifiMacQueueItem > mpdu)
Return the number of fragments needed for the given packet.
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.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
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.
uint32_t GetNNonErpBasicModes(void) const
Return the number of non-ERP basic modes we support.
Ptr< WifiMac > m_wifiMac
This is a pointer to the WifiMac associated with this WifiRemoteStationManager that is set on call to...
uint32_t GetFragmentationThreshold(void) const
Return the fragmentation threshold.
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
void AddStationHeCapabilities(Mac48Address from, HeCapabilities heCapabilities)
Records HE capabilities of the remote station.
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...
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
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PHY preambles.
void ReportFinalRtsFailed(const WifiMacHeader &header)
Should be invoked after calling ReportRtsFailed if NeedRetransmission returns false.
StationStates m_states
States of known stations.
bool NeedCtsToSelf(WifiTxVector txVector)
Return if we need to do CTS-to-self before sending a DATA.
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.
static TypeId GetTypeId(void)
Get the type ID.
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.
void ReportFinalDataFailed(Ptr< const WifiMacQueueItem > mpdu)
Should be invoked after calling ReportDataFailed if NeedRetransmission returns false.
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...
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.
Mac48Address GetAddress(const WifiRemoteStation *station) const
Return the address of the station.
WifiTxVector GetCtsToSelfTxVector(void)
Since CTS-to-self parameters are not dependent on the station, it is implemented in wifi remote stati...
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
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
WifiMode GetMcsSupported(const WifiRemoteStation *station, uint8_t i) const
Return the WifiMode supported by the specified station at the specified index.
uint32_t GetNNonErpSupported(const WifiRemoteStation *station) const
Return the number of non-ERP modes supported by the given station.
uint16_t GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
uint32_t m_maxSlrc
Maximum STA long retry count (SLRC)
virtual void DoReportAmpduTxStatus(WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_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...
Ptr< const VhtCapabilities > GetStationVhtCapabilities(Mac48Address from)
Return the VHT capabilities sent by 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.
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.
ProtectionMode
ProtectionMode enumeration.
void Reset(void)
Reset the station, invoked in a STA upon dis-association or in an AP upon reboot.
bool GetUseNonHtProtection(void) const
Return whether the device supports protection of non-HT stations.
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 GetShortGuardIntervalSupported(void) const
Return whether the device has SGI support enabled.
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index.
WifiMode m_defaultTxMode
The default transmission mode.
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 AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
virtual bool DoNeedRetransmission(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
bool NeedRetransmission(Ptr< const WifiMacQueueItem > mpdu)
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
Ptr< WifiMac > GetMac(void) const
Return the WifiMac.
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...
bool IsLastFragment(Ptr< const WifiMacQueueItem > mpdu, uint32_t fragmentNumber)
uint16_t GetGuardInterval(void) const
Return the supported HE guard interval duration (in nanoseconds).
bool GetShortSlotTimeEnabled(void) const
Return whether the device uses short slot time.
WifiTxVector GetRtsTxVector(Mac48Address address)
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...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
address
Definition: first.py:44
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
mac
Definition: third.py:99
phy
Definition: third.py:93
RxSignalInfo structure containing info on the received signal.
Definition: phy-entity.h:67
hold per-remote-station state.
WifiRemoteStationState * m_state
Remote station state.
std::pair< double, Time > m_rssiAndUpdateTimePair
RSSI (in dBm) of the most recent packet received from the remote station along with update time.
A struct that holds information about each remote station.
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.
uint16_t m_channelWidth
Channel width (in MHz) supported by the remote station.
bool m_ofdmSupported
Flag if OFDM is supported by the remote 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
uint16_t m_guardInterval
HE Guard interval duration (in nanoseconds) supported by the remote station.
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
enum ns3::WifiRemoteStationState::@77 m_state
State of the station.
WifiRemoteStationInfo m_info
remote station info
Ptr< const HtCapabilities > m_htCapabilities
remote station HT capabilities
Ptr< const HeCapabilities > m_heCapabilities
remote station HE capabilities