wifi: Cleanup header inclusions in wifi examples

This commit is contained in:
Sébastien Deronne
2018-05-08 21:32:30 +02:00
parent aa7ecb65f3
commit b88cf084f0
5 changed files with 45 additions and 20 deletions

View File

@@ -49,8 +49,12 @@
// logs associated to the chosen scenario.
//
#include "ns3/log.h"
#include "ns3/packet.h"
#include "ns3/core-module.h"
#include "ns3/config.h"
#include "ns3/double.h"
#include "ns3/simulator.h"
#include "ns3/command-line.h"
#include "ns3/yans-wifi-channel.h"
#include "ns3/yans-wifi-phy.h"
#include "ns3/propagation-loss-model.h"

View File

@@ -37,13 +37,23 @@
// --broadcast instead of unicast (default is unicast)
// --rtsThreshold (by default, value of 99999 disables it)
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/wifi-module.h"
#include "ns3/stats-module.h"
#include "ns3/mobility-module.h"
#include "ns3/propagation-module.h"
#include "ns3/log.h"
#include "ns3/config.h"
#include "ns3/uinteger.h"
#include "ns3/boolean.h"
#include "ns3/double.h"
#include "ns3/gnuplot.h"
#include "ns3/command-line.h"
#include "ns3/yans-wifi-helper.h"
#include "ns3/ssid.h"
#include "ns3/propagation-loss-model.h"
#include "ns3/propagation-delay-model.h"
#include "ns3/rng-seed-manager.h"
#include "ns3/mobility-helper.h"
#include "ns3/wifi-net-device.h"
#include "ns3/packet-socket-helper.h"
#include "ns3/packet-socket-client.h"
#include "ns3/packet-socket-server.h"
using namespace ns3;
@@ -317,7 +327,7 @@ int main (int argc, char *argv[])
NS_ABORT_IF (clientSelectedStandard.m_name == "none");
std::cout << "Testing " << serverSelectedStandard.m_name << " with " << wifiManager << " ..." << std::endl;
NS_ABORT_MSG_IF (clientSelectedStandard.m_snrLow >= clientSelectedStandard.m_snrHigh, "SNR values in wrong order");
steps = static_cast<uint32_t> (std::abs<double> ((clientSelectedStandard.m_snrHigh - clientSelectedStandard.m_snrLow ) / stepSize) + 1);
steps = static_cast<uint32_t> (std::abs (static_cast<double> (clientSelectedStandard.m_snrHigh - clientSelectedStandard.m_snrLow ) / stepSize) + 1);
NS_LOG_DEBUG ("Using " << steps << " steps for SNR range " << clientSelectedStandard.m_snrLow << ":" << clientSelectedStandard.m_snrHigh);
Ptr<Node> clientNode = CreateObject<Node> ();
Ptr<Node> serverNode = CreateObject<Node> ();

View File

@@ -23,15 +23,22 @@
// WifiHelper.SetStandard () and the physical layer channel number,
// center frequency, and channel width.
#include "ns3/log.h"
#include "ns3/command-line.h"
#include "ns3/config-store.h"
#include "ns3/core-module.h"
#include "ns3/wifi-module.h"
#include "ns3/config.h"
#include "ns3/boolean.h"
#include "ns3/uinteger.h"
#include "ns3/string.h"
#include "ns3/ssid.h"
#include "ns3/yans-wifi-phy.h"
#include "ns3/yans-wifi-helper.h"
#include "ns3/wifi-net-device.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiPhyConfigurationExample");
Ptr<YansWifiPhy>
GetYansWifiPhyPtr (const NetDeviceContainer &nc)
{

View File

@@ -18,11 +18,15 @@
* Author: Rediet <getachew.redieteab@orange.com>
*/
#include "ns3/core-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/spectrum-module.h"
#include "ns3/gnuplot.h"
#include "ns3/command-line.h"
#include "ns3/string.h"
#include "ns3/ssid.h"
#include "ns3/spectrum-helper.h"
#include "ns3/spectrum-wifi-helper.h"
#include "ns3/spectrum-analyzer-helper.h"
#include "ns3/spectrum-channel.h"
#include "ns3/mobility-helper.h"
using namespace ns3;

View File

@@ -5,21 +5,21 @@ def build(bld):
return;
obj = bld.create_ns3_program('wifi-phy-test',
['core', 'mobility', 'network', 'wifi'])
['wifi'])
obj.source = 'wifi-phy-test.cc'
obj = bld.create_ns3_program('test-interference-helper',
['core', 'mobility', 'network', 'wifi'])
['wifi'])
obj.source = 'test-interference-helper.cc'
obj = bld.create_ns3_program('wifi-manager-example',
['core', 'network', 'wifi', 'stats', 'mobility', 'propagation'])
['wifi'])
obj.source = 'wifi-manager-example.cc'
obj = bld.create_ns3_program('wifi-trans-example',
['core', 'mobility', 'spectrum', 'wifi'])
['wifi'])
obj.source = 'wifi-trans-example.cc'
obj = bld.create_ns3_program('wifi-phy-configuration',
['core', 'wifi', 'config-store'])
['wifi', 'config-store'])
obj.source = 'wifi-phy-configuration.cc'