A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
constant-rate-wifi-manager.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2004,2005 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 
22 
23 #include "ns3/string.h"
24 #include "ns3/assert.h"
25 #include "ns3/log.h"
26 
27 NS_LOG_COMPONENT_DEFINE ("ConstantRateWifiManager");
28 
29 #define Min(a,b) ((a < b) ? a : b)
30 
31 namespace ns3 {
32 
33 NS_OBJECT_ENSURE_REGISTERED (ConstantRateWifiManager)
34  ;
35 
36 TypeId
38 {
39  static TypeId tid = TypeId ("ns3::ConstantRateWifiManager")
41  .AddConstructor<ConstantRateWifiManager> ()
42  .AddAttribute ("DataMode", "The transmission mode to use for every data packet transmission",
43  StringValue ("OfdmRate6Mbps"),
44  MakeWifiModeAccessor (&ConstantRateWifiManager::m_dataMode),
45  MakeWifiModeChecker ())
46  .AddAttribute ("ControlMode", "The transmission mode to use for every control packet transmission.",
47  StringValue ("OfdmRate6Mbps"),
48  MakeWifiModeAccessor (&ConstantRateWifiManager::m_ctlMode),
49  MakeWifiModeChecker ())
50  ;
51  return tid;
52 }
53 
55 {
56  NS_LOG_FUNCTION (this);
57 }
59 {
60  NS_LOG_FUNCTION (this);
61 }
62 
63 
66 {
67  NS_LOG_FUNCTION (this);
68  WifiRemoteStation *station = new WifiRemoteStation ();
69  return station;
70 }
71 
72 
73 void
75  double rxSnr, WifiMode txMode)
76 {
77  NS_LOG_FUNCTION (this << station << rxSnr << txMode);
78 }
79 void
81 {
82  NS_LOG_FUNCTION (this << station);
83 }
84 void
86 {
87  NS_LOG_FUNCTION (this << station);
88 }
89 void
91  double ctsSnr, WifiMode ctsMode, double rtsSnr)
92 {
93  NS_LOG_FUNCTION (this << st << ctsSnr << ctsMode << rtsSnr);
94 }
95 void
97  double ackSnr, WifiMode ackMode, double dataSnr)
98 {
99  NS_LOG_FUNCTION (this << st << ackSnr << ackMode << dataSnr);
100 }
101 void
103 {
104  NS_LOG_FUNCTION (this << station);
105 }
106 void
108 {
109  NS_LOG_FUNCTION (this << station);
110 }
111 
114 {
115  NS_LOG_FUNCTION (this << st << size);
117 }
120 {
121  NS_LOG_FUNCTION (this << st);
123 }
124 
125 bool
127 {
128  NS_LOG_FUNCTION (this);
129  return true;
130 }
131 
132 } // namespace ns3
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:345
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
hold variables of type string
Definition: string.h:19
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
virtual WifiRemoteStation * DoCreateStation(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:91
uint32_t GetNumberOfReceiveAntennas(const WifiRemoteStation *station) const
Return the number of receive antenna the station has.
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.
bool GetStbc(const WifiRemoteStation *station) const
Return whether the given station supports space-time block coding (STBC).
virtual void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
virtual bool IsLowLatency(void) const
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Definition: int64x64.h:90
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
hold a list of per-remote-station state.
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)
NS_LOG_COMPONENT_DEFINE("ConstantRateWifiManager")
WifiMode m_ctlMode
Wifi mode for request control frames.
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.
bool GetShortGuardInterval(const WifiRemoteStation *station) const
Return whether the given station supports short guard interval.
WifiMode m_dataMode
Wifi mode for unicast DATA frames.
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
Return the long retry limit of the given station.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
uint32_t GetShortRetryCount(const WifiRemoteStation *station) const
Return the short retry limit of the given station.
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611
virtual void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
hold per-remote-station state.