A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::WimaxHelper Class Reference

helps to manage and create WimaxNetDevice objects More...

#include <wimax-helper.h>

+ Inheritance diagram for ns3::WimaxHelper:

Public Types

enum  NetDeviceType { DEVICE_TYPE_SUBSCRIBER_STATION, DEVICE_TYPE_BASE_STATION }
 
enum  PhyType { SIMPLE_PHY_TYPE_OFDM }
 
enum  SchedulerType { SCHED_TYPE_SIMPLE, SCHED_TYPE_RTPS, SCHED_TYPE_MBQOS }
 

Public Member Functions

 WimaxHelper (void)
 Create a Wimax helper in an empty state.
 
int64_t AssignStreams (int64_t stream)
 
int64_t AssignStreams (NetDeviceContainer c, int64_t stream)
 
Ptr< BSSchedulerCreateBSScheduler (SchedulerType schedulerType)
 
Ptr< WimaxPhyCreatePhy (PhyType phyType)
 
Ptr< WimaxPhyCreatePhy (PhyType phyType, char *SNRTraceFilePath, bool activateLoss)
 
Ptr< WimaxPhyCreatePhyWithoutChannel (PhyType phyType)
 
Ptr< WimaxPhyCreatePhyWithoutChannel (PhyType phyType, char *SNRTraceFilePath, bool activateLoss)
 
ServiceFlow CreateServiceFlow (ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulinType, IpcsClassifierRecord classifier)
 Creates a transport service flow. More...
 
Ptr< UplinkSchedulerCreateUplinkScheduler (SchedulerType schedulerType)
 
NetDeviceContainer Install (NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
 
NetDeviceContainer Install (NodeContainer c, NetDeviceType deviceType, PhyType phyType, Ptr< WimaxChannel > channel, SchedulerType schedulerType)
 
NetDeviceContainer Install (NodeContainer c, NetDeviceType deviceType, PhyType phyType, SchedulerType schedulerType, double frameDuration)
 
Ptr< WimaxNetDeviceInstall (Ptr< Node > node, NetDeviceType deviceType, PhyType phyType, Ptr< WimaxChannel > channel, SchedulerType schedulerType)
 
void SetPropagationLossModel (SimpleOfdmWimaxChannel::PropModel propagationModel)
 Set the propagation and loss model of the channel. By default the channel uses a COST231 propagation and loss model. More...
 
- Public Member Functions inherited from ns3::PcapHelperForDevice
 PcapHelperForDevice ()
 Construct a PcapHelperForDevice.
 
virtual ~PcapHelperForDevice ()
 Destroy a PcapHelperForDevice.
 
void EnablePcap (std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
 Enable pcap output the indicated net device. More...
 
void EnablePcap (std::string prefix, std::string ndName, bool promiscuous=false, bool explicitFilename=false)
 Enable pcap output the indicated net device using a device previously named using the ns-3 object name service. More...
 
void EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous=false)
 Enable pcap output on each device in the container which is of the appropriate type. More...
 
void EnablePcap (std::string prefix, NodeContainer n, bool promiscuous=false)
 Enable pcap output on each device (which is of the appropriate type) in the nodes provided in the container. More...
 
void EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false)
 Enable pcap output on the device specified by a global node-id (of a previously created node) and associated device-id. More...
 
void EnablePcapAll (std::string prefix, bool promiscuous=false)
 Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More...
 
- Public Member Functions inherited from ns3::AsciiTraceHelperForDevice
 AsciiTraceHelperForDevice ()
 Construct an AsciiTraceHelperForDevice.
 
virtual ~AsciiTraceHelperForDevice ()
 Destroy an AsciiTraceHelperForDevice.
 
void EnableAscii (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename=false)
 Enable ascii trace output on the indicated net device. More...
 
void EnableAscii (Ptr< OutputStreamWrapper > stream, Ptr< NetDevice > nd)
 Enable ascii trace output on the indicated net device. More...
 
void EnableAscii (std::string prefix, std::string ndName, bool explicitFilename=false)
 Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More...
 
void EnableAscii (Ptr< OutputStreamWrapper > stream, std::string ndName)
 Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More...
 
