helps to manage and create WimaxNetDevice objects More...
#include "wimax-helper.h"
Public Types | |
enum | NetDeviceType { DEVICE_TYPE_SUBSCRIBER_STATION , DEVICE_TYPE_BASE_STATION } |
Net Device Type Distinguish a subscriber station(SS) device from base station(BS) device. More... | |
enum | PhyType { SIMPLE_PHY_TYPE_OFDM } |
WiMAX Physical layer WiMAX Physical layers with different levels of detail. More... | |
enum | SchedulerType { SCHED_TYPE_SIMPLE , SCHED_TYPE_RTPS , SCHED_TYPE_MBQOS } |
Scheduler Type Different implementations of uplink/downlink scheduler. More... | |
Public Member Functions | |
WimaxHelper () | |
Create a Wimax helper in an empty state. | |
~WimaxHelper () override | |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. | |
int64_t | AssignStreams (NetDeviceContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. | |
Ptr< BSScheduler > | CreateBSScheduler (SchedulerType schedulerType) |
Ptr< WimaxPhy > | CreatePhy (PhyType phyType) |
Ptr< WimaxPhy > | CreatePhy (PhyType phyType, char *SNRTraceFilePath, bool activateLoss) |
Ptr< WimaxPhy > | CreatePhyWithoutChannel (PhyType phyType) |
Ptr< WimaxPhy > | CreatePhyWithoutChannel (PhyType phyType, char *SNRTraceFilePath, bool activateLoss) |
ServiceFlow | CreateServiceFlow (ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulingType, IpcsClassifierRecord classifier) |
Creates a transport service flow. | |
Ptr< UplinkScheduler > | CreateUplinkScheduler (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) |
NetDeviceContainer | Install (NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType) |
Ptr< WimaxNetDevice > | Install (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. | |
Public Member Functions inherited from ns3::PcapHelperForDevice | |
PcapHelperForDevice () | |
Construct a PcapHelperForDevice. | |
virtual | ~PcapHelperForDevice () |
Destroy a PcapHelperForDevice. | |
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. | |
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. | |
void | EnablePcap (std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false) |
Enable pcap output the indicated net device. | |
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. | |
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. | |
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. | |
Public Member Functions inherited from ns3::AsciiTraceHelperForDevice | |
AsciiTraceHelperForDevice () | |
Construct an AsciiTraceHelperForDevice. | |
virtual | ~AsciiTraceHelperForDevice () |
Destroy an AsciiTraceHelperForDevice. | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type. | |
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. | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, Ptr< NetDevice > nd) |
Enable ascii trace output on the indicated net device. | |
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. | |
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. | |
void | EnableAscii (std::string prefix, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type. | |
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. | |
void | EnableAscii (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename=false) |
Enable ascii trace output on the indicated net device. | |
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. | |
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. | |
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. | |
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. | |
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. | |
static void | EnableLogComponents () |
Helper to enable all WimaxNetDevice log components with one statement. | |
Private Member Functions | |
void | EnableAsciiInternal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override |
Enable ascii trace output on the indicated net device. | |
void | EnablePcapInternal (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename, bool promiscuous) override |
Enable pcap output on the indicated net device. | |
Static Private Member Functions | |
static void | AsciiRxEvent (Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &source) |
ASCII trace receive event. | |
static void | AsciiTxEvent (Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &dest) |
ASCII trace transmit event. | |
Private Attributes | |
Ptr< WimaxChannel > | m_channel |
wifi channel | |
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 47 of file wimax-helper.h.
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 54 of file wimax-helper.h.
WiMAX Physical layer WiMAX Physical layers with different levels of detail.
Enumerator | |
---|---|
SIMPLE_PHY_TYPE_OFDM |
Definition at line 65 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 74 of file wimax-helper.h.
ns3::WimaxHelper::WimaxHelper | ( | ) |
Create a Wimax helper in an empty state.
Definition at line 33 of file wimax-helper.cc.
|
override |
Definition at line 38 of file wimax-helper.cc.
|
staticprivate |
ASCII trace receive event.
stream | the output stream |
path | the path name |
packet | the packet |
source | the source MAC address |
Definition at line 413 of file wimax-helper.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by EnableAsciiInternal().
|
staticprivate |
ASCII trace transmit event.
stream | the output stream |
path | the path |
packet | the packet |
dest | the destination MAC address |
Definition at line 423 of file wimax-helper.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by EnableAsciiInternal().
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.
stream | first stream index to use |
Definition at line 677 of file wimax-helper.cc.
References m_channel, and 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.
c | NetDeviceContainer of the set of net devices for which the WimaxNetDevice should be modified to use a fixed stream |
stream | first stream index to use |
Definition at line 684 of file wimax-helper.cc.
References ns3::NetDeviceContainer::Begin(), ns3::DynamicCast(), ns3::NetDeviceContainer::End(), and m_channel.
Ptr< BSScheduler > ns3::WimaxHelper::CreateBSScheduler | ( | SchedulerType | schedulerType | ) |
schedulerType | Scheduling mechanism |
Creates a downlink scheduler to be used by base station according to selected scheduling mechanism.
Definition at line 187 of file wimax-helper.cc.
References ns3::CreateObject(), NS_FATAL_ERROR, SCHED_TYPE_MBQOS, SCHED_TYPE_RTPS, and SCHED_TYPE_SIMPLE.
Referenced by Install(), Install(), Install(), and Install().
phyType | WiMAX Physical layer type |
Creates a physical layer object to be used in simulation.
Definition at line 69 of file wimax-helper.cc.
References ns3::SimpleOfdmWimaxChannel::COST231_PROPAGATION, ns3::CreateObject(), m_channel, NS_FATAL_ERROR, and SIMPLE_PHY_TYPE_OFDM.
Referenced by Install(), and Install().
Ptr< WimaxPhy > ns3::WimaxHelper::CreatePhy | ( | PhyType | phyType, |
char * | SNRTraceFilePath, | ||
bool | activateLoss ) |
phyType | WiMAX Physical layer type |
SNRTraceFilePath | the path to the repository containing the SNR traces files |
activateLoss | set to 1 if you want ton activate losses 0 otherwise |
Creates a physical layer
Definition at line 101 of file wimax-helper.cc.
References ns3::SimpleOfdmWimaxChannel::COST231_PROPAGATION, ns3::CreateObject(), m_channel, NS_FATAL_ERROR, and SIMPLE_PHY_TYPE_OFDM.
phyType | WiMAX Physical layer type |
Creates a physical layer without a channel
Definition at line 127 of file wimax-helper.cc.
References ns3::CreateObject(), NS_FATAL_ERROR, and SIMPLE_PHY_TYPE_OFDM.
Referenced by Install(), and Install().
Ptr< WimaxPhy > ns3::WimaxHelper::CreatePhyWithoutChannel | ( | PhyType | phyType, |
char * | SNRTraceFilePath, | ||
bool | activateLoss ) |
phyType | WiMAX Physical layer type |
SNRTraceFilePath | of the repository containing the SNR traces files |
activateLoss | set to 1 to activate losses 0 otherwise |
Creates a physical layer without creating a channel
Definition at line 144 of file wimax-helper.cc.
References ns3::CreateObject(), NS_FATAL_ERROR, and SIMPLE_PHY_TYPE_OFDM.
ServiceFlow ns3::WimaxHelper::CreateServiceFlow | ( | ServiceFlow::Direction | direction, |
ServiceFlow::SchedulingType | schedulingType, | ||
IpcsClassifierRecord | classifier ) |
Creates a transport service flow.
direction | the direction of the service flow: UP or DOWN. |
schedulingType | The service scheduling type to be used: UGS, RTPS, NRTPS, BE |
classifier | The classifier to be used for this service flow |
Definition at line 433 of file wimax-helper.cc.
References ns3::CsParameters::ADD, ns3::ServiceFlow::IPV4, ns3::ServiceFlow::SetConvergenceSublayerParam(), ns3::ServiceFlow::SetCsSpecification(), ns3::ServiceFlow::SetMaximumLatency(), ns3::ServiceFlow::SetMaxSustainedTrafficRate(), ns3::ServiceFlow::SetMaxTrafficBurst(), ns3::ServiceFlow::SetMinReservedTrafficRate(), ns3::ServiceFlow::SetMinTolerableTrafficRate(), ns3::ServiceFlow::SetRequestTransmissionPolicy(), ns3::ServiceFlow::SetSduSize(), ns3::ServiceFlow::SetServiceSchedulingType(), ns3::ServiceFlow::SetToleratedJitter(), ns3::ServiceFlow::SetTrafficPriority(), and ns3::ServiceFlow::SetUnsolicitedGrantInterval().
Referenced by Ns3WimaxSchedulingTestCase::DoRunOnce(), and Ns3WimaxSFTypeTestCase::DoRunOnce().
Ptr< UplinkScheduler > ns3::WimaxHelper::CreateUplinkScheduler | ( | SchedulerType | schedulerType | ) |
schedulerType | Scheduling mechanism |
Creates a uplink scheduler to be used by base station according to selected scheduling mechanism.
Definition at line 165 of file wimax-helper.cc.
References ns3::CreateObject(), NS_FATAL_ERROR, SCHED_TYPE_MBQOS, SCHED_TYPE_RTPS, SCHED_TYPE_SIMPLE, and ns3::Seconds().
Referenced by Install(), Install(), Install(), and Install().
|
static |
Enable ascii trace output on the indicated net device for a given connection.
oss | The output stream object to use when logging ascii traces. |
nodeid | the id of the node for which you want to enable tracing. |
deviceid | the id of the net device for which you want to enable tracing. |
netdevice | the type of net device for which you want to enable tracing (SubscriberStationNetDevice, BaseStationNetDevice or WimaxNetDevice) |
connection | the connection for which you want to enable tracing (InitialRangingConnection, BroadcastConnection, BasicConnection, PrimaryConnection). |
Definition at line 43 of file wimax-helper.cc.
References ns3::Config::Connect(), ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(), ns3::AsciiTraceHelper::DefaultDropSinkWithContext(), ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(), and ns3::MakeBoundCallback().
Referenced by EnableAsciiInternal().
|
overrideprivatevirtual |
Enable ascii trace output on the indicated net device.
NetDevice-specific implementation mechanism for hooking the trace and writing to the trace file.
stream | The output stream object to use when logging ascii traces. |
prefix | Filename prefix to use for ascii trace files. |
nd | Net device for which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Implements ns3::AsciiTraceHelperForDevice.
Definition at line 457 of file wimax-helper.cc.
References AsciiRxEvent(), AsciiTxEvent(), ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(), ns3::AsciiTraceHelper::DefaultDropSinkWithContext(), ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(), ns3::DynamicCast(), EnableAsciiForConnection(), ns3::Packet::EnablePrinting(), ns3::AsciiTraceHelper::GetFilenameFromDevice(), ns3::MakeBoundCallback(), and NS_LOG_INFO.
|
static |
Helper to enable all WimaxNetDevice log components with one statement.
Definition at line 369 of file wimax-helper.cc.
References ns3::LOG_LEVEL_ALL, and ns3::LogComponentEnable().
|
overrideprivatevirtual |
Enable pcap output on the indicated net device.
NetDevice-specific implementation mechanism for hooking the trace and writing to the trace file.
prefix | Filename prefix to use for pcap files. |
nd | Net device for which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
promiscuous | If true capture all possible packets available at the device. |
Implements ns3::PcapHelperForDevice.
Definition at line 639 of file wimax-helper.cc.
References ns3::PcapHelper::CreateFile(), ns3::PcapHelper::DLT_EN10MB, ns3::PcapHelper::GetFilenameFromDevice(), ns3::MakeBoundCallback(), NS_LOG_INFO, and ns3::PcapSniffTxRxEvent().
NetDeviceContainer ns3::WimaxHelper::Install | ( | NodeContainer | c, |
NetDeviceType | deviceType, | ||
PhyType | phyType, | ||
Ptr< WimaxChannel > | channel, | ||
SchedulerType | schedulerType ) |
c | A set of nodes. |
deviceType | Device type to create. |
phyType | PHY type to create. |
channel | A channel to use. |
schedulerType | The 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 294 of file wimax-helper.cc.
References ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), CreateBSScheduler(), ns3::CreateObject(), CreatePhyWithoutChannel(), CreateUplinkScheduler(), DEVICE_TYPE_BASE_STATION, and ns3::NodeContainer::End().
NetDeviceContainer ns3::WimaxHelper::Install | ( | NodeContainer | c, |
NetDeviceType | deviceType, | ||
PhyType | phyType, | ||
SchedulerType | schedulerType, | ||
double | frameDuration ) |
c | A set of nodes. |
deviceType | Device type to create. |
phyType | PHY type to create. |
schedulerType | The scheduling mechanism. |
frameDuration | the 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 209 of file wimax-helper.cc.
References ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), CreateBSScheduler(), ns3::CreateObject(), CreatePhy(), CreateUplinkScheduler(), DEVICE_TYPE_BASE_STATION, ns3::NodeContainer::End(), m_channel, and ns3::Seconds().
NetDeviceContainer ns3::WimaxHelper::Install | ( | NodeContainer | c, |
NetDeviceType | type, | ||
PhyType | phyType, | ||
SchedulerType | schedulerType ) |
c | a set of nodes |
type | device type to create |
phyType | a phy to use |
schedulerType | the 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 254 of file wimax-helper.cc.
References ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), CreateBSScheduler(), ns3::CreateObject(), CreatePhy(), CreateUplinkScheduler(), DEVICE_TYPE_BASE_STATION, ns3::NodeContainer::End(), and m_channel.
Referenced by Ns3WimaxManagementConnectionsTestCase::DoRun(), Ns3WimaxNetworkEntryTestCase::DoRun(), Ns3WimaxSfCreationTestCase::DoRun(), Ns3WimaxSchedulingTestCase::DoRunOnce(), Ns3WimaxSFTypeTestCase::DoRunOnce(), and Ns3WimaxSimpleOFDMTestCase::DoRunOnce().
Ptr< WimaxNetDevice > ns3::WimaxHelper::Install | ( | Ptr< Node > | node, |
NetDeviceType | deviceType, | ||
PhyType | phyType, | ||
Ptr< WimaxChannel > | channel, | ||
SchedulerType | schedulerType ) |
node | Node to be installed. |
deviceType | Device type to create. |
phyType | PHY type to create. |
channel | A channel to use. |
schedulerType | The 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 334 of file wimax-helper.cc.
References ns3::Mac48Address::Allocate(), CreateBSScheduler(), ns3::CreateObject(), 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.
propagationModel | The propagation and loss model to set |
Definition at line 91 of file wimax-helper.cc.
References ns3::CreateObject(), and m_channel.
|
private |
wifi channel
Definition at line 329 of file wimax-helper.h.
Referenced by AssignStreams(), AssignStreams(), CreatePhy(), CreatePhy(), Install(), Install(), and SetPropagationLossModel().