A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef WIFI_REMOTE_STATION_MANAGER_H
21 #define WIFI_REMOTE_STATION_MANAGER_H
22 
23 #include <vector>
24 #include <utility>
25 #include "ns3/mac48-address.h"
26 #include "ns3/traced-callback.h"
27 #include "ns3/packet.h"
28 #include "ns3/object.h"
29 #include "ns3/nstime.h"
30 #include "wifi-mode.h"
31 #include "wifi-tx-vector.h"
32 #include "ht-capabilities.h"
33 
34 namespace ns3 {
35 
36 struct WifiRemoteStation;
37 struct WifiRemoteStationState;
38 class WifiPhy;
39 class WifiMacHeader;
40 
48 {
49 public:
57  void NotifyTxSuccess (uint32_t retryCounter);
59  void NotifyTxFailed ();
61  double GetFrameErrorRate () const;
62 private:
76  double m_failAvg;
77 };
78 
86 {
87 public:
88  static TypeId GetTypeId (void);
89 
91  virtual ~WifiRemoteStationManager ();
92 
99  virtual void SetupPhy (Ptr<WifiPhy> phy);
100 
106  uint32_t GetMaxSsrc (void) const;
112  uint32_t GetMaxSlrc (void) const;
118  uint32_t GetRtsCtsThreshold (void) const;
124  uint32_t GetFragmentationThreshold (void) const;
130  void SetMaxSsrc (uint32_t maxSsrc);
136  void SetMaxSlrc (uint32_t maxSlrc);
142  void SetRtsCtsThreshold (uint32_t threshold);
149  void SetFragmentationThreshold (uint32_t threshold);
156  void AddStationHtCapabilities (Mac48Address from, HtCapabilities htcapabilities);
162  void SetHtSupported (bool enable);
168  bool HasHtSupported (void) const;
169 
173  void Reset (void);
181  void AddBasicMode (WifiMode mode);
182 
188  WifiMode GetDefaultMode (void) const;
194  uint32_t GetNBasicModes (void) const;
201  WifiMode GetBasicMode (uint32_t i) const;
216  void AddBasicMcs (uint8_t mcs);
217 
223  uint8_t GetDefaultMcs (void) const;
229  uint32_t GetNBasicMcs (void) const;
236  uint8_t GetBasicMcs (uint32_t i) const;
243  void AddSupportedMcs (Mac48Address address, uint8_t mcs);
244 
250  WifiMode GetNonUnicastMode (void) const;
251 
252 
259  void Reset (Mac48Address address);
270  void AddSupportedMode (Mac48Address address, WifiMode mode);
271  //void AddBssMembershipParameters(Mac48Address address, uint32_t selector);
272 
280  bool IsBrandNew (Mac48Address address) const;
288  bool IsAssociated (Mac48Address address) const;
297  bool IsWaitAssocTxOk (Mac48Address address) const;
304  void RecordWaitAssocTxOk (Mac48Address address);
311  void RecordGotAssocTxOk (Mac48Address address);
318  void RecordGotAssocTxFailed (Mac48Address address);
324  void RecordDisassociated (Mac48Address address);
325 
337  void PrepareForQueue (Mac48Address address, const WifiMacHeader *header,
338  Ptr<const Packet> packet, uint32_t fullPacketSize);
339 
347  WifiTxVector GetDataTxVector (Mac48Address address, const WifiMacHeader *header,
348  Ptr<const Packet> packet, uint32_t fullPacketSize);
357  WifiTxVector GetRtsTxVector (Mac48Address address, const WifiMacHeader *header,
358  Ptr<const Packet> packet);
359 
368  Ptr<const Packet> packet);
369 
378 
379 
387  void ReportRtsFailed (Mac48Address address, const WifiMacHeader *header);
395  void ReportDataFailed (Mac48Address address, const WifiMacHeader *header);
407  void ReportRtsOk (Mac48Address address, const WifiMacHeader *header,
408  double ctsSnr, WifiMode ctsMode, double rtsSnr);
419  void ReportDataOk (Mac48Address address, const WifiMacHeader *header,
420  double ackSnr, WifiMode ackMode, double dataSnr);
428  void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header);
436  void ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header);
437 
446  void ReportRxOk (Mac48Address address, const WifiMacHeader *header,
447  double rxSnr, WifiMode txMode);
448 
456  bool NeedRts (Mac48Address address, const WifiMacHeader *header,
457  Ptr<const Packet> packet);
464  bool NeedCtsToSelf (WifiTxVector txVector);
465 
473  bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header,
474  Ptr<const Packet> packet);
482  bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header,
483  Ptr<const Packet> packet);
484 
491  bool NeedFragmentation (Mac48Address address, const WifiMacHeader *header,
492  Ptr<const Packet> packet);
500  uint32_t GetFragmentSize (Mac48Address address, const WifiMacHeader *header,
501  Ptr<const Packet> packet, uint32_t fragmentNumber);
509  uint32_t GetFragmentOffset (Mac48Address address, const WifiMacHeader *header,
510  Ptr<const Packet> packet, uint32_t fragmentNumber);
518  bool IsLastFragment (Mac48Address address, const WifiMacHeader *header,
519  Ptr<const Packet> packet, uint32_t fragmentNumber);
520 
534  WifiTxVector GetAckTxVector (Mac48Address address, WifiMode dataMode);
545  uint8_t GetDefaultTxPowerLevel (void) const;
556  void SetDefaultTxPowerLevel (uint8_t txPower);
560  uint32_t GetNumberOfTransmitAntennas (void);
561 
562  protected:
563  virtual void DoDispose (void);
571  WifiMode GetSupported (const WifiRemoteStation *station, uint32_t i) const;
578  uint32_t GetNSupported (const WifiRemoteStation *station) const;
586  uint8_t GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const;
593  uint32_t GetNMcsSupported (const WifiRemoteStation *station) const;
594 
602  bool GetShortGuardInterval (const WifiRemoteStation *station) const;
609  bool GetStbc (const WifiRemoteStation *station) const;
617  bool GetGreenfield (const WifiRemoteStation *station) const;
624  uint32_t GetNumberOfReceiveAntennas (const WifiRemoteStation *station) const;
631  uint32_t GetNumberOfTransmitAntennas (const WifiRemoteStation *station) const;
638  uint32_t GetLongRetryCount (const WifiRemoteStation *station) const;
645  uint32_t GetShortRetryCount (const WifiRemoteStation *station) const;
646 private:
657  virtual bool DoNeedRts (WifiRemoteStation *station,
658  Ptr<const Packet> packet, bool normally);
670  virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station,
671  Ptr<const Packet> packet, bool normally);
683  virtual bool DoNeedDataRetransmission (WifiRemoteStation *station,
684  Ptr<const Packet> packet, bool normally);
685 
695  virtual bool DoNeedFragmentation (WifiRemoteStation *station,
696  Ptr<const Packet> packet, bool normally);
704  virtual bool IsLowLatency (void) const = 0;
708  virtual WifiRemoteStation* DoCreateStation (void) const = 0;
718  uint32_t size) = 0;
726  virtual WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) = 0;
727 
728 
735  virtual uint8_t DoGetCtsTxPowerLevel (Mac48Address address, WifiMode ctsMode);
736 
743  virtual uint8_t DoGetAckTxPowerLevel (Mac48Address address, WifiMode ackMode);
744 
751  virtual uint8_t DoGetBlockAckTxPowerLevel (Mac48Address address, WifiMode blockAckMode);
752 
753  virtual bool DoGetCtsTxGuardInterval (Mac48Address address, WifiMode ctsMode);
754 
755  virtual uint8_t DoGetCtsTxNss(Mac48Address address, WifiMode ctsMode);
756  virtual uint8_t DoGetCtsTxNess(Mac48Address address, WifiMode ctsMode);
757  virtual bool DoGetCtsTxStbc(Mac48Address address, WifiMode ctsMode);
758  virtual bool DoGetAckTxGuardInterval(Mac48Address address, WifiMode ackMode);
759  virtual uint8_t DoGetAckTxNss(Mac48Address address, WifiMode ackMode);
760  virtual uint8_t DoGetAckTxNess(Mac48Address address, WifiMode ackMode);
761  virtual bool DoGetAckTxStbc(Mac48Address address, WifiMode ackMode);
762  virtual bool DoGetBlockAckTxGuardInterval(Mac48Address address, WifiMode blockAckMode);
763  virtual uint8_t DoGetBlockAckTxNss(Mac48Address address, WifiMode blockAckMode);
764  virtual uint8_t DoGetBlockAckTxNess(Mac48Address address, WifiMode blockAckMode);
765  virtual bool DoGetBlockAckTxStbc(Mac48Address address, WifiMode blockAckMode);
766 
773  virtual void DoReportRtsFailed (WifiRemoteStation *station) = 0;
780  virtual void DoReportDataFailed (WifiRemoteStation *station) = 0;
790  virtual void DoReportRtsOk (WifiRemoteStation *station,
791  double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0;
801  virtual void DoReportDataOk (WifiRemoteStation *station,
802  double ackSnr, WifiMode ackMode, double dataSnr) = 0;
809  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station) = 0;
816  virtual void DoReportFinalDataFailed (WifiRemoteStation *station) = 0;
825  virtual void DoReportRxOk (WifiRemoteStation *station,
826  double rxSnr, WifiMode txMode) = 0;
827 
842  WifiRemoteStation* Lookup (Mac48Address address, uint8_t tid) const;
844 
852  WifiRemoteStation* Lookup (Mac48Address address, const WifiMacHeader *header) const;
854 
861  void DoSetFragmentationThreshold (uint32_t threshold);
867  uint32_t DoGetFragmentationThreshold (void) const;
875  uint32_t GetNFragments (const WifiMacHeader *header, Ptr<const Packet> packet);
876 
880  typedef std::vector <WifiRemoteStation *> Stations;
884  typedef std::vector <WifiRemoteStationState *> StationStates;
885 
888 
898  uint8_t m_defaultTxMcs;
899 
910 
912  uint32_t m_maxSsrc;
913  uint32_t m_maxSlrc;
914  uint32_t m_rtsCtsThreshold;
918 
937 
938 };
939 
944 {
948  enum
949  {
954  } m_state;
955 
970  uint32_t m_rx;
971  uint32_t m_tx;
972  bool m_stbc;
974 
975 };
976 
986 {
988  uint32_t m_ssrc;
989  uint32_t m_slrc;
990  uint8_t m_tid;
991 };
992 
993 
994 } // namespace ns3
995 
996 #endif /* WIFI_REMOTE_STATION_MANAGER_H */
virtual uint8_t DoGetAckTxNss(Mac48Address address, WifiMode ackMode)
uint32_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given station.
uint32_t m_ssrc
STA short retry count.
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
virtual uint8_t DoGetAckTxNess(Mac48Address address, WifiMode ackMode)
uint32_t GetNFragments(const WifiMacHeader *header, Ptr< const Packet > packet)
Return the number of fragments needed for the given packet.
void SetDefaultTxPowerLevel(uint8_t txPower)
Set the default transmission power level.
std::vector< WifiRemoteStationState * > StationStates
A vector of WifiRemoteStationStates.
bool GetGreenfieldSupported(Mac48Address address) const
Return whether the station supports Greenfield or not.
bool m_shortGuardInterval
Flag if short guard interval is supported by the remote station.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
uint32_t m_rtsCtsThreshold
Threshold for RTS/CTS.
bool NeedDataRetransmission(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
uint8_t GetDefaultMcs(void) const
Return the default Modulation and Coding Scheme (MCS) index.
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.
WifiMode m_nonUnicastMode
Transmission mode for non-unicast DATA frames.
void ReportDataFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
virtual uint8_t DoGetBlockAckTxNss(Mac48Address address, WifiMode blockAckMode)
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
uint32_t GetMaxSsrc(void) const
Return the maximum STA short retry count (SSRC).
virtual bool DoGetAckTxGuardInterval(Mac48Address address, WifiMode ackMode)
WifiTxVector GetCtsTxVector(Mac48Address address, WifiMode rtsMode)
virtual uint8_t DoGetBlockAckTxNess(Mac48Address address, WifiMode blockAckMode)
enum ns3::WifiRemoteStationState::@90 m_state
State of the station.
WifiMode GetNonUnicastMode(void) const
Return a mode for non-unicast packets.
uint32_t m_fragmentationThreshold
Threshold for fragmentation.
The Ht Capabilities Information ElementThis class knows how to serialise and deserialise the Ht Capab...
uint8_t m_defaultTxPowerLevel
Default tranmission power level.
uint8_t GetMcsSupported(const WifiRemoteStation *station, uint32_t i) const
Return the MCS index supported by the specified station at the specified index.
bool GetGreenfield(const WifiRemoteStation *station) const
Return whether the station supports Greenfield or not.
Mac48Address m_address
Mac48Address of the remote station.
Time m_memoryTime
averaging coefficient depends on the memory time
bool IsLastFragment(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
TracedCallback< Mac48Address > m_macTxFinalRtsFailed
The trace source fired when the transmission of a RTS has exceeded the maximum number of attempts...
bool IsBrandNew(Mac48Address address) const
Return whether the station state is brand new.
virtual void SetupPhy(Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:91
virtual bool DoNeedRts(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
uint32_t GetNumberOfReceiveAntennas(const WifiRemoteStation *station) const
Return the number of receive antenna the station has.
Tid independent remote station statistics.
WifiMode GetSupported(const WifiRemoteStation *station, uint32_t i) const
Return whether mode associated with the specified station at the specified index. ...
WifiRemoteStationState * LookupState(Mac48Address address) const
Return the state of the station associated with the given address.
WifiRemoteStationState * m_state
Remote station state.
double m_failAvg
moving percentage of failed frames
WifiTxVector GetCtsToSelfTxVector(const WifiMacHeader *header, Ptr< const Packet > packet)
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
TracedCallback< Mac48Address > m_macTxFinalDataFailed
The trace source fired when the transmission of a data packet has exceeded the maximum number of atte...
bool GetStbc(const WifiRemoteStation *station) const
Return whether the given station supports space-time block coding (STBC).
virtual bool DoNeedDataRetransmission(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
virtual bool DoGetAckTxStbc(Mac48Address address, WifiMode ackMode)
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)=0
Time m_lastUpdate
when last update has occured
void ReportFinalDataFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked after calling ReportDataFailed if NeedDataRetransmission returns false...
void SetRtsCtsThreshold(uint32_t threshold)
Sets the RTS 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.
WifiRemoteStation * Lookup(Mac48Address address, uint8_t tid) const
Return the station associated with the given address and TID.
Ptr< WifiPhy > m_wifiPhy
This is a pointer to the WifiPhy associated with this WifiRemoteStationManager that is set on call to...
double CalculateAveragingCoefficient()
Calculate averaging coefficient for frame error rate.
virtual bool DoGetCtsTxGuardInterval(Mac48Address address, WifiMode ctsMode)
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.
virtual bool DoNeedRtsRetransmission(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
virtual void DoReportDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
bool m_stbc
Flag if STBC is used by the remote station.
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
WifiMode GetBasicMode(uint32_t i) const
Return a basic mode from the set of basic modes.
uint32_t GetFragmentationThreshold(void) const
Return the fragmentation threshold.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htcapabilities)
Records HT capabilities of the remote station.
WifiRemoteStationInfo GetInfo(Mac48Address address)
void SetMaxSsrc(uint32_t maxSsrc)
Sets the maximum STA short retry count (SSRC).
uint32_t GetRtsCtsThreshold(void) const
Return the RTS threshold.
uint32_t m_maxSlrc
Maximum STA long retry count (SLRC)
void NotifyTxSuccess(uint32_t retryCounter)
Updates average frame error rate when data or RTS was transmitted successfully.
uint32_t DoGetFragmentationThreshold(void) const
Return the current fragmentation threshold.
std::vector< uint8_t > WifiMcsList
A list of Wi-Fi Modulation and Coding Scheme (MCS).
Definition: wifi-mode.h:197
hold a list of per-remote-station state.
WifiMode GetControlAnswerMode(Mac48Address address, WifiMode reqMode)
uint32_t GetNBasicMcs(void) const
Return the number of basic MCS index.
uint32_t m_tx
Number of TX antennae of the remote station.
WifiMode m_defaultTxMode
The default transmission mode.
virtual uint8_t DoGetCtsTxNss(Mac48Address address, WifiMode ctsMode)
WifiModeList m_bssBasicRateSet
This member is the list of WifiMode objects that comprise the BSSBasicRateSet parameter.
void ReportDataOk(Mac48Address address, const WifiMacHeader *header, double ackSnr, WifiMode ackMode, double dataSnr)
Should be invoked whenever we receive the Ack associated to a data packet we just sent...
void SetHtSupported(bool enable)
Enable or disable HT capability support.
virtual uint8_t DoGetAckTxPowerLevel(Mac48Address address, WifiMode ackMode)
uint32_t GetFragmentOffset(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for an ACK for the association response we sent.
uint8_t m_defaultTxMcs
The default transmission modulation-coding scheme (MCS)
void PrepareForQueue(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fullPacketSize)
WifiTxVector DoGetCtsToSelfTxVector(void)
Since CTS-to-self parameters are not dependent on the station, it is implemented in wifiremote statio...
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...
bool m_htSupported
Flag if HT capability is supported.
an EUI-48 address
Definition: mac48-address.h:41
TracedCallback< Mac48Address > m_macTxRtsFailed
The trace source fired when the transmission of a single RTS has failed.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
virtual bool IsLowLatency(void) const =0
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:188
bool GetShortGuardInterval(const WifiRemoteStation *station) const
Return whether the given station supports short guard interval.
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.
uint32_t m_rx
Number of RX antennae of the remote station.
double GetFrameErrorRate() const
Return frame error rate (probability that frame is corrupted due to transmission error).
bool HasHtSupported(void) const
Return whether the device has HT capability support enabled.
virtual bool DoNeedFragmentation(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
void NotifyTxFailed()
Updates average frame error rate when final data or RTS has failed.
bool NeedCtsToSelf(WifiTxVector txVector)
Return if we need to do Cts-to-self before sending a DATA.
void SetMaxSlrc(uint32_t maxSlrc)
Sets the maximum STA long retry count (SLRC).
uint32_t GetNBasicModes(void) const
Return the number of basic modes we support.
A struct that holds information about each remote station.
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
Return the long retry limit of the given station.
void AddSupportedMcs(Mac48Address address, uint8_t mcs)
Record the MCS index supported by the station.
virtual bool DoGetCtsTxStbc(Mac48Address address, WifiMode ctsMode)
uint32_t GetNMcsSupported(const WifiRemoteStation *station) const
Return the number of MCS supported by the given station.
WifiMode GetDefaultMode(void) const
Return the default transmission mode.
uint8_t GetBasicMcs(uint32_t i) const
Return the MCS at the given list index.
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. ...
uint32_t m_maxSsrc
Maximum STA short retry count (SSRC)
virtual bool DoGetBlockAckTxGuardInterval(Mac48Address address, WifiMode blockAckMode)
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
WifiTxVector GetDataTxVector(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fullPacketSize)
void ReportRxOk(Mac48Address address, const WifiMacHeader *header, double rxSnr, WifiMode txMode)
bool NeedFragmentation(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
void AddBasicMcs(uint8_t mcs)
Add a given Modulation and Coding Scheme (MCS) index to the set of basic MCS.
virtual bool DoGetBlockAckTxStbc(Mac48Address address, WifiMode blockAckMode)
bool NeedRtsRetransmission(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
uint32_t GetShortRetryCount(const WifiRemoteStation *station) const
Return the short retry limit of the given station.
virtual uint8_t DoGetCtsTxNess(Mac48Address address, WifiMode ctsMode)
WifiTxVector GetRtsTxVector(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
a base class which provides memory management and object aggregation
Definition: object.h:63
tuple address
Definition: first.py:37
StationStates m_states
States of known stations.
bool NeedRts(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
WifiTxVector GetBlockAckTxVector(Mac48Address address, WifiMode dataMode)
virtual uint8_t DoGetCtsTxPowerLevel(Mac48Address address, WifiMode ctsMode)
uint32_t GetMaxSlrc(void) const
Return the maximum STA long retry count (SLRC).
uint32_t m_slrc
STA long retry count.
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)=0
a unique identifier for an interface.
Definition: type-id.h:49
void ReportFinalRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked after calling ReportRtsFailed if NeedRtsRetransmission returns false.
WifiTxVector GetAckTxVector(Mac48Address address, WifiMode dataMode)
bool m_greenfield
Flag if green field is used by the remote station.
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.
virtual uint8_t DoGetBlockAckTxPowerLevel(Mac48Address address, WifiMode blockAckMode)
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)=0
This method is a pure virtual method that must be implemented by the sub-class.
std::vector< WifiRemoteStation * > Stations
A vector of WifiRemoteStations.