wifi: Cleanup unneeded methods
This commit is contained in:
@@ -57,21 +57,13 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
uint32_t slot = 9; //slot time in microseconds
|
||||
uint32_t sifs = 10; //SIFS duration in microseconds
|
||||
uint32_t ackTimeout = 88; //Ack timeout duration in microseconds
|
||||
uint32_t ctsTimeout = 88; //CTS timeout duration in microseconds
|
||||
uint32_t rifs = 2; //RIFS duration in microseconds
|
||||
uint32_t basicBlockAckTimeout = 286; //Basic BlockAck timeout duration in microseconds
|
||||
uint32_t compressedBlockAckTimeout = 112; //Compressed BlockAck timeout duration in microseconds
|
||||
double simulationTime = 10; //simulation time in seconds
|
||||
|
||||
CommandLine cmd (__FILE__);
|
||||
cmd.AddValue ("slot", "Slot time in microseconds", slot);
|
||||
cmd.AddValue ("sifs", "SIFS duration in microseconds", sifs);
|
||||
cmd.AddValue ("ackTimeout", "Ack timeout duration in microseconds", ackTimeout);
|
||||
cmd.AddValue ("ctsTimeout", "CTS timeout duration in microseconds", ctsTimeout);
|
||||
cmd.AddValue ("rifs", "RIFS duration in microseconds", rifs);
|
||||
cmd.AddValue ("basicBlockAckTimeoutTimeout", "Basic BlockAck timeout duration in microseconds", basicBlockAckTimeout);
|
||||
cmd.AddValue ("compressedBlockAckTimeoutTimeout", "Compressed BlockAck timeout duration in microseconds", compressedBlockAckTimeout);
|
||||
cmd.AddValue ("simulationTime", "Simulation time in seconds", simulationTime);
|
||||
cmd.Parse (argc,argv);
|
||||
|
||||
@@ -114,10 +106,7 @@ int main (int argc, char *argv[])
|
||||
//Once install is done, we overwrite the standard timing values
|
||||
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/Slot", TimeValue (MicroSeconds (slot)));
|
||||
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/Sifs", TimeValue (MicroSeconds (sifs)));
|
||||
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/AckTimeout", TimeValue (MicroSeconds (ackTimeout)));
|
||||
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/Rifs", TimeValue (MicroSeconds (rifs)));
|
||||
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BasicBlockAckTimeout", TimeValue (MicroSeconds (basicBlockAckTimeout)));
|
||||
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/CompressedBlockAckTimeout", TimeValue (MicroSeconds (compressedBlockAckTimeout)));
|
||||
|
||||
//Mobility
|
||||
MobilityHelper mobility;
|
||||
|
||||
@@ -327,24 +327,6 @@ MacLow::SetAddress (Mac48Address ad)
|
||||
m_self = ad;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetAckTimeout (Time ackTimeout)
|
||||
{
|
||||
m_ackTimeout = ackTimeout;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetBasicBlockAckTimeout (Time blockAckTimeout)
|
||||
{
|
||||
m_basicBlockAckTimeout = blockAckTimeout;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetCompressedBlockAckTimeout (Time blockAckTimeout)
|
||||
{
|
||||
m_compressedBlockAckTimeout = blockAckTimeout;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetCtsToSelfSupported (bool enable)
|
||||
{
|
||||
@@ -399,24 +381,6 @@ MacLow::GetAddress (void) const
|
||||
return m_self;
|
||||
}
|
||||
|
||||
Time
|
||||
MacLow::GetAckTimeout (void) const
|
||||
{
|
||||
return m_ackTimeout;
|
||||
}
|
||||
|
||||
Time
|
||||
MacLow::GetBasicBlockAckTimeout (void) const
|
||||
{
|
||||
return m_basicBlockAckTimeout;
|
||||
}
|
||||
|
||||
Time
|
||||
MacLow::GetCompressedBlockAckTimeout (void) const
|
||||
{
|
||||
return m_compressedBlockAckTimeout;
|
||||
}
|
||||
|
||||
Time
|
||||
MacLow::GetSifs (void) const
|
||||
{
|
||||
|
||||
@@ -111,24 +111,6 @@ public:
|
||||
* \param ad Mac48Address of this MacLow
|
||||
*/
|
||||
void SetAddress (Mac48Address ad);
|
||||
/**
|
||||
* Set Ack timeout of this MacLow.
|
||||
*
|
||||
* \param ackTimeout Ack timeout of this MacLow
|
||||
*/
|
||||
void SetAckTimeout (Time ackTimeout);
|
||||
/**
|
||||
* Set Basic BlockAck timeout of this MacLow.
|
||||
*
|
||||
* \param blockAckTimeout Basic BlockAck timeout of this MacLow
|
||||
*/
|
||||
void SetBasicBlockAckTimeout (Time blockAckTimeout);
|
||||
/**
|
||||
* Set Compressed BlockAck timeout of this MacLow.
|
||||
*
|
||||
* \param blockAckTimeout Compressed BlockAck timeout of this MacLow
|
||||
*/
|
||||
void SetCompressedBlockAckTimeout (Time blockAckTimeout);
|
||||
/**
|
||||
* Enable or disable CTS-to-self capability.
|
||||
*
|
||||
@@ -177,24 +159,6 @@ public:
|
||||
* \return Mac48Address of this MacLow
|
||||
*/
|
||||
Mac48Address GetAddress (void) const;
|
||||
/**
|
||||
* Return Ack timeout of this MacLow.
|
||||
*
|
||||
* \return Ack timeout
|
||||
*/
|
||||
Time GetAckTimeout (void) const;
|
||||
/**
|
||||
* Return Basic BlockAck timeout of this MacLow.
|
||||
*
|
||||
* \return Basic BlockAck timeout
|
||||
*/
|
||||
Time GetBasicBlockAckTimeout (void) const;
|
||||
/**
|
||||
* Return Compressed BlockAck timeout of this MacLow.
|
||||
*
|
||||
* \return Compressed BlockAck timeout
|
||||
*/
|
||||
Time GetCompressedBlockAckTimeout (void) const;
|
||||
/**
|
||||
* Return Short Interframe Space (SIFS) of this MacLow.
|
||||
*
|
||||
@@ -921,9 +885,6 @@ private:
|
||||
MacLowTransmissionParameters m_txParams; //!< Transmission parameters of the current packet
|
||||
Mac48Address m_self; //!< Address of this MacLow (Mac48Address)
|
||||
Mac48Address m_bssid; //!< BSSID address (Mac48Address)
|
||||
Time m_ackTimeout; //!< Ack timeout duration
|
||||
Time m_basicBlockAckTimeout; //!< Basic BlockAck timeout duration
|
||||
Time m_compressedBlockAckTimeout; //!< Compressed BlockAck timeout duration
|
||||
Time m_pifs; //!< PCF Interframe Space (PIFS) duration
|
||||
Time m_rifs; //!< Reduced Interframe Space (RIFS) duration
|
||||
|
||||
|
||||
@@ -1518,7 +1518,7 @@ MinstrelHtWifiManager::CalculateRetransmits (MinstrelHtWifiRemoteStation *statio
|
||||
uint32_t cwMax = 1023;
|
||||
Time cwTime, txTime, dataTxTime;
|
||||
Time slotTime = GetPhy ()->GetSlot ();
|
||||
Time ackTime = GetMac ()->GetBasicBlockAckTimeout ();
|
||||
Time ackTime = GetPhy ()->GetSifs () + GetPhy ()->GetBlockAckTxTime ();
|
||||
|
||||
if (station->m_groupsTable[groupId].m_ratesTable[rateId].ewmaProb < 1)
|
||||
{
|
||||
|
||||
@@ -962,14 +962,14 @@ MinstrelWifiManager::CalculateTimeUnicastPacket (Time dataTransmissionTime, uint
|
||||
//See rc80211_minstrel.c
|
||||
|
||||
//First transmission (Data + Ack timeout)
|
||||
Time tt = dataTransmissionTime + GetMac ()->GetAckTimeout ();
|
||||
Time tt = dataTransmissionTime + GetPhy ()->GetSifs () + GetPhy ()->GetAckTxTime ();
|
||||
|
||||
uint32_t cwMax = 1023;
|
||||
uint32_t cw = 31;
|
||||
for (uint32_t retry = 0; retry < longRetries; retry++)
|
||||
{
|
||||
//Add one re-transmission (Data + Ack timeout)
|
||||
tt += dataTransmissionTime + GetMac ()->GetAckTimeout ();
|
||||
tt += dataTransmissionTime + GetPhy ()->GetSifs () + GetPhy ()->GetAckTxTime ();
|
||||
|
||||
//Add average back off (half the current contention window)
|
||||
tt += (cw / 2.0) * GetPhy ()->GetSlot ();
|
||||
|
||||
@@ -662,45 +662,6 @@ RegularWifiMac::GetPifs (void) const
|
||||
return m_low->GetPifs ();
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetAckTimeout (Time ackTimeout)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << ackTimeout);
|
||||
m_low->SetAckTimeout (ackTimeout);
|
||||
}
|
||||
|
||||
Time
|
||||
RegularWifiMac::GetAckTimeout (void) const
|
||||
{
|
||||
return m_low->GetAckTimeout ();
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetBasicBlockAckTimeout (Time blockAckTimeout)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << blockAckTimeout);
|
||||
m_low->SetBasicBlockAckTimeout (blockAckTimeout);
|
||||
}
|
||||
|
||||
Time
|
||||
RegularWifiMac::GetBasicBlockAckTimeout (void) const
|
||||
{
|
||||
return m_low->GetBasicBlockAckTimeout ();
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetCompressedBlockAckTimeout (Time blockAckTimeout)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << blockAckTimeout);
|
||||
m_low->SetCompressedBlockAckTimeout (blockAckTimeout);
|
||||
}
|
||||
|
||||
Time
|
||||
RegularWifiMac::GetCompressedBlockAckTimeout (void) const
|
||||
{
|
||||
return m_low->GetCompressedBlockAckTimeout ();
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetAddress (Mac48Address address)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
void SetEifsNoDifs (Time eifsNoDifs);
|
||||
void SetPifs (Time pifs);
|
||||
void SetRifs (Time rifs);
|
||||
void SetAckTimeout (Time ackTimeout);
|
||||
void SetShortSlotTimeSupported (bool enable);
|
||||
void SetSsid (Ssid ssid);
|
||||
void SetAddress (Mac48Address address);
|
||||
@@ -65,7 +64,6 @@ public:
|
||||
Time GetRifs (void) const;
|
||||
Time GetPifs (void) const;
|
||||
Time GetEifsNoDifs (void) const;
|
||||
Time GetAckTimeout (void) const;
|
||||
bool GetShortSlotTimeSupported (void) const;
|
||||
Ssid GetSsid (void) const;
|
||||
Mac48Address GetAddress (void) const;
|
||||
@@ -91,14 +89,6 @@ public:
|
||||
void SetLinkUpCallback (Callback<void> linkUp);
|
||||
void SetLinkDownCallback (Callback<void> linkDown);
|
||||
|
||||
/* Next functions are not pure virtual so non-QoS WifiMacs are not
|
||||
* forced to implement them.
|
||||
*/
|
||||
void SetBasicBlockAckTimeout (Time blockAckTimeout);
|
||||
Time GetBasicBlockAckTimeout (void) const;
|
||||
void SetCompressedBlockAckTimeout (Time blockAckTimeout);
|
||||
Time GetCompressedBlockAckTimeout (void) const;
|
||||
|
||||
// Should be implemented by child classes
|
||||
virtual void Enqueue (Ptr<Packet> packet, Mac48Address to) = 0;
|
||||
|
||||
|
||||
@@ -34,13 +34,6 @@ NS_LOG_COMPONENT_DEFINE ("WifiMac");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (WifiMac);
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultMaxPropagationDelay (void)
|
||||
{
|
||||
//1000m
|
||||
return Seconds (1000.0 / 300000000.0);
|
||||
}
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultSlot (void)
|
||||
{
|
||||
@@ -75,76 +68,12 @@ WifiMac::GetDefaultCtsAckDelay (void)
|
||||
return MicroSeconds (44);
|
||||
}
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultCtsAckTimeout (void)
|
||||
{
|
||||
/* Cts_Timeout and Ack_Timeout are specified in the Annex C
|
||||
(Formal description of MAC operation, see details on the
|
||||
Trsp timer setting at page 346)
|
||||
*/
|
||||
Time ctsTimeout = GetDefaultSifs ();
|
||||
ctsTimeout += GetDefaultCtsAckDelay ();
|
||||
ctsTimeout += MicroSeconds (GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2);
|
||||
ctsTimeout += GetDefaultSlot ();
|
||||
return ctsTimeout;
|
||||
}
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultBasicBlockAckDelay (void)
|
||||
{
|
||||
//This value must be revisited
|
||||
return MicroSeconds (250);
|
||||
}
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultCompressedBlockAckDelay (void)
|
||||
{
|
||||
//This value must be revisited
|
||||
//CompressedBlockAckSize 32 * 8 * time it takes to transfer at the lowest rate (at 6 Mbit/s) + aPhy-StartDelay (33)
|
||||
return MicroSeconds (76);
|
||||
}
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultBasicBlockAckTimeout (void)
|
||||
{
|
||||
Time blockAckTimeout = GetDefaultSifs ();
|
||||
blockAckTimeout += GetDefaultBasicBlockAckDelay ();
|
||||
blockAckTimeout += MicroSeconds (GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2);
|
||||
blockAckTimeout += GetDefaultSlot ();
|
||||
return blockAckTimeout;
|
||||
}
|
||||
|
||||
Time
|
||||
WifiMac::GetDefaultCompressedBlockAckTimeout (void)
|
||||
{
|
||||
Time blockAckTimeout = GetDefaultSifs ();
|
||||
blockAckTimeout += GetDefaultCompressedBlockAckDelay ();
|
||||
blockAckTimeout += MicroSeconds (GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2);
|
||||
blockAckTimeout += GetDefaultSlot ();
|
||||
return blockAckTimeout;
|
||||
}
|
||||
|
||||
TypeId
|
||||
WifiMac::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::WifiMac")
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName ("Wifi")
|
||||
.AddAttribute ("AckTimeout", "When this timeout expires, the Data/Ack handshake has failed.",
|
||||
TimeValue (GetDefaultCtsAckTimeout ()),
|
||||
MakeTimeAccessor (&WifiMac::GetAckTimeout,
|
||||
&WifiMac::SetAckTimeout),
|
||||
MakeTimeChecker ())
|
||||
.AddAttribute ("BasicBlockAckTimeout", "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.",
|
||||
TimeValue (GetDefaultBasicBlockAckTimeout ()),
|
||||
MakeTimeAccessor (&WifiMac::GetBasicBlockAckTimeout,
|
||||
&WifiMac::SetBasicBlockAckTimeout),
|
||||
MakeTimeChecker ())
|
||||
.AddAttribute ("CompressedBlockAckTimeout", "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.",
|
||||
TimeValue (GetDefaultCompressedBlockAckTimeout ()),
|
||||
MakeTimeAccessor (&WifiMac::GetCompressedBlockAckTimeout,
|
||||
&WifiMac::SetCompressedBlockAckTimeout),
|
||||
MakeTimeChecker ())
|
||||
.AddAttribute ("EifsNoDifs", "The value of EIFS-DIFS.",
|
||||
TimeValue (GetDefaultEifsNoDifs ()),
|
||||
MakeTimeAccessor (&WifiMac::SetEifsNoDifs,
|
||||
@@ -160,10 +89,6 @@ WifiMac::GetTypeId (void)
|
||||
MakeTimeAccessor (&WifiMac::SetRifs,
|
||||
&WifiMac::GetRifs),
|
||||
MakeTimeChecker ())
|
||||
.AddAttribute ("MaxPropagationDelay", "The maximum propagation delay. Unused for now.",
|
||||
TimeValue (GetDefaultMaxPropagationDelay ()),
|
||||
MakeTimeAccessor (&WifiMac::SetMaxPropagationDelay),
|
||||
MakeTimeChecker ())
|
||||
.AddAttribute ("Ssid", "The ssid we want to belong to.",
|
||||
SsidValue (Ssid ("default")),
|
||||
MakeSsidAccessor (&WifiMac::GetSsid,
|
||||
@@ -214,13 +139,6 @@ WifiMac::GetDevice (void) const
|
||||
return m_device;
|
||||
}
|
||||
|
||||
void
|
||||
WifiMac::SetMaxPropagationDelay (Time delay)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << delay);
|
||||
m_maxPropagationDelay = delay;
|
||||
}
|
||||
|
||||
void
|
||||
WifiMac::NotifyTx (Ptr<const Packet> packet)
|
||||
{
|
||||
@@ -304,7 +222,6 @@ WifiMac::Configure80211a (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetEifsNoDifs (MicroSeconds (16 + 44));
|
||||
SetPifs (MicroSeconds (16 + 9));
|
||||
SetAckTimeout (MicroSeconds (16 + 44 + 9 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -313,7 +230,6 @@ WifiMac::Configure80211b (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetEifsNoDifs (MicroSeconds (10 + 304));
|
||||
SetPifs (MicroSeconds (10 + 20));
|
||||
SetAckTimeout (MicroSeconds (10 + 304 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -322,7 +238,6 @@ WifiMac::Configure80211g (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetEifsNoDifs (MicroSeconds (10 + 304));
|
||||
SetPifs (MicroSeconds (10 + 20));
|
||||
SetAckTimeout (MicroSeconds (10 + 304 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -331,7 +246,6 @@ WifiMac::Configure80211_10Mhz (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetEifsNoDifs (MicroSeconds (32 + 88));
|
||||
SetPifs (MicroSeconds (32 + 13));
|
||||
SetAckTimeout (MicroSeconds (32 + 88 + 13 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -340,7 +254,6 @@ WifiMac::Configure80211_5Mhz (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
SetEifsNoDifs (MicroSeconds (64 + 176));
|
||||
SetPifs (MicroSeconds (64 + 21));
|
||||
SetAckTimeout (MicroSeconds (64 + 176 + 21 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -349,8 +262,6 @@ WifiMac::Configure80211n_2_4Ghz (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
Configure80211g ();
|
||||
SetRifs (MicroSeconds (2));
|
||||
SetBasicBlockAckTimeout (MicroSeconds (30) + GetDefaultBasicBlockAckDelay () + GetDefaultMaxPropagationDelay () * 2);
|
||||
SetCompressedBlockAckTimeout (MicroSeconds (30 + 448) + GetDefaultMaxPropagationDelay () * 2);
|
||||
}
|
||||
void
|
||||
WifiMac::Configure80211n_5Ghz (void)
|
||||
@@ -358,8 +269,6 @@ WifiMac::Configure80211n_5Ghz (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
Configure80211a ();
|
||||
SetRifs (MicroSeconds (2));
|
||||
SetBasicBlockAckTimeout (MicroSeconds (25) + GetDefaultBasicBlockAckDelay () + GetDefaultMaxPropagationDelay () * 2);
|
||||
SetCompressedBlockAckTimeout (MicroSeconds (25) + GetDefaultCompressedBlockAckDelay () + GetDefaultMaxPropagationDelay () * 2);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -381,7 +290,6 @@ WifiMac::Configure80211ax_5Ghz (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Configure80211ac ();
|
||||
SetCompressedBlockAckTimeout (MicroSeconds (25 + 85) + GetDefaultMaxPropagationDelay () * 2);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -82,16 +82,6 @@ public:
|
||||
* \param rifs the RIFS duration.
|
||||
*/
|
||||
virtual void SetRifs (Time rifs) = 0;
|
||||
/**
|
||||
* \param ackTimeout the duration of an Ack timeout.
|
||||
*/
|
||||
virtual void SetAckTimeout (Time ackTimeout) = 0;
|
||||
/**
|
||||
* \param delay the max propagation delay.
|
||||
*
|
||||
* Unused for now.
|
||||
*/
|
||||
void SetMaxPropagationDelay (Time delay);
|
||||
/**
|
||||
* \param ssid the current SSID of this MAC layer.
|
||||
*/
|
||||
@@ -124,10 +114,6 @@ public:
|
||||
* \return the current EIFS minus DIFS duration
|
||||
*/
|
||||
virtual Time GetEifsNoDifs (void) const = 0;
|
||||
/**
|
||||
* \return the current Ack timeout duration.
|
||||
*/
|
||||
virtual Time GetAckTimeout (void) const = 0;
|
||||
/**
|
||||
* \return the MAC address associated to this MAC layer.
|
||||
*/
|
||||
@@ -216,27 +202,6 @@ public:
|
||||
* forced to implement them.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \param blockAckTimeout the duration for basic BlockAck timeout.
|
||||
*
|
||||
* Sets the timeout for basic BlockAck.
|
||||
*/
|
||||
virtual void SetBasicBlockAckTimeout (Time blockAckTimeout) = 0;
|
||||
/**
|
||||
* \return the current basic BlockAck timeout duration.
|
||||
*/
|
||||
virtual Time GetBasicBlockAckTimeout (void) const = 0;
|
||||
/**
|
||||
* \param blockAckTimeout the duration for compressed BlockAck timeout
|
||||
*
|
||||
* Sets the timeout for compressed BlockAck.
|
||||
*/
|
||||
virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout) = 0;
|
||||
/**
|
||||
* \return the current compressed BlockAck timeout duration.
|
||||
*/
|
||||
virtual Time GetCompressedBlockAckTimeout (void) const = 0;
|
||||
|
||||
/**
|
||||
* \param packet the packet being enqueued
|
||||
*
|
||||
@@ -320,13 +285,6 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
/**
|
||||
* \return the default maximum propagation delay
|
||||
*
|
||||
* By default, we get the maximum propagation delay from 1000 m and speed of light
|
||||
* (3e8 m/s).
|
||||
*/
|
||||
static Time GetDefaultMaxPropagationDelay (void);
|
||||
/**
|
||||
* \return the default slot duration
|
||||
*
|
||||
@@ -358,41 +316,6 @@ private:
|
||||
* Return a default value for 802.11a at 6Mbps (44 microseconds)
|
||||
*/
|
||||
static Time GetDefaultCtsAckDelay (void);
|
||||
/**
|
||||
* \return the default CTS and Ack timeout
|
||||
*
|
||||
* Return the default CTS and Ack timeout.
|
||||
* Cts_Timeout and Ack_Timeout are specified in the Annex C
|
||||
* (Formal description of MAC operation, see details on the
|
||||
* Trsp timer setting at page 346)
|
||||
*/
|
||||
static Time GetDefaultCtsAckTimeout (void);
|
||||
/**
|
||||
* Return the default basic BlockAck delay.
|
||||
* Currently it returns 250 microseconds.
|
||||
*
|
||||
* \return the default basic BlockAck delay
|
||||
*/
|
||||
static Time GetDefaultBasicBlockAckDelay (void);
|
||||
/**
|
||||
* Return the default basic BlockAck timeout.
|
||||
*
|
||||
* \return the default basic BlockAck timeout
|
||||
*/
|
||||
static Time GetDefaultBasicBlockAckTimeout (void);
|
||||
/**
|
||||
* Return the default compressed BlockAck delay.
|
||||
* Currently it returns 76 microseconds.
|
||||
*
|
||||
* \return the default compressed BlockAck delay
|
||||
*/
|
||||
static Time GetDefaultCompressedBlockAckDelay (void);
|
||||
/**
|
||||
* Return the default compressed BlockAck timeout.
|
||||
*
|
||||
* \return the default compressed BlockAck timeout
|
||||
*/
|
||||
static Time GetDefaultCompressedBlockAckTimeout (void);
|
||||
|
||||
/**
|
||||
* \param standard the PHY standard to be used
|
||||
@@ -404,7 +327,6 @@ private:
|
||||
*/
|
||||
virtual void FinishConfigureStandard (WifiPhyStandard standard) = 0;
|
||||
|
||||
Time m_maxPropagationDelay; ///< maximum propagation delay
|
||||
Ptr<NetDevice> m_device; ///< Pointer to the device
|
||||
|
||||
/**
|
||||
|
||||
@@ -415,6 +415,8 @@ WifiPhy::WifiPhy ()
|
||||
m_channelWidth (0),
|
||||
m_sifs (Seconds (0)),
|
||||
m_slot (Seconds (0)),
|
||||
m_ackTxTime (Seconds (0)),
|
||||
m_blockAckTxTime (Seconds (0)),
|
||||
m_powerRestricted (false),
|
||||
m_channelAccessRequested (false),
|
||||
m_txSpatialStreams (0),
|
||||
@@ -950,6 +952,18 @@ WifiPhy::GetSlot (void) const
|
||||
return m_slot;
|
||||
}
|
||||
|
||||
Time
|
||||
WifiPhy::GetAckTxTime (void) const
|
||||
{
|
||||
return m_ackTxTime;
|
||||
}
|
||||
|
||||
Time
|
||||
WifiPhy::GetBlockAckTxTime (void) const
|
||||
{
|
||||
return m_blockAckTxTime;
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhy::Configure80211a (void)
|
||||
{
|
||||
@@ -958,6 +972,9 @@ WifiPhy::Configure80211a (void)
|
||||
// See Table 17-21 "OFDM PHY characteristics" of 802.11-2016
|
||||
SetSifs (MicroSeconds (16));
|
||||
SetSlot (MicroSeconds (9));
|
||||
// See Table 10-5 "Determination of the EstimatedAckTxTime based on properties
|
||||
// of the PPDU causing the EIFS" of 802.11-2016
|
||||
m_ackTxTime = MicroSeconds (44);
|
||||
|
||||
m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ());
|
||||
m_deviceRateSet.push_back (WifiPhy::GetOfdmRate9Mbps ());
|
||||
@@ -977,6 +994,9 @@ WifiPhy::Configure80211b (void)
|
||||
// See Table 16-4 "HR/DSSS PHY characteristics" of 802.11-2016
|
||||
SetSifs (MicroSeconds (10));
|
||||
SetSlot (MicroSeconds (20));
|
||||
// See Table 10-5 "Determination of the EstimatedAckTxTime based on properties
|
||||
// of the PPDU causing the EIFS" of 802.11-2016
|
||||
m_ackTxTime = MicroSeconds (304);
|
||||
|
||||
m_deviceRateSet.push_back (WifiPhy::GetDsssRate1Mbps ());
|
||||
m_deviceRateSet.push_back (WifiPhy::GetDsssRate2Mbps ());
|
||||
@@ -1013,6 +1033,7 @@ WifiPhy::Configure80211_10Mhz (void)
|
||||
// See Table 17-21 "OFDM PHY characteristics" of 802.11-2016
|
||||
SetSifs (MicroSeconds (32));
|
||||
SetSlot (MicroSeconds (13));
|
||||
m_ackTxTime = MicroSeconds (88);
|
||||
|
||||
m_deviceRateSet.push_back (WifiPhy::GetOfdmRate3MbpsBW10MHz ());
|
||||
m_deviceRateSet.push_back (WifiPhy::GetOfdmRate4_5MbpsBW10MHz ());
|
||||
@@ -1032,6 +1053,7 @@ WifiPhy::Configure80211_5Mhz (void)
|
||||
// See Table 17-21 "OFDM PHY characteristics" of 802.11-2016
|
||||
SetSifs (MicroSeconds (64));
|
||||
SetSlot (MicroSeconds (21));
|
||||
m_ackTxTime = MicroSeconds (176);
|
||||
|
||||
m_deviceRateSet.push_back (WifiPhy::GetOfdmRate1_5MbpsBW5MHz ());
|
||||
m_deviceRateSet.push_back (WifiPhy::GetOfdmRate2_25MbpsBW5MHz ());
|
||||
@@ -1165,6 +1187,9 @@ WifiPhy::Configure80211n (void)
|
||||
{
|
||||
Configure80211a ();
|
||||
}
|
||||
// See Table 10-5 "Determination of the EstimatedAckTxTime based on properties
|
||||
// of the PPDU causing the EIFS" of 802.11-2016
|
||||
m_blockAckTxTime = MicroSeconds (68);
|
||||
m_bssMembershipSelectorSet.push_back (HT_PHY);
|
||||
ConfigureHtDeviceMcsSet ();
|
||||
}
|
||||
|
||||
@@ -531,6 +531,18 @@ public:
|
||||
* \return the slot duration
|
||||
*/
|
||||
Time GetSlot (void) const;
|
||||
/**
|
||||
* Return the estimated Ack TX time for this PHY.
|
||||
*
|
||||
* \return the estimated Ack TX time
|
||||
*/
|
||||
Time GetAckTxTime (void) const;
|
||||
/**
|
||||
* Return the estimated BlockAck TX time for this PHY.
|
||||
*
|
||||
* \return the estimated BlockAck TX time
|
||||
*/
|
||||
Time GetBlockAckTxTime (void) const;
|
||||
|
||||
/**
|
||||
* The WifiPhy::NBssMembershipSelectors() method is used
|
||||
@@ -2065,6 +2077,8 @@ private:
|
||||
|
||||
Time m_sifs; //!< Short Interframe Space (SIFS) duration
|
||||
Time m_slot; //!< Slot duration
|
||||
Time m_ackTxTime; //!< estimated Ack TX time
|
||||
Time m_blockAckTxTime; //!< estimated BlockAck TX time
|
||||
|
||||
double m_rxSensitivityW; //!< Receive sensitivity threshold in watts
|
||||
double m_ccaEdThresholdW; //!< Clear channel assessment (CCA) threshold in watts
|
||||
|
||||
Reference in New Issue
Block a user