A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
cara-wifi-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005,2006 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Federico Maguolo <maguolof@dei.unipd.it>
7 */
8
9#ifndef CARA_WIFI_MANAGER_H
10#define CARA_WIFI_MANAGER_H
11
12#include "ns3/traced-value.h"
13#include "ns3/wifi-remote-station-manager.h"
14
15namespace ns3
16{
17
18/**
19 * \brief implement the CARA rate control algorithm
20 * \ingroup wifi
21 *
22 * Implement the CARA algorithm from:
23 * J. Kim, S. Kim, S. Choi, and D. Qiao.
24 * "CARA: Collision-Aware Rate Adaptation for IEEE 802.11 WLANs."
25 *
26 * Originally implemented by Federico Maguolo for a very early
27 * prototype version of ns-3.
28 *
29 * This RAA does not support HT modes and will error
30 * exit if the user tries to configure this RAA with a Wi-Fi MAC
31 * that supports 802.11n or higher.
32 */
34{
35 public:
36 /**
37 * \brief Get the type ID.
38 * \return the object TypeId
39 */
40 static TypeId GetTypeId();
42 ~CaraWifiManager() override;
43
44 private:
45 void DoInitialize() override;
46 WifiRemoteStation* DoCreateStation() const override;
47 void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) override;
48 void DoReportRtsFailed(WifiRemoteStation* station) override;
49 void DoReportDataFailed(WifiRemoteStation* station) override;
50 void DoReportRtsOk(WifiRemoteStation* station,
51 double ctsSnr,
52 WifiMode ctsMode,
53 double rtsSnr) override;
55 double ackSnr,
56 WifiMode ackMode,
57 double dataSnr,
58 MHz_u dataChannelWidth,
59 uint8_t dataNss) override;
60 void DoReportFinalRtsFailed(WifiRemoteStation* station) override;
61 void DoReportFinalDataFailed(WifiRemoteStation* station) override;
62 WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, MHz_u allowedWidth) override;
64 bool DoNeedRts(WifiRemoteStation* station, uint32_t size, bool normally) override;
65
66 uint32_t m_timerTimeout; ///< timer threshold
67 uint32_t m_successThreshold; ///< success threshold
68 uint32_t m_failureThreshold; ///< failure threshold
69 uint32_t m_probeThreshold; ///< probe threshold
70
71 TracedValue<uint64_t> m_currentRate; //!< Trace rate changes
72};
73
74} // namespace ns3
75
76#endif /* CARA_WIFI_MANAGER_H */
implement the CARA rate control algorithm
void DoInitialize() override
Initialize() implementation.
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.
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId()
Get the type ID.
uint32_t m_failureThreshold
failure threshold
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, MHz_u allowedWidth) override
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
bool DoNeedRts(WifiRemoteStation *station, uint32_t size, bool normally) override
uint32_t m_timerTimeout
timer threshold
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.
WifiRemoteStation * DoCreateStation() const override
uint32_t m_successThreshold
success threshold
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
TracedValue< uint64_t > m_currentRate
Trace rate changes.
uint32_t m_probeThreshold
probe threshold
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, MHz_u dataChannelWidth, uint8_t dataNss) override
This method is a pure virtual method that must be implemented by the sub-class.
Trace classes with value semantics.
a unique identifier for an interface.
Definition type-id.h:48
represent a single transmission mode
Definition wifi-mode.h:40
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.
hold per-remote-station state.