|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #include "ns3/string.h"
24 #include "ns3/wifi-tx-vector.h"
25 #include "ns3/wifi-utils.h"
27 #define Min(a,b) ((a < b) ? a : b)
38 static TypeId tid =
TypeId (
"ns3::ConstantRateWifiManager")
40 .SetGroupName (
"Wifi")
42 .AddAttribute (
"DataMode",
"The transmission mode to use for every data packet transmission",
46 .AddAttribute (
"ControlMode",
"The transmission mode to use for every RTS packet transmission.",
93 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
100 double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
102 NS_LOG_FUNCTION (
this << st << ackSnr << ackMode << dataSnr << dataChannelWidth << +dataNss);
126 return WifiTxVector (
m_dataMode,
GetDefaultTxPowerLevel (),
GetPreambleForTransmission (
m_dataMode.
GetModulationClass (),
GetShortPreambleEnabled ()),
ConvertGuardIntervalToNanoSeconds (
m_dataMode,
GetShortGuardIntervalSupported (st),
NanoSeconds (
GetGuardInterval (st))),
GetNumberOfAntennas (), nss, 0,
GetChannelWidthForTransmission (
m_dataMode,
GetChannelWidth (st)),
GetAggregation (st));
133 return WifiTxVector (
m_ctlMode,
GetDefaultTxPowerLevel (),
GetPreambleForTransmission (
m_ctlMode.
GetModulationClass (),
GetShortPreambleEnabled ()),
ConvertGuardIntervalToNanoSeconds (
m_ctlMode,
GetShortGuardIntervalSupported (st),
NanoSeconds (
GetGuardInterval (st))), 1, 1, 0,
GetChannelWidthForTransmission (
m_ctlMode,
GetChannelWidth (st)),
GetAggregation (st));
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
uint8_t GetDefaultTxPowerLevel(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
bool GetShortGuardIntervalSupported(void) const
Return whether the device has SGI support enabled.
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Ptr< const AttributeChecker > MakeWifiModeChecker(void)
WifiModulationClass GetModulationClass() const
hold a list of per-remote-station state.
WifiRemoteStation * DoCreateStation(void) const override
uint16_t GetGuardInterval(void) const
Return the supported HE guard interval duration (in nanoseconds).
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Ptr< const AttributeAccessor > MakeWifiModeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PHY preambles.
use constant rates for data and RTS transmissions
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override
This method is a pure virtual method that must be implemented by the sub-class.
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
represent a single transmission mode
WifiMode m_dataMode
Wifi mode for unicast Data frames.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint16_t ConvertGuardIntervalToNanoSeconds(WifiMode mode, const Ptr< WifiNetDevice > device)
Convert the guard interval to nanoseconds based on the WifiMode.
uint16_t GetChannelWidthForTransmission(WifiMode mode, uint16_t maxSupportedChannelWidth)
Return the channel width that corresponds to the selected mode (instead of letting the PHY's default ...
Hold variables of type string.
virtual ~ConstantRateWifiManager()
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble)
Return the preamble to be used for the transmission.
WifiMode m_ctlMode
Wifi mode for RTS frames.
hold per-remote-station state.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
uint8_t GetNumberOfAntennas(void) const
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint8_t GetMaxNumberOfTransmitStreams(void) const
void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr) override
This method is a pure virtual method that must be implemented by the sub-class.
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
ConstantRateWifiManager()
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
uint8_t GetMcsValue(void) const