23 #include "ns3/string.h"
26 #define Min(a,b) ((a < b) ? a : b)
37 static TypeId tid =
TypeId (
"ns3::ConstantRateWifiManager")
39 .SetGroupName (
"Wifi")
41 .AddAttribute (
"DataMode",
"The transmission mode to use for every data packet transmission",
45 .AddAttribute (
"ControlMode",
"The transmission mode to use for every RTS packet transmission.",
92 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
99 double ackSnr,
WifiMode ackMode,
double dataSnr)
120 return WifiTxVector (
m_dataMode,
GetDefaultTxPowerLevel (),
GetLongRetryCount (st),
GetPreambleForTransmission (
m_dataMode,
GetAddress (st)),
ConvertGuardIntervalToNanoSeconds (
m_dataMode,
GetShortGuardInterval (st),
NanoSeconds (
GetGuardInterval (st))),
GetNumberOfAntennas (),
Min (
GetMaxNumberOfTransmitStreams (),
GetNumberOfSupportedStreams (st)), 0,
GetChannelWidth (st),
GetAggregation (st),
false);
127 return WifiTxVector (
m_ctlMode,
GetDefaultTxPowerLevel (),
GetShortRetryCount (st),
GetPreambleForTransmission (
m_ctlMode,
GetAddress (st)),
ConvertGuardIntervalToNanoSeconds (
m_ctlMode,
GetShortGuardInterval (st),
NanoSeconds (
GetGuardInterval (st))), 1, 1, 0,
GetChannelWidth (st),
GetAggregation (st),
false);
WifiTxVector DoGetDataTxVector(WifiRemoteStation *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.
Hold variables of type string.
uint8_t GetMaxNumberOfTransmitStreams(void)
uint16_t ConvertGuardIntervalToNanoSeconds(WifiMode mode, bool htShortGuardInterval, Time heGuardInterval)
Convert the guard interval to nanoseconds based on the wifimode.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
use constant rates for data and RTS transmissions
WifiRemoteStation * DoCreateStation(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
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.
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
uint8_t GetNumberOfAntennas(void)
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
WifiPreamble GetPreambleForTransmission(WifiMode mode, Mac48Address dest)
Return the preamble to be used for the transmission.
uint8_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
bool IsLowLatency(void) const
uint8_t GetNumberOfSupportedStreams(const WifiRemoteStation *station) const
Return the number of supported streams the station has.
Mac48Address GetAddress(const WifiRemoteStation *station) const
Return the address of the station.
void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
hold a list of per-remote-station state.
WifiMode m_ctlMode
Wifi mode for RTS frames.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ConstantRateWifiManager()
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.
Ptr< const AttributeAccessor > MakeWifiModeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
bool GetShortGuardInterval(const WifiRemoteStation *station) const
Return whether the given station supports HT/VHT short guard interval.
WifiMode m_dataMode
Wifi mode for unicast DATA frames.
uint8_t GetDefaultTxPowerLevel(void) const
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
Return the long retry limit of the given station.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
virtual ~ConstantRateWifiManager()
uint32_t GetShortRetryCount(const WifiRemoteStation *station) const
Return the short retry limit of the given station.
Ptr< const AttributeChecker > MakeWifiModeChecker(void)
void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId(void)
Get the type ID.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
hold per-remote-station state.
uint16_t GetGuardInterval(const WifiRemoteStation *station) const
Return the HE guard interval duration supported by the station.