Compare commits

...

18 Commits

Author SHA1 Message Date
Tom Henderson f07d1611be update RELEASE_NOTES for availability 2013-05-14 07:51:26 -07:00
Tom Henderson 4d0b8b05d8 clarify statement in tutorial 2013-05-12 11:46:51 -07:00
Tom Henderson b77fb7f40c update emulation section to deprecate EmuNetDevice and add FdNetDevice 2013-05-11 13:27:05 -07:00
Tom Henderson 2e20d86a39 add FdNetDevice descriptor 2013-05-11 11:24:37 -07:00
Tom Henderson 3a8d684c9e update changes.html and release notes for FdNetDevice changes 2013-05-11 11:08:52 -07:00
Tom Henderson 49eb8e5a9f improve formatting 2013-05-11 10:50:48 -07:00
Tom Henderson 21f96dc635 update RELEASE_NOTES 2013-05-09 22:43:52 -07:00
Tom Henderson 15058e8967 more tutorial updates 2013-05-09 22:38:09 -07:00
Tom Henderson 76c91ed1f4 update CHANGES.html 2013-05-09 16:17:01 -07:00
Yufei Cheng 3b0c201a73 update DSR routing documentation 2013-05-09 14:50:43 -07:00
Tom Henderson 71614226c9 rescan bindings 2013-05-08 07:00:47 -07:00
Nicola Baldo 568cd20be1 fixed bug 1421 - Frequency dependent propagation loss models need uniform Frequency / Lambda attribute 2013-05-07 18:57:51 +02:00
Mitch Watrous 81a807237d Update LTE Python bindings 2013-05-06 09:53:23 -07:00
Nicola Baldo b00e7d6290 Bug 1674 : removed unimplemented methods in LTE module 2013-05-06 18:03:54 +02:00
Tom Henderson 804ff9b528 update tutorial for bake usage 2013-05-05 22:42:12 -07:00
Tom Henderson bbb631cb98 update CHANGES.html 2013-05-05 22:41:07 -07:00
Alina Quereilhac b1f05f2a33 fixed Bug 1649 - bindings scanning for fd-net-device (adding --force-planetlab option to force PlanetLab support) 2013-05-06 00:50:09 +02:00
Alina Quereilhac 0e8b81cd09 fixed Bug 1649 - bindings scanning for fd-net-device 2013-05-04 22:38:49 +02:00
23 changed files with 582 additions and 538 deletions
+127 -107
View File
@@ -55,127 +55,147 @@ us a note on ns-developers mailing list.</p>
<h2>New API:</h2>
<ul>
<li>New TCP Westwood and Westwood+ models
<li>New TCP Westwood and Westwood+ models
<li>New FdNetDevice class providing a special NetDevice that is able to read
and write traffic from a file descriptor. Three helpers are provided
to associate the file descriptor with different underlying devices:
<ul>
<li> EmuFdNetDeviceHelper (to associate the |ns3| device with a physical
device in the host machine). This helper is intended to
eventually replace the EmuNetDevice in src/emu. </li>
<li> TapFdNetDeviceHelper (to associate the ns-3 device with the file
descriptor from a tap device in the host machine) </li>
<li> PlanteLabFdNetDeviceHelper (to automate the creation of tap devices
in PlanetLab nodes, enabling |ns3| simulations that can send and
receive traffic though the Internet using PlanetLab resource.</li>
</ul>
</li>
<li>In Ipv4ClickRouting, the following APIs were added:
<ul>
<li>Ipv4ClickRouting::SetDefines(), accessible through ClickInternetStackHelper::SetDefines(), for the user to set Click defines from the ns-3 simulation file.</li>
<li>SIMCLICK_GET_RANDOM_INT click-to-simulator command for ns-3 to drive Click's random number generation.</li>
</ul>
</li>
</ul>
<ul>
<li>LTE module
<ul>
<li> New user-visible LTE API
<ul>
<li>Two new methods have been added to LteHelper to enable the X2-based handover functionality: AddX2Interface, which setups the X2 interface between two eNBs, and HandoverRequest, which is a convenience method that schedules an explicit handover event to be executed at a given point in the simulation. </li>
<li>the new LteHelper method EnablePhyTraces can now be used to enable the new PHY traces</li>
</ul>
<ul>
<li>Two new methods have been added to LteHelper to enable the X2-based handover functionality: AddX2Interface, which setups the X2 interface between two eNBs, and HandoverRequest, which is a convenience method that schedules an explicit handover event to be executed at a given point in the simulation. </li>
<li>the new LteHelper method EnablePhyTraces can now be used to enable the new PHY traces</li>
</ul>
</li>
<li> New internal LTE API
<ul>
<li>New LTE control message classes DlHarqFeedbackLteControlMessage,
RachPreambleLteControlMessage, RarLteControlMessage, MibLteControlMessage</li>
<li>New class UeManager
<li>New LteRadioBearerInfo subclasses LteSignalingRadioBearerInfo,
LteDataRadioBearerInfo</li>
<li>New LteSinrChunkProcessor subclasses LteRsReceivedPowerChunkProcessor,
LteInterferencePowerChunkProcessor</li>
</ul>
<ul>
<li>New LTE control message classes DlHarqFeedbackLteControlMessage,
RachPreambleLteControlMessage, RarLteControlMessage, MibLteControlMessage</li>
<li>New class UeManager
<li>New LteRadioBearerInfo subclasses LteSignalingRadioBearerInfo,
LteDataRadioBearerInfo</li>
<li>New LteSinrChunkProcessor subclasses LteRsReceivedPowerChunkProcessor,
LteInterferencePowerChunkProcessor</li>
</ul>
</li>
</ul>
</li>
<li>New Tag, PacketSocketTag, to carry the dest address of a packet and the packet type</li>
<li>New Tag, DeviceNameTag, to carry the ns3 device name from where a packet is coming</li>
<li>New Error Model, BurstError model, to determine which bursts of packets are errored corresponding to an underlying distribution, burst rate, and burst size</li>
<li>New DSR API
<ul>
<li>Added PassiveBuffer class to save maintenance packet entry for passive acknowledgment option</li>
<li>Added FindSourceEntry function in RreqTable class to keep track of route request entry received from same source node</li>
<li>Added NotifyDataReciept function in DsrRouting class to notify the data receipt of the next hop from link layer. This is used for the link layer acknowledgment.</li>
</ul>
</li>
<li>New Tag, PacketSocketTag, to carry the destination address of a packet and the packet type</li>
<li>New Tag, DeviceNameTag, to carry the ns3 device name from where a packet is coming</li>
<li>New Error Model, BurstError model, to determine which bursts of packets are errored corresponding to an underlying distribution, burst rate, and burst size</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li>ns3::Object and subclasses DoStart has been renamed to DoInitialize</li>
<li>ns3::Object and subclasses Start has been renamed to Initialize</li>
<li>EnergySource StartDeviceModels renamed to InitializeDeviceModels</li>
<li>A typo was fixed in an LTE variable name. The variable ns3::AllocationRetentionPriority::preemprionVulnerability was changed to preemptionVulnerability.</li>
<li>Changes in TestCase API
<ul>
<li>TestCase has new enumeration TestDuration containing QUICK, EXTENSIVE, TAKES_FOREVER</li>
<li>TestCase constructor now requires TestDuration, old constructor marked deprecated</li>
</ul>
</li>
<li>Changes in DSR API
<ul>
<li>DsrMainHelper removed methods SetRouteCache and SetRreqTable</li>
<li>MaintainBuffer removed method FindMaintainEntry</li>
<li>DsrOptionRreqHeader removed methods (Set/Get)DataLength and SearchNextHop</li>
<li>DsrOptions added methods ReverseSearchNextTwoHop, Process</li>
<li>RouteCache removed methods GetDestination, DropPathWithDst and IsEqual</li>
<li>DsrRouting added (Set/Get) PassiveBuffer</li>
<li>DsrRouting added methods FindSourceEntry, PassiveEntryCheck and CancelPassiveTimer</li>
<li>DsrRouting removed methods SendRequestAndIncrement, GetNodeWithAddress and GetExtensionNumber</li>
<li>struct SourceRreqEntry removed.
<li>new class SourceRreqEntry: The request entry for intermediate nodes to check if they have received this request or not. This is used to control the duplication request from being processed</li>
<li>RreqTable added method FindSourceEntry</li>
</ul>
</li>
<li>Changes in LTE API
<ul>
<li> User-visible LTE API
<ul>
<li>The previous LteHelper method ActivateEpsBearer has been now replaced by two alternative methods: ActivateDataRadioBearer (to be used when the EPC model is not used) and ActivateDedicatedEpsBearer (to be used when the EPC model is used). In the case where the EPC model is used, the default EPS bearer is not automatically activated without the need for a specific method to be called.</li>
</ul>
</li>
<li> Internal LTE API
<ul>
<li>EpcHelper added methods AddUe, AddX2Interface. Method AddEnb now requires a cellId. Signature of ActivateEpsBearer changed to void ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer) </li>
<li>LteHelper added methods EnableDlPhyTraces, EnableUlPhyTraces, EnableDlTxPhyTraces, EnableUlTxPhyTraces, EnableDlRxPhyTraces, EnableUlRxPhyTraces</li>
<li>LteHelper removed methods EnableDlRlcTraces, EnableUlRlcTraces, EnableDlPdcpTraces, EnableUlPdcpTraces</li>
<li>RadioBearerStatsCalculator added methods (Set/Get)StartTime, (Set/Get)Epoch, RescheduleEndEpoch, EndEpoch</li>
<li>RadioBearerStatsCalculator removed methods StartEpoch, CheckEpoch</li>
<li>RadioBearerStatsCalculator methods UlTxPdu, DlRxPdu now require a cellId</li>
<li>EpcEnbApplication constructor now requires Ipv4Addresses enbS1uAddress and sgwS1uAddress as well as cellId</li>
<li>EpcEnbApplication added methods SetS1SapUser, GetS1SapProvider, SetS1apSapMme and GetS1apSapEnb</li>
<li>EpcEnbApplication removed method ErabSetupRequest</li>
<li>EpcSgwPgwApplication added methods SetS11SapMme, GetS11SapSgw, AddEnb, AddUe, SetUeAddress</li>
<li>lte-common.h new structs PhyTransmissionStatParameters and PhyReceptionStatParameters used in TracedCallbacks</li>
<li>LteControlMessage new message types DL_HARQ, RACH_PREAMBLE, RAR, MIB</li>
<li>LteEnbCmacSapProvider new methods RemoveUe, GetRachConfig, AllocateNcRaPreamble, AllocateTemporaryCellRnti</li>
<li>LteEnbPhy new methods GetLteEnbCphySapProvider, SetLteEnbCphySapUser, GetDlSpectrumPhy, GetUlSpectrumPhy, CreateSrsReport</li>
<li>LteEnbPhy methods DoSendMacPdu, DoSetTransmissionMode, DoSetSrsConfigurationIndex, DoGetMacChTtiDelay, DoSendLteControlMessage, AddUePhy, DeleteUePhy made private</li>
<li>LteEnbPhySapProvider removed methods SetBandwidth, SetTransmissionMode, SetSrsConfigurationIndex, SetCellId</li>
<li>LteEnbPhySapUser added methods ReceiveRachPreamble, UlInfoListElementHarqFeeback, DlInfoListElementHarqFeeback</li>
<li>LtePdcp added methods (Set/Get)Status</li>
<li>LtePdcp DoTransmitRrcPdu renamed DoTransmitPdcpSdu</li>
<li>LteUeRrc new enum State. New methods SetLteUeCphySapProvider, GetLteUeCphySapUser, SetLteUeRrcSapUser, GetLteUeRrcSapProvider, GetState, GetDlEarfcn, GetDlBandwidth, GetUlBandwidth, GetCellId, SetUseRlcSm . GetRnti made const.</li>
<li>LteUeRrc removed methods ReleaseRadioBearer, GetLcIdVector, SetForwardUpCallback, DoRrcConfigurationUpdateInd</li>
<li>LtePdcpSapProvider struct TransmitRrcPduParameters renamed TransmitPdcpSduParameters. Method TransmitRrcPdu renamed TransmitPdcpSdu </li>
<li>LtePdcpSapUser struct ReceiveRrcPduParameters renamed ReceivePdcpSduParameters. Method ReceiveRrcPdu renamed TransmitPdcpSdu</li>
<li>LtePdcpSpecificLtePdcpSapProvider method TransmitRrcPdu renamed TransmitPdcpSdu</li>
<li>LtePdcpSpecificLtePdcpSapUser method ReceiveRrcPdu renamed ReceivePdcpSdu. Method ReceiveRrcPdu renamed ReceivePdcpSdu</li>
<li>LtePhy removed methods DoSetBandwidth and DoSetEarfcn</li>
<li>LtePhy added methods ReportInterference and ReportRsReceivedPower</li>
<li>LteSpectrumPhy added methods SetHarqPhyModule, Reset, SetLtePhyDlHarqFeedbackCallback, SetLtePhyUlHarqFeedbackCallback, AddRsPowerChunkProcessor, AddInterferenceChunkProcessor</li>
<li>LteUeCphySapProvider removed methods ConfigureRach, StartContentionBasedRandomAccessProcedure, StartNonContentionBasedRandomAccessProcedure</li>
<li>LteUeMac added method AssignStreams</li>
<li>LteUeNetDevice methods GetMac, GetRrc, GetImsi made const</li>
<li>LteUeNetDevice new method GetNas</li>
<li>LteUePhy new methods GetLteUeCphySapProvider, SetLteUeCphySapUser, GetDlSpectrumPhy, GetUlSpectrumPhy, ReportInterference, ReportRsReceivedPower, ReceiveLteDlHarqFeedback</li>
<li>LteUePhy DoSendMacPdu, DoSendLteControlMessage, DoSetTransmissionMode, DoSetSrsConfigurationIndex made private</li>
<li>LteUePhySapProvider removed methods SetBandwidth, SetTransmissionMode, SetSrsConfigurationIndex</li>
<li>LteUePhySapProvider added method SendRachPreamble</li>
</li>
</ul>
<li>AnimationInterface method EnableIpv4RouteTracking returns reference to calling AnimationInterface object</li>
<li>ns3::Object and subclasses DoStart has been renamed to DoInitialize</li>
<li>ns3::Object and subclasses Start has been renamed to Initialize</li>
<li>EnergySource StartDeviceModels renamed to InitializeDeviceModels</li>
<li>A typo was fixed in an LTE variable name. The variable ns3::AllocationRetentionPriority::preemprionVulnerability was changed to preemptionVulnerability.</li>
<li>Changes in TestCase API
<ul>
<li>TestCase has new enumeration TestDuration containing QUICK, EXTENSIVE, TAKES_FOREVER</li>
<li>TestCase constructor now requires TestDuration, old constructor marked deprecated</li>
</ul>
</li>
<li>Changes in LTE API
<ul>
<li> User-visible LTE API
<ul>
<li>The previous LteHelper method ActivateEpsBearer has been now replaced by two alternative methods: ActivateDataRadioBearer (to be used when the EPC model is not used) and ActivateDedicatedEpsBearer (to be used when the EPC model is used). In the case where the EPC model is used, the default EPS bearer is not automatically activated without the need for a specific method to be called.</li>
</ul>
</li>
<li> Internal LTE API
<ul>
<li>EpcHelper added methods AddUe, AddX2Interface. Method AddEnb now requires a cellId. Signature of ActivateEpsBearer changed to void ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer)</li>
<li>LteHelper added methods EnableDlPhyTraces, EnableUlPhyTraces, EnableDlTxPhyTraces, EnableUlTxPhyTraces, EnableDlRxPhyTraces, EnableUlRxPhyTraces</li>
<li>LteHelper removed methods EnableDlRlcTraces, EnableUlRlcTraces, EnableDlPdcpTraces, EnableUlPdcpTraces</li>
<li>RadioBearerStatsCalculator added methods (Set/Get)StartTime, (Set/Get)Epoch, RescheduleEndEpoch, EndEpoch</li>
<li>RadioBearerStatsCalculator removed methods StartEpoch, CheckEpoch</li>
<li>RadioBearerStatsCalculator methods UlTxPdu, DlRxPdu now require a cellId</li>
<li>EpcEnbApplication constructor now requires Ipv4Addresses enbS1uAddress and sgwS1uAddress as well as cellId</li>
<li>EpcEnbApplication added methods SetS1SapUser, GetS1SapProvider, SetS1apSapMme and GetS1apSapEnb</li>
<li>EpcEnbApplication removed method ErabSetupRequest</li>
<li>EpcSgwPgwApplication added methods SetS11SapMme, GetS11SapSgw, AddEnb, AddUe, SetUeAddress</li>
<li>lte-common.h new structs PhyTransmissionStatParameters and PhyReceptionStatParameters used in TracedCallbacks</li>
<li>LteControlMessage new message types DL_HARQ, RACH_PREAMBLE, RAR, MIB</li>
<li>LteEnbCmacSapProvider new methods RemoveUe, GetRachConfig, AllocateNcRaPreamble, AllocateTemporaryCellRnti</li>
<li>LteEnbPhy new methods GetLteEnbCphySapProvider, SetLteEnbCphySapUser, GetDlSpectrumPhy, GetUlSpectrumPhy, CreateSrsReport</li>
<li>LteEnbPhy methods DoSendMacPdu, DoSetTransmissionMode, DoSetSrsConfigurationIndex, DoGetMacChTtiDelay, DoSendLteControlMessage, AddUePhy, DeleteUePhy made private</li>
<li>LteEnbPhySapProvider removed methods SetBandwidth, SetTransmissionMode, SetSrsConfigurationIndex, SetCellId</li>
<li>LteEnbPhySapUser added methods ReceiveRachPreamble, UlInfoListElementHarqFeeback, DlInfoListElementHarqFeeback</li>
<li>LtePdcp added methods (Set/Get)Status</li>
<li>LtePdcp DoTransmitRrcPdu renamed DoTransmitPdcpSdu</li>
<li>LteUeRrc new enum State. New methods SetLteUeCphySapProvider, GetLteUeCphySapUser, SetLteUeRrcSapUser, GetLteUeRrcSapProvider, GetState, GetDlEarfcn, GetDlBandwidth, GetUlBandwidth, GetCellId, SetUseRlcSm . GetRnti made const.</li>
<li>LteUeRrc removed methods ReleaseRadioBearer, GetLcIdVector, SetForwardUpCallback, DoRrcConfigurationUpdateInd</li>
<li>LtePdcpSapProvider struct TransmitRrcPduParameters renamed TransmitPdcpSduParameters. Method TransmitRrcPdu renamed TransmitPdcpSdu </li>
<li>LtePdcpSapUser struct ReceiveRrcPduParameters renamed ReceivePdcpSduParameters. Method ReceiveRrcPdu renamed TransmitPdcpSdu</li>
<li>LtePdcpSpecificLtePdcpSapProvider method TransmitRrcPdu renamed TransmitPdcpSdu</li>
<li>LtePdcpSpecificLtePdcpSapUser method ReceiveRrcPdu renamed ReceivePdcpSdu. Method ReceiveRrcPdu renamed ReceivePdcpSdu</li>
<li>LtePhy removed methods DoSetBandwidth and DoSetEarfcn</li>
<li>LtePhy added methods ReportInterference and ReportRsReceivedPower</li>
<li>LteSpectrumPhy added methods SetHarqPhyModule, Reset, SetLtePhyDlHarqFeedbackCallback, SetLtePhyUlHarqFeedbackCallback, AddRsPowerChunkProcessor, AddInterferenceChunkProcessor</li>
<li>LteUeCphySapProvider removed methods ConfigureRach, StartContentionBasedRandomAccessProcedure, StartNonContentionBasedRandomAccessProcedure</li>
<li>LteUeMac added method AssignStreams</li>
<li>LteUeNetDevice methods GetMac, GetRrc, GetImsi made const</li>
<li>LteUeNetDevice new method GetNas</li>
<li>LteUePhy new methods GetLteUeCphySapProvider, SetLteUeCphySapUser, GetDlSpectrumPhy, GetUlSpectrumPhy, ReportInterference, ReportRsReceivedPower, ReceiveLteDlHarqFeedback</li>
<li>LteUePhy DoSendMacPdu, DoSendLteControlMessage, DoSetTransmissionMode, DoSetSrsConfigurationIndex made private</li>
<li>LteUePhySapProvider removed methods SetBandwidth, SetTransmissionMode, SetSrsConfigurationIndex</li>
<li>LteUePhySapProvider added method SendRachPreamble</li>
</ul>
</li>
</ul>
<li>AnimationInterface method EnableIpv4RouteTracking returns reference to calling AnimationInterface object</li>
<li>To make the API more uniform across the various
PropagationLossModel classes, the Set/GetLambda methods of the
FriisPropagationLossModel and TwoRayGroundPropagationLossModel
classes have been changed to Set/GetFrequency, and now a Frequency
attribute is exported which replaces the pre-existing Lambda
attribute. Any previous user code setting a value for Lambda should
be changed to set instead a value of Frequency = C / Lambda, with C
= 299792458.0. </li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li></li>
<li>Waf shipped with ns-3 has been upgraded to version 1.7.10 and custom
pkg-config generator has been replaced by Waf's builtin tool.
</li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li></li>
<li>DSR link layer notification has changed. The model originally used
"TxErrHeader" in Ptr<WifiMac> to indicate the transmission
error of a specific packet in link layer; however, it was not working
correctly. The model now uses a different path to implement
the link layer notification mechanism; specifically, looking into the
trace file to find packet receive events. If the model finds one
receive event for the data packet, it is used as the indicator for
successful data delivery.</li>
</ul>
<hr>
@@ -193,7 +213,7 @@ us a note on ns-developers mailing list.</p>
<li>(Set/Is)Ipv6RecvTclass - tells the socket to pass information about IPv6 TCLASS up the stack (by adding SocketIpv6TclassTag to the packet).</li>
<li>(Set/Get)Ipv6HopLimit - sets Hop Limit field in the IPv6 headers.</li>
<li>(Set/Is)Ipv6RecvHopLimit - tells the socket to pass information about IPv6 HOPLIMIT up the stack (by adding SocketIpv6HoplimitTag to the packet).</li>
</ul>
</ul>
A user can call these functions to set/get the corresponding socket option. See examples/socket/socket-options-ipv4.cc and examples/socket/socket-options-ipv6.cc for examples.
</ul>
@@ -1047,16 +1067,16 @@ For example, before:
<pre>
void
SimpleChannel::Send (Ptr&lt;Packet&gt; p, uint16_t protocol,
Mac48Address to, Mac48Address from,
Ptr&lt;SimpleNetDevice&gt; sender)
Mac48Address to, Mac48Address from,
Ptr&lt;SimpleNetDevice&gt; sender)
{
for (std::vector&lt;Ptr&lt;SimpleNetDevice&gt; &gt;::const_iterator i = m_devices.begin (); i != m_devices.end (); ++i)
{
Ptr&lt;SimpleNetDevice&gt; tmp = *i;
if (tmp == sender)
{
continue;
}
{
continue;
}
Simulator::ScheduleNow (&SimpleNetDevice::Receive, tmp, p->Copy (), protocol, to, from);
}
}
@@ -1065,16 +1085,16 @@ After:
<pre>
void
SimpleChannel::Send (Ptr&lt;Packet&gt; p, uint16_t protocol,
Mac48Address to, Mac48Address from,
Ptr&lt;SimpleNetDevice&gt; sender)
Mac48Address to, Mac48Address from,
Ptr&lt;SimpleNetDevice&gt; sender)
{
for (std::vector&lt;Ptr&lt;SimpleNetDevice&gt; &gt;::const_iterator i = m_devices.begin (); i != m_devices.end (); ++i)
{
Ptr&lt;SimpleNetDevice&gt; tmp = *i;
if (tmp == sender)
{
continue;
}
{
continue;
}
Simulator::ScheduleWithContext (tmp->GetNode ()->GetId (), Seconds (0),
&SimpleNetDevice::Receive, tmp, p->Copy (), protocol, to, from);
}
+19 -4
View File
@@ -9,20 +9,34 @@ http://www.nsnam.org including tutorials: http://www.nsnam.org/tutorials.html
Consult the file CHANGES.html for more detailed information about changed
API and behavior across ns-3 releases.
Release 3-dev
=============
Release 3.17
============
Availability
------------
This release is not yet available.
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.17.tar.bz2
Supported platforms
-------------------
To be determined
These platforms have been tested; others may work also:
- Fedora Core 18 (32/64 bit) with g++-4.7.2
- Fedora Core 17 (32/64 bit) with g++-4.7.0
- Ubuntu 13.04 (32/64 bit) with g++-4.7.3
- Ubuntu 12.10 (32/64 bit) with g++-4.6.3
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- OS X Mountain Lion 10.8.3 with g++-4.2.1
- FreeBSD 9.1-RELEASE (64 bit) with g++-4.2.1
New user-visible features
-------------------------
- new TCP Westwood and Westwood+ models
- new FdNetDevice model and associated helpers. The FdNetDevice is able
to read and write from a file descriptor. Various helpers are provided
to associate this descriptor with underlying devices or sockets on the
host operating system, including a packet socket for emulation, and
tap devices including a version specialized for use on PlanetLab.
- ns-3-click: it's now possible to (i) have Click pull random numbers from
ns-3 and (ii) have ns-3 set "defines" in Click via the simulation file
(see src/click/examples/nsclick-defines.cc).
@@ -38,6 +52,7 @@ Bugs fixed
- bug 1256 - Unnecessary SND.NXT advance, missing ACK for Out of Order segments
- bug 1318 - Ipv6L3Protocol::LocalDeliver can get stuck in an infinte loop
- bug 1409 - Add an attribute "SystemId" to configure the ID for MPI
- bug 1421 - Frequency dependent propagation loss models need uniform Frequency / Lambda attribute
- bug 1434 - DSR throughput not comparable to other protocols for manet example
- bug 1502 - Shutdown on tcp socket seems to misbehave
- bug 1503 - BlockAckManager infine loop
+1 -1
View File
@@ -36,7 +36,7 @@ SOURCES = \
$(SRC)/dsr/doc/dsr.rst \
$(SRC)/mpi/doc/distributed.rst \
$(SRC)/energy/doc/energy.rst \
$(SRC)/emu/doc/emu.rst \
$(SRC)/fd-net-device/doc/fd-net-device.rst \
$(SRC)/tap-bridge/doc/tap.rst \
$(SRC)/mesh/doc/mesh.rst \
$(SRC)/lte/doc/source/lte.rst \
Binary file not shown.
+15 -4
View File
@@ -5,17 +5,28 @@ Emulation Overview
|ns3| has been designed for integration into testbed and virtual machine
environments. We have addressed this need by providing two kinds of net devices.
The first kind, which we call an ``Emu`` ``NetDevice`` allows |ns3| simulations
The first kind of device is a file descriptor net device (``FdNetDevice``),
which is a generic device type that can read and write from a file descriptor.
By associating this file descriptor with different things on the host
system, different capabilities can be provided. For instance, the
FdNetDevice can be associated with an underlying packet socket to provide
emulation capabilities. This allows |ns3| simulations
to send data on a "real" network. The second kind, called a ``Tap``
``NetDevice`` allows a "real" host to participate in an |ns3| simulation as if
it were one of the simulated nodes. An |ns3| simulation may be constructed with
any combination of simulated, ``Emu``, or ``Tap`` devices.
any combination of simulated or emulated devices.
**Note:** Prior to ns-3.17, the emulation capability was provided by a
special device called an ``Emu`` NetDevice; the ``Emu`` NetDevice has
been superseded by the ``FdNetDevice``, and will be deprecated and removed
in future revisions of |ns3|.
One of the use-cases we want to support is that of a testbed. A concrete example
of an environment of this kind is the ORBIT testbed. ORBIT is a laboratory
emulator/field trial network arranged as a two dimensional grid of 400 802.11
radio nodes. We integrate with ORBIT by using their "imaging" process to load
and run |ns3| simulations on the ORBIT array. We use our ``Emu`` ``NetDevice``
and run |ns3| simulations on the ORBIT array. We can use our
``EmuFdNetDevice``
to drive the hardware in the testbed and we can accumulate results either using
the |ns3| tracing and logging functions, or the native ORBIT data gathering
techniques. See `<http://www.orbit-lab.org/>`_ for details on the ORBIT
@@ -72,5 +83,5 @@ simulated |ns3| networks.
.. toctree::
emu
fd-net-device
tap
+2 -1
View File
@@ -1326,7 +1326,8 @@ connect the two. We will use the mobility model predefined course change
trace source to originate the trace events. We will need to write a trace
sink to connect to that source that will display some pretty information for
us. Despite its reputation as being difficult, it's really quite simple.
Just before the main program of the ``scratch/mythird.cc`` script, add the
Just before the main program of the ``scratch/mythird.cc`` script (i.e.,
just after the ``NS_LOG_COMPONENT_DEFINE`` statement), add the
following function:
::
+223 -172
View File
@@ -4,6 +4,35 @@
Getting Started
---------------
This section is aimed at getting a user to a working state starting
with a machine that may never have had |ns3| installed. It covers
supported platforms, prerequisites, ways to obtain |ns3|, ways to
build |ns3|, and ways to verify your build and run simple programs.
Overview
********
|ns3| is built as a system of software libraries that work together.
User programs can be written that links with (or imports from) these
libraries. User programs are written in either the C++ or Python
programming languages.
|ns3| is distributed as source code, meaning that the target system
needs to have a software development environment to build the libraries
first, then build the user program. |ns3| could in principle be
distributed as pre-built libraries for selected systems, and in the
future it may be distributed that way, but at present, many users
actually do their work by editing |ns3| itself, so having the source
code around to rebuild the libraries is useful. If someone would like
to undertake the job of making pre-built libraries and packages for
operating systems, please contact the ns-developers mailing list.
In the following, we'll look at two ways of downloading and building
|ns3|. The first is to download and build an official release
from the main web site. The second is to fetch and build development
copies of |ns3|. We'll walk through both examples since the tools
involved are slightly different.
Downloading ns-3
****************
@@ -12,7 +41,7 @@ number of dependencies on other components. Along with the systems you will
most likely deal with every day (the GNU toolchain, Mercurial, a text
editor) you will need to ensure that a number of additional libraries are
present on your system before proceeding. |ns3| provides a wiki
for your reading pleasure that includes pages with many useful hints and tips.
page that includes pages with many useful hints and tips.
One such page is the "Installation" page,
http://www.nsnam.org/wiki/index.php/Installation.
@@ -41,57 +70,101 @@ release.
The simplest way to get started using Mercurial repositories is to use the
``ns-3-allinone`` environment. This is a set of scripts that manages the
downloading and building of various subsystems of |ns3| for you. We
recommend that you begin your |ns3| adventures in this environment
as it can really simplify your life at this point.
recommend that you begin your |ns3| work in this environment.
Downloading ns-3 Using Mercurial
Downloading ns-3 Using a Tarball
++++++++++++++++++++++++++++++++
One practice is to create a directory called ``repos`` in one's home
A tarball is a particular format of software archive where multiple
files are bundled together and the archive possibly compressed.
|ns3| software releases are provided via a downloadable tarball.
The process for downloading |ns3| via tarball is simple; you just
have to pick a release, download it and decompress it.
Let's assume that you, as a user, wish to build |ns3| in a local
directory called ``workspace``.
If you adopt the ``workspace`` directory approach, you can
get a copy of a release by typing the following into your Linux shell
(substitute the appropriate version numbers, of course):
::
cd
mkdir workspace
cd workspace
wget http://www.nsnam.org/releases/ns-allinone-3.17.tar.bz2
tar xjf ns-allinone-3.17.tar.bz2
If you change into the directory ``ns-allinone-3.17`` you should see a
number of files:
::
bake constants.py ns-3.17 README
build.py netanim-3.103 pybindgen-0.16.0.825 util.py
You are now ready to build the |ns3| distribution.
Downloading ns-3 Using Bake
++++++++++++++++++++++++++++
Bake is a tool for distributed integration and building,
developed for the |ns3| project.  First of all, Bake is
developed in Python, and should be fetched from the project's
master code repositories using a tool called Mercurial, so to
run Bake one must have Python and mercurial on one's machine.
One practice is to create a directory called ``workspace`` in one's home
directory under which one can keep local Mercurial repositories.
*Hint: we will assume you do this later in the tutorial.* If you adopt
that approach, you can get a copy of ``ns-3-allinone`` by typing the
Any directory name will do, but we'll assume that ``workspace`` is used
herein (note: ``repos`` may also be used in some documentation as
an example directory name). You can get a copy of ``bake`` by typing the
following into your Linux shell (assuming you have installed Mercurial):
::
cd
mkdir repos
cd repos
hg clone http://code.nsnam.org/ns-3-allinone
mkdir workspace
cd workspace
hg clone http://code.nsnam.org/bake
As the hg (Mercurial) command executes, you should see something like the
following displayed,
::
destination directory: ns-3-allinone
destination directory: bake
requesting all changes
adding changesets
adding manifests
adding file changes
added 47 changesets with 67 changes to 7 files
added 252 changesets with 661 changes to 62 files
updating to branch default
7 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 files updated, 0 files merged, 0 files removed, 0 files unresolved
After the clone command completes, you should have a directory called
``ns-3-allinone``, the contents of which should
look something like the following:
``bake``, the contents of which should look something like the following:
::
build.py* constants.py dist.py* download.py* README util.py
bake bakeconf.xml doc generate-binary.py TODO
bake.py examples test
Notice that you really just downloaded some Python scripts. The next step
Notice that you really just downloaded some Python scripts and a Python
module called ``bake``. The next step
will be to use those scripts to download and build the |ns3|
distribution of your choice.
If you go to the following link: http://code.nsnam.org/,
you will see a number of repositories. Many are the private repositories of
the |ns3| development team. The repositories of interest to you will
be prefixed with "ns-3". Official releases of |ns3| will be
numbered as ``ns-3.<release>.<hotfix>``. For example, a second hotfix to a
still hypothetical release forty two of |ns3| would be numbered as
``ns-3.42.2``.
There are a few configuration targets available:
1. ``ns-3.17``: the module corresponding to the release; it will download
components similar to the release tarball.
2. ``ns-3-dev``: a similar module but using the development code tree
3. ``ns-allinone-3.17``: the module that includes other optional features
such as click routing, openflow for |ns3|, and the Network Simulation
Cradle
4. ``ns-3-allinone``: similar to the released version of the allinone
module, but for development code.
The current development snapshot (unreleased) of |ns3| may be found
at http://code.nsnam.org/ns-3-dev/. The
@@ -100,147 +173,96 @@ they are in a development area with unreleased code present, so you may want
to consider staying with an official release if you do not need newly-
introduced features.
Since the release numbers are going to be changing, I will stick with
the more constant ns-3-dev here in the tutorial, but you can replace the
string "ns-3-dev" with your choice of release (e.g., ns-3.10) in the
text below. You can find the latest version of the
You can find the latest version of the
code either by inspection of the repository list or by going to the
`"ns-3 Releases"
<http://www.nsnam.org/releases>`_
web page and clicking on the latest release link.
web page and clicking on the latest release link. We'll proceed in
this tutorial example with ``ns-3.17``.
Go ahead and change into the ``ns-3-allinone`` directory you created when
you cloned that repository. We are now going to use the ``download.py``
script to pull down the various pieces of |ns3| you will be using.
We are now going to use the bake tool to pull down the various pieces of
|ns3| you will be using. First, we'll say a word about running bake.
Go ahead and type the following into your shell (remember you can substitute
the name of your chosen release number instead of ``ns-3-dev`` -- like
``"ns-3.10"`` if you want to work with a
stable release).
bake works by downloading source packages into a source directory,
and installing libraries into a build directory. bake can be run
by referencing the binary, but if one chooses to run bake from
outside of the directory it was downloaded into, it is advisable
to put bake into your path, such as follows (Linux bash shell example):
::
./download.py -n ns-3-dev
export BAKE_HOME=`pwd`/bake
export PATH=$PATH:$BAKE_HOME
export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
Note that the default for the ``-n`` option is ``ns-3-dev`` and so the
above is actually redundant. We provide this example to illustrate how to
specify alternate repositories. In order to download ``ns-3-dev`` you
can actually use the defaults and simply type,
However, setting environment variables is not strictly necessary to
complete this tutorial, so we'll call bake directly by specifying the path
to it in our shell commands.
Step into the workspace directory and type the following into your shell:
::
./download.py
./bake.py configure -e ns-3-dev
As the hg (Mercurial) command executes, you should see something like the
following,
Next, we'l ask bake to check whether we have enough tools to download
various components. Type:
::
#
# Get NS-3
#
Cloning ns-3 branch
=> hg clone http://code.nsnam.org/ns-3-dev ns-3-dev
requesting all changes
adding changesets
adding manifests
adding file changes
added 4634 changesets with 16500 changes to 1762 files
870 files updated, 0 files merged, 0 files removed, 0 files unresolved
./bake.py check
This is output by the download script as it fetches the actual ``ns-3``
code from the repository.
The download script is smart enough to know that on some platforms various
pieces of ns-3 are not supported. On your platform you may not see some
of these pieces come down. However, on most platforms, the process should
continue with something like,
You should see something like the following,
::
#
# Get PyBindGen
#
> Python - OK
> GNU C++ compiler - OK
> Mercurial - OK
> CVS - OK
> GIT - OK
> Bazaar - OK
> Tar tool - OK
> Unzip tool - OK
> Unrar tool - is missing
> 7z data compression utility - OK
> XZ data compression utility - OK
> Make - OK
> cMake - OK
> patch tool - OK
> autoreconf tool - OK
Required pybindgen version: 0.10.0.640
Trying to fetch pybindgen; this will fail if no network connection is available. Hit Ctrl-C to skip.
=> bzr checkout -rrevno:640 https://launchpad.net/pybindgen pybindgen
Fetch was successful.
> Path searched for tools: /usr/lib64/qt-3.3/bin /usr/lib64/ccache /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin /home/tomh/bin bin
This was the download script getting the Python bindings generator for you.
Note that you will need bazaar (bzr), a version control system, to download
PyBindGen. Next you should see (modulo platform variations) something along
the lines of,
In particular, download tools such as Mercurial, CVS, GIT, and Bazaar
are our principal concerns at this point, since they allow us to fetch
the code. Please install missing tools at this stage if you are able to.
Next, try to download the software:
::
#
# Get NSC
#
./bake.py download
Required NSC version: nsc-0.5.0
Retrieving nsc from https://secure.wand.net.nz/mercurial/nsc
=> hg clone https://secure.wand.net.nz/mercurial/nsc nsc
requesting all changes
adding changesets
adding manifests
adding file changes
added 273 changesets with 17565 changes to 15175 files
10622 files updated, 0 files merged, 0 files removed, 0 files unresolved
This part of the process is the script downloading the Network Simulation
Cradle for you. Note that NSC is not supported on OSX or Cygwin and works
best with gcc-3.4 or gcc-4.2 or greater series.
After the download.py script completes, you should have several new directories
under ``~/repos/ns-3-allinone``:
should yield something like:
::
build.py* constants.pyc download.py* nsc/ README util.pyc
constants.py dist.py* ns-3-dev/ pybindgen/ util.py
>> Searching for system dependency pygoocanvas - OK
>> Searching for system dependency python-dev - OK
>> Searching for system dependency pygraphviz - OK
>> Downloading pybindgen-0.16.0.825 - OK
>> Searching for system dependency g++ - OK
>> Searching for system dependency qt4 - OK
>> Downloading netanim-3.103 - OK
>> Downloading ns-3.17 - OK
Go ahead and change into ``ns-3-dev`` under your ``~/repos/ns-3-allinone``
directory. You should see something like the following there:
The above suggests that three sources have been downloaded. Check the
``source`` directory now and type ``ls``; one should see:
::
AUTHORS doc ns3 scratch testpy.supp VERSION waf-tools
bindings examples README src utils waf* wscript
CHANGES.html LICENSE RELEASE_NOTES test.py* utils.py waf.bat* wutils.py
You are now ready to build the |ns3| distribution.
Downloading ns-3 Using a Tarball
++++++++++++++++++++++++++++++++
The process for downloading |ns3| via tarball is simpler than the
Mercurial process since all of the pieces are pre-packaged for you. You just
have to pick a release, download it and decompress it.
As mentioned above, one practice is to create a directory called ``repos``
in one's home directory under which one can keep local Mercurial repositories.
One could also keep a ``tarballs`` directory. *Hint: the tutorial
will assume you downloaded into a* ``repos`` *directory, so remember the
placekeeper.* If you adopt the ``tarballs`` directory approach, you can
get a copy of a release by typing the following into your Linux shell
(substitute the appropriate version numbers, of course):
::
cd
mkdir tarballs
cd tarballs
wget http://www.nsnam.org/releases/ns-allinone-3.13.tar.bz2
tar xjf ns-allinone-3.13.tar.bz2
If you change into the directory ``ns-allinone-3.13`` you should see a
number of files:
::
build.py ns-3.13/ pybindgen-0.15.0.795/ util.py
constants.py nsc-0.5.2/ README
netanim-3.103 ns-3.17 pybindgen-0.16.0.825
You are now ready to build the |ns3| distribution.
@@ -249,19 +271,17 @@ Building ns-3
Building with build.py
++++++++++++++++++++++
The first time you build the |ns3| project you can build using a
convenience program found in the
When working from a released tarball, the first time you build the
|ns3| project you can build using a convenience program found in the
``allinone`` directory. This program is called ``build.py``. This
program will get the project configured for you
in the most commonly useful way. However, please note that more advanced
configuration and work with |ns3| will typically involve using the
native |ns3| build system, Waf, to be introduced later in this tutorial.
Change into the directory you created in the download section above. If you
downloaded using Mercurial you should have a directory called
``ns-3-allinone`` under your ``~/repos`` directory. If you downloaded
If you downloaded
using a tarball you should have a directory called something like
``ns-allinone-3.13`` under your ``~/tarballs`` directory.
``ns-allinone-3.17`` under your ``~/workspace`` directory.
Type the following:
::
@@ -281,33 +301,37 @@ following magic words:
::
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3.13/build'
'build' finished successfully (2m30.586s)
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.17/ns-3.17/build'
'build' finished successfully (6m25.032s)
Modules built:
aodv applications bridge
click config-store core
csma csma-layout dsdv
emu energy flow-monitor
internet lte mesh
mobility mpi netanim
network nix-vector-routing ns3tcp
ns3wifi olsr openflow
point-to-point point-to-point-layout propagation
spectrum stats tap-bridge
template test tools
topology-read uan virtual-net-device
visualizer wifi wimax
Modules built:
antenna aodv applications
bridge buildings config-store
core csma csma-layout
dsdv dsr emu
energy fd-net-device flow-monitor
internet lte mesh
mobility mpi netanim (no Python)
network nix-vector-routing olsr
point-to-point point-to-point-layout propagation
spectrum stats tap-bridge
test (no Python) tools topology-read
uan virtual-net-device wifi
wimax
Modules not built (see ns-3 tutorial for explanation):
brite click openflow
visualizer
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3.13/build'
'build' finished successfully (2m30.586s)
You may also see something like:
Leaving directory `./ns-3.17`
Regarding the portion about modules not built:
::
Modules not built (see ns-3 tutorial for explanation):
click openflow visualizer
brite click openflow
visualizer
This just means that some ns-3 modules that have dependencies on
outside libraries may not have been built, or that the configuration
@@ -315,20 +339,47 @@ specifically asked not to build them. It does not mean that the
simulator did not build successfully or that it will provide wrong
results for the modules listed as being built.
Once the project has built, you can stop working with the
``ns-3-allinone`` scripts. You got what you needed from them and will now
interact directly with Waf and we do it in the |ns3| directory,
not in the ``ns-3-allinone`` directory. Go ahead and change into the
|ns3| directory (or the directory for the appropriate release or
development snapshot that you downloaded; e.g.
Building with bake
++++++++++++++++++
If you used bake above to fetch source code from project repositories, you
may continue to use it to build |ns3|. Type
::
cd ns-3-dev
./bake.py build
and you should see something like:
::
>> Building pybindgen-0.16.0.825 - OK
>> Building netanim-3.103 - OK
>> Building ns-3.17 - OK
*Hint: you can also perform both steps, download and build by calling 'bake.py deploy'.*
If there happens to be a failure, please have a look at what the following
command tells you; it may give a hint as to a missing dependency:
::
./bake.py show
This will list out the various dependencies of the packages you are
trying to build.
Building with Waf
+++++++++++++++++
Most users directly use Waf to configure and build the |ns3| project.
Up to this point, we have used either the `build.py` script, or the
`bake` tool, to get started with building |ns3|. These tools are useful
for building |ns3| and supporting libraries, and they call into
the |ns3| directory to call the Waf build tool to do the actual building.
Most users quickly transition to using Waf directly to configure and
build |ns3|. So, to proceed, please change your working directory to
the |ns3| directory that you have initially built.
It's not
strictly required at this point, but it will be valuable to take a slight
detour and look at how to make changes to the configuration of the project.
@@ -447,7 +498,7 @@ you could reconfigure using the following command that also includes the example
::
./waf -d debug --enable-sudo --enable-examples --enable-tests configure
./waf configure -d debug --enable-sudo --enable-examples --enable-tests
If you do this, waf will have run sudo to change the socket creator programs of the
emulation code to run as root. There are many other configure- and build-time options
@@ -466,7 +517,7 @@ the ``-o`` option to configure; e.g.
::
./waf -d debug -o build/debug --enable-examples --enable-tests configure
./waf configure -d debug -o build/debug --enable-examples --enable-tests
This allows users to work with multiple builds rather than always
overwriting the last build.
@@ -516,8 +567,8 @@ You will also see output from the test runner and the output will actually look
::
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Waf: Entering directory `/path/to/workspace/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/path/to/workspace/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (1.799s)
Modules built:
@@ -593,7 +644,7 @@ type the following,
::
./waf -d debug --enable-examples --enable-tests configure
./waf configure -d debug --enable-examples --enable-tests
to tell ``waf`` to build the debug versions of the |ns3|
programs that includes the examples and tests. You must still build
+92 -52
View File
@@ -3,8 +3,8 @@
DSR Routing
-----------
Dynamic Source Routing (DSR) protocol is a reactive routing protocol designed
specifically for use in multi-hop wireless ad hoc networks of mobile nodes.
Dynamic Source Routing (DSR) protocol is a reactive routing protocol designed specifically
for use in multi-hop wireless ad hoc networks of mobile nodes.
This model was developed by
`the ResiliNets research group <http://www.ittc.ku.edu/resilinets>`_
@@ -16,42 +16,28 @@ DSR Routing Overview
This model implements the base specification of the Dynamic Source Routing
(DSR) protocol. Implementation is based on RFC4728.
* ``Class dsr::DsrRouting`` implements all functionality of service packet exchange and inherits IpL4Protocol.
* ``Class dsr::DsrOptions`` implements functionality of packet processing and talks to DsrRouting to send/receive packets
* ``Class dsr::DsrFsHeader`` defines the fixed-size header and identifies the up-layer protocol
* ``Class dsr::DsrOptionHeader`` takes care of different dsr options and processes different header according to the specification from the RFC
* ``Class dsr::DsrSendBuffer`` is a buffer to save data packets and route error packets when there is no route to forward the packets
* ``Class dsr::DsrMaintainBuffer`` is a buffer to save data packets for next-hop notification when the data packet has already been sent out of send buffer
* ``Class dsr::RouteCache`` is the essential part to save routes found for data packets. DSR responds to several routes for a single destination
* ``Class dsr::RreqTable`` implements the functions to avoid duplicate route requests and control route request rate for a single destination
Protocol operation depends on many adjustable parameters. We support parameters, with their default values, from RFC and parameters that enable/disable
protocol features or tune for specific simulation scenarios, such as the max
size of the send buffer and its timeout value. The full parameter list is
found in the dsr-routing.cc file.
DSR operates on a on-demand behavior. Therefore, our DSR model buffers all
packets while a route request packet (RREQ) is disseminated. We implement
a packet buffer in dsr-rsendbuff.cc. The packet queue implements
garbage collection of old packets and a queue size limit. When the packet
is sent out from the send buffer, it will be queued in maintenance buffer
for next hop acknowledgment.
DSR discovers routes on-demand. Therefore, our DSR model buffers all packets,
while a route request packet (RREQ) is disseminated. We implement a packet
buffer in dsr-rsendbuff.cc. The packet queue implements garbage collection
of old packets and a queue size limit. When the packet is sent out from the
send buffer, it will be queued in maintenance buffer for next hop
acknowledgment.
The maintenance buffer then buffers the already sent out packets and waits
for the notification of packet delivery. Protocol operation strongly
depends on broken link detection mechanism. We implement the three heuristics
recommended based the RFC as follows:
The Route Cache implementation support garbage collection of old entries
and state machine, as defined in the standard. It implements as a STL
map container. The key is the destination IP address.
Protocol operation strongly depends on broken link detection mechanism.
We implement the three heuristics recommended based the rfc.
First, we use link layer feedback when possible, which is also the fastest mechanism
in these three to detect link errors. A link is considered to be
First, we use link layer feedback when possible, which is also the fastest
mechanism of these three to detect link errors. A link is considered to be
broken if frame transmission results in a transmission failure for all
retries. This mechanism is meant for active links and works much faster than
in its absence. DSR is able to detect the link layer transmission failure and
notify that as broken. Recalculation of routes will be triggered when needed.
If user does not want to use link layer acknowledgment, it can be tuned by setting
"LinkAcknowledgment" attribute to false in "dsr-routing.cc".
retries. This mechanism is meant for active links and works much faster
than in its absence. DSR is able to
detect the link layer transmission failure and notify that as broken.
Recalculation of routes will be triggered
when needed. If user does not want to use link layer acknowledgment,
it can be tuned by setting "LinkAcknowledgment" attribute to false in
"dsr-routing.cc".
Second, passive acknowledgment should be used whenever possible. The node
turns on "promiscuous" receive mode, in which it can receive packets not
@@ -61,6 +47,23 @@ packet to its destination, it cancels the passive acknowledgment timer.
Last, we use a network layer acknowledge scheme to notify the receipt of
a packet. Route request packet will not be acknowledged or retransmitted.
The Route Cache implementation support garbage collection of old entries
and state machine, as defined in the
standard. It implements as a STL map container. The key is the
destination IP address.
DSR operates with direct access to IP header, and operates between network
and transport layer. When packet is sent out from transport layer, it
passes itself to DSR and DSR header is appended.
We have two caching mechanisms: path cache and link cache. The path cache
saves the whole path in the cache. The paths are sorted based on the
hop count, and whenever one path is not able to be used, we change to the
next path. The link cache is a slightly better design in the sense that it
uses different subpaths and uses Implemented Link Cache using
Dijsktra algorithm, and this part is implemented by
Song Luan <lsuper@mail.ustc.edu.cn>.
The following optional protocol optimizations aren't implemented:
* Flow state
@@ -70,25 +73,63 @@ The following optional protocol optimizations aren't implemented:
1. flow state not supported option
2. unsupported option (not going to happen in simulation)
DSR operates with direct access to IP header, and operates between
network and transport layer.
DSR update in ns-3.17
=====================
Implementation changes
======================
We originally used "TxErrHeader" in Ptr<WifiMac> to indicate the transmission
error of a specific packet in link layer, however, it was not working
quite correctly since even when the packet was dropped, this header was
not recorded in the trace file. We used to a different path on implementing
the link layer notification mechanism. We look into the trace file by
finding packet receive event. If we find one receive event for the
data packet, we count that as the indicator for successful data delivery.
* The DsrFsHeader has added 3 fields: message type, source id, destination id,
and these changes only for post-processing
Useful parameters
=================
* message type is used to identify the data packet from control packet
* source id is used to identify the real source of the data packet since we have to deliver the packet hop-by-hop and the ipv4header is not carrying the real source and destination ip address as needed
* destination id is for same reason of above
::
+------------------------- +------------------------------------+-------------+
| Parameter | Description | Default |
+==========================+====================================+=============+
| MaxSendBuffLen | Maximum number of packets that can | 64 |
| | be stored in send buffer | |
+------------------------- +------------------------------------+-------------+
| MaxSendBuffTime | Maximum time packets can be queued | Seconds(30) |
| | in the send buffer | |
+------------------------- +------------------------------------+-------------+
| MaxMaintLen | Maximum number of packets that can | 50 |
| | be stored in maintenance buffer | |
+------------------------- +------------------------------------+-------------+
| MaxMaintTime | Maximum time packets can be queued | Seconds(30) |
| | in maintenance buffer | |
+------------------------- +------------------------------------+-------------+
| MaxCacheLen | Maximum number of route entries | 64 |
| | that can be stored in route cache | |
+------------------------- +------------------------------------+-------------+
| RouteCacheTimeout | Maximum time the route cache can | Seconds(300)|
| | be queued in route cache | |
+------------------------- +------------------------------------+-------------+
| RreqRetries | Maximum number of retransmissions | 16 |
| | for request discovery of a route | |
+------------------------- +------------------------------------+-------------+
| CacheType | Use Link Cache or use Path Cache | "LinkCache" |
| | | |
+------------------------- +------------------------------------+-------------+
| LinkAcknowledgment | Enable Link layer acknowledgment | True |
| | mechanism | |
+------------------------- +------------------------------------+-------------+
Implementation modification
===========================
* The DsrFsHeader has added 3 fields: message type, source id, destination id, and these changes only for post-processing
1. Message type is used to identify the data packet from control packet
2. source id is used to identify the real source of the data packet since we have to deliver the packet hop-by-hop and the ipv4header is not carrying the real source and destination ip address as needed
3. destination id is for same reason of above
* Route Reply header is not word-aligned in DSR rfc, change it to word-aligned in implementation
* DSR works as a shim header between transport and network protocol, it needs its own forwarding mechanism, we are changing the packet transmission to hop-by-hop delivery, so we added two fields in dsr fixed header to notify packet delivery
# message type to notify the type of this packet: data packet or control one
# source id to identify the real source address of this packet
# destination id to identify the real destination
Current Route Cache implementation
==================================
@@ -120,9 +161,8 @@ and DsrMainHelpers in your simulation script. For instance::
DsrMainHelper dsrMain;
dsrMain.Install (dsr, adhocNodes);
The example scripts inside ``src/dsr/examples/`` demonstrate the use of
DSR based nodes
in different scenarios. The helper source can be found inside ``src/dsr/helper/dsr-main-helper.{h,cc}``
The example scripts inside ``src/dsr/examples/`` demonstrate the use of DSR based nodesin different scenarios.
The helper source can be found inside ``src/dsr/helper/dsr-main-helper.{h,cc}``
and ``src/dsr/helper/dsr-helper.{h,cc}``
Examples
+4
View File
@@ -3,6 +3,10 @@
Emu NetDevice
-------------
**Note:** The ``EmuNetDevice`` is being deprecated as of ns-3.17. The
``EmuFdNetDeviceHelper`` class replaces this functionality and API
entirely.
Behavior
********
+1 -1
View File
@@ -2,6 +2,6 @@ callback_classes = [
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'unsigned char*', 'long', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'unsigned char*', 'int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
]
@@ -4,16 +4,21 @@ def post_register_types(root_module):
enabled_features = os.environ['NS3_ENABLED_FEATURES'].split(',')
if 'EmuFdNetDevice' not in enabled_features:
root_module.classes.remove(root_module['ns3::EmuFdNetDeviceHelper'])
if 'ns3::EmuFdNetDeviceHelper'in root_module:
root_module.classes.remove(root_module['ns3::EmuFdNetDeviceHelper'])
if 'TapFdNetDevice' not in enabled_features:
root_module.classes.remove(root_module['ns3::TapFdNetDeviceHelper'])
if 'ns3::TapFdNetDeviceHelper'in root_module:
root_module.classes.remove(root_module['ns3::TapFdNetDeviceHelper'])
if 'PlanetLabFdNetDevice' not in enabled_features:
root_module.classes.remove(root_module['ns3::PlanetLabFdNetDeviceHelper'])
if 'ns3::PlanetLabFdNetDeviceHelper'in root_module:
root_module.classes.remove(root_module['ns3::PlanetLabFdNetDeviceHelper'])
if 'FdNetDevice' not in enabled_features:
for clsname in ['FdNetDevice', 'FdNetDeviceHelper', 'FdNetDeviceFdReader']:
root_module.classes.remove(root_module['ns3::%s' % clsname])
root_module.enums.remove(root_module['ns3::FdNetDeviceHelper::EncapsulationMode'])
if 'ns3::%s' % clsname in root_module:
root_module.classes.remove(root_module['ns3::%s' % clsname])
if 'ns3::FdNetDeviceHelper::EncapsulationMode' in root_module:
root_module.enums.remove(root_module['ns3::FdNetDeviceHelper::EncapsulationMode'])
+9 -2
View File
@@ -2,6 +2,13 @@
import os.path
from waflib import Options
def options(opt):
opt.add_option('--force-planetlab',
help=('Forces compilation of PlanetLab even if not suported by the local system'),
dest='force_planetlab', default=False, action="store_true")
def configure(conf):
conf.env['ENABLE_FDNETDEV'] = False
@@ -72,7 +79,7 @@ def configure(conf):
# Enable use of PlanetLab TAP helper
# TODO: How to validate
(sysname, nodename, release, version, machine) = os.uname()
if release.find('onelab') != -1:
if release.find('onelab') != -1 or Options.options.force_planetlab:
conf.env['ENABLE_PLANETLAB'] = True
if conf.env['ENABLE_PLANETLAB']:
@@ -84,7 +91,7 @@ def configure(conf):
conf.report_optional_feature("PlanetLabFdNetDevice",
"PlanetLab FdNetDevice",
False,
"PlanetLab operating system not detected")
"PlanetLab operating system not detected (see option --force-planetlab)")
def build(bld):
# Don't do anything for this module if emu's not enabled.
-34
View File
@@ -7396,26 +7396,6 @@ def register_Ns3RadioBearerStatsConnector_methods(root_module, cls):
cls.add_method('EnsureConnected',
'void',
[])
## radio-bearer-stats-connector.h (module 'lte'): static uint16_t ns3::RadioBearerStatsConnector::FindCellIdFromEnbRlcPath(std::string path) [member function]
cls.add_method('FindCellIdFromEnbRlcPath',
'uint16_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static uint16_t ns3::RadioBearerStatsConnector::FindCellIdFromUeRlcPath(std::string path) [member function]
cls.add_method('FindCellIdFromUeRlcPath',
'uint16_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static uint64_t ns3::RadioBearerStatsConnector::FindImsiFromEnbRlcPath(std::string path) [member function]
cls.add_method('FindImsiFromEnbRlcPath',
'uint64_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static uint64_t ns3::RadioBearerStatsConnector::FindImsiFromUeRlcPath(std::string path) [member function]
cls.add_method('FindImsiFromUeRlcPath',
'uint64_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static void ns3::RadioBearerStatsConnector::NotifyConnectionReconfigurationEnb(ns3::RadioBearerStatsConnector * c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti) [member function]
cls.add_method('NotifyConnectionReconfigurationEnb',
'void',
@@ -8615,11 +8595,6 @@ def register_Ns3EpsBearerTag_methods(root_module, cls):
'ns3::TypeId',
[],
is_const=True, is_virtual=True)
## eps-bearer-tag.h (module 'lte'): uint8_t ns3::EpsBearerTag::GetLayer() const [member function]
cls.add_method('GetLayer',
'uint8_t',
[],
is_const=True)
## eps-bearer-tag.h (module 'lte'): uint16_t ns3::EpsBearerTag::GetRnti() const [member function]
cls.add_method('GetRnti',
'uint16_t',
@@ -12612,10 +12587,6 @@ def register_Ns3EpcSgwPgwApplication_methods(root_module, cls):
cls.add_constructor([param('ns3::EpcSgwPgwApplication const &', 'arg0')])
## epc-sgw-pgw-application.h (module 'lte'): ns3::EpcSgwPgwApplication::EpcSgwPgwApplication(ns3::Ptr<ns3::VirtualNetDevice> const tunDevice, ns3::Ptr<ns3::Socket> const s1uSocket) [constructor]
cls.add_constructor([param('ns3::Ptr< ns3::VirtualNetDevice > const', 'tunDevice'), param('ns3::Ptr< ns3::Socket > const', 's1uSocket')])
## epc-sgw-pgw-application.h (module 'lte'): uint32_t ns3::EpcSgwPgwApplication::ActivateS1Bearer(ns3::Ipv4Address ueAddr, ns3::Ipv4Address enbAddr, ns3::Ptr<ns3::EpcTft> tft) [member function]
cls.add_method('ActivateS1Bearer',
'uint32_t',
[param('ns3::Ipv4Address', 'ueAddr'), param('ns3::Ipv4Address', 'enbAddr'), param('ns3::Ptr< ns3::EpcTft >', 'tft')])
## epc-sgw-pgw-application.h (module 'lte'): void ns3::EpcSgwPgwApplication::AddEnb(uint16_t cellId, ns3::Ipv4Address enbAddr, ns3::Ipv4Address sgwAddr) [member function]
cls.add_method('AddEnb',
'void',
@@ -19497,11 +19468,6 @@ def register_Ns3RrcConnectionReleaseHeader_methods(root_module, cls):
'ns3::LteRrcSap::RrcConnectionRelease',
[],
is_const=True)
## lte-rrc-header.h (module 'lte'): uint8_t ns3::RrcConnectionReleaseHeader::GetRrcTransactionIdentifier() const [member function]
cls.add_method('GetRrcTransactionIdentifier',
'uint8_t',
[],
is_const=True)
## lte-rrc-header.h (module 'lte'): void ns3::RrcConnectionReleaseHeader::PreSerialize() const [member function]
cls.add_method('PreSerialize',
'void',
-34
View File
@@ -7396,26 +7396,6 @@ def register_Ns3RadioBearerStatsConnector_methods(root_module, cls):
cls.add_method('EnsureConnected',
'void',
[])
## radio-bearer-stats-connector.h (module 'lte'): static uint16_t ns3::RadioBearerStatsConnector::FindCellIdFromEnbRlcPath(std::string path) [member function]
cls.add_method('FindCellIdFromEnbRlcPath',
'uint16_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static uint16_t ns3::RadioBearerStatsConnector::FindCellIdFromUeRlcPath(std::string path) [member function]
cls.add_method('FindCellIdFromUeRlcPath',
'uint16_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static uint64_t ns3::RadioBearerStatsConnector::FindImsiFromEnbRlcPath(std::string path) [member function]
cls.add_method('FindImsiFromEnbRlcPath',
'uint64_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static uint64_t ns3::RadioBearerStatsConnector::FindImsiFromUeRlcPath(std::string path) [member function]
cls.add_method('FindImsiFromUeRlcPath',
'uint64_t',
[param('std::string', 'path')],
is_static=True)
## radio-bearer-stats-connector.h (module 'lte'): static void ns3::RadioBearerStatsConnector::NotifyConnectionReconfigurationEnb(ns3::RadioBearerStatsConnector * c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti) [member function]
cls.add_method('NotifyConnectionReconfigurationEnb',
'void',
@@ -8615,11 +8595,6 @@ def register_Ns3EpsBearerTag_methods(root_module, cls):
'ns3::TypeId',
[],
is_const=True, is_virtual=True)
## eps-bearer-tag.h (module 'lte'): uint8_t ns3::EpsBearerTag::GetLayer() const [member function]
cls.add_method('GetLayer',
'uint8_t',
[],
is_const=True)
## eps-bearer-tag.h (module 'lte'): uint16_t ns3::EpsBearerTag::GetRnti() const [member function]
cls.add_method('GetRnti',
'uint16_t',
@@ -12612,10 +12587,6 @@ def register_Ns3EpcSgwPgwApplication_methods(root_module, cls):
cls.add_constructor([param('ns3::EpcSgwPgwApplication const &', 'arg0')])
## epc-sgw-pgw-application.h (module 'lte'): ns3::EpcSgwPgwApplication::EpcSgwPgwApplication(ns3::Ptr<ns3::VirtualNetDevice> const tunDevice, ns3::Ptr<ns3::Socket> const s1uSocket) [constructor]
cls.add_constructor([param('ns3::Ptr< ns3::VirtualNetDevice > const', 'tunDevice'), param('ns3::Ptr< ns3::Socket > const', 's1uSocket')])
## epc-sgw-pgw-application.h (module 'lte'): uint32_t ns3::EpcSgwPgwApplication::ActivateS1Bearer(ns3::Ipv4Address ueAddr, ns3::Ipv4Address enbAddr, ns3::Ptr<ns3::EpcTft> tft) [member function]
cls.add_method('ActivateS1Bearer',
'uint32_t',
[param('ns3::Ipv4Address', 'ueAddr'), param('ns3::Ipv4Address', 'enbAddr'), param('ns3::Ptr< ns3::EpcTft >', 'tft')])
## epc-sgw-pgw-application.h (module 'lte'): void ns3::EpcSgwPgwApplication::AddEnb(uint16_t cellId, ns3::Ipv4Address enbAddr, ns3::Ipv4Address sgwAddr) [member function]
cls.add_method('AddEnb',
'void',
@@ -19497,11 +19468,6 @@ def register_Ns3RrcConnectionReleaseHeader_methods(root_module, cls):
'ns3::LteRrcSap::RrcConnectionRelease',
[],
is_const=True)
## lte-rrc-header.h (module 'lte'): uint8_t ns3::RrcConnectionReleaseHeader::GetRrcTransactionIdentifier() const [member function]
cls.add_method('GetRrcTransactionIdentifier',
'uint8_t',
[],
is_const=True)
## lte-rrc-header.h (module 'lte'): void ns3::RrcConnectionReleaseHeader::PreSerialize() const [member function]
cls.add_method('PreSerialize',
'void',
@@ -40,11 +40,6 @@ class RadioBearerStatsConnector
{
public:
static uint64_t FindImsiFromEnbRlcPath (std::string path);
static uint16_t FindCellIdFromEnbRlcPath (std::string path);
static uint64_t FindImsiFromUeRlcPath (std::string path);
static uint16_t FindCellIdFromUeRlcPath (std::string path);
RadioBearerStatsConnector ();
void EnableRlcStats (Ptr<RadioBearerStatsCalculator> rlcStats);
-16
View File
@@ -69,22 +69,6 @@ public:
* Destructor
*/
virtual ~EpcSgwPgwApplication (void);
/**
* Simulates the reception by the PGW of a GTP-C message of type
* CreateSessionRequest or BearerResourceCommand coming from the
* MME. This triggers the creation of a new EPS Bearer.
*
* \param bearer the specification of the EPS Bearer to be created
* \param enbS1uAddress the IPv4 address at which the SGW can reach
* the eNB via the S1-U interface
* \param tft the Traffic Flow Template related to this bearer
*
* \return the TunnelEndpointIdentifier of this EPS bearer
*/
uint32_t ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr<EpcTft> tft);
/**
* Method to be assigned to the callback of the Gi TUN VirtualNetDevice. It
-1
View File
@@ -70,7 +70,6 @@ public:
uint16_t GetRnti (void) const;
uint8_t GetBid (void) const;
uint8_t GetLayer (void) const;
private:
uint16_t m_rnti;
-6
View File
@@ -697,12 +697,6 @@ public:
*/
LteRrcSap::RrcConnectionRelease GetMessage () const;
/**
* Getter for m_rrcConnectionRelease attribute
* @return m_rrcConnectionRelease
*/
uint8_t GetRrcTransactionIdentifier () const;
private:
LteRrcSap::RrcConnectionRelease m_rrcConnectionRelease;
};
@@ -1348,14 +1348,10 @@ def register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, cls):
is_static=True)
## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel::TwoRayGroundPropagationLossModel() [constructor]
cls.add_constructor([])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double frequency, double speed) [member function]
cls.add_method('SetLambda',
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
cls.add_method('SetFrequency',
'void',
[param('double', 'frequency'), param('double', 'speed')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double lambda) [member function]
cls.add_method('SetLambda',
'void',
[param('double', 'lambda')])
[param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -1369,8 +1365,8 @@ def register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, cls):
'double',
[],
is_const=True)
## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetLambda() const [member function]
cls.add_method('GetLambda',
## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetFrequency() const [member function]
cls.add_method('GetFrequency',
'double',
[],
is_const=True)
@@ -2019,14 +2015,10 @@ def register_Ns3FriisPropagationLossModel_methods(root_module, cls):
is_static=True)
## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel::FriisPropagationLossModel() [constructor]
cls.add_constructor([])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double frequency, double speed) [member function]
cls.add_method('SetLambda',
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
cls.add_method('SetFrequency',
'void',
[param('double', 'frequency'), param('double', 'speed')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double lambda) [member function]
cls.add_method('SetLambda',
'void',
[param('double', 'lambda')])
[param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -2040,8 +2032,8 @@ def register_Ns3FriisPropagationLossModel_methods(root_module, cls):
'double',
[],
is_const=True)
## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetLambda() const [member function]
cls.add_method('GetLambda',
## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetFrequency() const [member function]
cls.add_method('GetFrequency',
'double',
[],
is_const=True)
+10 -18
View File
@@ -1348,14 +1348,10 @@ def register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, cls):
is_static=True)
## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel::TwoRayGroundPropagationLossModel() [constructor]
cls.add_constructor([])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double frequency, double speed) [member function]
cls.add_method('SetLambda',
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
cls.add_method('SetFrequency',
'void',
[param('double', 'frequency'), param('double', 'speed')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double lambda) [member function]
cls.add_method('SetLambda',
'void',
[param('double', 'lambda')])
[param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -1369,8 +1365,8 @@ def register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, cls):
'double',
[],
is_const=True)
## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetLambda() const [member function]
cls.add_method('GetLambda',
## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetFrequency() const [member function]
cls.add_method('GetFrequency',
'double',
[],
is_const=True)
@@ -2019,14 +2015,10 @@ def register_Ns3FriisPropagationLossModel_methods(root_module, cls):
is_static=True)
## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel::FriisPropagationLossModel() [constructor]
cls.add_constructor([])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double frequency, double speed) [member function]
cls.add_method('SetLambda',
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
cls.add_method('SetFrequency',
'void',
[param('double', 'frequency'), param('double', 'speed')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double lambda) [member function]
cls.add_method('SetLambda',
'void',
[param('double', 'lambda')])
[param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -2040,8 +2032,8 @@ def register_Ns3FriisPropagationLossModel_methods(root_module, cls):
'double',
[],
is_const=True)
## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetLambda() const [member function]
cls.add_method('GetLambda',
## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetFrequency() const [member function]
cls.add_method('GetFrequency',
'double',
[],
is_const=True)
+29 -29
View File
@@ -148,10 +148,11 @@ FriisPropagationLossModel::GetTypeId (void)
static TypeId tid = TypeId ("ns3::FriisPropagationLossModel")
.SetParent<PropagationLossModel> ()
.AddConstructor<FriisPropagationLossModel> ()
.AddAttribute ("Lambda",
"The wavelength (default is 5.15 GHz at 300 000 km/s).",
DoubleValue (300000000.0 / 5.150e9),
MakeDoubleAccessor (&FriisPropagationLossModel::m_lambda),
.AddAttribute ("Frequency",
"The carrier frequency (in Hz) at which propagation occurs (default is 5.15 GHz).",
DoubleValue (5.150e9),
MakeDoubleAccessor (&FriisPropagationLossModel::SetFrequency,
&FriisPropagationLossModel::GetFrequency),
MakeDoubleChecker<double> ())
.AddAttribute ("SystemLoss", "The system loss",
DoubleValue (1.0),
@@ -190,20 +191,19 @@ FriisPropagationLossModel::GetMinDistance (void) const
{
return m_minDistance;
}
void
FriisPropagationLossModel::SetLambda (double frequency, double speed)
FriisPropagationLossModel::SetFrequency (double frequency)
{
m_lambda = speed / frequency;
}
void
FriisPropagationLossModel::SetLambda (double lambda)
{
m_lambda = lambda;
m_frequency = frequency;
static const double C = 299792458.0; // speed of light in vacuum
m_lambda = C / frequency;
}
double
FriisPropagationLossModel::GetLambda (void) const
FriisPropagationLossModel::GetFrequency (void) const
{
return m_lambda;
return m_frequency;
}
double
@@ -285,10 +285,11 @@ TwoRayGroundPropagationLossModel::GetTypeId (void)
static TypeId tid = TypeId ("ns3::TwoRayGroundPropagationLossModel")
.SetParent<PropagationLossModel> ()
.AddConstructor<TwoRayGroundPropagationLossModel> ()
.AddAttribute ("Lambda",
"The wavelength (default is 5.15 GHz at 300 000 km/s).",
DoubleValue (300000000.0 / 5.150e9),
MakeDoubleAccessor (&TwoRayGroundPropagationLossModel::m_lambda),
.AddAttribute ("Frequency",
"The carrier frequency (in Hz) at which propagation occurs (default is 5.15 GHz).",
DoubleValue (5.150e9),
MakeDoubleAccessor (&TwoRayGroundPropagationLossModel::SetFrequency,
&TwoRayGroundPropagationLossModel::GetFrequency),
MakeDoubleChecker<double> ())
.AddAttribute ("SystemLoss", "The system loss",
DoubleValue (1.0),
@@ -337,20 +338,19 @@ TwoRayGroundPropagationLossModel::SetHeightAboveZ (double heightAboveZ)
{
m_heightAboveZ = heightAboveZ;
}
void
TwoRayGroundPropagationLossModel::SetLambda (double frequency, double speed)
void
TwoRayGroundPropagationLossModel::SetFrequency (double frequency)
{
m_lambda = speed / frequency;
m_frequency = frequency;
static const double C = 299792458.0; // speed of light in vacuum
m_lambda = C / frequency;
}
void
TwoRayGroundPropagationLossModel::SetLambda (double lambda)
double
TwoRayGroundPropagationLossModel::GetFrequency (void) const
{
m_lambda = lambda;
}
double
TwoRayGroundPropagationLossModel::GetLambda (void) const
{
return m_lambda;
return m_frequency;
}
double
@@ -415,7 +415,7 @@ TwoRayGroundPropagationLossModel::DoCalcRxPower (double txPowerDbm,
*
*/
double dCross = (4 * PI * txAntHeight * rxAntHeight) / GetLambda ();
double dCross = (4 * PI * txAntHeight * rxAntHeight) / m_lambda;
double tmp = 0;
if (distance <= dCross)
{
+24 -24
View File
@@ -171,6 +171,11 @@ private:
* This model is invalid for small distance values.
* The current implementation returns the txpower as the rxpower
* for any distance smaller than MinDistance.
*
* In the implementation, \f$ \lambda \f$ is calculated as
* \f$ \frac{C}{f} \f$, where \f$ C = 299792458\f$ m/s is the speed of light in
* vacuum, and \f$ f \f$ is the frequency in Hz which can be configured by
* the user via the Frequency attribute.
*/
class FriisPropagationLossModel : public PropagationLossModel
{
@@ -179,19 +184,11 @@ public:
FriisPropagationLossModel ();
/**
* \param frequency (Hz)
* \param speed (m/s)
*
* Set the main wavelength used in the Friis model
* Set the carrier frequency used in the Friis model
* calculation.
*/
void SetLambda (double frequency, double speed);
/**
* \param lambda (m) the wavelength
*
* Set the main wavelength used in the Friis model
* calculation.
*/
void SetLambda (double lambda);
void SetFrequency (double frequency);
/**
* \param systemLoss (dimension-less)
*
@@ -213,9 +210,9 @@ public:
double GetMinDistance (void) const;
/**
* \returns the current wavelength (m)
* \returns the current frequency (Hz)
*/
double GetLambda (void) const;
double GetFrequency (void) const;
/**
* \returns the current system loss (dimension-less)
*/
@@ -233,6 +230,7 @@ private:
static const double PI;
double m_lambda;
double m_frequency;
double m_systemLoss;
double m_minDistance;
};
@@ -259,27 +257,26 @@ private:
* The crossover distance, below which Friis is used, is calculated as follows:
*
* \f$ dCross = \frac{(4 * pi * Ht * Hr)}{lambda} \f$
*
* In the implementation, \f$ \lambda \f$ is calculated as
* \f$ \frac{C}{f} \f$, where \f$ C = 299792458\f$ m/s is the speed of light in
* vacuum, and \f$ f \f$ is the frequency in Hz which can be configured by
* the user via the Frequency attribute.
*/
class TwoRayGroundPropagationLossModel : public PropagationLossModel
{
public:
static TypeId GetTypeId (void);
TwoRayGroundPropagationLossModel ();
/**
* \param frequency (Hz)
* \param speed (m/s)
*
* Set the main wavelength used in the TwoRayGround model
* Set the carrier frequency used in the TwoRayGround model
* calculation.
*/
void SetLambda (double frequency, double speed);
/**
* \param lambda (m) the wavelength
*
* Set the main wavelength used in the TwoRayGround model
* calculation.
*/
void SetLambda (double lambda);
void SetFrequency (double frequency);
/**
* \param systemLoss (dimension-less)
*
@@ -297,10 +294,12 @@ public:
* \returns the minimum distance.
*/
double GetMinDistance (void) const;
/**
* \returns the current wavelength (m)
* \returns the current frequency (Hz)
*/
double GetLambda (void) const;
double GetFrequency (void) const;
/**
* \returns the current system loss (dimension-less)
*/
@@ -324,6 +323,7 @@ private:
static const double PI;
double m_lambda;
double m_frequency;
double m_systemLoss;
double m_minDistance;
double m_heightAboveZ;
@@ -68,8 +68,9 @@ FriisPropagationLossModelTestCase::DoRun (void)
// The ns-3 testing manual gives more background on the values selected
// for this test. First, set a few defaults.
// wavelength at 2.4 GHz is 0.125m
Config::SetDefault ("ns3::FriisPropagationLossModel::Lambda", DoubleValue (0.125));
// the test vectors have been determined for a wavelength of 0.125 m
// which corresponds to a frequency of 2398339664.0 Hz in the vacuum
Config::SetDefault ("ns3::FriisPropagationLossModel::Frequency", DoubleValue (2398339664.0));
Config::SetDefault ("ns3::FriisPropagationLossModel::SystemLoss", DoubleValue (1.0));
// Select a reference transmit power
@@ -164,8 +165,9 @@ TwoRayGroundPropagationLossModelTestCase::~TwoRayGroundPropagationLossModelTestC
void
TwoRayGroundPropagationLossModelTestCase::DoRun (void)
{
// wavelength at 2.4 GHz is 0.125m
Config::SetDefault ("ns3::TwoRayGroundPropagationLossModel::Lambda", DoubleValue (0.125));
// the test vectors have been determined for a wavelength of 0.125 m
// which corresponds to a frequency of 2398339664.0 Hz in the vacuum
Config::SetDefault ("ns3::TwoRayGroundPropagationLossModel::Frequency", DoubleValue (2398339664.0));
Config::SetDefault ("ns3::TwoRayGroundPropagationLossModel::SystemLoss", DoubleValue (1.0));
// set antenna height to 1.5m above z coordinate