LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2009 MIRKO BANCHI | 3 * Copyright (c) 2009 MIRKO BANCHI |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as· | 6 * it under the terms of the GNU General Public License version 2 as· |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 mac.SetType ("ns3::QstaWifiMac", "Ssid" , SsidValue (ssid), "ActiveProbing", B
ooleanValue (false)); | 73 mac.SetType ("ns3::QstaWifiMac", "Ssid" , SsidValue (ssid), "ActiveProbing", B
ooleanValue (false)); |
74 NetDeviceContainer staDevice = wifi.Install (phy, mac, sta); | 74 NetDeviceContainer staDevice = wifi.Install (phy, mac, sta); |
75 | 75 |
76 mac.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration",
BooleanValue (true), | 76 mac.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration",
BooleanValue (true), |
77 "BeaconInterval", TimeValue (Seconds (2.5))); | 77 "BeaconInterval", TimeValue (Seconds (2.5))); |
78 NetDeviceContainer apDevice = wifi.Install (phy, mac, ap); | 78 NetDeviceContainer apDevice = wifi.Install (phy, mac, ap); |
79 | 79 |
80 /* setting blockack threshold for sta's BE queue */ | 80 /* setting blockack threshold for sta's BE queue */ |
81 Config::Set ("/NodeList/0/DeviceList/0/Mac/BE_EdcaTxopN/BlockAckThreshold", Ui
ntegerValue (2)); | 81 Config::Set ("/NodeList/0/DeviceList/0/Mac/BE_EdcaTxopN/BlockAckThreshold", Ui
ntegerValue (2)); |
82 /* setting block inactivity timeout to 3*1024 = 3072 microseconds */· | 82 /* setting block inactivity timeout to 3*1024 = 3072 microseconds */· |
83 Config::Set ("/NodeList/0/DeviceList/0/Mac/BE_EdcaTxopN/BlockAckInactivityTime
out", UintegerValue (3)); | 83 //Config::Set ("/NodeList/0/DeviceList/0/Mac/BE_EdcaTxopN/BlockAckInactivityTi
meout", UintegerValue (3)); |
84 | 84 |
85 /* Setting mobility model */ | 85 /* Setting mobility model */ |
86 MobilityHelper mobility; | 86 MobilityHelper mobility; |
87 | 87 |
88 mobility.SetPositionAllocator ("ns3::GridPositionAllocator", | 88 mobility.SetPositionAllocator ("ns3::GridPositionAllocator", |
89 "MinX", DoubleValue (0.0), | 89 "MinX", DoubleValue (0.0), |
90 "MinY", DoubleValue (0.0), | 90 "MinY", DoubleValue (0.0), |
91 "DeltaX", DoubleValue (5.0), | 91 "DeltaX", DoubleValue (5.0), |
92 "DeltaY", DoubleValue (10.0), | 92 "DeltaY", DoubleValue (10.0), |
93 "GridWidth", UintegerValue (3), | 93 "GridWidth", UintegerValue (3), |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 Ipv4GlobalRoutingHelper::PopulateRoutingTables (); | 132 Ipv4GlobalRoutingHelper::PopulateRoutingTables (); |
133 | 133 |
134 Simulator::Stop (Seconds (10.0)); | 134 Simulator::Stop (Seconds (10.0)); |
135 | 135 |
136 phy.EnablePcap ("test-blockack-2", ap->GetId (), 0); | 136 phy.EnablePcap ("test-blockack-2", ap->GetId (), 0); |
137 Simulator::Run (); | 137 Simulator::Run (); |
138 Simulator::Destroy (); | 138 Simulator::Destroy (); |
139 | 139 |
140 return 0; | 140 return 0; |
141 } | 141 } |
LEFT | RIGHT |