23 #include "ns3/simulator.h"
24 #include "ns3/node-container.h"
25 #include "ns3/net-device-container.h"
26 #include "ns3/wimax-helper.h"
27 #include "ns3/snr-to-block-error-rate-manager.h"
47 virtual void DoRun (
void);
48 bool DoRunOnce (
double);
53 :
TestCase (
"Test the Phy model with different frame durations")
74 ssDevs = wimax.
Install (ssNodes, WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
75 WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler, FrameDuration);
76 bsDevs = wimax.
Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION,
77 WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler, FrameDuration);
81 for (
int i = 0; i < 3; i++)
90 Simulator::Destroy ();
100 frameDuratioTab[7] = { 0.0025, 0.004, 0.005, 0.008, 0.01, 0.0125, 0.02 };
101 for (
int i = 0; i < 7; i++)
103 NS_LOG_DEBUG (
"Frame Duration = " << frameDuratioTab[i]);
104 if (
DoRunOnce (frameDuratioTab[i]) !=
false)
122 virtual void DoRun (
void);
128 :
TestCase (
"Test the SNR to block error rate module")
143 for (
double i = -5; i < 40; i += 0.1)
155 for (
int i = 0; i < 7; i++)
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
Ns3WimaxSNRtoBLERTestCase()
virtual ~Ns3WimaxSNRtoBLERTestCase()
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 ...
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
holds a vector of ns3::NetDevice pointers
Ns3WimaxSimpleOFDMTestCase()
virtual ~Ns3WimaxSimpleOFDMTestCase()
void LoadTraces(void)
Loads the traces form the repository specified in the constructor or setted by SetTraceFilePath funct...
static Ns3WimaxPhyTestSuite ns3WimaxPhyTestSuite
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
virtual void DoRun(void)
Implementation to actually run this TestCase.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
virtual void DoRun(void)
Implementation to actually run this TestCase.
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.