23 #include "ns3/abort.h"
25 #include "ns3/uinteger.h"
26 #include "ns3/inet-socket-address.h"
27 #include "ns3/point-to-point-helper.h"
28 #include "ns3/internet-stack-helper.h"
29 #include "ns3/ipv4-address-helper.h"
30 #include "ns3/ipv4-header.h"
31 #include "ns3/packet-sink-helper.h"
32 #include "ns3/udp-client-server-helper.h"
33 #include "ns3/udp-header.h"
34 #include "ns3/simulator.h"
35 #include "ns3/wimax-helper.h"
36 #include "ns3/mobility-helper.h"
37 #include "ns3/global-route-manager.h"
38 #include "ns3/wimax-tlv.h"
39 #include "ns3/ipcs-classifier-record.h"
40 #include "ns3/service-flow.h"
55 virtual void DoRun (
void);
59 Ns3WimaxSfCreationTestCase::Ns3WimaxSfCreationTestCase ()
60 :
TestCase (
"Test the service flow tlv implementation.")
64 Ns3WimaxSfCreationTestCase::~Ns3WimaxSfCreationTestCase ()
86 ssDevs = wimax.
Install (ssNodes,
87 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
88 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
90 bsDevs = wimax.
Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);
97 stack.Install (ssNodes);
100 address.
SetBase (
"10.1.1.0",
"255.255.255.0");
117 CsParameters DlcsParam (CsParameters::ADD, DlClassifierUgs);
118 DlServiceFlowUgs->SetConvergenceSublayerParam (DlcsParam);
119 DlServiceFlowUgs->SetCsSpecification (ServiceFlow::IPV4);
120 DlServiceFlowUgs->SetServiceSchedulingType (ServiceFlow::SF_TYPE_UGS);
121 DlServiceFlowUgs->SetMaxSustainedTrafficRate (1000000);
122 DlServiceFlowUgs->SetMinReservedTrafficRate (1000000);
123 DlServiceFlowUgs->SetMinTolerableTrafficRate (1000000);
124 DlServiceFlowUgs->SetMaximumLatency (10);
125 DlServiceFlowUgs->SetMaxTrafficBurst (1000);
126 DlServiceFlowUgs->SetTrafficPriority (1);
140 CsParameters UlcsParam (CsParameters::ADD, UlClassifierUgs);
141 UlServiceFlowUgs->SetConvergenceSublayerParam (UlcsParam);
142 UlServiceFlowUgs->SetCsSpecification (ServiceFlow::IPV4);
143 UlServiceFlowUgs->SetServiceSchedulingType (ServiceFlow::SF_TYPE_UGS);
144 UlServiceFlowUgs->SetMaxSustainedTrafficRate (1000000);
145 UlServiceFlowUgs->SetMinReservedTrafficRate (1000000);
146 UlServiceFlowUgs->SetMinTolerableTrafficRate (1000000);
147 UlServiceFlowUgs->SetMaximumLatency (10);
148 UlServiceFlowUgs->SetMaxTrafficBurst (1000);
149 UlServiceFlowUgs->SetTrafficPriority (1);
153 Simulator::Stop (
Seconds (duration));
155 Simulator::Destroy ();
165 Ns3WimaxServiceFlowTestSuite::Ns3WimaxServiceFlowTestSuite ()
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
a class to represent an Ipv4 address mask
aggregate IP/TCP/UDP functionality to existing Nodes.
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Install(std::string nodeName) const
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite.
Ipv4 addresses are stored in host order in this class.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Time Seconds(double seconds)
create ns3::Time instances in units of seconds.
helps to manage and create WimaxNetDevice objects
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
virtual void DoRun(void)
Implementation to actually run this test case.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.