A Discrete-Event Network Simulator
API
ideal-wifi-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2006 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 IDEAL_WIFI_MANAGER_H
22 #define IDEAL_WIFI_MANAGER_H
23 
24 #include "ns3/traced-value.h"
26 
27 namespace ns3 {
28 
45 {
46 public:
51  static TypeId GetTypeId (void);
53  virtual ~IdealWifiManager ();
54 
55  void SetupPhy (const Ptr<WifiPhy> phy);
56 
57 
58 private:
59  //overridden from base class
60  void DoInitialize (void);
61  WifiRemoteStation* DoCreateStation (void) const;
62  void DoReportRxOk (WifiRemoteStation *station,
63  double rxSnr, WifiMode txMode);
64  void DoReportRtsFailed (WifiRemoteStation *station);
65  void DoReportDataFailed (WifiRemoteStation *station);
66  void DoReportRtsOk (WifiRemoteStation *station,
67  double ctsSnr, WifiMode ctsMode, double rtsSnr);
68  void DoReportDataOk (WifiRemoteStation *station,
69  double ackSnr, WifiMode ackMode, double dataSnr);
71  uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
72  double rxSnr, double dataSnr);
77  bool IsLowLatency (void) const;
78 
87  double GetSnrThreshold (WifiTxVector txVector) const;
95  void AddSnrThreshold (WifiTxVector txVector, double snr);
96 
102  uint16_t GetChannelWidthForMode (WifiMode mode) const;
103 
108  typedef std::vector<std::pair<double, WifiTxVector> > Thresholds;
109 
110  double m_ber;
112 
114 };
115 
116 } //namespace ns3
117 
118 #endif /* IDEAL_WIFI_MANAGER_H */
void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
std::vector< std::pair< double, WifiTxVector > > Thresholds
A vector of <snr, WifiTxVector> pair holding the minimum SNR for the WifiTxVector.
void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
void DoInitialize(void)
Initialize() implementation.
phy
Definition: third.py:86
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId(void)
Get the type ID.
double m_ber
The maximum Bit Error Rate acceptable at any transmission mode.
void DoReportAmpduTxStatus(WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
Thresholds m_thresholds
List of WifiTxVector and the minimum SNR pair.
hold a list of per-remote-station state.
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)
This method is a pure virtual method that must be implemented by the sub-class.
TracedValue< uint64_t > m_currentRate
Trace rate changes.
uint16_t GetChannelWidthForMode(WifiMode mode) const
Convenience function for selecting a channel width for legacy mode.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiRemoteStation * DoCreateStation(void) const
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
bool IsLowLatency(void) const
Ideal rate control algorithmThis class implements an &#39;ideal&#39; rate control algorithm similar to RBAR i...
void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
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...
double GetSnrThreshold(WifiTxVector txVector) const
Return the minimum SNR needed to successfully transmit data with this WifiTxVector at the specified B...
a unique identifier for an interface.
Definition: type-id.h:58
void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
hold per-remote-station state.
void AddSnrThreshold(WifiTxVector txVector, double snr)
Adds a pair of WifiTxVector and the minimum SNR for that given vector to the list.