22 #include "ns3/assert.h"
24 #include "ns3/double.h"
25 #include "ns3/uinteger.h"
26 #include "ns3/simulator.h"
28 #define Min(a,b) ((a < b) ? a : b)
55 .SetGroupName (
"Wifi")
57 .AddAttribute (
"ProbeThreshold",
58 "The number of consecutive transmissions failure to activate the RTS probe.",
61 MakeUintegerChecker<uint32_t> ())
62 .AddAttribute (
"FailureThreshold",
63 "The number of consecutive transmissions failure to decrease the rate.",
66 MakeUintegerChecker<uint32_t> ())
67 .AddAttribute (
"SuccessThreshold",
68 "The minimum number of sucessfull transmissions to try a new rate.",
71 MakeUintegerChecker<uint32_t> ())
72 .AddAttribute (
"Timeout",
73 "The 'timer' in the CARA algorithm",
76 MakeUintegerChecker<uint32_t> ())
139 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
147 double ackSnr,
WifiMode ackMode,
double dataSnr)
186 if (channelWidth > 20 && channelWidth != 22)
202 if (channelWidth > 20 && channelWidth != 22)
241 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HT rates");
251 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support VHT rates");
uint32_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given 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.
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
virtual WifiRemoteStation * DoCreateStation(void) const
virtual bool IsLowLatency(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
virtual ~CaraWifiManager()
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
virtual void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
uint32_t m_probeThreshold
WifiMode GetSupported(const WifiRemoteStation *station, uint32_t i) const
Return whether mode associated with the specified station at the specified index. ...
uint32_t m_failureThreshold
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.
static TypeId GetTypeId(void)
Hold an unsigned integer type.
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint32_t i) const
Return whether non-ERP mode associated with the specified station at the specified index...
virtual void SetHtSupported(bool enable)
Enable or disable HT capability support.
hold a list of per-remote-station state.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
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.
virtual void SetVhtSupported(bool enable)
Enable or disable VHT capability support.
uint8_t GetDefaultTxPowerLevel(void) const
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
Return the long retry limit of the given station.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
uint32_t m_successThreshold
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
uint32_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
hold per-remote-station state for CARA Wifi manager.
implement the CARA rate control algorithmImplement the CARA algorithm from: J.
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual bool DoNeedRts(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
hold per-remote-station state.
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)