A Discrete-Event Network Simulator
API
parf-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 PARF_WIFI_MANAGER_H
22 #define PARF_WIFI_MANAGER_H
23 
24 #include "ns3/wifi-remote-station-manager.h"
25 
26 namespace ns3 {
27 
28 struct ParfWifiRemoteStation;
44 {
45 public:
50  static TypeId GetTypeId (void);
51  ParfWifiManager ();
52  virtual ~ParfWifiManager ();
53 
54  void SetupPhy (const Ptr<WifiPhy> phy) override;
55 
56 
57 private:
58  void DoInitialize (void) override;
59  WifiRemoteStation * DoCreateStation (void) const override;
60  void DoReportRxOk (WifiRemoteStation *station,
61  double rxSnr, WifiMode txMode) override;
62  void DoReportRtsFailed (WifiRemoteStation *station) override;
63  void DoReportDataFailed (WifiRemoteStation *station) override;
64  void DoReportRtsOk (WifiRemoteStation *station,
65  double ctsSnr, WifiMode ctsMode, double rtsSnr) override;
66  void DoReportDataOk (WifiRemoteStation *station, double ackSnr, WifiMode ackMode,
67  double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
68  void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
69  void DoReportFinalDataFailed (WifiRemoteStation *station) override;
72 
77  void CheckInit (ParfWifiRemoteStation *station);
78 
79  uint32_t m_attemptThreshold;
80  uint32_t m_successThreshold;
81 
87  uint8_t m_minPower;
88 
92  uint8_t m_maxPower;
93 
102 };
103 
104 } //namespace ns3
105 
106 #endif /* PARF_WIFI_MANAGER_H */
PARF Rate control algorithm.
void DoInitialize(void) override
Initialize() implementation.
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_successThreshold
The minimum number of successful transmissions to try a new power or rate.
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override
This method is a pure virtual method that must be implemented by the sub-class.
void CheckInit(ParfWifiRemoteStation *station)
Check for initializations.
TracedCallback< double, double, Mac48Address > m_powerChange
The trace source fired when the transmission power changes.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
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 DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr) override
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId(void)
Register this type.
uint32_t m_attemptThreshold
The minimum number of transmission attempts to try a new power or rate.
void SetupPhy(const Ptr< WifiPhy > phy) override
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
WifiRemoteStation * DoCreateStation(void) const override
uint8_t m_maxPower
Maximal power level.
uint8_t m_minPower
Minimal power level.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
represent a single transmission mode
Definition: wifi-mode.h:48
hold a list of per-remote-station state.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
phy
Definition: third.py:93
Hold per-remote-station state for PARF Wifi manager.
hold per-remote-station state.