use Time for the beacon interval.
--- a/src/devices/wifi/mac-high-nqap.cc Wed Oct 31 13:17:45 2007 +0100
+++ b/src/devices/wifi/mac-high-nqap.cc Wed Oct 31 16:26:18 2007 +0100
@@ -22,6 +22,7 @@
#include "dca-txop.h"
#include "wifi-net-device.h"
#include "wifi-mac-header.h"
+#include "wifi-default-parameters.h"
#include "mgt-headers.h"
#include "wifi-phy.h"
#include "ns3/assert.h"
@@ -36,7 +37,7 @@
namespace ns3 {
MacHighNqap::MacHighNqap ()
- : m_beaconIntervalUs (500000)
+ : m_beaconInterval (WifiDefaultParameters::GetApBeaconInterval ())
{}
MacHighNqap::~MacHighNqap ()
{
@@ -71,9 +72,9 @@
m_forwardUp = callback;
}
void
-MacHighNqap::SetBeaconIntervalUs (uint64_t us)
+MacHighNqap::SetBeaconInterval (Time interval)
{
- m_beaconIntervalUs = us;
+ m_beaconInterval = interval;
}
void
MacHighNqap::ForwardDown (Packet packet, Mac48Address from, Mac48Address to)
@@ -126,7 +127,7 @@
MgtProbeResponseHeader probe;
probe.SetSsid (m_device->GetSsid ());
probe.SetSupportedRates (GetSupportedRates ());
- probe.SetBeaconIntervalUs (m_beaconIntervalUs);
+ probe.SetBeaconIntervalUs (m_beaconInterval.GetMicroSeconds ());
packet.AddHeader (probe);
m_dca->Queue (packet, hdr);
--- a/src/devices/wifi/mac-high-nqap.h Wed Oct 31 13:17:45 2007 +0100
+++ b/src/devices/wifi/mac-high-nqap.h Wed Oct 31 16:26:18 2007 +0100
@@ -24,6 +24,7 @@
#include "ns3/mac48-address.h"
#include "ns3/callback.h"
#include "ns3/packet.h"
+#include "ns3/nstime.h"
#include "supported-rates.h"
namespace ns3 {
@@ -46,7 +47,7 @@
void SetStations (MacStations *stations);
void SetPhy (Ptr<WifiPhy> phy);
void SetForwardCallback (ForwardCallback callback);
- void SetBeaconIntervalUs (uint64_t us);
+ void SetBeaconInterval (Time interval);
void Queue (Packet packet, Mac48Address to);
@@ -64,7 +65,7 @@
MacStations *m_stations;
Ptr<WifiPhy> m_phy;
ForwardCallback m_forwardUp;
- uint64_t m_beaconIntervalUs;
+ Time m_beaconInterval;
};
} // namespace ns3