A Discrete-Event Network Simulator
API
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 #include "ns3/string.h"
23 #include "ns3/assert.h"
24 #include "ns3/log.h"
25 
26 #define Min(a,b) ((a < b) ? a : b)
27 
28 namespace ns3 {
29 
30 NS_LOG_COMPONENT_DEFINE ("ConstantRateWifiManager");
31 
32 NS_OBJECT_ENSURE_REGISTERED (ConstantRateWifiManager);
33 
34 TypeId
36 {
37  static TypeId tid = TypeId ("ns3::ConstantRateWifiManager")
39  .SetGroupName ("Wifi")
40  .AddConstructor<ConstantRateWifiManager> ()
41  .AddAttribute ("DataMode", "The transmission mode to use for every data packet transmission",
42  StringValue ("OfdmRate6Mbps"),
45  .AddAttribute ("ControlMode", "The transmission mode to use for every RTS packet transmission.",
46  StringValue ("OfdmRate6Mbps"),
49  ;
50  return tid;
51 }
52 
54 {
55  NS_LOG_FUNCTION (this);
56 }
57 
59 {
60  NS_LOG_FUNCTION (this);
61 }
62 
65 {
66  NS_LOG_FUNCTION (this);
67  WifiRemoteStation *station = new WifiRemoteStation ();
68  return station;
69 }
70 
71 void
73  double rxSnr, WifiMode txMode)
74 {
75  NS_LOG_FUNCTION (this << station << rxSnr << txMode);
76 }
77 
78 void
80 {
81  NS_LOG_FUNCTION (this << station);
82 }
83 
84 void
86 {
87  NS_LOG_FUNCTION (this << station);
88 }
89 
90 void
92  double ctsSnr, WifiMode ctsMode, double rtsSnr)
93 {
94  NS_LOG_FUNCTION (this << st << ctsSnr << ctsMode << rtsSnr);
95 }
96 
97 void
99  double ackSnr, WifiMode ackMode, double dataSnr)
100 {
101  NS_LOG_FUNCTION (this << st << ackSnr << ackMode << dataSnr);
102 }
103 
104 void
106 {
107  NS_LOG_FUNCTION (this << station);
108 }
109 
110 void
112 {
113  NS_LOG_FUNCTION (this << station);
114 }
115 
118 {
119  NS_LOG_FUNCTION (this << st);
121 }
122 
125 {
126  NS_LOG_FUNCTION (this << st);
128 }
129 
130 bool
132 {
133  NS_LOG_FUNCTION (this);
134  return true;
135 }
136 
137 } //namespace ns3
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
Hold variables of type string.
Definition: string.h:41
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
use constant rates for data and RTS transmissions
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:99
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
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.
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
Definition: int64x64.h:197
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
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.
WifiMode m_ctlMode
Wifi mode for RTS frames.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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.
Ptr< const AttributeAccessor > MakeWifiModeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: wifi-mode.h:226
bool GetShortGuardInterval(const WifiRemoteStation *station) const
Return whether the given station supports short guard interval.
WifiMode m_dataMode
Wifi mode for unicast DATA frames.
uint8_t GetNumberOfSupportedRxAntennas(const WifiRemoteStation *station) const
Return the number of receive antennas the station has.
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
Return the long retry limit of the given station.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
uint32_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
uint32_t GetShortRetryCount(const WifiRemoteStation *station) const
Return the short retry limit of the given station.
Ptr< const AttributeChecker > MakeWifiModeChecker(void)
Definition: wifi-mode.cc:536
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:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:904
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.