A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ideal-wifi-manager.h
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"
26 #include "wifi-remote-station-manager.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 WifiMode DoGetDataMode (WifiRemoteStation *station, uint32_t size);
68  virtual WifiMode DoGetRtsMode (WifiRemoteStation *station);
69  virtual bool IsLowLatency (void) const;
70 
71  // return the min snr needed to successfully transmit
72  // data with this mode at the specified ber.
73  double GetSnrThreshold (WifiMode mode) const;
74  void AddModeSnrThreshold (WifiMode mode, double ber);
75 
76  typedef std::vector<std::pair<double,WifiMode> > Thresholds;
77 
78  double m_ber;
79  Thresholds m_thresholds;
80  double m_minSnr;
81  double m_maxSnr;
82 };
83 
84 } // namespace ns3
85 
86 #endif /* IDEAL_WIFI_MANAGER_H */
virtual bool IsLowLatency(void) const
virtual WifiMode DoGetRtsMode(WifiRemoteStation *station)
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:88
virtual WifiMode DoGetDataMode(WifiRemoteStation *station, uint32_t size)
hold a list of per-remote-station state.
virtual WifiRemoteStation * DoCreateStation(void) const
Ideal rate control algorithmThis class implements an 'ideal' rate control algorithm similar to RBAR i...
a unique identifier for an interface.
Definition: type-id.h:44
hold per-remote-station state.