--- a/src/devices/wimax/simple-ofdm-wimax-channel.h Wed Apr 21 15:59:25 2010 -0400
+++ b/src/devices/wimax/simple-ofdm-wimax-channel.h Thu Apr 22 11:31:45 2010 +0200
@@ -50,17 +50,17 @@
};
/**
* \brief Creates a channel and sets the propagation model
- * \param propModel the propagation model to used
+ * \param propModel the propagation model to use
*/
SimpleOfdmWimaxChannel (PropModel propModel);
/**
- * \brief Sends a fec block to all connected physical dxdevices
+ * \brief Sends a fec block to all connected physical devices
* \param BlockTime the time needed to send the block
* \param fecBlock the fec block being sent
* \param burstSize the size of the burst
* \param phy the sender device
* \param isFirstBlock true if this block is the first one, false otherwise
- * \param frequency the frequency on wich the block is sent
+ * \param frequency the frequency on which the block is sent
* \param modulationType the modulation used to send the fec block
* \param direction uplink or downlink
* \param txPowerDbm the transmission power
--- a/src/helper/wimax-helper.cc Wed Apr 21 15:59:25 2010 -0400
+++ b/src/helper/wimax-helper.cc Thu Apr 22 11:31:45 2010 +0200
@@ -80,7 +80,7 @@
phy = CreateObject<SimpleOfdmWimaxPhy> ();
if (!m_channel)
{
- m_channel = CreateObject<SimpleOfdmWimaxChannel> ();
+ m_channel = CreateObject<SimpleOfdmWimaxChannel> (SimpleOfdmWimaxChannel::COST231_PROPAGATION);
}
break;
default:
@@ -91,6 +91,15 @@
return phy;
}
+void WimaxHelper::SetPropagationLossModel (SimpleOfdmWimaxChannel::PropModel propagationModel)
+{
+ if (!m_channel)
+ {
+ m_channel = CreateObject<SimpleOfdmWimaxChannel> ();
+ }
+ m_channel->GetObject<SimpleOfdmWimaxChannel> ()->SetPropagationModel (propagationModel);
+}
+
Ptr<WimaxPhy> WimaxHelper::CreatePhy (PhyType phyType, char * SNRTraceFilePath, bool activateLoss)
{
Ptr<WimaxPhy> phy;
@@ -104,7 +113,7 @@
sphy->ActivateLoss (activateLoss);
if (!m_channel)
{
- m_channel = CreateObject<SimpleOfdmWimaxChannel> ();
+ m_channel = CreateObject<SimpleOfdmWimaxChannel> (SimpleOfdmWimaxChannel::COST231_PROPAGATION);
}
break;
default:
--- a/src/helper/wimax-helper.h Wed Apr 21 15:59:25 2010 -0400
+++ b/src/helper/wimax-helper.h Thu Apr 22 11:31:45 2010 +0200
@@ -31,6 +31,7 @@
#include "ns3/deprecated.h"
#include "ns3/service-flow.h"
#include "ns3/propagation-loss-model.h"
+#include "ns3/simple-ofdm-wimax-channel.h"
#include "ns3/bs-uplink-scheduler.h"
#include "ns3/bs-uplink-scheduler-mbqos.h"
#include "ns3/bs-uplink-scheduler-simple.h"
@@ -46,9 +47,15 @@
class WimaxPhy;
class UplinkScheduler;
+
/**
- * \brief build a set of WimaxNetDevice objects
+ * \brief 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.
*/
+
class WimaxHelper :public PcapHelperForDevice, public AsciiTraceHelperForDevice
{
public:
@@ -84,7 +91,9 @@
/**< An migration-based uplink scheduler */
};
-
+ /**
+ * \brief Create a Wimax helper in an empty state.
+ */
WimaxHelper (void);
~WimaxHelper (void);
/**
@@ -133,7 +142,7 @@
* \param c a set of nodes
* \param type device type to create
* \param phyType a phy to use
- * \param schedulerType a scheduling mechanism
+ * \param 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
@@ -175,6 +184,13 @@
double frameDuration);
/**
+ * \brief Set the propagation and loss model of the channel. By default the channel
+ * uses a COST231 propagation and loss model.
+ * \param propagationModel The propagation and loss model to set
+ */
+ void SetPropagationLossModel (SimpleOfdmWimaxChannel::PropModel propagationModel);
+
+ /**
* \param phyType WiMAX Physical layer type
* \return WiMAX Phy object
*
@@ -188,14 +204,14 @@
* \param activateLoss set to 1 to activate losses 0 otherwise
* \return WiMAX Phy object
*
- * Creates a physical layer without a channel
+ * Creates a physical layer without creating a channel
*/
Ptr<WimaxPhy> CreatePhyWithoutChannel (PhyType phyType, char * SNRTraceFilePath, bool activateLoss);
/**
* \param phyType WiMAX Physical layer type
- * \param SNRTraceFilePath of the repository containing the SNR traces files
- * \param activateLoss set to 1 to activate losses 0 otherwise
+ * \param SNRTraceFilePath the path to the repository containing the SNR traces files
+ * \param activateLoss set to 1 if you want ton activate losses 0 otherwise
* \return WiMAX Phy object
*
* Creates a physical layer
@@ -206,7 +222,7 @@
* \param deviceType Device type to create.
* \param phyType PHY type to create.
* \param channel A channel to use.
- * \param schedulerType The scheduling mechanism.
+ * \param 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
@@ -220,7 +236,7 @@
/**
* \brief Creates a transport service flow.
- * \param direction the Direction of the service flow: UP or DOWN.
+ * \param direction the direction of the service flow: UP or DOWN.
* \param schedulinType The service scheduling type to be used: UGS, RTPS, NRTPS, BE
* \param classifier The classifier to be used for this service flow
*