cwmin modifier
diff -r d96b35dc7d26 -r 51f196560e79 model/dca-txop.cc
--- a/model/dca-txop.cc Fri Aug 01 18:11:06 2014 -0300
+++ b/model/dca-txop.cc Fri Aug 01 18:11:48 2014 -0300
@@ -132,6 +132,11 @@
PointerValue (),
MakePointerAccessor (&DcaTxop::GetQueue),
MakePointerChecker<WifiMacQueue> ())
+ .AddAttribute ("CwMin",
+ "Sets the minimum contention window.",
+ UintegerValue (31),
+ MakeUintegerAccessor (&DcaTxop::m_initMinCw),
+ MakeUintegerChecker<uint32_t> ())
;
return tid;
}
@@ -250,6 +255,13 @@
return m_dcf->GetAifsn ();
}
+uint32_t
+DcaTxop::GetInitialMinCw (void) const
+{
+ NS_LOG_FUNCTION (this);
+ return m_initMinCw;
+}
+
void
DcaTxop::Queue (Ptr<const Packet> packet, const WifiMacHeader &hdr)
{
diff -r d96b35dc7d26 -r 51f196560e79 model/dca-txop.h
--- a/model/dca-txop.h Fri Aug 01 18:11:06 2014 -0300
+++ b/model/dca-txop.h Fri Aug 01 18:11:48 2014 -0300
@@ -150,6 +150,8 @@
* \return the number of stream indices assigned by this model
*/
int64_t AssignStreams (int64_t stream);
+
+ uint32_t GetInitialMinCw (void) const;
private:
class TransmissionListener;
@@ -324,6 +326,8 @@
Ptr<const Packet> m_currentPacket;
WifiMacHeader m_currentHdr;
uint8_t m_fragmentNumber;
+
+ uint32_t m_initMinCw;
};
} // namespace ns3
diff -r d96b35dc7d26 -r 51f196560e79 model/regular-wifi-mac.cc
--- a/model/regular-wifi-mac.cc Fri Aug 01 18:11:06 2014 -0300
+++ b/model/regular-wifi-mac.cc Fri Aug 01 18:11:48 2014 -0300
@@ -714,7 +714,8 @@
break;
case WIFI_PHY_STANDARD_80211b:
- cwmin = 31;
+// cwmin = 31;
+ cwmin = m_dca->GetInitialMinCw ();
cwmax = 1023;
break;
I hope it helps.