23 #include "ns3/simulator.h"
24 #include "ns3/packet.h"
27 #include "ns3/config.h"
28 #include "ns3/wimax-net-device.h"
29 #include "ns3/bs-net-device.h"
30 #include "ns3/ss-net-device.h"
31 #include "ns3/wimax-channel.h"
32 #include "ns3/simple-ofdm-wimax-channel.h"
33 #include "ns3/wimax-phy.h"
34 #include "ns3/simple-ofdm-wimax-phy.h"
35 #include "ns3/pointer.h"
36 #include "ns3/wimax-mac-to-mac-header.h"
58 std::ostringstream oss;
59 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::" << netdevice <<
"/" << connection
60 <<
"/TxQueue/Enqueue";
64 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::" << netdevice <<
"/" << connection
65 <<
"/TxQueue/Dequeue";
69 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::" << netdevice <<
"/" << connection
80 phy = CreateObject<SimpleOfdmWimaxPhy> ();
98 m_channel = CreateObject<SimpleOfdmWimaxChannel> ();
110 sphy = CreateObject<SimpleOfdmWimaxPhy> ();
133 phy = CreateObject<SimpleOfdmWimaxPhy> ();
150 sphy = CreateObject<SimpleOfdmWimaxPhy> ();
166 switch (schedulerType)
169 uplinkScheduler = CreateObject<UplinkSchedulerSimple> ();
172 uplinkScheduler = CreateObject<UplinkSchedulerRtps> ();
175 uplinkScheduler = CreateObject<UplinkSchedulerMBQoS> (Seconds (0.25));
181 return uplinkScheduler;
187 switch (schedulerType)
190 bsScheduler = CreateObject<BSSchedulerSimple> ();
193 bsScheduler = CreateObject<BSSchedulerRtps> ();
196 bsScheduler = CreateObject<BSSchedulerSimple> ();
209 double frameDuration)
228 deviceBS = CreateObject<BaseStationNetDevice> (node, phy, uplinkScheduler, bsScheduler);
230 uplinkScheduler->SetBs (deviceBS);
231 bsScheduler->
SetBs (deviceBS);
235 device = CreateObject<SubscriberStationNetDevice> (node, phy);
244 devices.
Add (device);
267 deviceBS = CreateObject<BaseStationNetDevice> (node, phy, uplinkScheduler, bsScheduler);
269 uplinkScheduler->SetBs (deviceBS);
270 bsScheduler->
SetBs (deviceBS);
274 device = CreateObject<SubscriberStationNetDevice> (node, phy);
283 devices.
Add (device);
307 deviceBS = CreateObject<BaseStationNetDevice> (node, phy, uplinkScheduler, bsScheduler);
309 uplinkScheduler->SetBs (deviceBS);
310 bsScheduler->
SetBs (deviceBS);
314 device = CreateObject<SubscriberStationNetDevice> (node, phy);
322 devices.
Add (device);
343 deviceBS = CreateObject<BaseStationNetDevice> (node, phy, uplinkScheduler, bsScheduler);
345 uplinkScheduler->SetBs (deviceBS);
346 bsScheduler->
SetBs (deviceBS);
350 device = CreateObject<SubscriberStationNetDevice> (node, phy);
413 *stream->
GetStream () << path << std::endl;
419 *stream->
GetStream () << path << std::endl;
449 bool explicitFilename)
459 NS_LOG_INFO (
"WimaxHelper::EnableAsciiInternal(): Device " << device <<
" not of type ns3::WimaxNetDevice");
483 std::string filename;
484 if (explicitFilename)
496 std::ostringstream oss;
501 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::WimaxNetDevice/Rx";
504 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::WimaxNetDevice/Tx";
511 EnableAsciiForConnection (theStream, nodeid, deviceid, (
char*)
"WimaxNetDevice", (
char*)
"InitialRangingConnection");
513 EnableAsciiForConnection (theStream, nodeid, deviceid, (
char*)
"SubscriberStationNetDevice", (
char*)
"BasicConnection");
514 EnableAsciiForConnection (theStream, nodeid, deviceid, (
char*)
"SubscriberStationNetDevice", (
char*)
"PrimaryConnection");
532 std::ostringstream oss;
534 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::WimaxNetDevice/Rx";
538 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::WimaxNetDevice/Tx";
543 EnableAsciiForConnection (stream, nodeid, deviceid, (
char*)
"SubscriberStationNetDevice", (
char*)
"BasicConnection");
544 EnableAsciiForConnection (stream, nodeid, deviceid, (
char*)
"SubscriberStationNetDevice", (
char*)
"PrimaryConnection");
551 std::list<Ptr<Packet> > packets = burst->
GetPackets ();
572 NS_LOG_INFO (
"WimaxHelper::EnablePcapInternal(): Device " << &device <<
" not of type ns3::WimaxNetDevice");
578 std::string filename;
579 if (explicitFilename)
604 int64_t currentStream = stream;
620 return (currentStream - stream);