22 #include "ns3/simulator.h" 
   24 #include "ns3/uinteger.h" 
   26 #define Min(a,b) ((a < b) ? a : b) 
   57     .SetGroupName (
"Wifi")
 
   59     .AddAttribute (
"UpdatePeriod",
 
   60                    "The interval between decisions about rate control changes",
 
   64     .AddAttribute (
"RaiseThreshold", 
"Attempt to raise the rate if we hit that threshold",
 
   67                    MakeUintegerChecker<uint32_t> ())
 
   68     .AddAttribute (
"AddCreditThreshold", 
"Add credit threshold",
 
   71                    MakeUintegerChecker<uint32_t> ())
 
   72     .AddTraceSource (
"Rate",
 
   73                      "Traced value for rate changes (b/s)",
 
   75                      "ns3::TracedValueCallback::Uint64")
 
  203   if (enough && station->
m_tx_err == 0
 
  210                 " upper " << station->
m_tx_upper << 
" dir " << dir);
 
  301   if (channelWidth > 20 && channelWidth != 22)
 
  312   return WifiTxVector (mode, 
GetDefaultTxPowerLevel (), 
GetPreambleForTransmission (mode, 
GetAddress (st)), 800, 1, 1, 0, channelWidth, 
GetAggregation (station), 
false);
 
  321   if (channelWidth > 20 && channelWidth != 22)
 
  337   rtsTxVector = 
WifiTxVector (mode, 
GetDefaultTxPowerLevel (), 
GetPreambleForTransmission (mode, 
GetAddress (st)), 800, 1, 1, 0, channelWidth, 
GetAggregation (station), 
false);
 
  353       NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HT rates");
 
  363       NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support VHT rates");
 
  373       NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HE rates");
 
Simulation virtual time values and global simulation resolution. 
 
void SetHtSupported(bool enable)
Enable or disable HT capability support. 
 
an implementation of the rate control algorithm developed by Atsushi Onoe 
 
#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. 
 
uint32_t m_tx_ok
transmit ok 
 
bool GetUseNonErpProtection(void) const 
Return whether the device supports protection of non-ERP stations. 
 
uint32_t m_tx_err
transmit error 
 
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. 
 
void UpdateMode(OnoeWifiRemoteStation *station)
Update the mode. 
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
void SetVhtSupported(bool enable)
Enable or disable VHT capability support. 
 
bool IsLowLatency(void) const 
 
uint32_t m_tx_retr
transmit retr 
 
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate. 
 
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
 
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
 
uint32_t m_shortRetry
short retry 
 
static TypeId GetTypeId(void)
Get the type ID. 
 
bool GetAggregation(const WifiRemoteStation *station) const 
Return whether the given station supports A-MPDU. 
 
void UpdateRetry(OnoeWifiRemoteStation *station)
Update the number of retry (both short and long). 
 
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source. 
 
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. 
 
uint32_t m_longRetry
long retry 
 
AttributeValue implementation for Time. 
 
Hold an unsigned integer type. 
 
WifiPreamble GetPreambleForTransmission(WifiMode mode, Mac48Address dest)
Return the preamble to be used for the transmission. 
 
uint64_t GetDataRate(uint8_t channelWidth, uint16_t guardInterval, uint8_t nss) const 
 
uint8_t GetChannelWidth(const WifiRemoteStation *station) const 
Return the channel width supported by the station. 
 
uint32_t m_tx_upper
transmit upper 
 
void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class. 
 
Mac48Address GetAddress(const WifiRemoteStation *station) const 
Return the address of the station. 
 
hold a list of per-remote-station state. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class. 
 
void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class. 
 
virtual ~OnoeWifiManager()
 
void SetHeSupported(bool enable)
Enable or disable HE capability support. 
 
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
static Time Now(void)
Return the current simulation virtual time. 
 
Time m_nextModeUpdate
next mode update 
 
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const 
Return whether mode associated with the specified station at the specified index. ...
 
WifiRemoteStation * DoCreateStation(void) const 
 
uint8_t GetDefaultTxPowerLevel(void) const 
 
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const 
Return whether non-ERP mode associated with the specified station at the specified index...
 
void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class. 
 
hold per-remote-station state for ONOE Wifi manager. 
 
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
Time m_updatePeriod
update period 
 
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
 
uint8_t GetNSupported(const WifiRemoteStation *station) const 
Return the number of modes supported by the given station. 
 
uint32_t m_raiseThreshold
raise threshold 
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
a unique identifier for an interface. 
 
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. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
uint8_t m_txrate
transmit rate 
 
hold per-remote-station state. 
 
TracedValue< uint64_t > m_currentRate
Trace rate changes. 
 
uint32_t m_addCreditThreshold
add credit threshold 
 
void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.