void EnableAscii (std::string prefix, NetDeviceContainer d)
 Enable ascii trace output on each device in the container which is of the appropriate type. More...
 
void EnableAscii (Ptr< OutputStreamWrapper > stream, NetDeviceContainer d)
 Enable ascii trace output on each device in the container which is of the appropriate type. More...
 
void EnableAscii (std::string prefix, NodeContainer n)
 Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container. More...
 
void EnableAscii (Ptr< OutputStreamWrapper > stream, NodeContainer n)
 Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container. More...
 
void EnableAscii (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename)
 Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id. More...
 
void EnableAscii (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t deviceid)
 Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id. More...
 
void EnableAsciiAll (std::string prefix)
 Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More...
 
void EnableAsciiAll (Ptr< OutputStreamWrapper > stream)
 Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More...
 

Static Public Member Functions

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. More...
 
static void EnableLogComponents (void)
 

Private Member Functions

virtual void EnableAsciiInternal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename)
 Enable ascii trace output on the indicated net device. More...
 
virtual void EnablePcapInternal (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename, bool promiscuous)
 Enable pcap output on the indicated net device. More...
 

Static Private Member Functions

static void AsciiRxEvent (Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &source)
 
static void AsciiTxEvent (Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &dest)
 

Private Attributes

Ptr< WimaxChannelm_channel
 

Detailed Description

helps to manage and create WimaxNetDevice objects

This class can help to create a large set of similar WimaxNetDevice objects and to configure their attributes during creation.

Definition at line 59 of file wimax-helper.h.

Member Enumeration Documentation

Net Device Type Distinguish a subscriber station(SS) device from base station(BS) device

Enumerator
DEVICE_TYPE_SUBSCRIBER_STATION 

Subscriber station(SS) device

DEVICE_TYPE_BASE_STATION 

Base station(BS) device

Definition at line 66 of file wimax-helper.h.

WiMAX Physical layer WiMAX Physical layers with different levels of detail

Definition at line 77 of file wimax-helper.h.

Scheduler Type Different implementations of uplink/downlink scheduler

Enumerator
SCHED_TYPE_SIMPLE 

A simple priority-based FCFS scheduler

SCHED_TYPE_RTPS 

A simple scheduler - rtPS based scheduler

SCHED_TYPE_MBQOS 

An migration-based uplink scheduler

Definition at line 86 of file wimax-helper.h.

Member Function Documentation

int64_t ns3::WimaxHelper::AssignStreams ( int64_t  stream)

Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 595 of file wimax-helper.cc.

References NS_LOG_FUNCTION.

int64_t ns3::WimaxHelper::AssignStreams ( NetDeviceContainer  c,
int64_t  stream 
)

Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.

Parameters
cNetDeviceContainer of the set of net devices for which the WimaxNetDevice should be modified to use a fixed stream
streamfirst stream index to use
Returns
the number of stream indices assigned by this helper

Definition at line 602 of file wimax-helper.cc.

References ns3::NetDeviceContainer::Begin(), and ns3::NetDeviceContainer::End().

Ptr< BSScheduler > ns3::WimaxHelper::CreateBSScheduler ( SchedulerType  schedulerType)
Parameters
schedulerTypeScheduling mechanism
Returns
Downlink scheduler

Creates a downlink scheduler to be used by base station according to selected scheduling mechanism.

Definition at line 184 of file wimax-helper.cc.

References NS_FATAL_ERROR, SCHED_TYPE_MBQOS, SCHED_TYPE_RTPS, and SCHED_TYPE_SIMPLE.

Referenced by Install().

Ptr< WimaxPhy > ns3::WimaxHelper::CreatePhy ( PhyType  phyType)
Parameters
phyTypeWiMAX Physical layer type
Returns
WiMAX Phy object

Creates a physical layer object to be used in simulation.

Definition at line 74 of file wimax-helper.cc.

References NS_FATAL_ERROR.

Referenced by Install().

Ptr< WimaxPhy > ns3::WimaxHelper::CreatePhy ( PhyType  phyType,
char *  SNRTraceFilePath,
bool  activateLoss 
)
Parameters
phyTypeWiMAX Physical layer type
SNRTraceFilePaththe path to the repository containing the SNR traces files
activateLossset to 1 if you want ton activate losses 0 otherwise
Returns
WiMAX Phy object

