22 #include "ns3/abort.h"
24 #include "ns3/config.h"
25 #include "ns3/string.h"
26 #include "ns3/uinteger.h"
27 #include "ns3/inet-socket-address.h"
28 #include "ns3/point-to-point-helper.h"
29 #include "ns3/internet-stack-helper.h"
30 #include "ns3/ipv4-address-helper.h"
31 #include "ns3/ipv4-header.h"
32 #include "ns3/packet-sink-helper.h"
33 #include "ns3/simulator.h"
34 #include "ns3/wimax-helper.h"
35 #include "ns3/mobility-helper.h"
36 #include "ns3/global-route-manager.h"
37 #include "ns3/snr-to-block-error-rate-manager.h"
58 virtual void DoRun (
void);
59 bool DoRunOnce (
double);
63 Ns3WimaxSimpleOFDMTestCase::Ns3WimaxSimpleOFDMTestCase ()
64 :
TestCase (
"Test the Phy model with different frame durations")
68 Ns3WimaxSimpleOFDMTestCase::~Ns3WimaxSimpleOFDMTestCase ()
73 Ns3WimaxSimpleOFDMTestCase::DoRunOnce (
double FrameDuration)
85 ssDevs = wimax.
Install (ssNodes, WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
86 WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler, FrameDuration);
87 bsDevs = wimax.
Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION,
88 WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler, FrameDuration);
90 Simulator::Stop (Seconds (1));
92 for (
int i = 0; i < 3; i++)
101 Simulator::Destroy ();
111 frameDuratioTab[7] = { 0.0025, 0.004, 0.005, 0.008, 0.01, 0.0125, 0.02 };
112 for (
int i = 0; i < 7; i++)
114 NS_LOG_DEBUG (
"Frame Duration = " << frameDuratioTab[i]);
115 if (DoRunOnce (frameDuratioTab[i]) !=
false)
133 virtual void DoRun (
void);
134 bool DoRunOnce (uint8_t);
138 Ns3WimaxSNRtoBLERTestCase::Ns3WimaxSNRtoBLERTestCase ()
139 :
TestCase (
"Test the SNR to block error rate module")
143 Ns3WimaxSNRtoBLERTestCase::~Ns3WimaxSNRtoBLERTestCase ()
147 bool Ns3WimaxSNRtoBLERTestCase::DoRunOnce (uint8_t modulationType)
154 for (
double i = -5; i < 40; i += 0.1)
166 for (
int i = 0; i < 7; i++)
180 Ns3WimaxPhyTestSuite::Ns3WimaxPhyTestSuite ()
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
#define NS_LOG_COMPONENT_DEFINE(name)
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
This class represents a record (handled by SnrToBlockErrorRate manager) that keeps a mapping between ...
SNRToBlockErrorRateRecord * GetSNRToBlockErrorRateRecord(double SNR, uint8_t modulation)
returns a record of type SNRToBlockErrorRateRecord corresponding to a given modulation and SNR value ...
holds a vector of ns3::NetDevice pointers
void LoadTraces(void)
Loads the traces form the repository specified in the constructor or setted by SetTraceFilePath funct...
keep track of a set of node pointers.
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite.
virtual void DoRun(void)
Implementation to actually run this test case.
#define NS_LOG_DEBUG(msg)
virtual void DoRun(void)
Implementation to actually run this test case.
helps to manage and create WimaxNetDevice objects
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
This class handles the SNR to BlcER traces. A path to a repository containing trace files should be p...