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 TypeId
37 {
38  static TypeId tid = TypeId ("ns3::ConstantRateWifiManager")
40  .AddConstructor<ConstantRateWifiManager> ()
41  .AddAttribute ("DataMode", "The transmission mode to use for every data packet transmission",
42  StringValue ("OfdmRate6Mbps"),
43  MakeWifiModeAccessor (&ConstantRateWifiManager::m_dataMode),
44  MakeWifiModeChecker ())
45  .AddAttribute ("ControlMode", "The transmission mode to use for every control packet transmission.",
46  StringValue ("OfdmRate6Mbps"),
47  MakeWifiModeAccessor (&ConstantRateWifiManager::m_ctlMode),
48  MakeWifiModeChecker ())
49  ;
50  return tid;
51 }
52 
54 {
55  NS_LOG_FUNCTION (this);
56 }
58 {
59  NS_LOG_FUNCTION (this);
60 }
61 
62 
65 {
66  NS_LOG_FUNCTION (this);
67  WifiRemoteStation *station = new WifiRemoteStation ();
68  return station;
69 }
70 
71 
72 void
74  double rxSnr, WifiMode txMode)
75 {
76  NS_LOG_FUNCTION (this << station << rxSnr << txMode);
77 }
78 void
80 {
81  NS_LOG_FUNCTION (this << station);
82 }
83 void
85 {
86  NS_LOG_FUNCTION (this << station);
87 }
88 void
90  double ctsSnr, WifiMode ctsMode, double rtsSnr)
91 {
92  NS_LOG_FUNCTION (this << st << ctsSnr << ctsMode << rtsSnr);
93 }
94 void
96  double ackSnr, WifiMode ackMode, double dataSnr)
97 {
98  NS_LOG_FUNCTION (this << st << ackSnr << ackMode << dataSnr);
99 }
100 void
102 {
103  NS_LOG_FUNCTION (this << station);
104 }
105 void
107 {
108  NS_LOG_FUNCTION (this << station);
109 }
110 
113 {
114  NS_LOG_FUNCTION (this << st << size);
116 }
119 {
120  NS_LOG_FUNCTION (this << st);
122 }
123 
124 bool
126 {
127  NS_LOG_FUNCTION (this);
128  return true;
129 }
130 
131 } // namespace ns3
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:311
hold variables of type string
Definition: string.h:19
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
virtual void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)
bool GetStbc(const WifiRemoteStation *station) const
virtual void DoReportRtsFailed(WifiRemoteStation *station)
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
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)
hold a list of per-remote-station state.
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)
NS_LOG_COMPONENT_DEFINE("ConstantRateWifiManager")
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)
bool GetShortGuardInterval(const WifiRemoteStation *station) const
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
uint32_t GetShortRetryCount(const WifiRemoteStation *station) const
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
virtual void DoReportDataFailed(WifiRemoteStation *station)
hold per-remote-station state.