wifi: (fixes #2463) Add TxopTrace trace source to EdcaTxopN
This commit is contained in:
@@ -58,6 +58,7 @@ us a note on ns-developers mailing list.</p>
|
||||
parameter to specify the time units used on the report. The new parameter is
|
||||
optional and if not specified defaults to the previous behavior (Time::S).
|
||||
</li>
|
||||
<li><b>TxopTrace</b>: new trace source exported by EdcaTxopN.</li>
|
||||
</ul>
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
|
||||
@@ -27,6 +27,7 @@ Bugs fixed
|
||||
- Bug 2007 - uan: Remove deprecation on SetRxThresholdDb
|
||||
- Bug 2221 - network: Remove constraint on size of ns3::Packet Tag objects
|
||||
- Bug 2450 - LogDistancePropagationLossModel is not continuous
|
||||
- Bug 2463 - create trace source to trace the TXOP time that is actually used
|
||||
- Bug 2477 - DCF manager assert
|
||||
- Bug 2492 - uan: Make use of RxGain attribute in UanPhyGen class
|
||||
- Bug 2511 - HT Greenfield is not working
|
||||
|
||||
@@ -248,6 +248,10 @@ EdcaTxopN::GetTypeId (void)
|
||||
"Trace source for contention window values",
|
||||
MakeTraceSourceAccessor (&EdcaTxopN::m_cwTrace),
|
||||
"ns3::TracedValue::Uint32Callback")
|
||||
.AddTraceSource ("TxopTrace",
|
||||
"Trace source for txop start and duration times",
|
||||
MakeTraceSourceAccessor (&EdcaTxopN::m_txopTrace),
|
||||
"ns3::TracedValueCallback::Time")
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
@@ -1184,9 +1188,10 @@ void
|
||||
EdcaTxopN::StartNext (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
NS_ASSERT (GetTxopLimit () == NanoSeconds (0) || Simulator::Now () - m_startTxop <= GetTxopLimit ());
|
||||
|
||||
WifiMacHeader hdr;
|
||||
Time tstamp;
|
||||
|
||||
Ptr<const Packet> peekedPacket = m_queue->PeekByTidAndAddress (&hdr,
|
||||
m_currentHdr.GetQosTid (),
|
||||
WifiMacHeader::ADDR1,
|
||||
@@ -1194,6 +1199,11 @@ EdcaTxopN::StartNext (void)
|
||||
&tstamp);
|
||||
if (peekedPacket == 0)
|
||||
{
|
||||
if (GetTxopLimit () > NanoSeconds (0))
|
||||
{
|
||||
NS_ASSERT (Simulator::Now () - m_startTxop <= GetTxopLimit ());
|
||||
m_txopTrace (m_startTxop, Simulator::Now () - m_startTxop);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1227,6 +1237,11 @@ EdcaTxopN::StartNext (void)
|
||||
m_currentHdr.GetAddr1 ());
|
||||
GetLow ()->StartTransmission (m_currentPacket, &m_currentHdr, params, m_transmissionListener);
|
||||
}
|
||||
else if (GetTxopLimit () > NanoSeconds (0))
|
||||
{
|
||||
NS_ASSERT (Simulator::Now () - m_startTxop <= GetTxopLimit ());
|
||||
m_txopTrace (m_startTxop, Simulator::Now () - m_startTxop);
|
||||
}
|
||||
}
|
||||
|
||||
Time
|
||||
|
||||
@@ -579,6 +579,7 @@ private:
|
||||
bool m_isAccessRequestedForRts;
|
||||
TracedValue<uint32_t> m_backoffTrace;
|
||||
TracedValue<uint32_t> m_cwTrace;
|
||||
TracedCallback<Time, Time> m_txopTrace;
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -1023,6 +1023,9 @@ Bug2222TestCase::DoRun (void)
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("OfdmRate54Mbps"),
|
||||
"ControlMode", StringValue ("OfdmRate24Mbps"));
|
||||
WifiMacHelper mac;
|
||||
Ssid ssid = Ssid ("ns-3-ssid");
|
||||
mac.SetType ("ns3::AdhocWifiMac",
|
||||
|
||||
Reference in New Issue
Block a user