A Discrete-Event Network Simulator
API
aparf-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) 2014 Universidad de la República - Uruguay
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: Matias Richart <mrichart@fing.edu.uy>
19  */
20 
21 #ifndef APARF_WIFI_MANAGER_H
22 #define APARF_WIFI_MANAGER_H
23 
25 
26 namespace ns3 {
27 
28 struct AparfWifiRemoteStation;
29 
46 {
47 public:
52  static TypeId GetTypeId (void);
54  virtual ~AparfWifiManager ();
55 
56  // Inherited from WifiRemoteStationManager
57  void SetupPhy (const Ptr<WifiPhy> phy);
58 
62  enum State
63  {
65  Low,
67  };
68 
69 
70 private:
71  // Overridden from base class.
72  void DoInitialize (void);
73  WifiRemoteStation * DoCreateStation (void) const;
74  void DoReportRxOk (WifiRemoteStation *station,
75  double rxSnr, WifiMode txMode);
76  void DoReportRtsFailed (WifiRemoteStation *station);
77  void DoReportDataFailed (WifiRemoteStation *station);
78  void DoReportRtsOk (WifiRemoteStation *station,
79  double ctsSnr, WifiMode ctsMode, double rtsSnr);
80  void DoReportDataOk (WifiRemoteStation *station,
81  double ackSnr, WifiMode ackMode, double dataSnr);
86  bool IsLowLatency (void) const;
87 
92  void CheckInit (AparfWifiRemoteStation *station);
93 
94  uint32_t m_succesMax1;
95  uint32_t m_succesMax2;
96  uint32_t m_failMax;
97  uint32_t m_powerMax;
98  uint8_t m_powerInc;
99  uint8_t m_powerDec;
100  uint8_t m_rateInc;
101  uint8_t m_rateDec;
102 
108  uint8_t m_minPower;
109 
113  uint8_t m_maxPower;
114 
123 };
124 
125 } //namespace ns3
126 
127 #endif /* APARF_WIFI_MANAGER_H */
uint32_t m_succesMax2
The minimum number of successful transmissions in "Low" state to try a new power or rate...
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
uint8_t m_powerDec
Step size for decrement the power.
uint8_t m_rateInc
Step size for increment the rate.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
APARF Power and rate control algorithm.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId(void)
Register this type.
Forward calls to a chain of Callback.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
State
Enumeration of the possible states of the channel.
WifiRemoteStation * DoCreateStation(void) const
phy
Definition: third.py:86
uint8_t m_maxPower
Maximal power level.
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.
uint8_t m_powerInc
Step size for increment the power.
TracedCallback< double, double, Mac48Address > m_powerChange
The trace source fired when the transmission power changes.
void CheckInit(AparfWifiRemoteStation *station)
Check for initializations.
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.
hold a list of per-remote-station state.
uint8_t m_rateDec
Step size for decrement the rate.
void DoInitialize(void)
Initialize() implementation.
void SetupPhy(const Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold per-remote-station state for APARF Wifi manager.
uint32_t m_failMax
The minimum number of failed transmissions to try a new power or rate.
void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
TracedCallback< DataRate, DataRate, Mac48Address > m_rateChange
The trace source fired when the transmission rate changes.
void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_succesMax1
The minimum number of successful transmissions in "High" state to try a new power or rate...
uint32_t m_powerMax
The maximum number of power changes.
bool IsLowLatency(void) const
uint8_t m_minPower
Minimal power level.
a unique identifier for an interface.
Definition: type-id.h:58
hold per-remote-station state.