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) 
   57     .AddConstructor<CaraWifiManager> ()
 
   58     .AddAttribute (
"ProbeThreshold",
 
   59                    "The number of consecutive transmissions failure to activate the RTS probe.",
 
   62                    MakeUintegerChecker<uint32_t> ())
 
   63     .AddAttribute (
"FailureThreshold",
 
   64                    "The number of consecutive transmissions failure to decrease the rate.",
 
   67                    MakeUintegerChecker<uint32_t> ())
 
   68     .AddAttribute (
"SuccessThreshold",
 
   69                    "The minimum number of sucessfull transmissions to try a new rate.",
 
   72                    MakeUintegerChecker<uint32_t> ())
 
   73     .AddAttribute (
"Timeout",
 
   74                    "The 'timer' in the CARA algorithm",
 
   77                    MakeUintegerChecker<uint32_t> ())
 
  137                                 double ctsSnr, 
WifiMode ctsMode, 
double rtsSnr)
 
  144                                  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)
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
virtual WifiRemoteStation * DoCreateStation(void) const 
virtual bool IsLowLatency(void) const 
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
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. 
NS_LOG_COMPONENT_DEFINE("Cara")
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). 
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. 
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
hold a list of per-remote-station state. 
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)
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. 
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.