wifi: Add StaWifiMac::BeaconArrival trace source

This commit is contained in:
Tom Henderson
2018-08-08 16:10:50 -07:00
parent 8c235ab250
commit 0a29d747c6
4 changed files with 8 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ nodes to be placed outside of buildings defined in the scenario.</li>
<li> The Hash() method has been added to the QueueDiscItem class to compute the
hash of various fields of the packet header (depending on the packet type).</li>
<li> Added a priority queue disc (PrioQueueDisc).</li>
<li> Added a new trace source in StaWifiMac for tracing beacon arrivals</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>

View File

@@ -29,6 +29,7 @@ New user-visible features
The allocator places nodes randomly but in a manner that rejects positions
that are located within buildings defined in the scenario.
- (tcp) Added PRR as recovery algorithm
- (wifi) Add a new trace source to StaWifiMac to trace beacon arrivals
Bugs fixed
----------

View File

@@ -75,6 +75,10 @@ StaWifiMac::GetTypeId (void)
.AddTraceSource ("DeAssoc", "Association with an access point lost.",
MakeTraceSourceAccessor (&StaWifiMac::m_deAssocLogger),
"ns3::Mac48Address::TracedCallback")
.AddTraceSource ("BeaconArrival",
"Time of beacons arrival from associated AP",
MakeTraceSourceAccessor (&StaWifiMac::m_beaconArrival),
"ns3::Time::TracedCallback")
;
return tid;
}
@@ -604,6 +608,7 @@ StaWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)
}
if (goodBeacon && m_state == ASSOCIATED)
{
m_beaconArrival (Simulator::Now ());
Time delay = MicroSeconds (beacon.GetBeaconIntervalUs () * m_maxMissedBeacons);
RestartBeaconWatchdog (delay);
UpdateApInfoFromBeacon (beacon, hdr->GetAddr2 (), hdr->GetAddr3 ());

View File

@@ -318,6 +318,7 @@ private:
TracedCallback<Mac48Address> m_assocLogger; ///< assoc logger
TracedCallback<Mac48Address> m_deAssocLogger; ///< deassoc logger
TracedCallback<Time> m_beaconArrival; ///< beacon arrival logger
};
} //namespace ns3