Creates a physical layer

Definition at line 103 of file wimax-helper.cc.

References NS_FATAL_ERROR.

Ptr< WimaxPhy > ns3::WimaxHelper::CreatePhyWithoutChannel ( PhyType  phyType)
Parameters
phyTypeWiMAX Physical layer type
Returns
WiMAX Phy object

Creates a physical layer without a channel

Definition at line 127 of file wimax-helper.cc.

References NS_FATAL_ERROR.

Referenced by Install().

Ptr< WimaxPhy > ns3::WimaxHelper::CreatePhyWithoutChannel ( PhyType  phyType,
char *  SNRTraceFilePath,
bool  activateLoss 
)
Parameters
phyTypeWiMAX Physical layer type
SNRTraceFilePathof the repository containing the SNR traces files
activateLossset to 1 to activate losses 0 otherwise
Returns
WiMAX Phy object

Creates a physical layer without creating a channel

Definition at line 143 of file wimax-helper.cc.

References NS_FATAL_ERROR.

ServiceFlow ns3::WimaxHelper::CreateServiceFlow ( ServiceFlow::Direction  direction,
ServiceFlow::SchedulingType  schedulinType,
IpcsClassifierRecord  classifier 
)

Creates a transport service flow.

Parameters
directionthe direction of the service flow: UP or DOWN.
schedulinTypeThe service scheduling type to be used: UGS, RTPS, NRTPS, BE
classifierThe classifier to be used for this service flow

Definition at line 422 of file wimax-helper.cc.

Ptr< UplinkScheduler > ns3::WimaxHelper::CreateUplinkScheduler ( SchedulerType  schedulerType)
Parameters
schedulerTypeScheduling mechanism
Returns
Uplink scheduler

Creates a uplink scheduler to be used by base station according to selected scheduling mechanism.

Definition at line 163 of file wimax-helper.cc.

References NS_FATAL_ERROR, SCHED_TYPE_MBQOS, SCHED_TYPE_RTPS, SCHED_TYPE_SIMPLE, and ns3::Seconds().

Referenced by Install().

void ns3::WimaxHelper::EnableAsciiForConnection ( Ptr< OutputStreamWrapper oss,
uint32_t  nodeid,
uint32_t  deviceid,
char *  netdevice,
char *  connection 
)
static

Enable ascii trace output on the indicated net device for a given connection.

Parameters
ossThe output stream object to use when logging ascii traces.
nodeidthe id of the node for which you want to enable tracing.
deviceidthe id of the net device for which you want to enable tracing.
netdevicethe type of net device for which you want to enable tracing (SubscriberStationNetDevice, BaseStationNetDevice or WimaxNetDevice)
connectionthe connection for which you want to enable tracing (InitialRangingConnection, BroadcastConnection, BasicConnection, PrimaryConnection).

Definition at line 52 of file wimax-helper.cc.

References ns3::Config::Connect().

Referenced by EnableAsciiInternal().

void ns3::WimaxHelper::EnableAsciiInternal ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
Ptr< NetDevice nd,
bool  explicitFilename 
)
privatevirtual

Enable ascii trace output on the indicated net device.

NetDevice-specific implementation mechanism for hooking the trace and writing to the trace file.

Parameters
streamThe output stream object to use when logging ascii traces.
prefixFilename prefix to use for ascii trace files.
ndNet device for which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true

Implements ns3::AsciiTraceHelperForDevice.

Definition at line 446 of file wimax-helper.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), EnableAsciiForConnection(), ns3::Packet::EnablePrinting(), ns3::AsciiTraceHelper::GetFilenameFromDevice(), and NS_LOG_INFO.

void ns3::WimaxHelper::EnableLogComponents ( void  )
static

Helper to enable all WimaxNetDevice log components with one statement

Definition at line 363 of file wimax-helper.cc.

References ns3::LogComponentEnable().

void ns3::WimaxHelper::EnablePcapInternal ( std::string  prefix,
Ptr< NetDevice nd,
bool  explicitFilename,
bool  promiscuous 
)
privatevirtual

Enable pcap output on the indicated net device.

NetDevice-specific implementation mechanism for hooking the trace and writing to the trace file.

