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> ())
136 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
143 double ackSnr,
WifiMode ackMode,
double dataSnr)
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.
virtual WifiRemoteStation * DoCreateStation(void) const
virtual bool IsLowLatency(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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.
uint32_t GetNumberOfReceiveAntennas(const WifiRemoteStation *station) const
Return the number of receive antenna the station has.
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. ...
bool GetStbc(const WifiRemoteStation *station) const
Return whether the given station supports space-time block coding (STBC).
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
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.
hold a list of per-remote-station state.
uint32_t GetNess(const WifiRemoteStation *station) const
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 WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)
bool GetShortGuardInterval(const WifiRemoteStation *station) const
Return whether the given station supports short guard interval.
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.
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)
hold per-remote-station state for CARA Wifi manager.
uint32_t GetNumberOfTransmitAntennas(void)
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)
hold per-remote-station state.