12#include "ns3/bs-net-device.h"
13#include "ns3/config.h"
15#include "ns3/packet.h"
16#include "ns3/pointer.h"
17#include "ns3/simple-ofdm-wimax-channel.h"
18#include "ns3/simple-ofdm-wimax-phy.h"
19#include "ns3/simulator.h"
20#include "ns3/ss-net-device.h"
21#include "ns3/wimax-channel.h"
22#include "ns3/wimax-mac-to-mac-header.h"
23#include "ns3/wimax-net-device.h"
24#include "ns3/wimax-phy.h"
49 std::ostringstream
oss;
50 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::" << netdevice <<
"/"
56 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::" << netdevice <<
"/"
62 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::" << netdevice <<
"/"
216 for (
auto i =
c.Begin();
i !=
c.End();
i++)
242 phy->SetDevice(device);
246 node->AddDevice(device);
260 for (
auto i =
c.Begin();
i !=
c.End();
i++)
282 phy->SetDevice(device);
286 node->AddDevice(device);
301 for (
auto i =
c.Begin();
i !=
c.End();
i++)
323 phy->SetDevice(device);
325 device->Attach(channel);
327 node->AddDevice(device);
359 phy->SetDevice(device);
361 device->Attach(channel);
363 node->AddDevice(device);
419 *stream->GetStream() << path << std::endl;
429 *stream->GetStream() << path << std::endl;
470 NS_LOG_INFO(
"WimaxHelper::EnableAsciiInternal(): Device "
471 << device <<
" not of type ns3::WimaxNetDevice");
508 std::ostringstream
oss;
513 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::WimaxNetDevice/Rx";
516 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::WimaxNetDevice/Tx";
526 (
char*)
"WimaxNetDevice",
527 (
char*)
"InitialRangingConnection");
531 (
char*)
"WimaxNetDevice",
532 (
char*)
"BroadcastConnection");
576 std::ostringstream
oss;
578 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::WimaxNetDevice/Rx";
582 oss <<
"/NodeList/" <<
nodeid <<
"/DeviceList/" <<
deviceid <<
"/$ns3::WimaxNetDevice/Tx";
588 (
char*)
"WimaxNetDevice",
589 (
char*)
"InitialRangingConnection");
593 (
char*)
"WimaxNetDevice",
594 (
char*)
"BroadcastConnection");
628 std::list<Ptr<Packet>> packets =
burst->GetPackets();
629 for (
auto iter = packets.begin();
iter != packets.end(); ++
iter)
652 NS_LOG_INFO(
"WimaxHelper::EnablePcapInternal(): Device "
653 << &device <<
" not of type ns3::WimaxNetDevice");
688 for (
auto i =
c.Begin();
i !=
c.End(); ++
i)
Manage ASCII trace files for device models.
std::string GetFilenameFromDevice(std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
Let the ascii trace helper figure out a reasonable filename to use for an ascii trace file associated...
static void DefaultDropSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Drop default trace sink.
static void DefaultEnqueueSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Enqueue default trace sink.
static void DefaultDequeueSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Dequeue default trace sink.
IpcsClassifierRecord class.
static Mac48Address Allocate()
Allocate a new Mac48Address.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
static void EnablePrinting()
Enable printing packets metadata.
Manage pcap files for device models.
std::string GetFilenameFromDevice(std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
Let the pcap helper figure out a reasonable filename to use for a pcap file associated with a device.
Smart pointer class similar to boost::intrusive_ptr.
This class implements service flows as described by the IEEE-802.16 standard.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Direction
Direction enumeration.
SimpleOfdmWimaxChannel class.
PropModel
PropModel enumeration.
static Time Now()
Return the current simulation virtual time.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
@ SCHED_TYPE_RTPS
A simple scheduler - rtPS based scheduler.
@ SCHED_TYPE_MBQOS
An migration-based uplink scheduler.
@ SCHED_TYPE_SIMPLE
A simple priority-based FCFS scheduler.
NetDeviceType
Net Device Type Distinguish a subscriber station(SS) device from base station(BS) device.
@ DEVICE_TYPE_BASE_STATION
Base station(BS) device.
Ptr< WimaxChannel > m_channel
wifi channel
Ptr< WimaxPhy > CreatePhyWithoutChannel(PhyType phyType)
Ptr< UplinkScheduler > CreateUplinkScheduler(SchedulerType schedulerType)
void SetPropagationLossModel(SimpleOfdmWimaxChannel::PropModel propagationModel)
Set the propagation and loss model of the channel.
PhyType
WiMAX Physical layer WiMAX Physical layers with different levels of detail.
Ptr< BSScheduler > CreateBSScheduler(SchedulerType schedulerType)
Ptr< WimaxPhy > CreatePhy(PhyType phyType)
WimaxHelper()
Create a Wimax helper in an empty state.
void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override
Enable ascii trace output on the indicated net device.
static void AsciiTxEvent(Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &dest)
ASCII trace transmit event.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
static void EnableAsciiForConnection(Ptr< OutputStreamWrapper > oss, uint32_t nodeid, uint32_t deviceid, char *netdevice, char *connection)
Enable ascii trace output on the indicated net device for a given connection.
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
static void EnableLogComponents()
Helper to enable all WimaxNetDevice log components with one statement.
static void AsciiRxEvent(Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &source)
ASCII trace receive event.
ServiceFlow CreateServiceFlow(ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulingType, IpcsClassifierRecord classifier)
Creates a transport service flow.
void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool explicitFilename, bool promiscuous) override
Enable pcap output on the indicated net device.
Hold together all WiMAX-related objects in a NetDevice.
void Connect(std::string path, const CallbackBase &cb)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
static void PcapSniffTxRxEvent(Ptr< PcapFileWrapper > file, Ptr< const PacketBurst > burst)
print pcap record
@ LOG_LEVEL_ALL
Print everything.