Parameters
prefixFilename prefix to use for pcap files.
ndNet device for which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true
promiscuousIf true capture all possible packets available at the device.

Implements ns3::PcapHelperForDevice.

Definition at line 562 of file wimax-helper.cc.

References ns3::PcapHelper::CreateFile(), ns3::PcapHelper::GetFilenameFromDevice(), and NS_LOG_INFO.

NetDeviceContainer ns3::WimaxHelper::Install ( NodeContainer  c,
NetDeviceType  type,
PhyType  phyType,
SchedulerType  schedulerType 
)
Parameters
ca set of nodes
typedevice type to create
phyTypea phy to use
schedulerTypethe type of the scheduling algorithm to install

For each of the input nodes, a new WiMAX net device (either ns3::SubscriberStationNetDevice or ns3::BaseStationNetDevice depending on the type parameter) is attached to the shared input channel.

Definition at line 249 of file wimax-helper.cc.

References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), CreateBSScheduler(), CreatePhy(), CreateUplinkScheduler(), DEVICE_TYPE_BASE_STATION, and ns3::NodeContainer::End().

Referenced by Ns3WimaxSfCreationTestCase::DoRun(), Ns3WimaxNetworkEntryTestCase::DoRun(), and Ns3WimaxManagementConnectionsTestCase::DoRun().

NetDeviceContainer ns3::WimaxHelper::Install ( NodeContainer  c,
NetDeviceType  deviceType,
PhyType  phyType,
Ptr< WimaxChannel channel,
SchedulerType  schedulerType 
)
Parameters
cA set of nodes.
deviceTypeDevice type to create.
phyTypePHY type to create.
channelA channel to use.
schedulerTypeThe scheduling mechanism.

For each of the input nodes, a new WiMAX net device (either ns3::SubscriberStationNetDevice or ns3::BaseStationNetDevice depending on the type parameter) is attached to the shared input channel.

Definition at line 288 of file wimax-helper.cc.

References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), CreateBSScheduler(), CreatePhyWithoutChannel(), CreateUplinkScheduler(), DEVICE_TYPE_BASE_STATION, and ns3::NodeContainer::End().

NetDeviceContainer ns3::WimaxHelper::Install ( NodeContainer  c,
NetDeviceType  deviceType,
PhyType  phyType,
SchedulerType  schedulerType,
double  frameDuration 
)
Parameters
cA set of nodes.
deviceTypeDevice type to create.
phyTypePHY type to create.
schedulerTypeThe scheduling mechanism.
frameDurationthe farme duration in seconds

For each of the input nodes, a new WiMAX net device (either ns3::SubscriberStationNetDevice or ns3::BaseStationNetDevice depending on the type parameter) is attached to the shared input channel.

Definition at line 205 of file wimax-helper.cc.

References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), CreateBSScheduler(), CreatePhy(), CreateUplinkScheduler(), DEVICE_TYPE_BASE_STATION, ns3::NodeContainer::End(), and ns3::Seconds().

Ptr< WimaxNetDevice > ns3::WimaxHelper::Install ( Ptr< Node node,
NetDeviceType  deviceType,
PhyType  phyType,
Ptr< WimaxChannel channel,
SchedulerType  schedulerType 
)
Parameters
nodeNode to be installed.
deviceTypeDevice type to create.
phyTypePHY type to create.
channelA channel to use.
schedulerTypeThe scheduling mechanism to install on the device.

For each of the input nodes, a new WiMAX net device (either ns3::SubscriberStationNetDevice or ns3::BaseStationNetDevice depending on the type parameter) is attached to the shared input channel.

Definition at line 327 of file wimax-helper.cc.

References ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), CreateBSScheduler(), CreatePhyWithoutChannel(), CreateUplinkScheduler(), and DEVICE_TYPE_BASE_STATION.

void ns3::WimaxHelper::SetPropagationLossModel ( SimpleOfdmWimaxChannel::PropModel  propagationModel)

Set the propagation and loss model of the channel. By default the channel uses a COST231 propagation and loss model.

Parameters
propagationModelThe propagation and loss model to set

Definition at line 94 of file wimax-helper.cc.


The documentation for this class was generated from the following files: