A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef IDEAL_WIFI_MANAGER_H
21 #define IDEAL_WIFI_MANAGER_H
22 
23 #include <stdint.h>
24 #include <vector>
25 #include "wifi-mode.h"
27 
28 namespace ns3 {
29 
46 {
47 public:
48  static TypeId GetTypeId (void);
50  virtual ~IdealWifiManager ();
51 
52  virtual void SetupPhy (Ptr<WifiPhy> phy);
53 
54 private:
55  // overriden from base class
56  virtual WifiRemoteStation* DoCreateStation (void) const;
57  virtual void DoReportRxOk (WifiRemoteStation *station,
58  double rxSnr, WifiMode txMode);
59  virtual void DoReportRtsFailed (WifiRemoteStation *station);
60  virtual void DoReportDataFailed (WifiRemoteStation *station);
61  virtual void DoReportRtsOk (WifiRemoteStation *station,
62  double ctsSnr, WifiMode ctsMode, double rtsSnr);
63  virtual void DoReportDataOk (WifiRemoteStation *station,
64  double ackSnr, WifiMode ackMode, double dataSnr);
65  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station);
66  virtual void DoReportFinalDataFailed (WifiRemoteStation *station);
67  virtual WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint32_t size);
69  virtual bool IsLowLatency (void) const;
70 
78  double GetSnrThreshold (WifiMode mode) const;
86  void AddModeSnrThreshold (WifiMode mode, double snr);
87 
91  typedef std::vector<std::pair<double,WifiMode> > Thresholds;
92 
93  double m_ber;
95 };
96 
97 } // namespace ns3
98 
99 #endif /* IDEAL_WIFI_MANAGER_H */
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
virtual bool IsLowLatency(void) const
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
double GetSnrThreshold(WifiMode mode) const
Return the minimum SNR needed to successfully transmit data with this mode at the specified BER...
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...
virtual 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.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:91
virtual 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)
double m_ber
The maximum Bit Error Rate acceptable at any transmission mode.
Thresholds m_thresholds
List of WifiMode and the minimum SNR pair.
hold a list of per-remote-station state.
virtual 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.
virtual WifiRemoteStation * DoCreateStation(void) const
std::vector< std::pair< double, WifiMode > > Thresholds
A vector of pair that holds the minimum SNR for different mode.
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
Ideal rate control algorithmThis class implements an 'ideal' rate control algorithm similar to RBAR i...
virtual void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
void AddModeSnrThreshold(WifiMode mode, double snr)
Adds a pair of WifiMode and the minimum SNR for that given mode to the list.
a unique identifier for an interface.
Definition: type-id.h:49
virtual void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
hold per-remote-station state.