fixed bug 843
This commit is contained in:
@@ -139,9 +139,7 @@ main (int argc, char *argv[])
|
||||
staDevices = wifi.Install (phy, mac, wifiStaNodes);
|
||||
|
||||
mac.SetType ("ns3::NqapWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
"Ssid", SsidValue (ssid));
|
||||
|
||||
NetDeviceContainer apDevices;
|
||||
apDevices = wifi.Install (phy, mac, wifiApNode);
|
||||
|
||||
@@ -140,9 +140,7 @@ main (int argc, char *argv[])
|
||||
wifi.SetRemoteStationManager ("ns3::ArfWifiManager");
|
||||
|
||||
wifiMac.SetType ("ns3::NqapWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
"Ssid", SsidValue (ssid));
|
||||
NetDeviceContainer devicesLeft = wifi.Install (wifiPhy, wifiMac, nodesLeft.Get (0));
|
||||
|
||||
|
||||
|
||||
@@ -99,9 +99,7 @@ main (int argc, char *argv[])
|
||||
staDevices = wifi.Install (phy, mac, wifiStaNodes);
|
||||
|
||||
mac.SetType ("ns3::NqapWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
"Ssid", SsidValue (ssid));
|
||||
|
||||
NetDeviceContainer apDevices;
|
||||
apDevices = wifi.Install (phy, mac, wifiApNode);
|
||||
|
||||
@@ -283,9 +283,7 @@ main (int argc, char *argv[])
|
||||
"ActiveProbing", BooleanValue (false));
|
||||
NetDeviceContainer staDevices = wifiInfra.Install (wifiPhy, macInfra, stas);
|
||||
// setup ap.
|
||||
macInfra.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
macInfra.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid));
|
||||
NetDeviceContainer apDevices = wifiInfra.Install (wifiPhy, macInfra, backbone.Get (i));
|
||||
// Collect all of these new devices
|
||||
NetDeviceContainer infraDevices (apDevices, staDevices);
|
||||
|
||||
@@ -78,9 +78,7 @@ int main (int argc, char *argv[])
|
||||
staDevices = wifi.Install (phy, mac, wifiNodes);
|
||||
|
||||
mac.SetType ("ns3::QapWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
"Ssid", SsidValue (ssid));
|
||||
mac.SetMsduAggregatorForAc (AC_BE, "ns3::MsduStandardAggregator",
|
||||
"MaxAmsduSize", UintegerValue (7935));
|
||||
|
||||
|
||||
@@ -155,9 +155,7 @@ int main (int argc, char *argv[])
|
||||
"ActiveProbing", BooleanValue (false));
|
||||
staDevs = wifi.Install (wifiPhy, wifiMac, stas);
|
||||
// setup ap.
|
||||
wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid));
|
||||
wifi.Install (wifiPhy, wifiMac, ap);
|
||||
|
||||
// mobility.
|
||||
|
||||
@@ -77,8 +77,7 @@ int main (int argc, char const* argv[])
|
||||
//mac.SetBlockAckInactivityTimeoutForAc (AC_BE, 3);
|
||||
NetDeviceContainer staDevice = wifi.Install (phy, mac, sta);
|
||||
|
||||
mac.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
mac.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid));
|
||||
mac.SetBlockAckThresholdForAc (AC_BE, 0);
|
||||
NetDeviceContainer apDevice = wifi.Install (phy, mac, ap);
|
||||
|
||||
|
||||
@@ -160,9 +160,7 @@ int main (int argc, char *argv[])
|
||||
NetDeviceContainer staDevice = wifi.Install (wifiPhy, wifiMac, c.Get(0));
|
||||
NetDeviceContainer devices = staDevice;
|
||||
// setup ap.
|
||||
wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid));
|
||||
NetDeviceContainer apDevice = wifi.Install (wifiPhy, wifiMac, c.Get(1));
|
||||
devices.Add (apDevice);
|
||||
|
||||
|
||||
@@ -125,9 +125,7 @@ int main (int argc, char *argv[])
|
||||
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
||||
mobility.Install (backboneNodes.Get (i));
|
||||
wifiMac.SetType ("ns3::NqapWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconGeneration", BooleanValue (true),
|
||||
"BeaconInterval", TimeValue (Seconds (2.5)));
|
||||
"Ssid", SsidValue (ssid));
|
||||
apDev = wifi.Install (wifiPhy, wifiMac, backboneNodes.Get (i));
|
||||
|
||||
NetDeviceContainer bridgeDev;
|
||||
@@ -191,7 +189,7 @@ int main (int argc, char *argv[])
|
||||
os.open ("wifi-wired-bridging.mob");
|
||||
MobilityHelper::EnableAsciiAll (os);
|
||||
|
||||
Simulator::Stop (Seconds (100.0));
|
||||
Simulator::Stop (Seconds (5.0));
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ NqapWifiMac::GetTypeId (void)
|
||||
.SetParent<WifiMac> ()
|
||||
.AddConstructor<NqapWifiMac> ()
|
||||
.AddAttribute ("BeaconInterval", "Delay between two beacons",
|
||||
TimeValue (Seconds (0.1)),
|
||||
TimeValue (MicroSeconds (102400)),
|
||||
MakeTimeAccessor (&NqapWifiMac::GetBeaconInterval,
|
||||
&NqapWifiMac::SetBeaconInterval),
|
||||
MakeTimeChecker ())
|
||||
@@ -280,6 +280,10 @@ void
|
||||
NqapWifiMac::SetBeaconInterval (Time interval)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << interval);
|
||||
if ((interval.GetMicroSeconds () % 1024) != 0)
|
||||
{
|
||||
NS_LOG_WARN ("beacon interval should be multiple of 1024us, see IEEE Std. 802.11-2007, section 11.1.1.1");
|
||||
}
|
||||
m_beaconInterval = interval;
|
||||
}
|
||||
void
|
||||
|
||||
@@ -52,7 +52,7 @@ QapWifiMac::GetTypeId (void)
|
||||
.SetParent<WifiMac> ()
|
||||
.AddConstructor<QapWifiMac> ()
|
||||
.AddAttribute ("BeaconInterval", "Delay between two beacons",
|
||||
TimeValue (Seconds (0.1)),
|
||||
TimeValue (MicroSeconds (102400)),
|
||||
MakeTimeAccessor (&QapWifiMac::GetBeaconInterval,
|
||||
&QapWifiMac::SetBeaconInterval),
|
||||
MakeTimeChecker ())
|
||||
@@ -352,6 +352,10 @@ void
|
||||
QapWifiMac::SetBeaconInterval (Time interval)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << interval);
|
||||
if ((interval.GetMicroSeconds () % 1024) != 0)
|
||||
{
|
||||
NS_LOG_WARN ("beacon interval should be multiple of 1024us, see IEEE Std. 802.11-2007, section 11.1.1.1");
|
||||
}
|
||||
m_beaconInterval = interval;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user