diff --git a/.hgignore b/.hgignore
index 8005e8788..3b72f761d 100644
--- a/.hgignore
+++ b/.hgignore
@@ -20,6 +20,7 @@
\.pcap$
\.mob$
\.routes$
+^doc/doxygen.log$
^doc/doxygen.warnings.log$
^doc/(manual|models|tutorial|tutorial-pt-br)/build
^doc/(manual|models|tutorial|tutorial-pt-br)/figures/.*\.(eps|pdf|png)$
diff --git a/.hgtags b/.hgtags
index bad3c9042..4625ebb74 100644
--- a/.hgtags
+++ b/.hgtags
@@ -63,3 +63,4 @@ e48ed3aabca6ad71c8c49e4604c0f83345eda6a8 ns-3.11-RC3
9007193fbb8d18b69a1feb6aec16501dcf138b6f ns-3.13
ae540de68a2534213342c5e0b12afb47d7518a90 ns-3.14
26a511d6dbad7284e66de0f3b2ad5bebe6b76405 ns-3.15
+49d343e55caec257bb01e400eef6c14522f37e1b ns-3.16
diff --git a/AUTHORS b/AUTHORS
index 89a23619d..620ea4f91 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,6 +4,7 @@ Kirill Andreev (andreev@iitp.ru)
Dean Armstrong (deanarm@gmail.com)
Nicola Baldo (nbaldo@cttc.es)
Mirko Banchi (mk.banchi@gmail.com)
+Peter D. Barnes, Jr. (barnes26@llnl.gov)
Ramon Bauza (monbauza@gmail.com)
Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
Raj Bhattacharjea (raj.b@gatech.edu)
@@ -22,14 +23,17 @@ Andrey Churin (aachurin@gmail.com)
Salva Climent (jocliba@gmail.com)
Luis Cortes (cortes@gatech.edu)
Luca Costantino (luca.costantino@gmail.com)
+Alexander D'souza (moijes12@gmail.com)
Craig Dowell (craigdo@ee.washington.edu)
Denis Fakhriev (fakhriev@iitp.ru)
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
Juliana Freitag Borin (juliana.freitag@gmail.com)
+Eric Gamess (egamess@gmail.com)
Thomas Geithner (thomas.geithner@dai-labor.de)
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
Tom Goff (tgoff@tgoff.net)
David Gross (gdavid.devel@gmail.com)
+Maja Grubišić (maja.grubisic@live.com)
Charline Taibi Guguen (charline.guguen@gmail.com)
Daniel Halperin (daniel@halper.in)
Bruno Haick (bghaick@hotmail.com)
@@ -47,6 +51,7 @@ Flavio Kobuta (flaviokubota@gmail.com)
Aleksey Kovalenko (kovalenko@iitp.ru)
Mathieu Lacage (mathieu.lacage@inria.fr)
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
+Daniel Lertpratchya (nikkipui@gmail.com)
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
Keith Ma (keith.nwsuaf@gmail.com)
Federico Maguolo (maguolof@dei.unipd.it)
@@ -87,6 +92,7 @@ Phillip Sitbon (phillip.sitbon@gmail.com)
Anirudh Sivaraman (sk.anirudh@gmail.com)
Ewgenij Starostin (estar@cs.tu-berlin.de)
YunQiang Su (wzssyqa@gmail.com)
+Brian Swenson (bswenson3@gatech.edu)
Lalith Suresh (suresh.lalith@gmail.com)
Marcos Talau (talau@users.sourceforge.net)
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
@@ -104,3 +110,4 @@ Mitch Watrous (watrous@u.washington.edu)
Florian Westphal (fw@strlen.de)
He Wu (mdzz@u.washington.edu)
Yoshihiko Yazawa (yoshiyaz@gmail.com)
+Dizhi Zhou (dizhi.zhou@gmail.com)
diff --git a/CHANGES.html b/CHANGES.html
index 968b3fd48..9602f5118 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -23,6 +23,13 @@ the impact of these changes on users by documenting these changes in a
single place (this file), and not by providing a temporary or permanent
backward-compatibility software layer.
+A related file is the RELEASE_NOTES file in the top level directory.
+This file complements RELEASE_NOTES by focusing on API and behavioral
+changes that users upgrading from one release to the next may encounter.
+RELEASE_NOTES attempts to comprehensively list all of the changes
+that were made. There is generally some overlap in the information
+contained in RELEASE_NOTES and this file.
+
The goal is that users who encounter a problem when trying to use older
code with newer code should be able to consult this file to find
guidance as to how to fix the problem. For instance, if a method name
@@ -43,6 +50,176 @@ the cracks, unfortunately. If you, as a user, can suggest improvements
to this file based on your experience, please contribute a patch or drop
us a note on ns-developers mailing list.
+
+Changes from ns-3.16 to ns-3.17
+
+New API:
+
+ - New TCP Westwood and Westwood+ models
+
- In Ipv4ClickRouting, the following APIs were added:
+
+ - Ipv4ClickRouting::SetDefines(), accessible through ClickInternetStackHelper::SetDefines(), for the user to set Click defines from the ns-3 simulation file.
+ - SIMCLICK_GET_RANDOM_INT click-to-simulator command for ns-3 to drive Click's random number generation.
+
+
+ - LTE module
+
+ - New user-visible LTE API
+
+ - 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.
+ - the new LteHelper method EnablePhyTraces can now be used to enable the new PHY traces
+
+
+ - New internal LTE API
+
+ - New LTE control message classes DlHarqFeedbackLteControlMessage,
+ RachPreambleLteControlMessage, RarLteControlMessage, MibLteControlMessage
+ - New class UeManager
+
- New LteRadioBearerInfo subclasses LteSignalingRadioBearerInfo,
+ LteDataRadioBearerInfo
+ - New LteSinrChunkProcessor subclasses LteRsReceivedPowerChunkProcessor,
+ LteInterferencePowerChunkProcessor
+
+
+
+
+- New DSR API
+
+ - Added PassiveBuffer class to save maintenance packet entry for passive acknowledgment option
+ - Added FindSourceEntry function in RreqTable class to keep track of route request entry received from same source node
+ - 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.
+
+
+- New Tag, PacketSocketTag, to carry the destination address of a packet and the packet type
+- New Tag, DeviceNameTag, to carry the ns3 device name from where a packet is coming
+- New Error Model, BurstError model, to determine which bursts of packets are errored corresponding to an underlying distribution, burst rate, and burst size
+
+
+Changes to existing API:
+
+- ns3::Object and subclasses DoStart has been renamed to DoInitialize
+- ns3::Object and subclasses Start has been renamed to Initialize
+- EnergySource StartDeviceModels renamed to InitializeDeviceModels
+- A typo was fixed in an LTE variable name. The variable ns3::AllocationRetentionPriority::preemprionVulnerability was changed to preemptionVulnerability.
+- Changes in TestCase API
+
+ - TestCase has new enumeration TestDuration containing QUICK, EXTENSIVE, TAKES_FOREVER
+ - TestCase constructor now requires TestDuration, old constructor marked deprecated
+
+
+- Changes in LTE API
+
+ - User-visible LTE API
+
+ - 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.
+
+
+ - Internal LTE API
+
+ - EpcHelper added methods AddUe, AddX2Interface. Method AddEnb now requires a cellId. Signature of ActivateEpsBearer changed to void ActivateEpsBearer (Ptr ueLteDevice, uint64_t imsi, Ptr tft, EpsBearer bearer)
+ - LteHelper added methods EnableDlPhyTraces, EnableUlPhyTraces, EnableDlTxPhyTraces, EnableUlTxPhyTraces, EnableDlRxPhyTraces, EnableUlRxPhyTraces
+ - LteHelper removed methods EnableDlRlcTraces, EnableUlRlcTraces, EnableDlPdcpTraces, EnableUlPdcpTraces
+ - RadioBearerStatsCalculator added methods (Set/Get)StartTime, (Set/Get)Epoch, RescheduleEndEpoch, EndEpoch
+ - RadioBearerStatsCalculator removed methods StartEpoch, CheckEpoch
+ - RadioBearerStatsCalculator methods UlTxPdu, DlRxPdu now require a cellId
+ - EpcEnbApplication constructor now requires Ipv4Addresses enbS1uAddress and sgwS1uAddress as well as cellId
+ - EpcEnbApplication added methods SetS1SapUser, GetS1SapProvider, SetS1apSapMme and GetS1apSapEnb
+ - EpcEnbApplication removed method ErabSetupRequest
+ - EpcSgwPgwApplication added methods SetS11SapMme, GetS11SapSgw, AddEnb, AddUe, SetUeAddress
+ - lte-common.h new structs PhyTransmissionStatParameters and PhyReceptionStatParameters used in TracedCallbacks
+ - LteControlMessage new message types DL_HARQ, RACH_PREAMBLE, RAR, MIB
+ - LteEnbCmacSapProvider new methods RemoveUe, GetRachConfig, AllocateNcRaPreamble, AllocateTemporaryCellRnti
+ - LteEnbPhy new methods GetLteEnbCphySapProvider, SetLteEnbCphySapUser, GetDlSpectrumPhy, GetUlSpectrumPhy, CreateSrsReport
+ - LteEnbPhy methods DoSendMacPdu, DoSetTransmissionMode, DoSetSrsConfigurationIndex, DoGetMacChTtiDelay, DoSendLteControlMessage, AddUePhy, DeleteUePhy made private
+ - LteEnbPhySapProvider removed methods SetBandwidth, SetTransmissionMode, SetSrsConfigurationIndex, SetCellId
+ - LteEnbPhySapUser added methods ReceiveRachPreamble, UlInfoListElementHarqFeeback, DlInfoListElementHarqFeeback
+ - LtePdcp added methods (Set/Get)Status
+ - LtePdcp DoTransmitRrcPdu renamed DoTransmitPdcpSdu
+ - LteUeRrc new enum State. New methods SetLteUeCphySapProvider, GetLteUeCphySapUser, SetLteUeRrcSapUser, GetLteUeRrcSapProvider, GetState, GetDlEarfcn, GetDlBandwidth, GetUlBandwidth, GetCellId, SetUseRlcSm . GetRnti made const.
+ - LteUeRrc removed methods ReleaseRadioBearer, GetLcIdVector, SetForwardUpCallback, DoRrcConfigurationUpdateInd
+ - LtePdcpSapProvider struct TransmitRrcPduParameters renamed TransmitPdcpSduParameters. Method TransmitRrcPdu renamed TransmitPdcpSdu
+ - LtePdcpSapUser struct ReceiveRrcPduParameters renamed ReceivePdcpSduParameters. Method ReceiveRrcPdu renamed TransmitPdcpSdu
+ - LtePdcpSpecificLtePdcpSapProvider method TransmitRrcPdu renamed TransmitPdcpSdu
+ - LtePdcpSpecificLtePdcpSapUser method ReceiveRrcPdu renamed ReceivePdcpSdu. Method ReceiveRrcPdu renamed ReceivePdcpSdu
+ - LtePhy removed methods DoSetBandwidth and DoSetEarfcn
+ - LtePhy added methods ReportInterference and ReportRsReceivedPower
+ - LteSpectrumPhy added methods SetHarqPhyModule, Reset, SetLtePhyDlHarqFeedbackCallback, SetLtePhyUlHarqFeedbackCallback, AddRsPowerChunkProcessor, AddInterferenceChunkProcessor
+ - LteUeCphySapProvider removed methods ConfigureRach, StartContentionBasedRandomAccessProcedure, StartNonContentionBasedRandomAccessProcedure
+ - LteUeMac added method AssignStreams
+ - LteUeNetDevice methods GetMac, GetRrc, GetImsi made const
+ - LteUeNetDevice new method GetNas
+ - LteUePhy new methods GetLteUeCphySapProvider, SetLteUeCphySapUser, GetDlSpectrumPhy, GetUlSpectrumPhy, ReportInterference, ReportRsReceivedPower, ReceiveLteDlHarqFeedback
+ - LteUePhy DoSendMacPdu, DoSendLteControlMessage, DoSetTransmissionMode, DoSetSrsConfigurationIndex made private
+ - LteUePhySapProvider removed methods SetBandwidth, SetTransmissionMode, SetSrsConfigurationIndex
+ - LteUePhySapProvider added method SendRachPreamble
+
+
+ - AnimationInterface method EnableIpv4RouteTracking returns reference to calling AnimationInterface object
+- 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.
+
+
+Changes to build system:
+
+- 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.
+
+
+
+Changed behavior:
+
+- DSR link layer notification has changed. The model originally used
+"TxErrHeader" in Ptr 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.
+
+
+
+Changes from ns-3.15 to ns-3.16
+
+New API:
+
+- In the Socket class, the following functions were added:
+
+ - (Set/Get)IpTos - sets IP Type of Service field in the IP headers.
+ - (Set/Is)IpRecvTos - tells the socket to pass information about IP ToS up the stack (by adding SocketIpTosTag to the packet).
+ - (Set/Get)IpTtl - sets IP Time to live field in the IP headers.
+ - (Set/Is)RecvIpTtl - tells the socket to pass information about IP TTL up the stack (by adding SocketIpTtlTag to the packet).
+ - (Set/Is)Ipv6Tclass - sets Traffic Class field in the IPv6 headers.
+ - (Set/Is)Ipv6RecvTclass - tells the socket to pass information about IPv6 TCLASS up the stack (by adding SocketIpv6TclassTag to the packet).
+ - (Set/Get)Ipv6HopLimit - sets Hop Limit field in the IPv6 headers.
+ - (Set/Is)Ipv6RecvHopLimit - tells the socket to pass information about IPv6 HOPLIMIT up the stack (by adding SocketIpv6HoplimitTag to the packet).
+
+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.
+
+
+Changes to existing API:
+
+- In the MobilityHelper class, the functions EnableAscii () and EnableAsciiAll () were changed to use output stream wrappers rather than standard C++ ostreams. The purpose of this change was to make them behave analogously to other helpers in ns-3 that generate ascii traces. Now, the file stream that is open in MobilityHelper is closed nicely upon asserts and program exits.
+
+
+Changes to build system:
+
+- It's now possible to use distcc when building ns-3. See tutorial for details.
+
+
+Changed behavior:
+
+- Sending a packet through Ipv4RawSocket now supports checksum in the Ipv4Header. It is still not possible to manually put in arbitrary checksum as the checksum is automatically calculated at Ipv4L3Protocol. The user has to enable checksum globally for this to work. Simply calling Ipv4Header::EnableChecksum() for a single Ipv4Header will not work.
+- Now MultiModelSpectrumChannel allows a SpectrumPhy instance to change SpectrumModel at runtime by issuing a call to MultiModelSpectrumChannel::AddRx (). Previously, MultiModelSpectrumChannel required each SpectrumPhy instance to stick with the same SpectrumModel for the whole simulation.
+
+
+
Changes from ns-3.14 to ns-3.15
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index fe657ce70..028c453cd 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -10,7 +10,7 @@ Consult the file CHANGES.html for more detailed information about changed
API and behavior across ns-3 releases.
Release 3-dev
-============
+=============
Availability
------------
@@ -18,14 +18,149 @@ This release is not yet available.
Supported platforms
-------------------
+To be determined
New user-visible features
-------------------------
+- new TCP Westwood and Westwood+ models
+- 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).
+- 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.
+- create-module.py script has been updated to work with waf 1.7 and support
+ for creating modules with names containing dashes has been added.
+- the M5 release of the LTE module by the LENA project has been
+ merged; please see src/lte/RELEASE_NOTES for more detailed info
Bugs fixed
----------
- - bug 1485 - Setting global properties in config file (raw text) does
- not have any effect
+- 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
+- bug 1517 - Waf clean/distclean doesn't remove the doc/html directory
+- bug 1540 - Waf not finding click libraries
+- bug 1549 - Test for NS_LOG
+- bug 1556 - Uses of htonl making OpenFlow's match field error
+- bug 1563 - Reduce valgrind test scope
+- bug 1564 - Packet meta data isn't shown in dumbbell-animation.xml
+- bug 1566 - WiFi SNR tag improvements
+- bug 1568 - Deserialized addresses are implicity marked as Mac48Address
+- bug 1569 - droptail_vs_red example doesn't run
+- bug 1570 - Valgrind errors in new test examples
+- bug 1574 - Node color overwritten, by mobility updates in netanim
+- bug 1575 - Invert the y-axis in netanim
+- bug 1576 - Frequency units HERTZ and MEGAHERTZ mix up
+- bug 1577 - Typo in ascii picture in example aodv script
+- bug 1579 - edca-txop-n fragmentation causes segfault
+- bug 1582 - IPv6 raw socket return value is not like Linux socket
+- bug 1585 - Length field of A-MSDU subframe header endianness
+- bug 1586 - Building documentation fails if make runs in parallel
+- bug 1588 - UdpEchoServer::HandleRead logs fail when using Ipv6
+- bug 1589 - Bake - support pre-2.7 version of python
+- bug 1590 - Bake - more autotools version support
+- bug 1595 - Function declarations without implementations cause problems with dsr module's python bindings
+- bug 1596 - Inet TopologyReader is skipping one link and duplicating another one
+- bug 1600 - Icmpv6OptionLinkLayerAddress can only carry 48 bit addresses correctly
+- bug 1601 - RttEstimator doesn't set the m_currentEstimatedRtt to m_initialEstimatedRtt on creation
+- bug 1602 - waf build can break due to file collisions in higher-level directory
+- bug 1603 - random-variable-stream-helper - this unavalable for static member functions
+- bug 1607 - OnOffApplication over TCP with IPv6 support
+- bug 1608 - DSR Network ACK is not handled correctly
+- bug 1609 - Route Request table is needed
+- bug 1612 - pyviz (visualizer) will not be installed
+- bug 1613 - Can't build ns-3-dev with g++ 4.7.2
+- bug 1615 - Adjusting OLSR HelloInterval Attribute results in no links
+- bug 1618 - bake.py not detecting install of libxml2-dev on ubuntu
+- bug 1623 - pybindgen rev809 is not able to build after Ubuntu 1210
+- bug 1625 - ns-3-dev fails to build on Debian wheezy amd64
+- bug 1626 - ipv6-only network can't use UDP or TCP
+- bug 1632 - Prepend bake build directory to the guessed locations
+ that waf will look to find libraries
+- bug 1633 - Bake - should not report that it is downloading qt4 when it is already installed
+- bug 1635 - Small bug without Simulator::Destroy()
+- bug 1636 - Compilation error flagged as unmet dependency
+- bug 1637 - Bake calling apt-get for unpriviledged user
+- bug 1639 - bake.py support for linux mint
+- bug 1640 - bake needs to test for g++
+- bug 1641 - bake reports autotools dependency, but needs automake
+- bug 1661 - Variable ub1 defined but not used in ipv6-address.cc
+
+Known issues
+------------
+In general, known issues are tracked on the project tracker available
+at http://www.nsnam.org/bugzilla/
+
+Release 3.16
+============
+
+Availability
+------------
+This release is available from:
+http://www.nsnam.org/release/ns-allinone-3.16.tar.bz2
+
+Supported platforms
+-------------------
+- Fedora Core 17 (32/64 bit) with g++-4.7.0
+- Fedora Core 15 (64 bit) with g++-4.6.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 8.2 (32 bit) with g++-4.2.1
+- Cygwin 1.7.9-1 with g++-4.5.3
+
+New user-visible features
+-------------------------
+- Support several new LTE MAC schedulers developed in GSoC 2012 project.
+ Those schedulers include FD-MT, TD-MT, TTA, FD-BET, TD-BET, FD-TBFQ,
+ TD-TBFQ, PSS. Here, FD and TD mean frequency domain and time domain
+ respectively.
+- It's now possible to use distcc when building ns-3 by using
+ $ CXX='distcc g++' ./waf configure
+ $ ./waf build
+- Support topology generation with the (external) BRITE topology generation
+ tool
+
+Bugs fixed
+----------
+- bug 555 - DCF immediate access
+- bug 976 - wifi-wired-bridging regression test fails because of
+ rounding errors in mobility model
+- bug 1055: Wrong UAN's Thorp absorption loss model formula
+- bug 1284 - ./test.py performance tests do not exist
+- bug 1324 - ns3tcp-cwnd-test-suite.cc test failing
+- bug 1340 - ns3tcp-loss-suite.cc tests failing
+- bug 1342 - ns3tcp-cwnd-test-suite.cc tests failing
+- bug 1345 - ns-3 builds with clang compiler >= 3.0
+- bug 1359 - TCP cannot receive ICMP
+- bug 1361 - Set TOS from Application level (sockets)
+- bug 1463 - ./test.py --example should automatically detect the path
+- bug 1479 - When the Ipv4RawSocket "IpHeaderInclude" Attribute set true,
+ Ip Checksum error
+- bug 1485 - Setting global properties in config file (raw text) does
+ not have any effect
+- bug 1493 - test.py --list should show the test type default tip
+- bug 1493 - test.py --list should show the test type
+- bug 1494 - test.py --constrain doesn't work
+- bug 1495 - test.py claims test passed when no test was run
+- bug 1506: TCP data segment piggybacking acknowledgment
+- bug 1509 - RttEstimator returns invalid value in presence of errors
+- bug 1516 - GtkConfigStore does not show read-only attributes
+- bug 1520 - Config paths not fully documented (partial fix)
+- bug 1524 - Fragmentation Threshold equals to Packet Size at MAC Layer
+ (Data + IP + UDP) crash the reception
+- bug 1525 - Linker error with mpi on Mac 10.8
+- bug 1526: Wrong calculation of pathloss within
+ UanPropModelThorp::GetPathLossDb
+- bug 1527 - Ipv4RawSocket's BindToNetDevice not working
+- bug 1528 - BindToNetDevice not working for IPv6 sockets
+- bug 1531 - Crash when using NS_LOG in destructors of static objects
+- bug 1532 - unimplemented LTE Scheduler methods
Known issues
------------
@@ -37,7 +172,8 @@ Release 3.15
Availability
------------
-This release is not yet available.
+This release is available from:
+http://www.nsnam.org/release/ns-allinone-3.15.tar.bz2
Supported platforms
-------------------
diff --git a/bindings/python/wscript b/bindings/python/wscript
index 085f502b2..85ed23155 100644
--- a/bindings/python/wscript
+++ b/bindings/python/wscript
@@ -6,25 +6,17 @@ import subprocess
import shutil
import sys
-import Task
-import Options
-import Configure
-import TaskGen
-import Logs
-import Build
-import Utils
-
+from waflib import Task, Options, Configure, TaskGen, Logs, Build, Utils, Errors
from waflib.Errors import WafError
+# feature = TaskGen.feature
+# after = TaskGen.after
+
## https://launchpad.net/pybindgen/
-REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 809)
+REQUIRED_PYBINDGEN_VERSION = (0, 16, 0, 825)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
-from TaskGen import feature, after
-import Task
-
-
def add_to_python_path(path):
if os.environ.get('PYTHONPATH', ''):
@@ -38,7 +30,7 @@ def set_pybindgen_pythonpath(env):
def options(opt):
- opt.tool_options('python')
+ opt.load('python')
opt.add_option('--disable-python',
help=("Don't build Python bindings."),
action="store_true", default=False,
@@ -76,7 +68,7 @@ def configure(conf):
available_modules.sort()
all_modules_enabled = (enabled_modules == available_modules)
- conf.check_tool('misc', tooldir=['waf-tools'])
+ conf.load('misc', tooldir=['waf-tools'])
if sys.platform == 'cygwin':
conf.report_optional_feature("python", "Python Bindings", False,
@@ -91,20 +83,20 @@ def configure(conf):
conf.env.PYTHON = Options.options.with_python
try:
- conf.check_tool('python')
- except Configure.ConfigurationError, ex:
+ conf.load('python')
+ except Errors.ConfigurationError, ex:
conf.report_optional_feature("python", "Python Bindings", False,
"The python interpreter was not found")
return
try:
conf.check_python_version((2,3))
- except Configure.ConfigurationError, ex:
+ except Errors.ConfigurationError, ex:
conf.report_optional_feature("python", "Python Bindings", False,
"The python found version is too low (2.3 required)")
return
try:
conf.check_python_headers()
- except Configure.ConfigurationError, ex:
+ except Errors.ConfigurationError, ex:
conf.report_optional_feature("python", "Python Bindings", False,
"Python library or headers missing")
return
@@ -161,7 +153,7 @@ def configure(conf):
try:
conf.check_python_module('pybindgen')
- except Configure.ConfigurationError:
+ except Errors.ConfigurationError:
Logs.warn("pybindgen missing => no python bindings")
conf.report_optional_feature("python", "Python Bindings", False,
"PyBindGen missing")
@@ -197,9 +189,9 @@ int main ()
try:
ret = conf.run_c_code(code=test_program,
- env=conf.env.copy(), compile_filename='test.cc',
+ env=conf.env.derive(), compile_filename='test.cc',
features='cxx cprogram', execute=False)
- except Configure.ConfigurationError:
+ except Errors.ConfigurationError:
ret = 1
conf.msg('Checking for types %s and %s equivalence' % (t1, t2), (ret and 'no' or 'yes'))
return not ret
@@ -250,7 +242,7 @@ int main ()
## Check for pygccxml
try:
conf.check_python_module('pygccxml')
- except Configure.ConfigurationError:
+ except Errors.ConfigurationError:
conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
"Missing 'pygccxml' Python module")
return
@@ -322,7 +314,7 @@ class apiscan_task(Task.TaskBase):
"""Uses gccxml to scan the file 'everything.h' and extract API definitions.
"""
after = 'gen_ns3_module_header ns3header'
- before = 'cc cxx command'
+ before = 'cxx command'
color = "BLUE"
def __init__(self, curdirnode, env, bld, target, cflags, module):
self.bld = bld
@@ -336,6 +328,18 @@ class apiscan_task(Task.TaskBase):
def display(self):
return 'api-scan-%s\n' % (self.target,)
+ def uid(self):
+ try:
+ return self.uid_
+ except AttributeError:
+ m = Utils.md5()
+ up = m.update
+ up(self.__class__.__name__.encode())
+ up(self.curdirnode.abspath().encode())
+ up(self.target)
+ self.uid_ = m.digest()
+ return self.uid_
+
def run(self):
top_builddir = self.bld.bldnode.abspath()
module_path = get_module_path(self.bld, self.module)
@@ -393,7 +397,7 @@ class python_scan_task_collector(Task.TaskBase):
"""Tasks that waits for the python-scan-* tasks to complete and then signals WAF to exit
"""
after = 'apiscan'
- before = 'cc cxx'
+ before = 'cxx'
color = "BLUE"
def __init__(self, curdirnode, env, bld):
self.bld = bld
@@ -415,7 +419,7 @@ class python_scan_task_collector(Task.TaskBase):
class gen_ns3_compat_pymod_task(Task.Task):
"""Generates a 'ns3.py' compatibility module."""
- before = 'cc cxx'
+ before = 'cxx'
color = 'BLUE'
def run(self):
@@ -437,8 +441,6 @@ def build(bld):
return
env = bld.env
- curdir = bld.path.abspath()
-
set_pybindgen_pythonpath(env)
if Options.options.apiscan:
@@ -489,9 +491,7 @@ def build(bld):
grp = bld.get_group(bld.current_group)
grp.append(task)
- bld.new_task_gen(features='copy',
- source="ns__init__.py",
- target='ns/__init__.py')
+ bld(features='copy', source="ns__init__.py", target='ns/__init__.py')
bld.install_as('${PYTHONARCHDIR}/ns/__init__.py', 'ns__init__.py')
diff --git a/doc/doxygen.conf b/doc/doxygen.conf
index 7d3f37861..94e213d8c 100644
--- a/doc/doxygen.conf
+++ b/doc/doxygen.conf
@@ -646,7 +646,7 @@ WARN_FORMAT = "$file:$line: $text"
# and error messages should be written. If left blank the output is written
# to stderr.
-WARN_LOGFILE = doc/doxygen.warnings.log
+WARN_LOGFILE = doc/doxygen.log
#---------------------------------------------------------------------------
# configuration options related to the input files
diff --git a/doc/doxygen.warnings.report.sh b/doc/doxygen.warnings.report.sh
old mode 100644
new mode 100755
index 29eb17aee..1d59a2902
--- a/doc/doxygen.warnings.report.sh
+++ b/doc/doxygen.warnings.report.sh
@@ -2,63 +2,132 @@
# Process doxygen.warnings.log to generate sorted list of top offenders
-logfile=doxygen.warnings.log
-rootdir=`dirname $PWD`
+# Flag to skip running doxygen
+skipdoxy=${1:-""}
-echo
-echo "Summary Report of Doxygen warnings:"
-echo
-echo "Count of warning by module:"
-echo "Count Module"
-grep "^$rootdir" $logfile | \
- cut -d ':' -f 1 | \
- sed "s|$rootdir||g" | \
- cut -d '/' -f 1-3 | \
- sort | \
- uniq -c | \
- sort -nr
+DIR=`dirname $0`
+ROOT=`hg root`
+# Final resting place for the log file
+log=$DIR/doxygen.warnings.log
-echo
-undocparam=` \
-grep -v "^$rootdir" $logfile | \
+# First, we have to modify doxygen.conf to generate all the warnings
+# (We also suppress dot graphs, so shorten the run time.)
+
+if [ "$skipdoxy" == "" ]; then
+
+ conf=$DIR/doxygen.conf
+
+ sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT |^WARNINGS /s/YES/no/' $conf
+ rm -f $conf.bak
+
+ echo -n "Rebuilding doxygen docs with full errors..."
+ (cd $ROOT && ./waf --doxygen >/dev/null 2>&1)
+ status=$?
+
+ hg revert $conf
+
+ if [ "$status" = "0" ]; then
+ echo "Done."
+ else
+ echo "FAILED."
+ exit 1
+ fi
+
+ mv $DIR/doxygen.log $log
+
+else
+ echo "Skipping doxygen run, using existing log file $log"
+fi
+
+
+# Analyze the log
+
+# List of module directories (e.g, "src/core/model")
+undocmods=$( \
+ grep "^$ROOT" "$log" | \
+ cut -d ':' -f 1 | \
+ sed "s|$ROOT||g" | \
+ cut -d '/' -f 2-4 | \
+ sort | \
+ uniq -c | \
+ sort -nr \
+ )
+
+
+# Number of directories
+modcount=$( \
+ echo "$undocmods" | \
+ wc -l | \
+ sed 's/^[ \t]*//;s/[ \t]*$//' \
+ )
+
+# For a function with multiple undocumented parameters,
+# Doxygen prints the additional parameters on separate lines,
+# so they don't show up in the totals above.
+# Rather than work too hard to get the exact number,
+# we just list the total here.
+addlparam=$( \
+ grep -v "^$ROOT" $log | \
grep -v "not generated, too many nodes" | \
- grep "^ parameter '" | \
- wc -l | \
- sed 's/^[ \t]*//;s/[ \t]*$//' `
+ grep "^ parameter '" $log | \
+ wc -l | \
+ sed 's/^[ \t]*//;s/[ \t]*$//' \
+ )
+
+# Total number of warnings
+warncount=$(echo "$undocmods" | \
+ awk '{total += $1}; END {print total}' )
+warncount=$((warncount + addlparam))
+
+# List of files appearing in the log
+undocfiles=$( \
+ grep "^$ROOT" "$log" | \
+ cut -d ':' -f 1 | \
+ sed "s|$ROOT||g" | \
+ cut -d '/' -f 2- | \
+ sort | \
+ uniq -c | \
+ sort -k 2 \
+ )
+
+# Total number of files
+filecount=$( \
+ echo "$undocfiles" | \
+ wc -l | \
+ sed 's/^[ \t]*//;s/[ \t]*$//' \
+ )
+
+# Now we're ready to summarize the log
-echo "+ $undocparam undocumented parameters."
echo
-
-
-function sort_tags {
- local conf=${1:-doxygen.conf}
- local tags=${2:-$1.tags}
- grep -v "^#" $conf | \
- sed '/^$/d' | \
- sed ':a;/\\$/N;s/\\\n/|n /;ta' | \
- sort | \
- sed 's/|n /\\\n/g' > $tags
-}
-
-orig=doxygen-r7657.conf
-conf=doxygen.conf
-tags=doxygen.conf.tags
-delt=$tags.changed
-
-sort_tags $orig
-sort_tags $conf $tags
-
-# Show only changed lines from second file
-diff --changed-group-format='%>' \
- --unchanged-group-format='' \
- $orig.tags $tags > $delt
-
-deltn=`cat $delt | \
- wc -l | \
- sed 's/^[ \t]*//;s/[ \t]*$//' `
-
-echo "R7657 sorted tags in: $orig.tags"
-echo "Sorted doxygen tags in: $tags"
-echo "Changed doxygen tags in: $delt, ($deltn lines)"
+echo "Report of Doxygen warnings"
+echo "----------------------------------------"
echo
+echo "(All counts are lower bounds.)"
+echo
+echo "Warnings by module/directory:"
+echo
+echo "Count Directory"
+echo "----- ----------------------------------"
+echo "$undocmods"
+echo " $addlparam additional undocumented parameters."
+echo "----------------------------------------"
+printf "%6d total warnings\n" $warncount
+printf "%6d directories with warnings\n" $modcount
+echo
+echo
+echo "Warnings by file"
+echo
+echo "Count File"
+echo "----- ----------------------------------"
+echo "$undocfiles"
+echo "----------------------------------------"
+printf "%6d files with warnings\n" $filecount
+echo
+echo
+echo "Doxygen Warnings Summary"
+echo "----------------------------------------"
+printf "%6d directories\n" $modcount
+printf "%6d files\n" $filecount
+printf "%6d warnings\n" $warncount
diff --git a/doc/manual/Makefile b/doc/manual/Makefile
index 501ef9e19..6fac507f2 100644
--- a/doc/manual/Makefile
+++ b/doc/manual/Makefile
@@ -49,6 +49,8 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.NOTPARALLEL:
+
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
diff --git a/doc/manual/source/attributes.rst b/doc/manual/source/attributes.rst
index ae107688f..9e2da8c74 100644
--- a/doc/manual/source/attributes.rst
+++ b/doc/manual/source/attributes.rst
@@ -492,6 +492,10 @@ follows:::
// continue on with constructor.
}
+Beware that the object and all its derived classes must also implement a
+``virtual TypeId GetInstanceTypeId (void) const;`` method. Otherwise the
+``ObjectBase::ConstructSelf ()`` will not be able to read the attributes.
+
Extending attributes
********************
@@ -856,18 +860,25 @@ presentation.
To use this feature, one must install libgtk and libgtk-dev; an example
Ubuntu installation command is:::
- sudo apt-get install libgtk2.0-0 libgtk2.0-dev
+ sudo apt-get install libgtk2.0-0 libgtk2.0-dev
To check whether it is configured or not, check the output of the step:::
-./waf configure --enable-examples --enable-tests
- ---- Summary of optional NS-3 features:
- Threading Primitives : enabled
- Real Time Simulator : enabled
- GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found)
+ ./waf configure --enable-examples --enable-tests
+
+ ---- Summary of optional NS-3 features:
+ Python Bindings : enabled
+ Python API Scanning Support : enabled
+ NS-3 Click Integration : enabled
+ GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found)
In the above example, it was not enabled, so it cannot be used until a suitable
-version is installed and ./waf configure --enable-examples --enable-tests; ./waf is rerun.
+version is installed and::
+
+ ./waf configure --enable-examples --enable-tests
+ ./waf
+
+is rerun.
Usage is almost the same as the non-GTK-based version, but there
are no ConfigStore attributes involved:::
diff --git a/doc/manual/source/callbacks.rst b/doc/manual/source/callbacks.rst
index 6164e86a4..d0997ccb8 100644
--- a/doc/manual/source/callbacks.rst
+++ b/doc/manual/source/callbacks.rst
@@ -253,3 +253,333 @@ Here is an example of the usage::
SpecificFunctor sf(&a, &A::Hello);
sf(5);
}
+
+.. note:: The previous code is not real ns-3 code. It is simplistic example
+ code used only to illustrate the concepts involved and to help you understand
+ the system more. Do not expect to find this code anywhere in the ns-3 tree.
+
+Notice that there are two variables defined in the class above. The m_p
+variable is the object pointer and m_pmi is the variable containing the
+address of the function to execute.
+
+Notice that when ``operator()`` is called, it in turn calls the method provided
+with the object pointer using the C++ PMI syntax.
+
+To use this, one could then declare some model code that takes a generic functor
+as a parameter::
+
+ void LibraryFunction (Functor functor);
+
+The code that will talk to the model would build a specific functor and pass it to ``LibraryFunction``::
+
+ MyClass myClass;
+ SpecificFunctor functor (&myclass, MyClass::MyMethod);
+
+When ``LibraryFunction`` is done, it executes the callback using the
+``operator()`` on the generic functor it was passed, and in this particular
+case, provides the integer argument::
+
+ void
+ LibraryFunction (Functor functor)
+ {
+ // Execute the library function
+ functor(1234);
+ }
+
+Notice that ``LibraryFunction`` is completely decoupled from the specific
+type of the client. The connection is made through the Functor polymorphism.
+
+The Callback API in |ns3| implements object-oriented callbacks using
+the functor mechanism. This callback API, being based on C++ templates, is
+type-safe; that is, it performs static type checks to enforce proper signature
+compatibility between callers and callees. It is therefore more type-safe to
+use than traditional function pointers, but the syntax may look imposing at
+first. This section is designed to walk you through the Callback system so
+that you can be comfortable using it in |ns3|.
+
+Using the Callback API
+**********************
+
+The Callback API is fairly minimal, providing only two services:
+
+1. callback type declaration: a way to declare a type of callback
+with a given signature, and,
+
+2. callback instantiation: a way to instantiate a
+template-generated forwarding callback which can forward any calls
+to another C++ class member method or C++ function.
+
+This is best observed via walking through an example, based on
+``samples/main-callback.cc``.
+
+Using the Callback API with static functions
+++++++++++++++++++++++++++++++++++++++++++++
+
+Consider a function::
+
+ static double
+ CbOne (double a, double b)
+ {
+ std::cout << "invoke cbOne a=" << a << ", b=" << b << std::endl;
+ return a;
+ }
+
+Consider also the following main program snippet::
+
+ int main (int argc, char *argv[])
+ {
+ // return type: double
+ // first arg type: double
+ // second arg type: double
+ Callback one;
+ }
+
+This is an example of a C-style callback -- one which does not include or need
+a ``this`` pointer. The function template ``Callback`` is essentially the
+declaration of the variable containing the pointer-to-function. In the example
+above, we explicitly showed a pointer to a function that returned an integer and
+took a single integer as a parameter, The ``Callback`` template function is
+a generic version of that -- it is used to declare the type of a callback.
+
+.. note:: Readers unfamiliar with C++ templates may consult ``_.
+
+The ``Callback`` template requires one mandatory argument (the return type
+of the function to be assigned to this callback) and up to five optional
+arguments, which each specify the type of the arguments (if your particular
+callback function has more than five arguments, then this can be handled
+by extending the callback implementation).
+
+So in the above example, we have a declared a callback named "one" that will
+eventually hold a function pointer. The signature of the function that it will
+hold must return double and must support two double arguments. If one tries
+to pass a function whose signature does not match the declared callback,
+a compilation error will occur. Also, if one tries to assign to a callback
+an incompatible one, compilation will succeed but a run-time
+NS_FATAL_ERROR will be raised. The sample program
+``src/core/examples/main-callback.cc`` demonstrates both of these error cases
+at the end of the ``main()`` program.
+
+Now, we need to tie together this callback instance and the actual target function
+(CbOne). Notice above that CbOne has the same function signature types as the
+callback-- this is important. We can pass in any such properly-typed function
+to this callback. Let's look at this more closely::
+
+ static double CbOne (double a, double b) {}
+ ^ ^ ^
+ | ---| ------|
+ | | |
+ Callback one;
+
+You can only bind a function to a callback if they have the matching signature.
+The first template argument is the return type, and the additional template
+arguments are the types of the arguments of the function signature.
+
+Now, let's bind our callback "one" to the function that matches its signature::
+
+ // build callback instance which points to cbOne function
+ one = MakeCallback (&CbOne);
+
+This call to ``MakeCallback`` is, in essence, creating one of the specialized
+functors mentioned above. The variable declared using the ``Callback``
+template function is going to be playing the part of the generic functor. The
+assignment ``one = MakeCallback (&CbOne)`` is the cast that converts the
+specialized functor known to the callee to a generic functor known to the caller.
+
+Then, later in the program, if the callback is needed, it can be used as follows::
+
+ NS_ASSERT (!one.IsNull ());
+
+ // invoke cbOne function through callback instance
+ double retOne;
+ retOne = one (10.0, 20.0);
+
+The check for ``IsNull()`` ensures that the callback is not null -- that there
+is a function to call behind this callback. Then, ``one()`` executes the
+generic ``operator()`` which is really overloaded with a specific implementation
+of ``operator()`` and returns the same result as if ``CbOne()`` had been
+called directly.
+
+Using the Callback API with member functions
+++++++++++++++++++++++++++++++++++++++++++++
+
+Generally, you will not be calling static functions but instead public member
+functions of an object. In this case, an extra argument is needed to the
+MakeCallback function, to tell the system on which object the function should be
+invoked. Consider this example, also from main-callback.cc::
+
+ class MyCb {
+ public:
+ int CbTwo (double a) {
+ std::cout << "invoke cbTwo a=" << a << std::endl;
+ return -5;
+ }
+ };
+
+ int main ()
+ {
+ ...
+ // return type: int
+ // first arg type: double
+ Callback two;
+ MyCb cb;
+ // build callback instance which points to MyCb::cbTwo
+ two = MakeCallback (&MyCb::CbTwo, &cb);
+ ...
+ }
+
+Here, we pass an additional object pointer to the ``MakeCallback<>`` function.
+Recall from the background section above that ``Operator()`` will use the pointer to
+member syntax when it executes on an object::
+
+ virtual int operator() (ARG arg)
+ {
+ (*m_p.*m_pmi)(arg);
+ }
+
+And so we needed to provide the two variables (``m_p`` and ``m_pmi``) when
+we made the specific functor. The line::
+
+ two = MakeCallback (&MyCb::CbTwo, &cb);
+
+does precisely that. In this case, when ``two ()`` is invoked::
+
+ int result = two (1.0);
+
+will result in a call tothe ``CbTwo`` member function (method) on the object
+pointed to by ``&cb``.
+
+Building Null Callbacks
++++++++++++++++++++++++
+
+It is possible for callbacks to be null; hence it may be wise to
+check before using them. There is a special construct for a null
+callback, which is preferable to simply passing "0" as an argument;
+it is the ``MakeNullCallback<>`` construct::
+
+ two = MakeNullCallback ();
+ NS_ASSERT (two.IsNull ());
+
+Invoking a null callback is just like invoking a null function pointer: it will
+crash at runtime.
+
+Bound Callbacks
+***************
+
+A very useful extension to the functor concept is that of a Bound Callback.
+Previously it was mentioned that closures were originally function calls
+packaged up for later execution. Notice that in all of the Callback
+descriptions above, there is no way to package up any parameters for use
+later -- when the ``Callback`` is called via ``operator()``. All of
+the parameters are provided by the calling function.
+
+What if it is desired to allow the client function (the one that provides the
+callback) to provide some of the parameters? `Alexandrescu `_ calls the process of
+allowing a client to specify one of the parameters *"binding"*. One of the
+parameters of ``operator()`` has been bound (fixed) by the client.
+
+Some of our pcap tracing code provides a nice example of this. There is a
+function that needs to be called whenever a packet is received. This function
+calls an object that actually writes the packet to disk in the pcap file
+format. The signature of one of these functions will be::
+
+ static void DefaultSink (Ptr file, Ptr p);
+
+The static keyword means this is a static function which does not need a
+``this`` pointer, so it will be using C-style callbacks. We don't want the
+calling code to have to know about anything but the Packet. What we want in
+the calling code is just a call that looks like::
+
+ m_promiscSnifferTrace (m_currentPkt);
+
+What we want to do is to *bind* the ``Ptr file`` to the
+specific callback implementation when it is created and arrange for the
+``operator()`` of the Callback to provide that parameter for free.
+
+We provide the ``MakeBoundCallback`` template function for that purpose. It
+takes the same parameters as the ``MakeCallback`` template function but also
+takes the parameters to be bound. In the case of the example above::
+
+ MakeBoundCallback (&DefaultSink, file);
+
+will create a specific callback implementation that knows to add in the extra
+bound arguments. Conceptually, it extends the specific functor described above
+with one or more bound arguments::
+
+ template
+ class SpecificFunctor : public Functor
+ {
+ public:
+ SpecificFunctor(T* p, int (T::*_pmi)(ARG arg), BOUND_ARG boundArg)
+ {
+ m_p = p;
+ m_pmi = pmi;
+ m_boundArg = boundArg;
+ }
+
+ virtual int operator() (ARG arg)
+ {
+ (*m_p.*m_pmi)(m_boundArg, arg);
+ }
+ private:
+ void (T::*m_pmi)(ARG arg);
+ T* m_p;
+ BOUND_ARG m_boundArg;
+ };
+
+You can see that when the specific functor is created, the bound argument is saved
+in the functor / callback object itself. When the ``operator()`` is invoked with
+the single parameter, as in::
+
+ m_promiscSnifferTrace (m_currentPkt);
+
+the implementation of ``operator()`` adds the bound parameter into the actual
+function call::
+
+ (*m_p.*m_pmi)(m_boundArg, arg);
+
+Traced Callbacks
+****************
+*Placeholder subsection*
+
+Callback locations in ns-3
+**************************
+
+Where are callbacks frequently used in |ns3|? Here are some of the
+more visible ones to typical users:
+
+* Socket API
+* Layer-2/Layer-3 API
+* Tracing subsystem
+* API between IP and routing subsystems
+
+Implementation details
+**********************
+
+The code snippets above are simplistic and only designed to illustrate the mechanism
+itself. The actual Callback code is quite complicated and very template-intense and
+a deep understanding of the code is not required. If interested, expert users may
+find the following useful.
+
+The code was originally written based on the techniques described in
+``_.
+It was subsequently rewritten to follow the architecture outlined in
+`Modern C++ Design, Generic Programming and Design Patterns Applied, Alexandrescu, chapter 5, Generalized Functors `_.
+
+This code uses:
+
+* default template parameters to saves users from having to
+ specify empty parameters when the number of parameters
+ is smaller than the maximum supported number
+* the pimpl idiom: the Callback class is passed around by
+ value and delegates the crux of the work to its pimpl pointer.
+* two pimpl implementations which derive from CallbackImpl
+ FunctorCallbackImpl can be used with any functor-type
+ while MemPtrCallbackImpl can be used with pointers to
+ member functions.
+* a reference list implementation to implement the Callback's
+ value semantics.
+
+This code most notably departs from the Alexandrescu implementation in that it
+does not use type lists to specify and pass around the types of the callback
+arguments. Of course, it also does not use copy-destruction semantics and
+relies on a reference list rather than autoPtr to hold the pointer.
diff --git a/doc/manual/source/events.rst b/doc/manual/source/events.rst
new file mode 100644
index 000000000..bfd3d5983
--- /dev/null
+++ b/doc/manual/source/events.rst
@@ -0,0 +1,199 @@
+.. include:: replace.txt
+
+.. heading hierarchy:
+ ------------- Chapter
+ ************* Section (#.#)
+ ============= Subsection (#.#.#)
+ ############# Paragraph (no number)
+
+Events and Simulator
+--------------------
+
+|ns3| is a discrete-event network simulator. Conceptually, the simulator
+keeps track of a number of events that are scheduled to execute at a
+specified simulation time. The job of the simulator is to execute the
+events in sequential time order. Once the completion of an event occurs,
+the simulator will move to the next event (or will exit if there are no
+more events in the event queue). If, for example, an event scheduled
+for simulation time "100 seconds" is executed, and the next event is not
+scheduled until "200 seconds", the simulator will immediately jump from
+100 seconds to 200 seconds (of simulation time) to execute the next event.
+This is what is meant by "discrete-event" simulator.
+
+To make this all happen, the simulator needs a few things:
+
+1) a simulator object that can access an event queue where events are
+ stored and that can manage the execution of events
+2) a scheduler responsible for inserting and removing events from the queue
+3) a way to represent simulation time
+4) the events themselves
+
+This chapter of the manual describes these fundamental objects
+(simulator, scheduler, time, event) and how they are used.
+
+Event
+*****
+
+*To be completed*
+
+Simulator
+*********
+
+The Simulator class is the public entry point to access event scheduling
+facilities. Once a couple of events have been scheduled to start the
+simulation, the user can start to execute them by entering the simulator
+main loop (call Simulator::Run). Once the main loop starts running, it
+will sequentially execute all scheduled events in order from oldest to
+most recent until there are either no more events left in the event
+queue or Simulator::Stop has been called.
+
+To schedule events for execution by the simulator main loop, the
+Simulator class provides the Simulator::Schedule* family of functions.
+
+1) Handling event handlers with different signatures
+
+These functions are declared and implemented as C++ templates to handle
+automatically the wide variety of C++ event handler signatures used in
+the wild. For example, to schedule an event to execute 10 seconds in the
+future, and invoke a C++ method or function with specific arguments, you
+might write this:
+
+::
+
+ void handler (int arg0, int arg1)
+ {
+ std::cout << "handler called with argument arg0=" << arg0 << " and
+ arg1=" << arg1 << std::endl;
+ }
+
+ Simulator::Schedule(Seconds(10), &handler, 10, 5);
+
+Which will output:
+
+::
+
+ handler called with argument arg0=10 and arg1=5
+
+Of course, these C++ templates can also handle transparently member
+methods on C++ objects:
+
+*To be completed: member method example*
+
+Notes:
+
+* the ns-3 Schedule methods recognize automatically functions and
+ methods only if they take less than 5 arguments. If you need them to
+ support more arguments, please, file a bug report.
+* Readers familiar with the term 'fully-bound functors' will recognize
+ the Simulator::Schedule methods as a way to automatically construct such
+ objects.
+
+2) Common scheduling operations
+
+The Simulator API was designed to make it really simple to schedule most
+events. It provides three variants to do so (ordered from most commonly
+used to least commonly used):
+
+* Schedule methods which allow you to schedule an event in the future
+ by providing the delay between the current simulation time and the
+ expiration date of the target event.
+* ScheduleNow methods which allow you to schedule an event for the
+ current simulation time: they will execute _after_ the current event is
+ finished executing but _before_ the simulation time is changed for the
+ next event.
+* ScheduleDestroy methods which allow you to hook in the shutdown
+ process of the Simulator to cleanup simulation resources: every
+ 'destroy' event is executed when the user calls the Simulator::Destroy
+ method.
+
+3) Maintaining the simulation context
+
+There are two basic ways to schedule events, with and without *context*.
+What does this mean?
+
+::
+
+ Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj);
+
+vs.
+
+::
+
+ Simulator::ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj);
+
+Readers who invest time and effort in developing or using a non-trivial
+simulation model will know the value of the ns-3 logging framework to
+debug simple and complex simulations alike. One of the important
+features that is provided by this logging framework is the automatic
+display of the network node id associated with the 'currently' running
+event.
+
+The node id of the currently executing network node is in fact tracked
+by the Simulator class. It can be accessed with the
+Simulator::GetContext method which returns the 'context' (a 32-bit
+integer) associated and stored in the currently-executing event. In some
+rare cases, when an event is not associated with a specific network
+node, its 'context' is set to 0xffffffff.
+
+To associate a context to each event, the Schedule, and ScheduleNow
+methods automatically reuse the context of the currently-executing event
+as the context of the event scheduled for execution later.
+
+In some cases, most notably when simulating the transmission of a packet
+from a node to another, this behavior is undesirable since the expected
+context of the reception event is that of the receiving node, not the
+sending node. To avoid this problem, the Simulator class provides a
+specific schedule method: ScheduleWithContext which allows one to
+provide explicitly the node id of the receiving node associated with
+the receive event.
+
+*XXX: code example*
+
+In some very rare cases, developers might need to modify or understand
+how the context (node id) of the first event is set to that of its
+associated node. This is accomplished by the NodeList class: whenever a
+new node is created, the NodeList class uses ScheduleWithContext to
+schedule a 'initialize' event for this node. The 'initialize' event thus executes
+with a context set to that of the node id and can use the normal variety
+of Schedule methods. It invokes the Node::Initialize method which propagates
+the 'initialize' event by calling the DoInitialize method for each object
+associated with the node. The DoInitialize method overridden in some of these
+objects (most notably in the Application base class) will schedule some
+events (most notably Application::StartApplication) which will in turn
+scheduling traffic generation events which will in turn schedule
+network-level events.
+
+Notes:
+
+* Users need to be careful to propagate DoInitialize methods across objects
+ by calling Initialize explicitely on their member objects
+* The context id associated with each ScheduleWithContext method has
+ other uses beyond logging: it is used by an experimental branch of ns-3
+ to perform parallel simulation on multicore systems using
+ multithreading.
+
+The Simulator::* functions do not know what the context is: they
+merely make sure that whatever context you specify with
+ScheduleWithContext is available when the corresponding event executes
+with ::GetContext.
+
+It is up to the models implemented on top of Simulator::* to interpret
+the context value. In ns-3, the network models interpret the context
+as the node id of the node which generated an event. This is why it is
+important to call ScheduleWithContext in ns3::Channel subclasses
+because we are generating an event from node i to node j and we want
+to make sure that the event which will run on node j has the right
+context.
+
+Time
+****
+
+*To be completed*
+
+
+Scheduler
+*********
+
+*To be completed*
+
+
diff --git a/doc/manual/source/index.rst b/doc/manual/source/index.rst
index 5d9d4ad2f..c267cbc32 100644
--- a/doc/manual/source/index.rst
+++ b/doc/manual/source/index.rst
@@ -18,6 +18,7 @@ This document is written in `reStructuredText
@@ -167,7 +167,7 @@ callback process.::
void
IntTrace (Int oldValue, Int newValue)
{
- std::cout << ``Traced `` << oldValue << `` to `` << newValue << std::endl;
+ std::cout << "Traced " << oldValue << " to " << newValue << std::endl;
}
This is the definition of the trace sink. It corresponds directly to a callback
@@ -199,7 +199,7 @@ context for now since it is not important yet.
Finally, the line,::
- myObject->m_myInt = 1234;
+ myObject->m_myInt = 1234;
should be interpreted as an invocation of ``operator=`` on the member variable
``m_myInt`` with the integer :math:`1234` passed as a parameter. It turns out
diff --git a/doc/models/Makefile b/doc/models/Makefile
index 1794997b0..7de6b11cd 100644
--- a/doc/models/Makefile
+++ b/doc/models/Makefile
@@ -24,6 +24,7 @@ SOURCES = \
$(SRC)/aodv/doc/aodv.rst \
$(SRC)/applications/doc/applications.rst \
$(SRC)/bridge/doc/bridge.rst \
+ $(SRC)/brite/doc/brite.rst \
$(SRC)/buildings/doc/source/buildings.rst \
$(SRC)/buildings/doc/source/buildings-design.rst \
$(SRC)/buildings/doc/source/buildings-user.rst \
@@ -47,6 +48,7 @@ SOURCES = \
$(SRC)/propagation/doc/propagation.rst \
$(SRC)/network/doc/network-overview.rst \
$(SRC)/network/doc/packets.rst \
+ $(SRC)/network/doc/error-model.rst \
$(SRC)/network/doc/sockets-api.rst \
$(SRC)/network/doc/simple.rst \
$(SRC)/network/doc/queue.rst \
@@ -88,19 +90,27 @@ SOURCEFIGS = \
$(SRC)/wifi/doc/WifiArchitecture.dia \
$(SRC)/wifi/doc/snir.dia \
$(SRC)/wimax/doc/WimaxArchitecture.dia \
+ $(SRC)/lte/doc/source/figures/epc-ctrl-arch.dia \
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
$(SRC)/lte/doc/source/figures/epc-data-flow-ul.dia \
$(SRC)/lte/doc/source/figures/epc-profiling-scenario.dia \
$(SRC)/lte/doc/source/figures/epc-topology.dia \
+ $(SRC)/lte/doc/source/figures/epc-topology-x2-enhanced.dia \
$(SRC)/lte/doc/source/figures/eutran-profiling-scenario.dia \
$(SRC)/lte/doc/source/figures/ff-example.dia \
$(SRC)/lte/doc/source/figures/ff-mac-saps.dia \
- $(SRC)/lte/doc/source/figures/lte-arch-data-rrc-pdcp-rlc.dia \
- $(SRC)/lte/doc/source/figures/lte-enb-architecture.dia \
+ $(SRC)/lte/doc/source/figures/lte-arch-enb-data.dia \
+ $(SRC)/lte/doc/source/figures/lte-arch-enb-ctrl.dia \
+ $(SRC)/lte/doc/source/figures/lte-arch-ue-data.dia \
+ $(SRC)/lte/doc/source/figures/lte-arch-ue-ctrl.dia \
+ $(SRC)/lte/doc/source/figures/lte-enb-phy.dia \
+ $(SRC)/lte/doc/source/figures/lte-ue-phy.dia \
$(SRC)/lte/doc/source/figures/lte-epc-e2e-data-protocol-stack.dia \
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
- $(SRC)/lte/doc/source/figures/lte-ue-architecture.dia \
$(SRC)/lte/doc/source/figures/lte-subframe-structure.dia \
+ $(SRC)/lte/doc/source/figures/lte-epc-x2-interface.dia \
+ $(SRC)/lte/doc/source/figures/lte-harq-architecture.dia \
+ $(SRC)/lte/doc/source/figures/lte-harq-processes-scheme.dia \
$(SRC)/lte/doc/source/figures/lena-dual-stripe.eps \
$(SRC)/lte/doc/source/figures/lte-mcs-index.eps \
$(SRC)/lte/doc/source/figures/lenaThrTestCase1.eps \
@@ -117,6 +127,8 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-dl.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-ul.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.eps \
+ $(SRC)/lte/doc/source/figures/lte-epc-x2-handover-seq-diagram.eps \
+ $(SRC)/lte/doc/source/figures/lte-epc-x2-entity-saps.eps \
$(SRC)/lte/doc/source/figures/fading_pedestrian.png \
$(SRC)/lte/doc/source/figures/fading_vehicular.png \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \
@@ -145,16 +157,28 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/MCS_12_test.pdf \
$(SRC)/lte/doc/source/figures/MCS_16_test.png \
$(SRC)/lte/doc/source/figures/MCS_16_test.pdf \
- $(SRC)/lte/doc/source/figures/lte-phy-interference.png \
- $(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \
- $(SRC)/lte/doc/source/figures/helpers.png \
- $(SRC)/lte/doc/source/figures/helpers.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
- $(SRC)/lte/doc/source/figures/lte-phy-interference.seqdiag \
- $(SRC)/lte/doc/source/figures/helpers.seqdiag \
- $(SRC)/lte/doc/source/figures/lte-phy-interference.seqdiag \
- $(SRC)/lte/doc/source/figures/helpers.seqdiag \
+ $(SRC)/lte/doc/source/figures/lte-phy-interference.png \
+ $(SRC)/lte/doc/source/figures/helpers.png \
+ $(SRC)/lte/doc/source/figures/mac-random-access-contention.png \
+ $(SRC)/lte/doc/source/figures/mac-random-access-noncontention.png \
+ $(SRC)/lte/doc/source/figures/rrc-connection-establishment.png \
+ $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration.png \
+ $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.png \
+ $(SRC)/lte/doc/source/figures/nas-attach.png \
+ $(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \
+ $(SRC)/lte/doc/source/figures/helpers.pdf \
+ $(SRC)/lte/doc/source/figures/mac-random-access-contention.pdf \
+ $(SRC)/lte/doc/source/figures/mac-random-access-noncontention.pdf \
+ $(SRC)/lte/doc/source/figures/rrc-connection-establishment.pdf \
+ $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration.pdf \
+ $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.pdf \
+ $(SRC)/lte/doc/source/figures/nas-attach.pdf \
+ $(SRC)/lte/doc/source/figures/lte-enb-rrc-states.png \
+ $(SRC)/lte/doc/source/figures/lte-ue-rrc-states.png \
+ $(SRC)/lte/doc/source/figures/lte-enb-rrc-states.pdf \
+ $(SRC)/lte/doc/source/figures/lte-ue-rrc-states.pdf \
$(SRC)/uan/doc/auvmobility-classes.dia \
$(SRC)/stats/doc/Stat-framework-arch.png \
$(SRC)/stats/doc/Wifi-default.png \
@@ -198,19 +222,27 @@ IMAGES_EPS = \
$(FIGURES)/WifiArchitecture.eps \
$(FIGURES)/snir.eps \
$(FIGURES)/WimaxArchitecture.eps \
+ $(FIGURES)/epc-ctrl-arch.eps \
$(FIGURES)/epc-data-flow-dl.eps \
$(FIGURES)/epc-data-flow-ul.eps \
$(FIGURES)/epc-profiling-scenario.eps \
$(FIGURES)/epc-topology.eps \
+ $(FIGURES)/epc-topology-x2-enhanced.eps \
$(FIGURES)/eutran-profiling-scenario.eps \
$(FIGURES)/ff-example.eps \
$(FIGURES)/ff-mac-saps.eps \
- $(FIGURES)/lte-arch-data-rrc-pdcp-rlc.eps \
- $(FIGURES)/lte-enb-architecture.eps \
+ $(FIGURES)/lte-arch-enb-data.eps \
+ $(FIGURES)/lte-arch-enb-ctrl.eps \
+ $(FIGURES)/lte-arch-ue-data.eps \
+ $(FIGURES)/lte-arch-ue-ctrl.eps \
+ $(FIGURES)/lte-enb-phy.eps \
+ $(FIGURES)/lte-ue-phy.eps \
$(FIGURES)/lte-epc-e2e-data-protocol-stack.eps \
$(FIGURES)/lte-interference-test-scenario.eps \
- $(FIGURES)/lte-ue-architecture.eps \
$(FIGURES)/lte-subframe-structure.eps \
+ $(FIGURES)/lte-epc-x2-interface.eps \
+ $(FIGURES)/lte-harq-architecture.eps \
+ $(FIGURES)/lte-harq-processes-scheme.eps \
$(FIGURES)/lena-dual-stripe.eps \
$(FIGURES)/lte-mcs-index.eps \
$(FIGURES)/lenaThrTestCase1.eps \
@@ -227,6 +259,8 @@ IMAGES_EPS = \
$(FIGURES)/lte-rlc-data-retx-dl.eps \
$(FIGURES)/lte-rlc-data-txon-ul.eps \
$(FIGURES)/lte-rlc-data-retx-ul.eps \
+ $(FIGURES)/lte-epc-x2-handover-seq-diagram.eps \
+ $(FIGURES)/lte-epc-x2-entity-saps.eps \
$(FIGURES)/auvmobility-classes.eps \
# rescale pdf figures as necessary
@@ -281,6 +315,8 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(S
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.NOTPARALLEL:
+
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
diff --git a/doc/models/source/index.rst b/doc/models/source/index.rst
index d6e71b841..02b144448 100644
--- a/doc/models/source/index.rst
+++ b/doc/models/source/index.rst
@@ -22,6 +22,7 @@ This document is written in `reStructuredText html
+ - revise and check in AUTHORS, RELEASE_NOTES, and CHANGES.html
- required versions for related libraries (nsc, netanim, pybindgen)
are correct
- - make latexpdf in the doc/manual, doc/models, and doc/tutorial directories
- confirm that Doxygen builds cleanly (./waf doxygen),
+ - confirm all documents build: './waf docs' and check outputs
Check out a clean ns-3-dev somewhere using ns-3-allinone
- hg clone http://code.nsnam.org/ns-3-allinone
@@ -50,7 +50,7 @@ Test this, and when satisfied, upload it to
www.nsnam.org:/var/www/html/releases/ (with apache:apache file ownership)
Announce it to ns-developers as:
-https://www.nsnam.org/release/ns-allinone-3.14.rc3.tar.bz2
+https://www.nsnam.org/release/ns-allinone-3.14.rc1.tar.bz2
Iterate the above as needed during the release testing phase.
@@ -140,9 +140,7 @@ preparing the documentation
1. If final release, build release documentation
- sudo bash; su nsnam; cd /home/nsnam/bin
- ./update-doxygen-release ns-3.x
- ./update-manual-release ns-3.x
- ./update-tutorial-release ns-3.x
+ ./update-docs -r http://code.nsnam.org/ns-3.x -R
2. Check if these new files are available on the website
diff --git a/doc/tutorial-pt-br/Makefile b/doc/tutorial-pt-br/Makefile
index 0a3517bff..514eebde1 100644
--- a/doc/tutorial-pt-br/Makefile
+++ b/doc/tutorial-pt-br/Makefile
@@ -25,6 +25,8 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.NOTPARALLEL:
+
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
diff --git a/doc/tutorial/Makefile b/doc/tutorial/Makefile
index 0a3517bff..514eebde1 100644
--- a/doc/tutorial/Makefile
+++ b/doc/tutorial/Makefile
@@ -25,6 +25,8 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.NOTPARALLEL:
+
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
diff --git a/doc/tutorial/source/building-topologies.rst b/doc/tutorial/source/building-topologies.rst
index 0132ebcba..944ef422d 100644
--- a/doc/tutorial/source/building-topologies.rst
+++ b/doc/tutorial/source/building-topologies.rst
@@ -267,7 +267,7 @@ leftmost point-to-point node seen in the topology illustration.
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (p2pNodes.Get (0));
@@ -1124,7 +1124,7 @@ the server on the CSMA network. We have also seen similar operations before.
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps =
diff --git a/doc/tutorial/source/conceptual-overview.rst b/doc/tutorial/source/conceptual-overview.rst
index 5bd0f0dd4..d0538a33b 100644
--- a/doc/tutorial/source/conceptual-overview.rst
+++ b/doc/tutorial/source/conceptual-overview.rst
@@ -313,7 +313,7 @@ section, so go ahead and expand that documentation node. Now, expand the
``Debugging`` book and then select the ``Logging`` page.
You should now be looking at the Doxygen documentation for the Logging module.
-In the list of ``#define``s at the top of the page you will see the entry
+In the list of ``#define``'s at the top of the page you will see the entry
for ``NS_LOG_COMPONENT_DEFINE``. Before jumping in, it would probably be
good to look for the "Detailed Description" of the logging module to get a
feel for the overall operation. You can either scroll down or select the
@@ -636,7 +636,7 @@ that is managed by an ``UdpEchoClientHelper``.
UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (nodes.Get (0));
diff --git a/doc/tutorial/source/getting-started.rst b/doc/tutorial/source/getting-started.rst
index 52d31116e..9d4f88b94 100644
--- a/doc/tutorial/source/getting-started.rst
+++ b/doc/tutorial/source/getting-started.rst
@@ -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,56 +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..``. 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
@@ -99,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"
`_
-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.
@@ -248,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:
::
@@ -280,38 +301,85 @@ 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
-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.
+ Leaving directory `./ns-3.17`
+
+Regarding the portion about modules not built:
::
- cd ns-3-dev
+ Modules not built (see ns-3 tutorial for explanation):
+ 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
+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.
+
+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
+
+::
+
+ ./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.
@@ -430,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
@@ -449,11 +517,33 @@ 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.
+In the examples above, waf uses GCC C++ compiler, command ``g++``, for
+building ns-3. However, it's possible to change C++ compiler used by waf.
+Say one wants to use Clang C++ compiler, command ``clang++``; it's done by
+
+::
+
+ CXX="clang++" ./waf configure
+ ./waf build
+
+One can also set up waf to do distributed compilation with ``distcc`` in
+a similar way:
+
+::
+
+ CXX="distcc g++" ./waf configure
+ ./waf build
+
+More info on distcc and distributed compilation can be found on it's
+`project page
+`_
+under Documentation section.
+
Testing ns-3
************
@@ -477,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:
@@ -541,7 +631,7 @@ produces the following output.
*What do I do if I don't see the output?*
-If you don't see ``waf`` messages indicating that the build was
+If you see ``waf`` messages indicating that the build was
completed successfully, but do not see the "Hello Simulator" output,
chances are that you have switched your build mode to "optimized" in
the "Building with Waf" section, but have missed the change back to
@@ -554,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
diff --git a/doc/tutorial/source/tracing.rst b/doc/tutorial/source/tracing.rst
index 22d77c02b..c80600796 100644
--- a/doc/tutorial/source/tracing.rst
+++ b/doc/tutorial/source/tracing.rst
@@ -1507,57 +1507,57 @@ you will find,
::
- Simulator::ScheduleWithContext (index, TimeStep (0), &Node::Start, node);
+ Simulator::ScheduleWithContext (index, TimeStep (0), &Node::Initialize, node);
This tells you that whenever a ``Node`` is created in a simulation, as
-a side-effect, a call to that node's ``Start`` method is scheduled for
+a side-effect, a call to that node's ``Initialize`` method is scheduled for
you that happens at time zero. Don't read too much into that name, yet.
It doesn't mean that the node is going to start doing anything, it can be
interpreted as an informational call into the ``Node`` telling it that
the simulation has started, not a call for action telling the ``Node``
to start doing something.
-So, ``NodeList::Add`` indirectly schedules a call to ``Node::Start``
+So, ``NodeList::Add`` indirectly schedules a call to ``Node::Initialize``
at time zero to advise a new node that the simulation has started. If you
look in ``src/network/model/node.h`` you will, however, not find a method called
-``Node::Start``. It turns out that the ``Start`` method is inherited
+``Node::Initialize``. It turns out that the ``Initialize`` method is inherited
from class ``Object``. All objects in the system can be notified when
the simulation starts, and objects of class ``Node`` are just one kind
of those objects.
-Take a look at ``src/core/model/object.cc`` next and search for ``Object::Start``.
+Take a look at ``src/core/model/object.cc`` next and search for ``Object::Initialize``.
This code is not as straightforward as you might have expected since
|ns3| ``Objects`` support aggregation. The code in
-``Object::Start`` then loops through all of the objects that have been
-aggregated together and calls their ``DoStart`` method. This is another
+``Object::Initialize`` then loops through all of the objects that have been
+aggregated together and calls their ``DoInitialize`` method. This is another
idiom that is very common in |ns3|. There is a public API method,
that stays constant across implementations, that calls a private implementation
method that is inherited and implemented by subclasses. The names are typically
something like ``MethodName`` for the public API and ``DoMethodName`` for
the private API.
-This tells us that we should look for a ``Node::DoStart`` method in
+This tells us that we should look for a ``Node::DoInitialize`` method in
``src/network/model/node.cc`` for the method that will continue our trail. If you
locate the code, you will find a method that loops through all of the devices
in the node and then all of the applications in the node calling
-``device->Start`` and ``application->Start`` respectively.
+``device->Initialize`` and ``application->Initialize`` respectively.
You may already know that classes ``Device`` and ``Application`` both
inherit from class ``Object`` and so the next step will be to look at
-what happens when ``Application::DoStart`` is called. Take a look at
+what happens when ``Application::DoInitialize`` is called. Take a look at
``src/network/model/application.cc`` and you will find:
::
void
- Application::DoStart (void)
+ Application::DoInitialize (void)
{
m_startEvent = Simulator::Schedule (m_startTime, &Application::StartApplication, this);
if (m_stopTime != TimeStep (0))
{
m_stopEvent = Simulator::Schedule (m_stopTime, &Application::StopApplication, this);
}
- Object::DoStart ();
+ Object::DoInitialize ();
}
Here, we finally come to the end of the trail. If you have kept it all straight,
@@ -1567,16 +1567,16 @@ and ``StopApplication`` methods and provide mechanisms for starting and
stopping the flow of data out of your new ``Application``. When a ``Node``
is created in the simulation, it is added to a global ``NodeList``. The act
of adding a node to this ``NodeList`` causes a simulator event to be scheduled
-for time zero which calls the ``Node::Start`` method of the newly added
+for time zero which calls the ``Node::Initialize`` method of the newly added
``Node`` to be called when the simulation starts. Since a ``Node`` inherits
-from ``Object``, this calls the ``Object::Start`` method on the ``Node``
-which, in turn, calls the ``DoStart`` methods on all of the ``Objects``
+from ``Object``, this calls the ``Object::Initialize`` method on the ``Node``
+which, in turn, calls the ``DoInitialize`` methods on all of the ``Objects``
aggregated to the ``Node`` (think mobility models). Since the ``Node``
-``Object`` has overridden ``DoStart``, that method is called when the
-simulation starts. The ``Node::DoStart`` method calls the ``Start`` methods
+``Object`` has overridden ``DoInitialize``, that method is called when the
+simulation starts. The ``Node::DoInitialize`` method calls the ``Initialize`` methods
of all of the ``Applications`` on the node. Since ``Applications`` are
-also ``Objects``, this causes ``Application::DoStart`` to be called. When
-``Application::DoStart`` is called, it schedules events for the
+also ``Objects``, this causes ``Application::DoInitialize`` to be called. When
+``Application::DoInitialize`` is called, it schedules events for the
``StartApplication`` and ``StopApplication`` calls on the ``Application``.
These calls are designed to start and stop the flow of data from the
``Application``
@@ -2342,7 +2342,7 @@ must implement a single virtual method inherited from this class.
The signature of this method reflects the device-centric view of the situation
at this level. All of the public methods inherited from class
-2``PcapUserHelperForDevice`` reduce to calling this single device-dependent
+``PcapUserHelperForDevice`` reduce to calling this single device-dependent
implementation method. For example, the lowest level pcap method,
::
diff --git a/doc/tutorial/source/tweaking.rst b/doc/tutorial/source/tweaking.rst
index bccb884b2..bb4d200a3 100644
--- a/doc/tutorial/source/tweaking.rst
+++ b/doc/tutorial/source/tweaking.rst
@@ -37,18 +37,32 @@ easily get a quick message out of your scripts or models.
There are currently seven levels of log messages of increasing verbosity
defined in the system.
-* NS_LOG_ERROR --- Log error messages;
-* NS_LOG_WARN --- Log warning messages;
-* NS_LOG_DEBUG --- Log relatively rare, ad-hoc debugging messages;
-* NS_LOG_INFO --- Log informational messages about program progress;
-* NS_LOG_FUNCTION --- Log a message describing each function called;
-* NS_LOG_LOGIC -- Log messages describing logical flow within a function;
-* NS_LOG_ALL --- Log everything.
+* LOG_ERROR --- Log error messages (associated macro: NS_LOG_ERROR);
+* LOG_WARN --- Log warning messages (associated macro: NS_LOG_WARN);
+* LOG_DEBUG --- Log relatively rare, ad-hoc debugging messages
+ (associated macro: NS_LOG_DEBUG);
+* LOG_INFO --- Log informational messages about program progress
+ (associated macro: NS_LOG_INFO);
+* LOG_FUNCTION --- Log a message describing each function called
+ (two associated macros: NS_LOG_FUNCTION, used for member functions,
+ and NS_LOG_FUNCTION_NOARGS, used for static functions);
+* LOG_LOGIC -- Log messages describing logical flow within a function
+ (associated macro: NS_LOG_LOGIC);
+* LOG_ALL --- Log everything mentioned above (no associated macro).
-We also provide an unconditional logging level that is always displayed,
+For each LOG_TYPE there is also LOG_LEVEL_TYPE that, if used, enables
+logging of all the levels above it in addition to it's level. (As a
+consequence of this, LOG_ERROR and LOG_LEVEL_ERROR and also LOG_ALL
+and LOG_LEVEL_ALL are functionally equivalent.) For example,
+enabling LOG_INFO will only enable messages provided by NS_LOG_INFO macro,
+while enabling LOG_LEVEL_INFO will also enable messages provided by
+NS_LOG_DEBUG, NS_LOG_WARN and NS_LOG_ERROR macros.
+
+We also provide an unconditional logging macro that is always displayed,
irrespective of logging levels or component selection.
-* NS_LOG_UNCOND -- Log the associated message unconditionally.
+* NS_LOG_UNCOND -- Log the associated message unconditionally (no associated
+ log level).
Each level can be requested singly or cumulatively; and logging can be set
up using a shell environment variable (NS_LOG) or by logging system function
@@ -143,10 +157,12 @@ system will pick up the change and you should see the following output:
The additional debug information provided by the application is from
the NS_LOG_FUNCTION level. This shows every time a function in the application
-is called during script execution. Note that there are no requirements in the
-|ns3| system that models must support any particular logging
-functionality. The decision regarding how much information is logged
-is left to the individual model developer. In the case of the echo
+is called during script execution. Generally, use of (at least)
+NS_LOG_FUNCTION(this) in member functions is preferred. Use
+NS_LOG_FUNCTION_NOARGS() only in static functions. Note, however, that there
+are no requirements in the |ns3| system that models must support any particular
+logging functionality. The decision regarding how much information is logged
+is left to the individual model developer. In the case of the echo
applications, a good deal of log output is available.
You can now see a log of the function calls that were made to the application.
diff --git a/examples/energy/energy-model-example.cc b/examples/energy/energy-model-example.cc
index 79f1210e7..a86e4c2c5 100644
--- a/examples/energy/energy-model-example.cc
+++ b/examples/energy/energy-model-example.cc
@@ -35,7 +35,7 @@ NS_LOG_COMPONENT_DEFINE ("EnergyExample");
using namespace ns3;
-std::string
+static inline std::string
PrintReceivedPacket (Address& from)
{
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (from);
diff --git a/examples/error-model/simple-error-model.cc b/examples/error-model/simple-error-model.cc
index ddcc7cc21..37782f2fe 100644
--- a/examples/error-model/simple-error-model.cc
+++ b/examples/error-model/simple-error-model.cc
@@ -57,16 +57,21 @@ main (int argc, char *argv[])
// Set a few attributes
- Config::SetDefault ("ns3::RateErrorModel::ErrorRate", DoubleValue (0.01));
+ Config::SetDefault ("ns3::RateErrorModel::ErrorRate", DoubleValue (0.001));
Config::SetDefault ("ns3::RateErrorModel::ErrorUnit", StringValue ("ERROR_UNIT_PACKET"));
+ Config::SetDefault ("ns3::BurstErrorModel::ErrorRate", DoubleValue (0.01));
+ Config::SetDefault ("ns3::BurstErrorModel::BurstSize", StringValue ("ns3::UniformRandomVariable[Min=1|Max=3]"));
+
Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRateValue (DataRate ("448kb/s")));
+ std::string errorModelType = "ns3::RateErrorModel";
// Allow the user to override any of the defaults and the above
// Bind()s at run-time, via command-line arguments
CommandLine cmd;
+ cmd.AddValue("errorModelType", "TypeId of the error model to use", errorModelType);
cmd.Parse (argc, argv);
// Here, we will explicitly create four nodes. In more sophisticated
@@ -146,9 +151,11 @@ main (int argc, char *argv[])
// Error model
//
// Create an ErrorModel based on the implementation (constructor)
- // specified by the default classId
- Ptr em = CreateObject ();
- em->SetAttribute ("ErrorRate", DoubleValue (0.001));
+ // specified by the default TypeId
+
+ ObjectFactory factory;
+ factory.SetTypeId (errorModelType);
+ Ptr em = factory.Create ();
d3d2.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
// Now, let's use the ListErrorModel and explicitly force a loss
diff --git a/examples/matrix-topology/matrix-topology.cc b/examples/matrix-topology/matrix-topology.cc
index a31ebb9af..e6b6004bb 100644
--- a/examples/matrix-topology/matrix-topology.cc
+++ b/examples/matrix-topology/matrix-topology.cc
@@ -44,7 +44,6 @@
#include
#include
#include
-#include
#include "ns3/core-module.h"
#include "ns3/network-module.h"
diff --git a/examples/mobility/wscript b/examples/mobility/wscript
deleted file mode 100644
index e9461f91f..000000000
--- a/examples/mobility/wscript
+++ /dev/null
@@ -1,6 +0,0 @@
-## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-def build(bld):
- obj = bld.create_ns3_program('ns2-mobility-trace', ['internet', 'mobility', 'wifi', 'mesh', 'applications'])
- obj.source = 'ns2-mobility-trace.cc'
-
diff --git a/examples/routing/manet-routing-compare.cc b/examples/routing/manet-routing-compare.cc
index 24b725d80..1fa63cd23 100644
--- a/examples/routing/manet-routing-compare.cc
+++ b/examples/routing/manet-routing-compare.cc
@@ -119,7 +119,7 @@ RoutingExperiment::RoutingExperiment ()
{
}
-std::string
+static inline std::string
PrintReceivedPacket (Ptr socket, Ptr packet)
{
SocketAddressTag tag;
@@ -378,9 +378,8 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
//AsciiTraceHelper ascii;
//Ptr osw = ascii.CreateFileStream ( (tr_name + ".tr").c_str());
//wifiPhy.EnableAsciiAll (osw);
- std::ofstream os;
- os.open ((tr_name + ".mob").c_str ());
- MobilityHelper::EnableAsciiAll (os);
+ AsciiTraceHelper ascii;
+ MobilityHelper::EnableAsciiAll (ascii.CreateFileStream (tr_name + ".mob"));
//Ptr flowmon;
//FlowMonitorHelper flowmonHelper;
diff --git a/examples/routing/simple-global-routing.cc b/examples/routing/simple-global-routing.cc
index c73454ed7..0246a105f 100644
--- a/examples/routing/simple-global-routing.cc
+++ b/examples/routing/simple-global-routing.cc
@@ -150,9 +150,9 @@ main (int argc, char *argv[])
// Flow Monitor
Ptr flowmon;
+ FlowMonitorHelper flowmonHelper;
if (enableFlowMonitor)
{
- FlowMonitorHelper flowmonHelper;
flowmon = flowmonHelper.InstallAll ();
}
diff --git a/examples/socket/socket-options-ipv4.cc b/examples/socket/socket-options-ipv4.cc
new file mode 100644
index 000000000..74d8f9506
--- /dev/null
+++ b/examples/socket/socket-options-ipv4.cc
@@ -0,0 +1,158 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// Network topology
+//
+// n0 n1
+// | |
+// =================
+// LAN
+//
+// - UDP flows from n0 to n1
+
+#include
+#include "ns3/core-module.h"
+#include "ns3/csma-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/network-module.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("SocketOptionsIpv4");
+
+void ReceivePacket (Ptr socket)
+{
+ NS_LOG_INFO ("Received one packet!");
+ Ptr packet = socket->Recv ();
+ SocketIpTosTag tosTag;
+ if (packet->RemovePacketTag (tosTag))
+ {
+ NS_LOG_INFO (" TOS = " << (uint32_t)tosTag.GetTos ());
+ }
+ SocketIpTtlTag ttlTag;
+ if (packet->RemovePacketTag (ttlTag))
+ {
+ NS_LOG_INFO (" TTL = " << (uint32_t)ttlTag.GetTtl ());
+ }
+}
+
+static void SendPacket (Ptr socket, uint32_t pktSize,
+ uint32_t pktCount, Time pktInterval )
+{
+ if (pktCount > 0)
+ {
+ socket->Send (Create (pktSize));
+ Simulator::Schedule (pktInterval, &SendPacket,
+ socket, pktSize,pktCount - 1, pktInterval);
+ }
+ else
+ {
+ socket->Close ();
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+//
+// Allow the user to override any of the defaults and the above Bind() at
+// run-time, via command-line arguments
+//
+ uint32_t packetSize = 1024;
+ uint32_t packetCount = 10;
+ double packetInterval = 1.0;
+
+ //Socket options for IPv4, currently TOS, TTL, RECVTOS, and RECVTTL
+ uint32_t ipTos = 0;
+ bool ipRecvTos = true;
+ uint32_t ipTtl = 0;
+ bool ipRecvTtl = true;
+
+ CommandLine cmd;
+ cmd.AddValue ("PacketSize", "Packet size in bytes", packetSize);
+ cmd.AddValue ("PacketCount", "Number of packets to send", packetCount);
+ cmd.AddValue ("Interval", "Interval between packets", packetInterval);
+ cmd.AddValue ("IP_TOS", "IP_TOS", ipTos);
+ cmd.AddValue ("IP_RECVTOS", "IP_RECVTOS", ipRecvTos);
+ cmd.AddValue ("IP_TTL", "IP_TTL", ipTtl);
+ cmd.AddValue ("IP_RECVTTL", "IP_RECVTTL", ipRecvTtl);
+ cmd.Parse (argc, argv);
+
+ NS_LOG_INFO ("Create nodes.");
+ NodeContainer n;
+ n.Create (2);
+
+ InternetStackHelper internet;
+ internet.Install (n);
+
+ Address serverAddress;
+
+ NS_LOG_INFO ("Create channels.");
+ CsmaHelper csma;
+ csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
+ csma.SetDeviceAttribute ("Mtu", UintegerValue (1400));
+ NetDeviceContainer d = csma.Install (n);
+
+
+ NS_LOG_INFO ("Assign IP Addresses.");
+ Ipv4AddressHelper ipv4;
+ ipv4.SetBase ("10.1.1.0", "255.255.255.0");
+ Ipv4InterfaceContainer i = ipv4.Assign (d);
+ serverAddress = Address(i.GetAddress (1));
+
+ NS_LOG_INFO ("Create sockets.");
+ //Receiver socket on n1
+ TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
+ Ptr recvSink = Socket::CreateSocket (n.Get (1), tid);
+ InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 4477);
+ recvSink->SetIpRecvTos (ipRecvTos);
+ recvSink->SetIpRecvTtl (ipRecvTtl);
+ recvSink->Bind (local);
+ recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
+
+ //Sender socket on n0
+ Ptr source = Socket::CreateSocket (n.Get (0), tid);
+ InetSocketAddress remote = InetSocketAddress (i.GetAddress (1), 4477);
+
+ //Set socket options, it is also possible to set the options after the socket has been created/connected.
+ if (ipTos > 0)
+ {
+ source->SetIpTos (ipTos);
+ }
+
+ if (ipTtl > 0)
+ {
+ source->SetIpTtl (ipTtl);
+ }
+ source->Connect (remote);
+
+ AsciiTraceHelper ascii;
+ csma.EnableAsciiAll (ascii.CreateFileStream ("socket-options-ipv4.tr"));
+ csma.EnablePcapAll ("socket-options-ipv4", false);
+
+ //Schedule SendPacket
+ Time interPacketInterval = Seconds (packetInterval);
+ Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
+ Seconds (1.0), &SendPacket,
+ source, packetSize, packetCount, interPacketInterval);
+
+ NS_LOG_INFO ("Run Simulation.");
+ Simulator::Run ();
+ Simulator::Destroy ();
+ NS_LOG_INFO ("Done.");
+}
diff --git a/examples/socket/socket-options-ipv6.cc b/examples/socket/socket-options-ipv6.cc
new file mode 100644
index 000000000..dca834fad
--- /dev/null
+++ b/examples/socket/socket-options-ipv6.cc
@@ -0,0 +1,157 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// Network topology
+//
+// n0 n1
+// | |
+// =================
+// LAN
+//
+// - UDP flows from n0 to n1
+
+#include
+#include "ns3/core-module.h"
+#include "ns3/csma-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/network-module.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("SocketOptionsIpv6");
+
+void ReceivePacket (Ptr socket)
+{
+ NS_LOG_INFO ("Received one packet!");
+ Ptr packet = socket->Recv ();
+ SocketIpv6TclassTag tclassTag;
+ if (packet->RemovePacketTag (tclassTag))
+ {
+ NS_LOG_INFO (" TCLASS = " << (uint32_t)tclassTag.GetTclass ());
+ }
+ SocketIpv6HopLimitTag hoplimitTag;
+ if (packet->RemovePacketTag (hoplimitTag))
+ {
+ NS_LOG_INFO (" HOPLIMIT = " << (uint32_t)hoplimitTag.GetHopLimit ());
+ }
+}
+
+static void SendPacket (Ptr socket, uint32_t pktSize,
+ uint32_t pktCount, Time pktInterval )
+{
+ if (pktCount > 0)
+ {
+ socket->Send (Create (pktSize));
+ Simulator::Schedule (pktInterval, &SendPacket,
+ socket, pktSize,pktCount - 1, pktInterval);
+ }
+ else
+ {
+ socket->Close ();
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+//
+// Allow the user to override any of the defaults and the above Bind() at
+// run-time, via command-line arguments
+//
+ uint32_t packetSize = 1024;
+ uint32_t packetCount = 10;
+ double packetInterval = 1.0;
+
+ //Socket options for IPv6, currently TCLASS, HOPLIMIT, RECVTCLASS, and RECVHOPLIMIT
+ uint32_t ipv6Tclass = 0;
+ bool ipv6RecvTclass = true;
+ uint32_t ipv6Hoplimit = 0;
+ bool ipv6RecvHoplimit = true;
+
+ CommandLine cmd;
+ cmd.AddValue ("PacketSize", "Packet size in bytes", packetSize);
+ cmd.AddValue ("PacketCount", "Number of packets to send", packetCount);
+ cmd.AddValue ("Interval", "Interval between packets", packetInterval);
+ cmd.AddValue ("IPV6_TCLASS", "IPV6_TCLASS", ipv6Tclass);
+ cmd.AddValue ("IPV6_RECVTCLASS", "IPV6_RECVTCLASS", ipv6RecvTclass);
+ cmd.AddValue ("IPV6_HOPLIMIT", "IPV6_HOPLIMIT", ipv6Hoplimit);
+ cmd.AddValue ("IPV6_RECVHOPLIMIT", "IPV6_RECVHOPLIMIT", ipv6RecvHoplimit);
+ cmd.Parse (argc, argv);
+
+ NS_LOG_INFO ("Create nodes.");
+ NodeContainer n;
+ n.Create (2);
+
+ InternetStackHelper internet;
+ internet.Install (n);
+
+ Address serverAddress;
+
+ NS_LOG_INFO ("Create channels.");
+ CsmaHelper csma;
+ csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
+ csma.SetDeviceAttribute ("Mtu", UintegerValue (1400));
+ NetDeviceContainer d = csma.Install (n);
+
+
+ NS_LOG_INFO ("Assign IP Addresses.");
+ Ipv6AddressHelper ipv6;
+ ipv6.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64));
+ Ipv6InterfaceContainer i6 = ipv6.Assign (d);
+ serverAddress = Address(i6.GetAddress (1,1));
+
+ NS_LOG_INFO ("Create sockets.");
+ //Receiver socket on n1
+ TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
+ Ptr recvSink = Socket::CreateSocket (n.Get (1), tid);
+ Inet6SocketAddress local = Inet6SocketAddress (Ipv6Address::GetAny (), 4477);
+ recvSink->SetIpv6RecvTclass (ipv6RecvTclass);
+ recvSink->SetIpv6RecvHopLimit (ipv6RecvHoplimit);
+ recvSink->Bind (local);
+ recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
+
+ //Sender socket on n0
+ Ptr source = Socket::CreateSocket (n.Get (0), tid);
+ Inet6SocketAddress remote = Inet6SocketAddress (i6.GetAddress (1,1), 4477);
+ //Set socket options, it is also possible to set the options after the socket has been created/connected.
+ if (ipv6Tclass != 0)
+ {
+ source->SetIpv6Tclass (ipv6Tclass);
+ }
+
+ if (ipv6Hoplimit > 0)
+ {
+ source->SetIpv6HopLimit (ipv6Hoplimit);
+ }
+ source->Connect (remote);
+
+ AsciiTraceHelper ascii;
+ csma.EnableAsciiAll (ascii.CreateFileStream ("socket-options-ipv6.tr"));
+ csma.EnablePcapAll ("socket-options-ipv6", false);
+
+ //Schedule SendPacket
+ Time interPacketInterval = Seconds (packetInterval);
+ Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
+ Seconds (1.0), &SendPacket,
+ source, packetSize, packetCount, interPacketInterval);
+
+ NS_LOG_INFO ("Run Simulation.");
+ Simulator::Run ();
+ Simulator::Destroy ();
+ NS_LOG_INFO ("Done.");
+}
diff --git a/examples/socket/wscript b/examples/socket/wscript
index 2f8ecc21a..c47243855 100644
--- a/examples/socket/wscript
+++ b/examples/socket/wscript
@@ -6,3 +6,9 @@ def build(bld):
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-bound-tcp-static-routing.cc'
+
+ obj = bld.create_ns3_program('socket-options-ipv4', ['network', 'csma', 'point-to-point', 'internet'])
+ obj.source = 'socket-options-ipv4.cc'
+
+ obj = bld.create_ns3_program('socket-options-ipv6', ['network', 'csma', 'point-to-point', 'internet'])
+ obj.source = 'socket-options-ipv6.cc'
diff --git a/examples/tcp/examples-to-run.py b/examples/tcp/examples-to-run.py
index 0b06193bf..d22490362 100644
--- a/examples/tcp/examples-to-run.py
+++ b/examples/tcp/examples-to-run.py
@@ -13,6 +13,7 @@ cpp_examples = [
("tcp-nsc-lfn", "NSC_ENABLED == True", "False"),
("tcp-nsc-zoo", "NSC_ENABLED == True", "False"),
("tcp-star-server", "True", "True"),
+ ("tcp-variants-comparison", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain
diff --git a/examples/tcp/tcp-large-transfer.cc b/examples/tcp/tcp-large-transfer.cc
index 8e5378acd..5d0c7add0 100644
--- a/examples/tcp/tcp-large-transfer.cc
+++ b/examples/tcp/tcp-large-transfer.cc
@@ -29,12 +29,9 @@
// numbers respectively
// Usage (e.g.): ./waf --run tcp-large-transfer
-
-#include
#include
#include
#include
-#include
#include "ns3/core-module.h"
#include "ns3/applications-module.h"
diff --git a/examples/tcp/tcp-nsc-comparison.cc b/examples/tcp/tcp-nsc-comparison.cc
new file mode 100644
index 000000000..4931a0432
--- /dev/null
+++ b/examples/tcp/tcp-nsc-comparison.cc
@@ -0,0 +1,180 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2012 NICT
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Hajime Tazaki
+ *
+ * This code is a modified version of the code used for the the experiments in the paper
+ * "DCE Cradle: Simulate Network Protocols with Real Stacks for Better Realism"
+ * by Hajime Tazaki, Frederic Urbani and Thierry Turlett presented at WNS3 2013
+ *
+ */
+
+#include "ns3/log.h"
+#include "ns3/core-module.h"
+#include "ns3/network-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/flow-monitor-module.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("TcpNscComparison");
+
+std::string m_stack = "nsc-linux";
+std::string sock_factory;
+int m_seed = 1;
+double startTime = 4.0;
+double stopTime = 20.0;
+uint32_t m_nNodes = 2;
+bool enablePcap = false;
+
+int
+main (int argc, char *argv[])
+{
+
+ //ensure the ns3 TCP default values match what nsc is using
+ Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1448));
+ Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (1));
+
+ CommandLine cmd;
+ cmd.AddValue ("stack", "choose network stack", m_stack);
+ cmd.AddValue ("seed", "randomize seed", m_seed);
+ cmd.AddValue ("nNodes", "the number of nodes in left side", m_nNodes);
+ cmd.AddValue ("stopTime", "duration", stopTime);
+ cmd.AddValue ("enablePcap", "pcap", enablePcap);
+ cmd.Parse (argc, argv);
+
+ SeedManager::SetSeed (m_seed);
+
+ NodeContainer lefts, routers, rights, nodes;
+ lefts.Create (m_nNodes);
+ routers.Create (2);
+ rights.Create (m_nNodes);
+ nodes = NodeContainer (lefts, routers, rights);
+
+ InternetStackHelper internetStack;
+
+ GlobalValue::Bind ("ChecksumEnabled", BooleanValue (true));
+ if (m_stack == "ns3")
+ {
+ sock_factory = "ns3::TcpSocketFactory";
+ internetStack.Install (nodes);
+ }
+ else if (m_stack == "nsc-linux")
+ {
+ internetStack.Install (routers);
+ sock_factory = "ns3::TcpSocketFactory";
+ internetStack.SetTcp ("ns3::NscTcpL4Protocol",
+ "Library", StringValue ("liblinux2.6.26.so"));
+ internetStack.Install (lefts);
+ internetStack.Install (rights);
+
+ //these are not implemented in ns3 tcp so disable for comparison
+ Config::Set ("/NodeList/*/$ns3::Ns3NscStack/net.ipv4.tcp_sack", StringValue ("0"));
+ Config::Set ("/NodeList/*/$ns3::Ns3NscStack/net.ipv4.tcp_timestamps", StringValue ("0"));
+ Config::Set ("/NodeList/*/$ns3::Ns3NscStack/net.ipv4.tcp_window_scaling", StringValue ("0"));
+ }
+
+ PointToPointHelper pointToPoint;
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
+
+ Ipv4AddressHelper address;
+ Ipv4InterfaceContainer interfaces;
+
+ NetDeviceContainer dev0, dev1, dev2;
+ for (uint32_t i = 0; i < m_nNodes; i++)
+ {
+ std::ostringstream oss;
+ oss << "10.0." << i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ dev0 = pointToPoint.Install (NodeContainer (lefts.Get (i), routers.Get (0)));
+ address.Assign (dev0);
+ }
+
+ // bottle neck link
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("2Mbps"));
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("100ms"));
+ dev1 = pointToPoint.Install (NodeContainer (routers.Get (0), routers.Get (1)));
+
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
+ // for right links
+ for (uint32_t i = 0; i < m_nNodes; i++)
+ {
+ std::ostringstream oss;
+ oss << "10.2." << i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ dev2 = pointToPoint.Install (NodeContainer (routers.Get (1), rights.Get (i)));
+ address.Assign (dev2);
+ }
+
+ // bottle neck link
+ Ptr em1 =
+ CreateObjectWithAttributes (
+ "ErrorRate", DoubleValue (0.05),
+ "ErrorUnit", EnumValue (RateErrorModel::ERROR_UNIT_PACKET)
+ );
+ dev1.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em1));
+
+ address.SetBase ("10.1.0.0", "255.255.255.0");
+ address.Assign (dev1);
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+
+ ApplicationContainer apps;
+
+ OnOffHelper onoff = OnOffHelper (sock_factory,
+ InetSocketAddress (Ipv4Address ("10.2.0.2"), 2000));
+ onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
+ onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
+
+ // Flow 1 - n
+ for (uint32_t i = 0; i < m_nNodes; i++)
+ {
+ std::ostringstream oss;
+ oss << "10.2." << i << ".2";
+ onoff.SetAttribute ("Remote", AddressValue (InetSocketAddress (Ipv4Address (oss.str ().c_str ()), 2000)));
+ onoff.SetAttribute ("PacketSize", StringValue ("1024"));
+ onoff.SetAttribute ("DataRate", StringValue ("1Mbps"));
+ onoff.SetAttribute ("StartTime", TimeValue (Seconds (startTime)));
+ apps = onoff.Install (lefts.Get (i));
+ }
+
+ PacketSinkHelper sink = PacketSinkHelper (sock_factory,
+ InetSocketAddress (Ipv4Address::GetAny (), 2000));
+ apps = sink.Install (rights);
+ apps.Start (Seconds (3.9999));
+
+ pointToPoint.EnablePcapAll ("nsc.pcap");
+
+ Simulator::Stop (Seconds (stopTime));
+ Simulator::Run ();
+
+ Ptr pktsink;
+ std::cout << "Total ";
+ for (uint32_t i = 0; i < m_nNodes; i++)
+ {
+ pktsink = apps.Get (i)->GetObject ();
+ std::cout << "Rx(" << i << ") = " << pktsink->GetTotalRx () <<
+ " bytes (" << pktsink->GetTotalRx () * 8 / (stopTime - startTime) << " bps), ";
+ }
+ std::cout << std::endl;
+
+ Simulator::Destroy ();
+ return 0;
+}
diff --git a/examples/tcp/tcp-nsc-lfn.cc b/examples/tcp/tcp-nsc-lfn.cc
index a01b4cdf9..f3cfc0d7a 100644
--- a/examples/tcp/tcp-nsc-lfn.cc
+++ b/examples/tcp/tcp-nsc-lfn.cc
@@ -26,11 +26,9 @@
// - pcap traces generated as tcp-nsc-lfn-0-0.pcap and tcp-nsc-lfn-1-0.pcap
// Usage (e.g.): ./waf --run 'tcp-nsc-lfn --TCP_CONGESTION=hybla --runtime=30'
-#include
#include
#include
#include
-#include
#include "ns3/core-module.h"
#include "ns3/network-module.h"
diff --git a/examples/tcp/tcp-variants-comparison.cc b/examples/tcp/tcp-variants-comparison.cc
new file mode 100644
index 000000000..f6a62abae
--- /dev/null
+++ b/examples/tcp/tcp-variants-comparison.cc
@@ -0,0 +1,360 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Authors: Justin P. Rohrer, Truc Anh N. Nguyen , Siddharth Gangadhar
+ *
+ * James P.G. Sterbenz , director
+ * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets
+ * Information and Telecommunication Technology Center (ITTC)
+ * and Department of Electrical Engineering and Computer Science
+ * The University of Kansas Lawrence, KS USA.
+ *
+ * Work supported in part by NSF FIND (Future Internet Design) Program
+ * under grant CNS-0626918 (Postmodern Internet Architecture),
+ * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
+ * US Department of Defense (DoD), and ITTC at The University of Kansas.
+ *
+ * “TCP Westwood(+) Protocol Implementation in ns-3”
+ * Siddharth Gangadhar, Trúc Anh Ngọc Nguyễn , Greeshma Umapathi, and James P.G. Sterbenz,
+ * ICST SIMUTools Workshop on ns-3 (WNS3), Cannes, France, March 2013
+ */
+
+#include
+#include
+#include
+
+#include "ns3/core-module.h"
+#include "ns3/network-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/error-model.h"
+#include "ns3/tcp-header.h"
+#include "ns3/udp-header.h"
+#include "ns3/enum.h"
+#include "ns3/event-id.h"
+#include "ns3/flow-monitor-helper.h"
+#include "ns3/ipv4-global-routing-helper.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("TcpVariantsComparison");
+
+double old_time = 0.0;
+EventId output;
+Time current = Time::FromInteger(3, Time::S); //Only record cwnd and ssthresh values every 3 seconds
+bool first = true;
+
+static void
+OutputTrace ()
+{
+ // *stream->GetStream() << newtime << " " << newval << std::endl;
+ // old_time = newval;
+}
+
+static void
+CwndTracer (Ptrstream, uint32_t oldval, uint32_t newval)
+{
+ double new_time = Simulator::Now().GetSeconds();
+ if (old_time == 0 && first)
+ {
+ double mycurrent = current.GetSeconds();
+ *stream->GetStream() << new_time << " " << mycurrent << " " << newval << std::endl;
+ first = false;
+ output = Simulator::Schedule(current,&OutputTrace);
+ }
+ else
+ {
+ if (output.IsExpired())
+ {
+ *stream->GetStream() << new_time << " " << newval << std::endl;
+ output.Cancel();
+ output = Simulator::Schedule(current,&OutputTrace);
+ }
+ }
+}
+
+static void
+SsThreshTracer (Ptrstream, uint32_t oldval, uint32_t newval)
+{
+ double new_time = Simulator::Now().GetSeconds();
+ if (old_time == 0 && first)
+ {
+ double mycurrent = current.GetSeconds();
+ *stream->GetStream() << new_time << " " << mycurrent << " " << newval << std::endl;
+ first = false;
+ output = Simulator::Schedule(current,&OutputTrace);
+ }
+ else
+ {
+ if (output.IsExpired())
+ {
+ *stream->GetStream() << new_time << " " << newval << std::endl;
+ output.Cancel();
+ output = Simulator::Schedule(current,&OutputTrace);
+ }
+ }
+}
+
+static void
+TraceCwnd (std::string cwnd_tr_file_name)
+{
+ AsciiTraceHelper ascii;
+ if (cwnd_tr_file_name.compare("") == 0)
+ {
+ NS_LOG_DEBUG ("No trace file for cwnd provided");
+ return;
+ }
+ else
+ {
+ Ptr stream = ascii.CreateFileStream(cwnd_tr_file_name.c_str());
+ Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow",MakeBoundCallback (&CwndTracer, stream));
+ }
+}
+
+static void
+TraceSsThresh(std::string ssthresh_tr_file_name)
+{
+ AsciiTraceHelper ascii;
+ if (ssthresh_tr_file_name.compare("") == 0)
+ {
+ NS_LOG_DEBUG ("No trace file for ssthresh provided");
+ return;
+ }
+ else
+ {
+ Ptr stream = ascii.CreateFileStream(ssthresh_tr_file_name.c_str());
+ Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold",MakeBoundCallback (&SsThreshTracer, stream));
+ }
+}
+
+int main (int argc, char *argv[])
+{
+ std::string transport_prot = "TcpWestwood";
+ double error_p = 0.0;
+ std::string bandwidth = "2Mbps";
+ std::string access_bandwidth = "10Mbps";
+ std::string access_delay = "45ms";
+ bool tracing = false;
+ std::string tr_file_name = "";
+ std::string cwnd_tr_file_name = "";
+ std::string ssthresh_tr_file_name = "";
+ double data_mbytes = 0;
+ uint32_t mtu_bytes = 400;
+ uint16_t num_flows = 1;
+ float duration = 100;
+ uint32_t run = 0;
+ bool flow_monitor = true;
+
+
+ CommandLine cmd;
+ cmd.AddValue("transport_prot", "Transport protocol to use: TcpTahoe, TcpReno, TcpNewReno, TcpWestwood, TcpWestwoodPlus ", transport_prot);
+ cmd.AddValue("error_p", "Packet error rate", error_p);
+ cmd.AddValue("bandwidth", "Bottleneck bandwidth", bandwidth);
+ cmd.AddValue("access_bandwidth", "Access link bandwidth", access_bandwidth);
+ cmd.AddValue("delay", "Access link delay", access_delay);
+ cmd.AddValue("tracing", "Flag to enable/disable tracing", tracing);
+ cmd.AddValue("tr_name", "Name of output trace file", tr_file_name);
+ cmd.AddValue("cwnd_tr_name", "Name of output trace file", cwnd_tr_file_name);
+ cmd.AddValue("ssthresh_tr_name", "Name of output trace file", ssthresh_tr_file_name);
+ cmd.AddValue("data", "Number of Megabytes of data to transmit", data_mbytes);
+ cmd.AddValue("mtu", "Size of IP packets to send in bytes", mtu_bytes);
+ cmd.AddValue("num_flows", "Number of flows", num_flows);
+ cmd.AddValue("duration", "Time to allow flows to run in seconds", duration);
+ cmd.AddValue("run", "Run index (for setting repeatable seeds)", run);
+ cmd.AddValue("flow_monitor", "Enable flow monitor", flow_monitor);
+ cmd.Parse (argc, argv);
+
+ SeedManager::SetSeed(1);
+ SeedManager::SetRun(run);
+
+ // User may find it convenient to enable logging
+ //LogComponentEnable("TcpVariantsComparison", LOG_LEVEL_ALL);
+ //LogComponentEnable("BulkSendApplication", LOG_LEVEL_INFO);
+ //LogComponentEnable("DropTailQueue", LOG_LEVEL_ALL);
+
+ // Calculate the ADU size
+ Header* temp_header = new Ipv4Header();
+ uint32_t ip_header = temp_header->GetSerializedSize();
+ NS_LOG_LOGIC ("IP Header size is: " << ip_header);
+ delete temp_header;
+ temp_header = new TcpHeader();
+ uint32_t tcp_header = temp_header->GetSerializedSize();
+ NS_LOG_LOGIC ("TCP Header size is: " << tcp_header);
+ delete temp_header;
+ uint32_t tcp_adu_size = mtu_bytes - (ip_header + tcp_header);
+ NS_LOG_LOGIC ("TCP ADU size is: " << tcp_adu_size);
+
+ // Set the simulation start and stop time
+ float start_time = 0.1;
+ float stop_time = start_time + duration;
+
+ // Select TCP variant
+ if (transport_prot.compare("TcpTahoe") == 0)
+ Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpTahoe::GetTypeId()));
+ else if (transport_prot.compare("TcpReno") == 0)
+ Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpReno::GetTypeId()));
+ else if (transport_prot.compare("TcpNewReno") == 0)
+ Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpNewReno::GetTypeId()));
+ else if (transport_prot.compare("TcpWestwood") == 0)
+ {// the default protocol type in ns3::TcpWestwood is WESTWOOD
+ Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId()));
+ Config::SetDefault("ns3::TcpWestwood::FilterType", EnumValue(TcpWestwood::TUSTIN));
+ }
+ else if (transport_prot.compare("TcpWestwoodPlus") == 0)
+ {
+ Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId()));
+ Config::SetDefault("ns3::TcpWestwood::ProtocolType", EnumValue(TcpWestwood::WESTWOODPLUS));
+ Config::SetDefault("ns3::TcpWestwood::FilterType", EnumValue(TcpWestwood::TUSTIN));
+ }
+ else
+ {
+ NS_LOG_DEBUG ("Invalid TCP version");
+ exit (1);
+ }
+
+ // Create gateways, sources, and sinks
+ NodeContainer gateways;
+ gateways.Create (1);
+ NodeContainer sources;
+ sources.Create(num_flows);
+ NodeContainer sinks;
+ sinks.Create(num_flows);
+
+ // Configure the error model
+ // Here we use RateErrorModel with packet error rate
+ Ptr uv = CreateObject();
+ uv->SetStream (50);
+ RateErrorModel error_model;
+ error_model.SetRandomVariable(uv);
+ error_model.SetUnit(RateErrorModel::ERROR_UNIT_PACKET);
+ error_model.SetRate(error_p);
+
+ PointToPointHelper UnReLink;
+ UnReLink.SetDeviceAttribute ("DataRate", StringValue (bandwidth));
+ UnReLink.SetChannelAttribute ("Delay", StringValue ("0.01ms"));
+ UnReLink.SetDeviceAttribute ("ReceiveErrorModel", PointerValue (&error_model));
+
+
+ InternetStackHelper stack;
+ stack.InstallAll ();
+
+ Ipv4AddressHelper address;
+ address.SetBase ("10.0.0.0", "255.255.255.0");
+
+ // Configure the sources and sinks net devices
+ // and the channels between the sources/sinks and the gateways
+ PointToPointHelper LocalLink;
+ LocalLink.SetDeviceAttribute ("DataRate", StringValue (access_bandwidth));
+ LocalLink.SetChannelAttribute ("Delay", StringValue (access_delay));
+ Ipv4InterfaceContainer sink_interfaces;
+ for (int i=0; i ascii_wrap;
+ if (tr_file_name.compare("") == 0)
+ {
+ NS_LOG_DEBUG ("No trace file provided");
+ exit (1);
+ }
+ else
+ {
+ ascii.open (tr_file_name.c_str());
+ ascii_wrap = new OutputStreamWrapper(tr_file_name.c_str(), std::ios::out);
+ }
+
+ stack.EnableAsciiIpv4All (ascii_wrap);
+
+ Simulator::Schedule(Seconds(0.00001), &TraceCwnd, cwnd_tr_file_name);
+ Simulator::Schedule(Seconds(0.00001), &TraceSsThresh, ssthresh_tr_file_name);
+ }
+
+ UnReLink.EnablePcapAll("TcpVariantsComparison", true);
+ LocalLink.EnablePcapAll("TcpVariantsComparison", true);
+
+ // Flow monitor
+ Ptr flowMonitor;
+ FlowMonitorHelper flowHelper;
+ if (flow_monitor)
+ {
+ flowMonitor = flowHelper.InstallAll();
+ }
+
+ Simulator::Stop (Seconds(stop_time));
+ Simulator::Run ();
+
+ if (flow_monitor)
+ {
+ flowMonitor->SerializeToXmlFile("TcpVariantsComparison.flowmonitor", true, true);
+ }
+
+ Simulator::Destroy ();
+ return 0;
+}
diff --git a/examples/tcp/wscript b/examples/tcp/wscript
index ff733c24f..f535d8c86 100644
--- a/examples/tcp/wscript
+++ b/examples/tcp/wscript
@@ -24,3 +24,14 @@ def build(bld):
obj = bld.create_ns3_program('tcp-bulk-send',
['point-to-point', 'applications', 'internet'])
obj.source = 'tcp-bulk-send.cc'
+
+ obj = bld.create_ns3_program('tcp-nsc-comparison',
+ ['point-to-point', 'internet', 'applications', 'flow-monitor'])
+
+ obj.source = 'tcp-nsc-comparison.cc'
+
+ obj = bld.create_ns3_program('tcp-variants-comparison',
+ ['point-to-point', 'internet', 'applications', 'flow-monitor'])
+
+ obj.source = 'tcp-variants-comparison.cc'
+
diff --git a/examples/tutorial/second.cc b/examples/tutorial/second.cc
index a486f5141..33298367b 100644
--- a/examples/tutorial/second.cc
+++ b/examples/tutorial/second.cc
@@ -97,7 +97,7 @@ main (int argc, char *argv[])
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (p2pNodes.Get (0));
diff --git a/examples/tutorial/third.cc b/examples/tutorial/third.cc
index 1a6b09180..ef07a1bda 100644
--- a/examples/tutorial/third.cc
+++ b/examples/tutorial/third.cc
@@ -157,7 +157,7 @@ main (int argc, char *argv[])
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps =
diff --git a/examples/wireless/multirate.cc b/examples/wireless/multirate.cc
index ffb8c0d94..27b974e06 100644
--- a/examples/wireless/multirate.cc
+++ b/examples/wireless/multirate.cc
@@ -309,14 +309,14 @@ Experiment::SendMultiDestinations (Ptr sender, NodeContainer c)
}
}
-Vector
+static inline Vector
GetPosition (Ptr node)
{
Ptr mobility = node->GetObject ();
return mobility->GetPosition ();
}
-std::string
+static inline std::string
PrintPosition (Ptr client, Ptr server)
{
Vector serverPos = GetPosition (server);
@@ -507,10 +507,10 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
}
Ptr flowmon;
+ FlowMonitorHelper flowmonHelper;
if (enableFlowMon)
{
- FlowMonitorHelper flowmonHelper;
flowmon = flowmonHelper.InstallAll ();
}
diff --git a/examples/wireless/ofdm-validation.cc b/examples/wireless/ofdm-validation.cc
index 02c22c289..edc128b61 100644
--- a/examples/wireless/ofdm-validation.cc
+++ b/examples/wireless/ofdm-validation.cc
@@ -24,7 +24,7 @@
#include
#include
-#include
+#include
using namespace ns3;
@@ -62,9 +62,9 @@ int main (int argc, char *argv[])
for (double snr = -5.0; snr <= 30.0; snr += 0.1)
{
- double ps = yans->GetChunkSuccessRate (WifiMode (modes[i]), pow (10.0,snr/10.0), FrameSize*8);
+ double ps = yans->GetChunkSuccessRate (WifiMode (modes[i]), std::pow (10.0,snr/10.0), FrameSize*8);
yansdataset.Add (snr, ps);
- ps = nist->GetChunkSuccessRate (WifiMode (modes[i]), pow (10.0,snr/10.0), FrameSize*8);
+ ps = nist->GetChunkSuccessRate (WifiMode (modes[i]), std::pow (10.0,snr/10.0), FrameSize*8);
nistdataset.Add (snr, ps);
}
diff --git a/examples/wireless/wifi-simple-interference.cc b/examples/wireless/wifi-simple-interference.cc
index 59eadb9e4..9e5399338 100644
--- a/examples/wireless/wifi-simple-interference.cc
+++ b/examples/wireless/wifi-simple-interference.cc
@@ -96,7 +96,7 @@ NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference");
using namespace ns3;
-std::string PrintReceivedPacket (Ptr socket)
+static inline std::string PrintReceivedPacket (Ptr socket)
{
Address addr;
socket->GetSockName (addr);
@@ -108,7 +108,7 @@ std::string PrintReceivedPacket (Ptr socket)
return oss.str ();
}
-void ReceivePacket (Ptr socket)
+static void ReceivePacket (Ptr socket)
{
NS_LOG_UNCOND (PrintReceivedPacket (socket));
}
diff --git a/examples/wireless/wifi-wired-bridging.cc b/examples/wireless/wifi-wired-bridging.cc
index c004aa447..354a6e405 100644
--- a/examples/wireless/wifi-wired-bridging.cc
+++ b/examples/wireless/wifi-wired-bridging.cc
@@ -190,9 +190,8 @@ int main (int argc, char *argv[])
if (writeMobility)
{
- std::ofstream os;
- os.open ("wifi-wired-bridging.mob");
- MobilityHelper::EnableAsciiAll (os);
+ AsciiTraceHelper ascii;
+ MobilityHelper::EnableAsciiAll (ascii.CreateFileStream ("wifi-wired-bridging.mob"));
}
Simulator::Stop (Seconds (5.0));
diff --git a/src/antenna/bindings/modulegen__gcc_ILP32.py b/src/antenna/bindings/modulegen__gcc_ILP32.py
index a858bf40a..38607e0fb 100644
--- a/src/antenna/bindings/modulegen__gcc_ILP32.py
+++ b/src/antenna/bindings/modulegen__gcc_ILP32.py
@@ -561,8 +561,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -573,8 +573,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
diff --git a/src/antenna/bindings/modulegen__gcc_LP64.py b/src/antenna/bindings/modulegen__gcc_LP64.py
index a858bf40a..38607e0fb 100644
--- a/src/antenna/bindings/modulegen__gcc_LP64.py
+++ b/src/antenna/bindings/modulegen__gcc_LP64.py
@@ -561,8 +561,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -573,8 +573,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
diff --git a/src/antenna/doc/source/conf.py b/src/antenna/doc/source/conf.py
index 2d9b21628..6e83f3502 100644
--- a/src/antenna/doc/source/conf.py
+++ b/src/antenna/doc/source/conf.py
@@ -48,9 +48,9 @@ copyright = u'2011-2012, CTTC'
# built documents.
#
# The short X.Y version.
-version = 'lena-dev'
+version = 'ns-3-dev'
# The full version, including alpha/beta/rc tags.
-release = 'lena-dev'
+release = 'ns-3-dev'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/src/antenna/model/angles.cc b/src/antenna/model/angles.cc
index d2753de48..a36ef24b4 100644
--- a/src/antenna/model/angles.cc
+++ b/src/antenna/model/angles.cc
@@ -73,14 +73,14 @@ Angles::Angles (double p, double t)
Angles::Angles (Vector v)
- : phi (atan2 (v.y, v.x)),
- theta (acos (v.z / sqrt (v.x*v.x + v.y*v.y + v.z*v.z)))
+ : phi (std::atan2 (v.y, v.x)),
+ theta (std::acos (v.z / sqrt (v.x*v.x + v.y*v.y + v.z*v.z)))
{
}
Angles::Angles (Vector v, Vector o)
- : phi (atan2 (v.y - o.y, v.x - o.x)),
- theta (acos ((v.z - o.z) / CalculateDistance (v, o)))
+ : phi (std::atan2 (v.y - o.y, v.x - o.x)),
+ theta (std::acos ((v.z - o.z) / CalculateDistance (v, o)))
{
}
diff --git a/src/antenna/model/cosine-antenna-model.cc b/src/antenna/model/cosine-antenna-model.cc
index f6eb38c47..a283091c0 100644
--- a/src/antenna/model/cosine-antenna-model.cc
+++ b/src/antenna/model/cosine-antenna-model.cc
@@ -66,7 +66,7 @@ CosineAntennaModel::SetBeamwidth (double beamwidthDegrees)
{
NS_LOG_FUNCTION (this << beamwidthDegrees);
m_beamwidthRadians = DegreesToRadians (beamwidthDegrees);
- m_exponent = -3.0 / (20*log10 (cos (m_beamwidthRadians / 4.0)));
+ m_exponent = -3.0 / (20 * std::log10 (std::cos (m_beamwidthRadians / 4.0)));
NS_LOG_LOGIC (this << " m_exponent = " << m_exponent);
}
@@ -109,7 +109,7 @@ CosineAntennaModel::GetGainDb (Angles a)
NS_LOG_LOGIC ("phi = " << phi );
// element factor: amplitude gain of a single antenna element in linear units
- double ef = pow (cos (phi / 2.0), m_exponent);
+ double ef = std::pow (std::cos (phi / 2.0), m_exponent);
// the array factor is not considered. Note that if we did consider
// the array factor, the actual beamwidth would change, and in
@@ -117,7 +117,7 @@ CosineAntennaModel::GetGainDb (Angles a)
// user. Hence it is not desirable to use the array factor, for the
// ease of use of this model.
- double gainDb = 20*log10 (ef);
+ double gainDb = 20 * std::log10 (ef);
NS_LOG_LOGIC ("gain = " << gainDb << " + " << m_maxGain << " dB");
return gainDb + m_maxGain;
}
diff --git a/src/antenna/test/test-angles.cc b/src/antenna/test/test-angles.cc
index 78131938e..6cfe49d1a 100644
--- a/src/antenna/test/test-angles.cc
+++ b/src/antenna/test/test-angles.cc
@@ -120,90 +120,90 @@ public:
AnglesTestSuite::AnglesTestSuite ()
: TestSuite ("angles", UNIT)
{
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 0), Angles (0, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 0), Angles (M_PI, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 0), Angles (M_PI_2, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 0), Angles (-M_PI_2, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 1), Angles (0, 0)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -1), Angles (0, M_PI)));
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 0), Angles (0, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 0), Angles (M_PI, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 0), Angles (M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 0), Angles (-M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 1), Angles (0, 0)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -1), Angles (0, M_PI)), TestCase::QUICK);
- AddTestCase (new OneVectorConstructorTestCase (Vector (2, 0, 0), Angles (0, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-2, 0, 0), Angles (M_PI, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 2, 0), Angles (M_PI_2, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, -2, 0), Angles (-M_PI_2, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 2), Angles (0, 0)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -2), Angles (0, M_PI)));
+ AddTestCase (new OneVectorConstructorTestCase (Vector (2, 0, 0), Angles (0, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-2, 0, 0), Angles (M_PI, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 2, 0), Angles (M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, -2, 0), Angles (-M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 2), Angles (0, 0)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -2), Angles (0, M_PI)), TestCase::QUICK);
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 1), Angles (0, M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, -1), Angles (0, 3*M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, 0), Angles (M_PI_4, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, 0), Angles (-M_PI_4, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 1), Angles (M_PI, M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, -1), Angles (M_PI, 3*M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, 0), Angles (3*M_PI_4, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, -1, 0), Angles (-3*M_PI_4, M_PI_2)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 1), Angles (M_PI_2, M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, -1), Angles (M_PI_2, 3*M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 1), Angles (-M_PI_2, M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, -1), Angles (-M_PI_2, 3*M_PI_4)));
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 1), Angles (0, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, -1), Angles (0, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, 0), Angles (M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, 0), Angles (-M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 1), Angles (M_PI, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, -1), Angles (M_PI, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, 0), Angles (3*M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, -1, 0), Angles (-3*M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 1), Angles (M_PI_2, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, -1), Angles (M_PI_2, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 1), Angles (-M_PI_2, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, -1), Angles (-M_PI_2, 3*M_PI_4)), TestCase::QUICK);
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, sqrt (2)), Angles (M_PI_4, M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, -sqrt (2)), Angles (M_PI_4, 3*M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, sqrt (2)), Angles (-M_PI_4, M_PI_4)));
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, sqrt (2)), Angles (3*M_PI_4, M_PI_4)));
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, std::sqrt (2)), Angles (M_PI_4, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, -std::sqrt (2)), Angles (M_PI_4, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, std::sqrt (2)), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, std::sqrt (2)), Angles (3*M_PI_4, M_PI_4)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 0), Vector (0, 0, 0), Angles (0, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 0), Vector (0, 0, 0), Angles (M_PI, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 0), Vector (0, 0, 0), Angles (M_PI_2, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 0), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 1), Vector (0, 0, 0), Angles (0, 0)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -1), Vector (0, 0, 0), Angles (0, M_PI)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 0), Vector (0, 0, 0), Angles (0, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 0), Vector (0, 0, 0), Angles (M_PI, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 0), Vector (0, 0, 0), Angles (M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 0), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 1), Vector (0, 0, 0), Angles (0, 0)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -1), Vector (0, 0, 0), Angles (0, M_PI)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 0, 0), Vector (0, 0, 0), Angles (0, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 0, 0), Vector (0, 0, 0), Angles (M_PI, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 2, 0), Vector (0, 0, 0), Angles (M_PI_2, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, 0), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 2), Vector (0, 0, 0), Angles (0, 0)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -2), Vector (0, 0, 0), Angles (0, M_PI)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 0, 0), Vector (0, 0, 0), Angles (0, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 0, 0), Vector (0, 0, 0), Angles (M_PI, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 2, 0), Vector (0, 0, 0), Angles (M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, 0), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 2), Vector (0, 0, 0), Angles (0, 0)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -2), Vector (0, 0, 0), Angles (0, M_PI)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 1), Vector (0, 0, 0), Angles (0, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, -1), Vector (0, 0, 0), Angles (0, 3*M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, 0), Vector (0, 0, 0), Angles (M_PI_4, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, 0), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 1), Vector (0, 0, 0), Angles (M_PI, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, -1), Vector (0, 0, 0), Angles (M_PI, 3*M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, 0), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, -1, 0), Vector (0, 0, 0), Angles (-3*M_PI_4, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 1), Vector (0, 0, 0), Angles (M_PI_2, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, -1), Vector (0, 0, 0), Angles (M_PI_2, 3*M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 1), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, -1), Vector (0, 0, 0), Angles (-M_PI_2, 3*M_PI_4)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 1), Vector (0, 0, 0), Angles (0, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, -1), Vector (0, 0, 0), Angles (0, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, 0), Vector (0, 0, 0), Angles (M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, 0), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 1), Vector (0, 0, 0), Angles (M_PI, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, -1), Vector (0, 0, 0), Angles (M_PI, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, 0), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, -1, 0), Vector (0, 0, 0), Angles (-3*M_PI_4, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 1), Vector (0, 0, 0), Angles (M_PI_2, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, -1), Vector (0, 0, 0), Angles (M_PI_2, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 1), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, -1), Vector (0, 0, 0), Angles (-M_PI_2, 3*M_PI_4)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, -sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, 3*M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, sqrt (2)), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, sqrt (2)), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_4)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, std::sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, -std::sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, std::sqrt (2)), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, std::sqrt (2)), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_4)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (3, 2, 2), Vector (2, 2, 2), Angles (0, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 2, 2), Vector (2, 2, 2), Angles (M_PI, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 3, 2), Vector (2, 2, 2), Angles (M_PI_2, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 2, 2), Vector (-1, 3, 2), Angles (-M_PI_2, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (4, -2, 7), Vector (4, -2, 6), Angles (0, 0)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -5, -1), Vector (0, -5, 0), Angles (0, M_PI)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (3, 2, 2), Vector (2, 2, 2), Angles (0, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 2, 2), Vector (2, 2, 2), Angles (M_PI, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 3, 2), Vector (2, 2, 2), Angles (M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 2, 2), Vector (-1, 3, 2), Angles (-M_PI_2, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (4, -2, 7), Vector (4, -2, 6), Angles (0, 0)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -5, -1), Vector (0, -5, 0), Angles (0, M_PI)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 2, -1), Vector (-4, 2, -1), Angles (0, M_PI_2)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 2, 0), Vector (4, 2, 0), Angles (M_PI, M_PI_2)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 2, -1), Vector (-4, 2, -1), Angles (0, M_PI_2)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 2, 0), Vector (4, 2, 0), Angles (M_PI, M_PI_2)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 4, 4), Vector (-2, 4, 3), Angles (0, M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, -6), Vector (-1, -2, -5), Angles (0, 3*M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (77, 3, 43), Vector (78, 2, 43), Angles (3*M_PI_4, M_PI_2)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 4, 4), Vector (-2, 4, 3), Angles (0, M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, -6), Vector (-1, -2, -5), Angles (0, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (77, 3, 43), Vector (78, 2, 43), Angles (3*M_PI_4, M_PI_2)), TestCase::QUICK);
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (24, -2, -6 -sqrt (2)), Vector (23, -3, -6), Angles (M_PI_4, 3*M_PI_4)));
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0.5, 11.45, sqrt (2)-1), Vector (-0.5, 12.45, -1), Angles (-M_PI_4, M_PI_4)));
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (24, -2, -6 -std::sqrt (2)), Vector (23, -3, -6), Angles (M_PI_4, 3*M_PI_4)), TestCase::QUICK);
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0.5, 11.45, std::sqrt (2)-1), Vector (-0.5, 12.45, -1), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK);
};
diff --git a/src/antenna/test/test-cosine-antenna.cc b/src/antenna/test/test-cosine-antenna.cc
index 29965264f..0308db8f6 100644
--- a/src/antenna/test/test-cosine-antenna.cc
+++ b/src/antenna/test/test-cosine-antenna.cc
@@ -118,88 +118,88 @@ CosineAntennaModelTestSuite::CosineAntennaModelTestSuite ()
// e.g., with a 60 deg beamwidth, gain is -20dB at +- 74.945 degrees from boresight
// phi, theta, beamwidth, orientation, maxGain, expectedGain, condition
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (180), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-180), 0), 60, 0, 0, -20, LESSTHAN));
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (180), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-180), 0), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
// test positive orientation
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 60, 60, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 60, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 60, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (160), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (210), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (240), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-40), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-120), 0), 60, 60, 0, -20, LESSTHAN));
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 60, 60, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 60, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 60, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (160), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (210), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (240), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-40), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-120), 0), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
// test negative orientation and different beamwidths
// with a 100 deg beamwidth, gain is -20dB at +- 117.47 degrees from boresight
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 100, -150, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 100, -150, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 0), 100, -150, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-32.531), 0), 100, -150, 0, -20, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (92.531), 0), 100, -150, 0, -20, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 100, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 100, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 100, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 100, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 100, -150, 0, -20, LESSTHAN));
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 100, -150, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 100, -150, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 0), 100, -150, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-32.531), 0), 100, -150, 0, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (92.531), 0), 100, -150, 0, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
// with a 150 deg beamwidth, gain is -10dB at +- 124.93 degrees from boresight, and -20dB at +- 155.32 degrees from boresight
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 150, -150, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (135), 0), 150, -150, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-75), 0), 150, -150, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (85.070), 0), 150, -150, 0, -10, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-25.070), 0), 150, -150, 0, -10, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (5.3230), 0), 150, -150, 0, -20, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (54.677), 0), 150, -150, 0, -20, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 150, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (20), 0), 150, -150, 0, -20, LESSTHAN));
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 150, -150, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (135), 0), 150, -150, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-75), 0), 150, -150, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (85.070), 0), 150, -150, 0, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-25.070), 0), 150, -150, 0, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (5.3230), 0), 150, -150, 0, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (54.677), 0), 150, -150, 0, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 150, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (20), 0), 150, -150, 0, -20, LESSTHAN), TestCase::QUICK);
// test maxGain
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 10, 10, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 22, 19, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, -4, -7, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 10, -10, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, -20, -40, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 40, 20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 100, -150, 2, 2, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 100, -150, 4, 1, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 0), 100, -150, -1, -4, EQUAL));
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 10, 10, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 22, 19, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, -4, -7, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 10, -10, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, -20, -40, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 40, 20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 100, -150, 2, 2, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 100, -150, 4, 1, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 0), 100, -150, -1, -4, EQUAL), TestCase::QUICK);
// test elevation angle
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 2), 60, 0, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 2), 60, 0, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 2), 60, 0, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 2), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-180), 2), 60, 0, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), -3), 60, 60, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), -3), 60, 60, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), -3), 60, 60, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-120), -3), 60, 60, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), -3), 100, -150, 0, 0, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), -3), 100, -150, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), -3), 100, -150, 0, -3, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), -3), 100, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 9.5), 100, -150, 0, -20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 9.5), 60, 0, 10, 10, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 9.5), 60, 0, 22, 19, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 9.5), 60, 0, -4, -7, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 9.5), 60, 0, 40, 20, LESSTHAN));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 9.5), 100, -150, 2, 2, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 9.5), 100, -150, 4, 1, EQUAL));
- AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 9.5), 100, -150, -1, -4, EQUAL));
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 2), 60, 0, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 2), 60, 0, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 2), 60, 0, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 2), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-180), 2), 60, 0, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), -3), 60, 60, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), -3), 60, 60, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), -3), 60, 60, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-120), -3), 60, 60, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), -3), 100, -150, 0, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), -3), 100, -150, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), -3), 100, -150, 0, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), -3), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 9.5), 100, -150, 0, -20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 9.5), 60, 0, 10, 10, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 9.5), 60, 0, 22, 19, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 9.5), 60, 0, -4, -7, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 9.5), 60, 0, 40, 20, LESSTHAN), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 9.5), 100, -150, 2, 2, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 9.5), 100, -150, 4, 1, EQUAL), TestCase::QUICK);
+ AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 9.5), 100, -150, -1, -4, EQUAL), TestCase::QUICK);
};
diff --git a/src/antenna/test/test-degrees-radians.cc b/src/antenna/test/test-degrees-radians.cc
index 2aa80270f..8cd05651b 100644
--- a/src/antenna/test/test-degrees-radians.cc
+++ b/src/antenna/test/test-degrees-radians.cc
@@ -113,21 +113,21 @@ public:
DegreesRadiansTestSuite::DegreesRadiansTestSuite ()
: TestSuite ("degrees-radians", UNIT)
{
- AddTestCase (new DegreesToRadiansTestCase (0, 0));
- AddTestCase (new DegreesToRadiansTestCase (90, M_PI_2));
- AddTestCase (new DegreesToRadiansTestCase (180, M_PI));
- AddTestCase (new DegreesToRadiansTestCase (270, M_PI + M_PI_2));
- AddTestCase (new DegreesToRadiansTestCase (360, M_PI + M_PI));
- AddTestCase (new DegreesToRadiansTestCase (-90, -M_PI_2));
- AddTestCase (new DegreesToRadiansTestCase (810, 4.5*M_PI));
+ AddTestCase (new DegreesToRadiansTestCase (0, 0), TestCase::QUICK);
+ AddTestCase (new DegreesToRadiansTestCase (90, M_PI_2), TestCase::QUICK);
+ AddTestCase (new DegreesToRadiansTestCase (180, M_PI), TestCase::QUICK);
+ AddTestCase (new DegreesToRadiansTestCase (270, M_PI + M_PI_2), TestCase::QUICK);
+ AddTestCase (new DegreesToRadiansTestCase (360, M_PI + M_PI), TestCase::QUICK);
+ AddTestCase (new DegreesToRadiansTestCase (-90, -M_PI_2), TestCase::QUICK);
+ AddTestCase (new DegreesToRadiansTestCase (810, 4.5*M_PI), TestCase::QUICK);
- AddTestCase (new RadiansToDegreesTestCase (0, 0));
- AddTestCase (new RadiansToDegreesTestCase (M_PI_2, 90));
- AddTestCase (new RadiansToDegreesTestCase (M_PI, 180));
- AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI_2, 270));
- AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI, 360));
- AddTestCase (new RadiansToDegreesTestCase (-M_PI_2, -90));
- AddTestCase (new RadiansToDegreesTestCase (4.5*M_PI, 810));
+ AddTestCase (new RadiansToDegreesTestCase (0, 0), TestCase::QUICK);
+ AddTestCase (new RadiansToDegreesTestCase (M_PI_2, 90), TestCase::QUICK);
+ AddTestCase (new RadiansToDegreesTestCase (M_PI, 180), TestCase::QUICK);
+ AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI_2, 270), TestCase::QUICK);
+ AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI, 360), TestCase::QUICK);
+ AddTestCase (new RadiansToDegreesTestCase (-M_PI_2, -90), TestCase::QUICK);
+ AddTestCase (new RadiansToDegreesTestCase (4.5*M_PI, 810), TestCase::QUICK);
};
diff --git a/src/antenna/test/test-isotropic-antenna.cc b/src/antenna/test/test-isotropic-antenna.cc
index 12fe6a91c..cdba25b2b 100644
--- a/src/antenna/test/test-isotropic-antenna.cc
+++ b/src/antenna/test/test-isotropic-antenna.cc
@@ -77,15 +77,15 @@ public:
IsotropicAntennaModelTestSuite::IsotropicAntennaModelTestSuite ()
: TestSuite ("isotropic-antenna-model", UNIT)
{
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, 0), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, M_PI), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, M_PI_2), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, 0), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, M_PI), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, M_PI_2), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, 0), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, M_PI), 0.0));
- AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, M_PI_2), 0.0));
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, 0), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, M_PI), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, M_PI_2), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, 0), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, M_PI), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, M_PI_2), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, 0), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, M_PI), 0.0), TestCase::QUICK);
+ AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, M_PI_2), 0.0), TestCase::QUICK);
};
diff --git a/src/antenna/test/test-parabolic-antenna.cc b/src/antenna/test/test-parabolic-antenna.cc
index 6f1d0e44d..a18173090 100644
--- a/src/antenna/test/test-parabolic-antenna.cc
+++ b/src/antenna/test/test-parabolic-antenna.cc
@@ -116,69 +116,69 @@ ParabolicAntennaModelTestSuite::ParabolicAntennaModelTestSuite ()
// with a 60 deg beamwidth, gain is -20dB at +-77.460 degrees from boresight
// phi, theta, beamwidth, orientation, maxAttn, expectedGain, condition
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 20, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (180), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-180), 0), 60, 0, 20, -20, EQUAL));
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 20, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (180), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-180), 0), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
// with a 60 deg beamwidth, gain is -10dB at +-54.772 degrees from boresight
// test positive orientation
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 60, 60, 10, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 60, 10, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 60, 10, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (160), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (210), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (240), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-40), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 60, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-120), 0), 60, 60, 10, -10, EQUAL));
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 60, 60, 10, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 60, 10, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 60, 10, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (160), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (210), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (240), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-40), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-120), 0), 60, 60, 10, -10, EQUAL), TestCase::QUICK);
// test negative orientation and different beamwidths
// with a 80 deg beamwidth, gain is -20dB at +- 73.030 degrees from boresight
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 80, -150, 10, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-110), 0), 80, -150, 10, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-190), 0), 80, -150, 10, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-70), 0), 80, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (92), 0), 80, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 80, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 80, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 80, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 80, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 80, -150, 10, -10, EQUAL));
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 80, -150, 10, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-110), 0), 80, -150, 10, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-190), 0), 80, -150, 10, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-70), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (92), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 80, -150, 10, -10, EQUAL), TestCase::QUICK);
// test elevation angle
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 2), 60, 0, 20, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 2), 60, 0, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 2), 60, 0, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 2), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-180), 2), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), -3), 60, 60, 20, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), -3), 60, 60, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), -3), 60, 60, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-120), -3), 60, 60, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), -3), 100, -150, 10, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), -3), 100, -150, 10, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200), -3), 100, -150, 10, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), -3), 100, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 9.5), 100, -150, 10, -10, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 9.5), 60, 0, 20, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 9.5), 60, 0, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 9.5), 60, 0, 20, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (100), 9.5), 60, 0, 20, -20, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 9.5), 100, -150, 30, 0, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), 9.5), 100, -150, 30, -3, EQUAL));
- AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200), 9.5), 100, -150, 30, -3, EQUAL));
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 2), 60, 0, 20, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 2), 60, 0, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 2), 60, 0, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 2), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-180), 2), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), -3), 60, 60, 20, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), -3), 60, 60, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), -3), 60, 60, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-120), -3), 60, 60, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), -3), 100, -150, 10, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), -3), 100, -150, 10, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200), -3), 100, -150, 10, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), -3), 100, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 9.5), 100, -150, 10, -10, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 9.5), 60, 0, 20, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 9.5), 60, 0, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 9.5), 60, 0, 20, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (100), 9.5), 60, 0, 20, -20, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 9.5), 100, -150, 30, 0, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), 9.5), 100, -150, 30, -3, EQUAL), TestCase::QUICK);
+ AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200), 9.5), 100, -150, 30, -3, EQUAL), TestCase::QUICK);
};
diff --git a/src/antenna/wscript b/src/antenna/wscript
index 9128b416a..3f76ce862 100644
--- a/src/antenna/wscript
+++ b/src/antenna/wscript
@@ -21,7 +21,7 @@ def build(bld):
'test/test-parabolic-antenna.cc',
]
- headers = bld.new_task_gen(features=['ns3header'])
+ headers = bld(features='ns3header')
headers.module = 'antenna'
headers.source = [
'model/angles.h',
diff --git a/src/aodv/bindings/modulegen__gcc_ILP32.py b/src/aodv/bindings/modulegen__gcc_ILP32.py
index a427637f2..61f5ac089 100644
--- a/src/aodv/bindings/modulegen__gcc_ILP32.py
+++ b/src/aodv/bindings/modulegen__gcc_ILP32.py
@@ -48,6 +48,14 @@ def register_types(module):
module.add_class('CallbackBase', import_from_module='ns.core')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
+ module.add_class('Inet6SocketAddress', import_from_module='ns.network')
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
+ root_module['ns3::Inet6SocketAddress'].implicitly_converts_to(root_module['ns3::Address'])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class]
+ module.add_class('InetSocketAddress', import_from_module='ns.network')
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class]
+ root_module['ns3::InetSocketAddress'].implicitly_converts_to(root_module['ns3::Address'])
## int-to-type.h (module 'core'): ns3::IntToType<0> [struct]
module.add_class('IntToType', import_from_module='ns.core', template_parameters=['0'])
## int-to-type.h (module 'core'): ns3::IntToType<0>::v_e [enumeration]
@@ -210,8 +218,14 @@ def register_types(module):
module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network')
## socket.h (module 'network'): ns3::SocketAddressTag [class]
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag [class]
+ module.add_class('SocketIpTosTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag [class]
+ module.add_class('SocketIpv6HopLimitTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag [class]
+ module.add_class('SocketIpv6TclassTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## nstime.h (module 'core'): ns3::Time [class]
@@ -420,6 +434,8 @@ def register_methods(root_module):
register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item'])
register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
register_Ns3EventId_methods(root_module, root_module['ns3::EventId'])
+ register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress'])
+ register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress'])
register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >'])
register_Ns3IntToType__1_methods(root_module, root_module['ns3::IntToType< 1 >'])
register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >'])
@@ -479,7 +495,10 @@ def register_methods(root_module):
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >'])
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
+ register_Ns3SocketIpTosTag_methods(root_module, root_module['ns3::SocketIpTosTag'])
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
+ register_Ns3SocketIpv6HopLimitTag_methods(root_module, root_module['ns3::SocketIpv6HopLimitTag'])
+ register_Ns3SocketIpv6TclassTag_methods(root_module, root_module['ns3::SocketIpv6TclassTag'])
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
register_Ns3Time_methods(root_module, root_module['ns3::Time'])
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
@@ -1081,6 +1100,92 @@ def register_Ns3EventId_methods(root_module, cls):
is_const=True)
return
+def register_Ns3Inet6SocketAddress_methods(root_module, cls):
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6, uint16_t port) [constructor]
+ cls.add_constructor([param('ns3::Ipv6Address', 'ipv6'), param('uint16_t', 'port')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6) [constructor]
+ cls.add_constructor([param('ns3::Ipv6Address', 'ipv6')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(uint16_t port) [constructor]
+ cls.add_constructor([param('uint16_t', 'port')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6, uint16_t port) [constructor]
+ cls.add_constructor([param('char const *', 'ipv6'), param('uint16_t', 'port')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6) [constructor]
+ cls.add_constructor([param('char const *', 'ipv6')])
+ ## inet6-socket-address.h (module 'network'): static ns3::Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom(ns3::Address const & addr) [member function]
+ cls.add_method('ConvertFrom',
+ 'ns3::Inet6SocketAddress',
+ [param('ns3::Address const &', 'addr')],
+ is_static=True)
+ ## inet6-socket-address.h (module 'network'): ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function]
+ cls.add_method('GetIpv6',
+ 'ns3::Ipv6Address',
+ [],
+ is_const=True)
+ ## inet6-socket-address.h (module 'network'): uint16_t ns3::Inet6SocketAddress::GetPort() const [member function]
+ cls.add_method('GetPort',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## inet6-socket-address.h (module 'network'): static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function]
+ cls.add_method('IsMatchingType',
+ 'bool',
+ [param('ns3::Address const &', 'addr')],
+ is_static=True)
+ ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function]
+ cls.add_method('SetIpv6',
+ 'void',
+ [param('ns3::Ipv6Address', 'ipv6')])
+ ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function]
+ cls.add_method('SetPort',
+ 'void',
+ [param('uint16_t', 'port')])
+ return
+
+def register_Ns3InetSocketAddress_methods(root_module, cls):
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::InetSocketAddress const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::InetSocketAddress const &', 'arg0')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4, uint16_t port) [constructor]
+ cls.add_constructor([param('ns3::Ipv4Address', 'ipv4'), param('uint16_t', 'port')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4) [constructor]
+ cls.add_constructor([param('ns3::Ipv4Address', 'ipv4')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(uint16_t port) [constructor]
+ cls.add_constructor([param('uint16_t', 'port')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4, uint16_t port) [constructor]
+ cls.add_constructor([param('char const *', 'ipv4'), param('uint16_t', 'port')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4) [constructor]
+ cls.add_constructor([param('char const *', 'ipv4')])
+ ## inet-socket-address.h (module 'network'): static ns3::InetSocketAddress ns3::InetSocketAddress::ConvertFrom(ns3::Address const & address) [member function]
+ cls.add_method('ConvertFrom',
+ 'ns3::InetSocketAddress',
+ [param('ns3::Address const &', 'address')],
+ is_static=True)
+ ## inet-socket-address.h (module 'network'): ns3::Ipv4Address ns3::InetSocketAddress::GetIpv4() const [member function]
+ cls.add_method('GetIpv4',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## inet-socket-address.h (module 'network'): uint16_t ns3::InetSocketAddress::GetPort() const [member function]
+ cls.add_method('GetPort',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## inet-socket-address.h (module 'network'): static bool ns3::InetSocketAddress::IsMatchingType(ns3::Address const & address) [member function]
+ cls.add_method('IsMatchingType',
+ 'bool',
+ [param('ns3::Address const &', 'address')],
+ is_static=True)
+ ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetIpv4(ns3::Ipv4Address address) [member function]
+ cls.add_method('SetIpv4',
+ 'void',
+ [param('ns3::Ipv4Address', 'address')])
+ ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetPort(uint16_t port) [member function]
+ cls.add_method('SetPort',
+ 'void',
+ [param('uint16_t', 'port')])
+ return
+
def register_Ns3IntToType__0_methods(root_module, cls):
## int-to-type.h (module 'core'): ns3::IntToType<0>::IntToType() [constructor]
cls.add_constructor([])
@@ -3054,8 +3159,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -3066,8 +3171,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -3363,6 +3468,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::Socket::SocketErrno',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function]
+ cls.add_method('GetIpTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function]
+ cls.add_method('GetIpTtl',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function]
+ cls.add_method('GetIpv6HopLimit',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function]
+ cls.add_method('GetIpv6Tclass',
+ 'uint8_t',
+ [],
+ is_const=True)
## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function]
cls.add_method('GetNode',
'ns3::Ptr< ns3::Node >',
@@ -3393,6 +3518,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function]
+ cls.add_method('IsIpRecvTos',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function]
+ cls.add_method('IsIpRecvTtl',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function]
+ cls.add_method('IsIpv6RecvHopLimit',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function]
+ cls.add_method('IsIpv6RecvTclass',
+ 'bool',
+ [],
+ is_const=True)
## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function]
cls.add_method('IsRecvPktInfo',
'bool',
@@ -3472,6 +3617,40 @@ def register_Ns3Socket_methods(root_module, cls):
cls.add_method('SetDataSentCallback',
'void',
[param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function]
+ cls.add_method('SetIpRecvTos',
+ 'void',
+ [param('bool', 'ipv4RecvTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function]
+ cls.add_method('SetIpRecvTtl',
+ 'void',
+ [param('bool', 'ipv4RecvTtl')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function]
+ cls.add_method('SetIpTos',
+ 'void',
+ [param('uint8_t', 'ipTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function]
+ cls.add_method('SetIpTtl',
+ 'void',
+ [param('uint8_t', 'ipTtl')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function]
+ cls.add_method('SetIpv6HopLimit',
+ 'void',
+ [param('uint8_t', 'ipHopLimit')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function]
+ cls.add_method('SetIpv6RecvHopLimit',
+ 'void',
+ [param('bool', 'ipv6RecvHopLimit')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function]
+ cls.add_method('SetIpv6RecvTclass',
+ 'void',
+ [param('bool', 'ipv6RecvTclass')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function]
+ cls.add_method('SetIpv6Tclass',
+ 'void',
+ [param('int', 'ipTclass')])
## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function]
cls.add_method('SetRecvCallback',
'void',
@@ -3499,6 +3678,26 @@ def register_Ns3Socket_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function]
+ cls.add_method('IsManualIpTos',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function]
+ cls.add_method('IsManualIpTtl',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function]
+ cls.add_method('IsManualIpv6HopLimit',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function]
+ cls.add_method('IsManualIpv6Tclass',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function]
cls.add_method('NotifyConnectionFailed',
'void',
@@ -3592,6 +3791,52 @@ def register_Ns3SocketAddressTag_methods(root_module, cls):
[param('ns3::Address', 'addr')])
return
+def register_Ns3SocketIpTosTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function]
+ cls.add_method('GetTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function]
+ cls.add_method('SetTos',
+ 'void',
+ [param('uint8_t', 'tos')])
+ return
+
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
@@ -3638,6 +3883,98 @@ def register_Ns3SocketIpTtlTag_methods(root_module, cls):
[param('uint8_t', 'ttl')])
return
+def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function]
+ cls.add_method('GetHopLimit',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function]
+ cls.add_method('SetHopLimit',
+ 'void',
+ [param('uint8_t', 'hopLimit')])
+ return
+
+def register_Ns3SocketIpv6TclassTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function]
+ cls.add_method('GetTclass',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function]
+ cls.add_method('SetTclass',
+ 'void',
+ [param('uint8_t', 'tclass')])
+ return
+
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
@@ -5162,10 +5499,10 @@ def register_Ns3IpL4Protocol_methods(root_module, cls):
'ns3::IpL4Protocol::RxStatus',
[param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')],
is_pure_virtual=True, is_virtual=True)
- ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Address & src, ns3::Ipv6Address & dst, ns3::Ptr incomingInterface) [member function]
+ ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr incomingInterface) [member function]
cls.add_method('Receive',
'ns3::IpL4Protocol::RxStatus',
- [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address &', 'src'), param('ns3::Ipv6Address &', 'dst'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')],
+ [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')],
is_pure_virtual=True, is_virtual=True)
## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function]
cls.add_method('ReceiveIcmp',
@@ -6442,8 +6779,8 @@ def register_Ns3Node_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## node.h (module 'network'): void ns3::Node::DoStart() [member function]
- cls.add_method('DoStart',
+ ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -6474,10 +6811,10 @@ def register_Ns3NormalRandomVariable_methods(root_module, cls):
'double',
[],
is_const=True)
- ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound) [member function]
+ ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function]
cls.add_method('GetValue',
'double',
- [param('double', 'mean'), param('double', 'variance'), param('double', 'bound')])
+ [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')])
## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function]
cls.add_method('GetInteger',
'uint32_t',
@@ -7787,8 +8124,8 @@ def register_Ns3AodvTypeHeader_methods(root_module, cls):
cls.add_binary_comparison_operator('==')
## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::TypeHeader const & arg0) [copy constructor]
cls.add_constructor([param('ns3::aodv::TypeHeader const &', 'arg0')])
- ## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::MessageType t) [constructor]
- cls.add_constructor([param('ns3::aodv::MessageType', 't')])
+ ## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::MessageType t=::ns3::aodv::AODVTYPE_RREQ) [constructor]
+ cls.add_constructor([param('ns3::aodv::MessageType', 't', default_value='::ns3::aodv::AODVTYPE_RREQ')])
## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::TypeHeader::Deserialize(ns3::Buffer::Iterator start) [member function]
cls.add_method('Deserialize',
'uint32_t',
diff --git a/src/aodv/bindings/modulegen__gcc_LP64.py b/src/aodv/bindings/modulegen__gcc_LP64.py
index a427637f2..61f5ac089 100644
--- a/src/aodv/bindings/modulegen__gcc_LP64.py
+++ b/src/aodv/bindings/modulegen__gcc_LP64.py
@@ -48,6 +48,14 @@ def register_types(module):
module.add_class('CallbackBase', import_from_module='ns.core')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
+ module.add_class('Inet6SocketAddress', import_from_module='ns.network')
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
+ root_module['ns3::Inet6SocketAddress'].implicitly_converts_to(root_module['ns3::Address'])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class]
+ module.add_class('InetSocketAddress', import_from_module='ns.network')
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class]
+ root_module['ns3::InetSocketAddress'].implicitly_converts_to(root_module['ns3::Address'])
## int-to-type.h (module 'core'): ns3::IntToType<0> [struct]
module.add_class('IntToType', import_from_module='ns.core', template_parameters=['0'])
## int-to-type.h (module 'core'): ns3::IntToType<0>::v_e [enumeration]
@@ -210,8 +218,14 @@ def register_types(module):
module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network')
## socket.h (module 'network'): ns3::SocketAddressTag [class]
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag [class]
+ module.add_class('SocketIpTosTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag [class]
+ module.add_class('SocketIpv6HopLimitTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag [class]
+ module.add_class('SocketIpv6TclassTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## nstime.h (module 'core'): ns3::Time [class]
@@ -420,6 +434,8 @@ def register_methods(root_module):
register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item'])
register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
register_Ns3EventId_methods(root_module, root_module['ns3::EventId'])
+ register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress'])
+ register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress'])
register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >'])
register_Ns3IntToType__1_methods(root_module, root_module['ns3::IntToType< 1 >'])
register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >'])
@@ -479,7 +495,10 @@ def register_methods(root_module):
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >'])
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
+ register_Ns3SocketIpTosTag_methods(root_module, root_module['ns3::SocketIpTosTag'])
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
+ register_Ns3SocketIpv6HopLimitTag_methods(root_module, root_module['ns3::SocketIpv6HopLimitTag'])
+ register_Ns3SocketIpv6TclassTag_methods(root_module, root_module['ns3::SocketIpv6TclassTag'])
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
register_Ns3Time_methods(root_module, root_module['ns3::Time'])
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
@@ -1081,6 +1100,92 @@ def register_Ns3EventId_methods(root_module, cls):
is_const=True)
return
+def register_Ns3Inet6SocketAddress_methods(root_module, cls):
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6, uint16_t port) [constructor]
+ cls.add_constructor([param('ns3::Ipv6Address', 'ipv6'), param('uint16_t', 'port')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6) [constructor]
+ cls.add_constructor([param('ns3::Ipv6Address', 'ipv6')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(uint16_t port) [constructor]
+ cls.add_constructor([param('uint16_t', 'port')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6, uint16_t port) [constructor]
+ cls.add_constructor([param('char const *', 'ipv6'), param('uint16_t', 'port')])
+ ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6) [constructor]
+ cls.add_constructor([param('char const *', 'ipv6')])
+ ## inet6-socket-address.h (module 'network'): static ns3::Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom(ns3::Address const & addr) [member function]
+ cls.add_method('ConvertFrom',
+ 'ns3::Inet6SocketAddress',
+ [param('ns3::Address const &', 'addr')],
+ is_static=True)
+ ## inet6-socket-address.h (module 'network'): ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function]
+ cls.add_method('GetIpv6',
+ 'ns3::Ipv6Address',
+ [],
+ is_const=True)
+ ## inet6-socket-address.h (module 'network'): uint16_t ns3::Inet6SocketAddress::GetPort() const [member function]
+ cls.add_method('GetPort',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## inet6-socket-address.h (module 'network'): static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function]
+ cls.add_method('IsMatchingType',
+ 'bool',
+ [param('ns3::Address const &', 'addr')],
+ is_static=True)
+ ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function]
+ cls.add_method('SetIpv6',
+ 'void',
+ [param('ns3::Ipv6Address', 'ipv6')])
+ ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function]
+ cls.add_method('SetPort',
+ 'void',
+ [param('uint16_t', 'port')])
+ return
+
+def register_Ns3InetSocketAddress_methods(root_module, cls):
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::InetSocketAddress const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::InetSocketAddress const &', 'arg0')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4, uint16_t port) [constructor]
+ cls.add_constructor([param('ns3::Ipv4Address', 'ipv4'), param('uint16_t', 'port')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4) [constructor]
+ cls.add_constructor([param('ns3::Ipv4Address', 'ipv4')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(uint16_t port) [constructor]
+ cls.add_constructor([param('uint16_t', 'port')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4, uint16_t port) [constructor]
+ cls.add_constructor([param('char const *', 'ipv4'), param('uint16_t', 'port')])
+ ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4) [constructor]
+ cls.add_constructor([param('char const *', 'ipv4')])
+ ## inet-socket-address.h (module 'network'): static ns3::InetSocketAddress ns3::InetSocketAddress::ConvertFrom(ns3::Address const & address) [member function]
+ cls.add_method('ConvertFrom',
+ 'ns3::InetSocketAddress',
+ [param('ns3::Address const &', 'address')],
+ is_static=True)
+ ## inet-socket-address.h (module 'network'): ns3::Ipv4Address ns3::InetSocketAddress::GetIpv4() const [member function]
+ cls.add_method('GetIpv4',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## inet-socket-address.h (module 'network'): uint16_t ns3::InetSocketAddress::GetPort() const [member function]
+ cls.add_method('GetPort',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## inet-socket-address.h (module 'network'): static bool ns3::InetSocketAddress::IsMatchingType(ns3::Address const & address) [member function]
+ cls.add_method('IsMatchingType',
+ 'bool',
+ [param('ns3::Address const &', 'address')],
+ is_static=True)
+ ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetIpv4(ns3::Ipv4Address address) [member function]
+ cls.add_method('SetIpv4',
+ 'void',
+ [param('ns3::Ipv4Address', 'address')])
+ ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetPort(uint16_t port) [member function]
+ cls.add_method('SetPort',
+ 'void',
+ [param('uint16_t', 'port')])
+ return
+
def register_Ns3IntToType__0_methods(root_module, cls):
## int-to-type.h (module 'core'): ns3::IntToType<0>::IntToType() [constructor]
cls.add_constructor([])
@@ -3054,8 +3159,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -3066,8 +3171,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -3363,6 +3468,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::Socket::SocketErrno',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function]
+ cls.add_method('GetIpTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function]
+ cls.add_method('GetIpTtl',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function]
+ cls.add_method('GetIpv6HopLimit',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function]
+ cls.add_method('GetIpv6Tclass',
+ 'uint8_t',
+ [],
+ is_const=True)
## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function]
cls.add_method('GetNode',
'ns3::Ptr< ns3::Node >',
@@ -3393,6 +3518,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function]
+ cls.add_method('IsIpRecvTos',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function]
+ cls.add_method('IsIpRecvTtl',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function]
+ cls.add_method('IsIpv6RecvHopLimit',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function]
+ cls.add_method('IsIpv6RecvTclass',
+ 'bool',
+ [],
+ is_const=True)
## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function]
cls.add_method('IsRecvPktInfo',
'bool',
@@ -3472,6 +3617,40 @@ def register_Ns3Socket_methods(root_module, cls):
cls.add_method('SetDataSentCallback',
'void',
[param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function]
+ cls.add_method('SetIpRecvTos',
+ 'void',
+ [param('bool', 'ipv4RecvTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function]
+ cls.add_method('SetIpRecvTtl',
+ 'void',
+ [param('bool', 'ipv4RecvTtl')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function]
+ cls.add_method('SetIpTos',
+ 'void',
+ [param('uint8_t', 'ipTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function]
+ cls.add_method('SetIpTtl',
+ 'void',
+ [param('uint8_t', 'ipTtl')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function]
+ cls.add_method('SetIpv6HopLimit',
+ 'void',
+ [param('uint8_t', 'ipHopLimit')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function]
+ cls.add_method('SetIpv6RecvHopLimit',
+ 'void',
+ [param('bool', 'ipv6RecvHopLimit')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function]
+ cls.add_method('SetIpv6RecvTclass',
+ 'void',
+ [param('bool', 'ipv6RecvTclass')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function]
+ cls.add_method('SetIpv6Tclass',
+ 'void',
+ [param('int', 'ipTclass')])
## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function]
cls.add_method('SetRecvCallback',
'void',
@@ -3499,6 +3678,26 @@ def register_Ns3Socket_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function]
+ cls.add_method('IsManualIpTos',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function]
+ cls.add_method('IsManualIpTtl',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function]
+ cls.add_method('IsManualIpv6HopLimit',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function]
+ cls.add_method('IsManualIpv6Tclass',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function]
cls.add_method('NotifyConnectionFailed',
'void',
@@ -3592,6 +3791,52 @@ def register_Ns3SocketAddressTag_methods(root_module, cls):
[param('ns3::Address', 'addr')])
return
+def register_Ns3SocketIpTosTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function]
+ cls.add_method('GetTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function]
+ cls.add_method('SetTos',
+ 'void',
+ [param('uint8_t', 'tos')])
+ return
+
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
@@ -3638,6 +3883,98 @@ def register_Ns3SocketIpTtlTag_methods(root_module, cls):
[param('uint8_t', 'ttl')])
return
+def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function]
+ cls.add_method('GetHopLimit',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function]
+ cls.add_method('SetHopLimit',
+ 'void',
+ [param('uint8_t', 'hopLimit')])
+ return
+
+def register_Ns3SocketIpv6TclassTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function]
+ cls.add_method('GetTclass',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function]
+ cls.add_method('SetTclass',
+ 'void',
+ [param('uint8_t', 'tclass')])
+ return
+
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
@@ -5162,10 +5499,10 @@ def register_Ns3IpL4Protocol_methods(root_module, cls):
'ns3::IpL4Protocol::RxStatus',
[param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')],
is_pure_virtual=True, is_virtual=True)
- ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Address & src, ns3::Ipv6Address & dst, ns3::Ptr incomingInterface) [member function]
+ ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr incomingInterface) [member function]
cls.add_method('Receive',
'ns3::IpL4Protocol::RxStatus',
- [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address &', 'src'), param('ns3::Ipv6Address &', 'dst'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')],
+ [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')],
is_pure_virtual=True, is_virtual=True)
## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function]
cls.add_method('ReceiveIcmp',
@@ -6442,8 +6779,8 @@ def register_Ns3Node_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## node.h (module 'network'): void ns3::Node::DoStart() [member function]
- cls.add_method('DoStart',
+ ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -6474,10 +6811,10 @@ def register_Ns3NormalRandomVariable_methods(root_module, cls):
'double',
[],
is_const=True)
- ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound) [member function]
+ ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function]
cls.add_method('GetValue',
'double',
- [param('double', 'mean'), param('double', 'variance'), param('double', 'bound')])
+ [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')])
## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function]
cls.add_method('GetInteger',
'uint32_t',
@@ -7787,8 +8124,8 @@ def register_Ns3AodvTypeHeader_methods(root_module, cls):
cls.add_binary_comparison_operator('==')
## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::TypeHeader const & arg0) [copy constructor]
cls.add_constructor([param('ns3::aodv::TypeHeader const &', 'arg0')])
- ## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::MessageType t) [constructor]
- cls.add_constructor([param('ns3::aodv::MessageType', 't')])
+ ## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::MessageType t=::ns3::aodv::AODVTYPE_RREQ) [constructor]
+ cls.add_constructor([param('ns3::aodv::MessageType', 't', default_value='::ns3::aodv::AODVTYPE_RREQ')])
## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::TypeHeader::Deserialize(ns3::Buffer::Iterator start) [member function]
cls.add_method('Deserialize',
'uint32_t',
diff --git a/src/aodv/examples/aodv.cc b/src/aodv/examples/aodv.cc
index 3e8c56973..c3b4637c6 100644
--- a/src/aodv/examples/aodv.cc
+++ b/src/aodv/examples/aodv.cc
@@ -38,7 +38,7 @@ using namespace ns3;
*
* This script creates 1-dimensional grid topology and then ping last node from the first one:
*
- * [10.0.0.1] <-- step --> [10.0.0.2] <-- step --> [10.0.0.3] <-- step --> [10.0.04]
+ * [10.0.0.1] <-- step --> [10.0.0.2] <-- step --> [10.0.0.3] <-- step --> [10.0.0.4]
*
* ping 10.0.0.4
*/
diff --git a/src/aodv/test/aodv-id-cache-test-suite.cc b/src/aodv/test/aodv-id-cache-test-suite.cc
index 466352bfb..7a03dee62 100644
--- a/src/aodv/test/aodv-id-cache-test-suite.cc
+++ b/src/aodv/test/aodv-id-cache-test-suite.cc
@@ -95,7 +95,7 @@ class IdCacheTestSuite : public TestSuite
public:
IdCacheTestSuite () : TestSuite ("routing-id-cache", UNIT)
{
- AddTestCase (new IdCacheTest);
+ AddTestCase (new IdCacheTest, TestCase::QUICK);
}
} g_idCacheTestSuite;
diff --git a/src/aodv/test/aodv-regression.cc b/src/aodv/test/aodv-regression.cc
index 7dab5b159..149e8b6c4 100644
--- a/src/aodv/test/aodv-regression.cc
+++ b/src/aodv/test/aodv-regression.cc
@@ -56,15 +56,15 @@ public:
{
SetDataDir (NS_TEST_SOURCEDIR);
// General RREQ-RREP-RRER test case
- AddTestCase (new ChainRegressionTest ("aodv-chain-regression-test"));
+ AddTestCase (new ChainRegressionTest ("aodv-chain-regression-test"), TestCase::QUICK);
// Bug 606 test case, should crash if bug is not fixed
- AddTestCase (new ChainRegressionTest ("bug-606-test", Seconds (10), 3, Seconds (1)));
+ AddTestCase (new ChainRegressionTest ("bug-606-test", Seconds (10), 3, Seconds (1)), TestCase::QUICK);
// Bug 772 UDP test case
- AddTestCase (new Bug772ChainTest ("udp-chain-test", "ns3::UdpSocketFactory", Seconds (3), 10));
+ AddTestCase (new Bug772ChainTest ("udp-chain-test", "ns3::UdpSocketFactory", Seconds (3), 10), TestCase::QUICK);
// Bug 772 TCP test case
- AddTestCase (new Bug772ChainTest ("tcp-chain-test", "ns3::TcpSocketFactory", Seconds (3), 10));
+ AddTestCase (new Bug772ChainTest ("tcp-chain-test", "ns3::TcpSocketFactory", Seconds (3), 10), TestCase::QUICK);
// Ping loopback test case
- AddTestCase (new LoopbackTestCase ());
+ AddTestCase (new LoopbackTestCase (), TestCase::QUICK);
}
} g_aodvRegressionTestSuite;
diff --git a/src/aodv/test/aodv-test-suite.cc b/src/aodv/test/aodv-test-suite.cc
index da8c2b1e7..a2d9831bd 100644
--- a/src/aodv/test/aodv-test-suite.cc
+++ b/src/aodv/test/aodv-test-suite.cc
@@ -525,16 +525,16 @@ class AodvTestSuite : public TestSuite
public:
AodvTestSuite () : TestSuite ("routing-aodv", UNIT)
{
- AddTestCase (new NeighborTest);
- AddTestCase (new TypeHeaderTest);
- AddTestCase (new RreqHeaderTest);
- AddTestCase (new RrepHeaderTest);
- AddTestCase (new RrepAckHeaderTest);
- AddTestCase (new RerrHeaderTest);
- AddTestCase (new QueueEntryTest);
- AddTestCase (new AodvRqueueTest);
- AddTestCase (new AodvRtableEntryTest);
- AddTestCase (new AodvRtableTest);
+ AddTestCase (new NeighborTest, TestCase::QUICK);
+ AddTestCase (new TypeHeaderTest, TestCase::QUICK);
+ AddTestCase (new RreqHeaderTest, TestCase::QUICK);
+ AddTestCase (new RrepHeaderTest, TestCase::QUICK);
+ AddTestCase (new RrepAckHeaderTest, TestCase::QUICK);
+ AddTestCase (new RerrHeaderTest, TestCase::QUICK);
+ AddTestCase (new QueueEntryTest, TestCase::QUICK);
+ AddTestCase (new AodvRqueueTest, TestCase::QUICK);
+ AddTestCase (new AodvRtableEntryTest, TestCase::QUICK);
+ AddTestCase (new AodvRtableTest, TestCase::QUICK);
}
} g_aodvTestSuite;
diff --git a/src/aodv/test/tcp-chain-test-0-0.pcap b/src/aodv/test/tcp-chain-test-0-0.pcap
index e1d953307..5d5caa51e 100644
Binary files a/src/aodv/test/tcp-chain-test-0-0.pcap and b/src/aodv/test/tcp-chain-test-0-0.pcap differ
diff --git a/src/aodv/test/tcp-chain-test-9-0.pcap b/src/aodv/test/tcp-chain-test-9-0.pcap
index 1694c955a..8406fe22a 100644
Binary files a/src/aodv/test/tcp-chain-test-9-0.pcap and b/src/aodv/test/tcp-chain-test-9-0.pcap differ
diff --git a/src/aodv/wscript b/src/aodv/wscript
index 6209a5b26..f396298da 100644
--- a/src/aodv/wscript
+++ b/src/aodv/wscript
@@ -23,7 +23,7 @@ def build(bld):
'test/loopback.cc',
]
- headers = bld.new_task_gen(features=['ns3header'])
+ headers = bld(features='ns3header')
headers.module = 'aodv'
headers.source = [
'model/aodv-id-cache.h',
@@ -37,6 +37,6 @@ def build(bld):
]
if bld.env['ENABLE_EXAMPLES']:
- bld.add_subdirs('examples')
+ bld.recurse('examples')
bld.ns3_python_bindings()
diff --git a/src/applications/bindings/modulegen__gcc_ILP32.py b/src/applications/bindings/modulegen__gcc_ILP32.py
index f6d7fe0e4..33e4f84c7 100644
--- a/src/applications/bindings/modulegen__gcc_ILP32.py
+++ b/src/applications/bindings/modulegen__gcc_ILP32.py
@@ -30,6 +30,8 @@ def register_types(module):
module.add_enum('MaxSize_e', ['MAX_SIZE'], outer_class=root_module['ns3::Address'], import_from_module='ns.network')
## application-container.h (module 'network'): ns3::ApplicationContainer [class]
module.add_class('ApplicationContainer', import_from_module='ns.network')
+ ## ascii-file.h (module 'network'): ns3::AsciiFile [class]
+ module.add_class('AsciiFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::AsciiTraceHelper [class]
module.add_class('AsciiTraceHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::AsciiTraceHelperForDevice [class]
@@ -186,6 +188,8 @@ def register_types(module):
module.add_class('int64x64_t', import_from_module='ns.core')
## chunk.h (module 'network'): ns3::Chunk [class]
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
+ ## packet-socket.h (module 'network'): ns3::DeviceNameTag [class]
+ module.add_class('DeviceNameTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## flow-id-tag.h (module 'network'): ns3::FlowIdTag [class]
module.add_class('FlowIdTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## header.h (module 'network'): ns3::Header [class]
@@ -198,6 +202,8 @@ def register_types(module):
module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object'])
## packet-burst.h (module 'network'): ns3::PacketBurst [class]
module.add_class('PacketBurst', import_from_module='ns.network', parent=root_module['ns3::Object'])
+ ## packet-socket.h (module 'network'): ns3::PacketSocketTag [class]
+ module.add_class('PacketSocketTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## pcap-file-wrapper.h (module 'network'): ns3::PcapFileWrapper [class]
module.add_class('PcapFileWrapper', import_from_module='ns.network', parent=root_module['ns3::Object'])
## queue.h (module 'network'): ns3::Queue [class]
@@ -262,8 +268,14 @@ def register_types(module):
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket-factory.h (module 'network'): ns3::SocketFactory [class]
module.add_class('SocketFactory', import_from_module='ns.network', parent=root_module['ns3::Object'])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag [class]
+ module.add_class('SocketIpTosTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag [class]
+ module.add_class('SocketIpv6HopLimitTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag [class]
+ module.add_class('SocketIpv6TclassTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## nstime.h (module 'core'): ns3::Time [class]
@@ -452,6 +464,8 @@ def register_types(module):
module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker'])
## address.h (module 'network'): ns3::AddressValue [class]
module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue'])
+ ## error-model.h (module 'network'): ns3::BurstErrorModel [class]
+ module.add_class('BurstErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel'])
## packetbb.h (module 'network'): ns3::PbbAddressTlv [class]
module.add_class('PbbAddressTlv', import_from_module='ns.network', parent=root_module['ns3::PbbTlv'])
module.add_container('std::vector< ns3::Ipv6Address >', 'ns3::Ipv6Address', container_type='vector')
@@ -504,6 +518,7 @@ def register_types_ns3_addressUtils(module):
def register_methods(root_module):
register_Ns3Address_methods(root_module, root_module['ns3::Address'])
register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
+ register_Ns3AsciiFile_methods(root_module, root_module['ns3::AsciiFile'])
register_Ns3AsciiTraceHelper_methods(root_module, root_module['ns3::AsciiTraceHelper'])
register_Ns3AsciiTraceHelperForDevice_methods(root_module, root_module['ns3::AsciiTraceHelperForDevice'])
register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList'])
@@ -572,12 +587,14 @@ def register_methods(root_module):
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
+ register_Ns3DeviceNameTag_methods(root_module, root_module['ns3::DeviceNameTag'])
register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag'])
register_Ns3Header_methods(root_module, root_module['ns3::Header'])
register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader'])
register_Ns3Object_methods(root_module, root_module['ns3::Object'])
register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
register_Ns3PacketBurst_methods(root_module, root_module['ns3::PacketBurst'])
+ register_Ns3PacketSocketTag_methods(root_module, root_module['ns3::PacketSocketTag'])
register_Ns3PcapFileWrapper_methods(root_module, root_module['ns3::PcapFileWrapper'])
register_Ns3Queue_methods(root_module, root_module['ns3::Queue'])
register_Ns3RadiotapHeader_methods(root_module, root_module['ns3::RadiotapHeader'])
@@ -604,7 +621,10 @@ def register_methods(root_module):
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
+ register_Ns3SocketIpTosTag_methods(root_module, root_module['ns3::SocketIpTosTag'])
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
+ register_Ns3SocketIpv6HopLimitTag_methods(root_module, root_module['ns3::SocketIpv6HopLimitTag'])
+ register_Ns3SocketIpv6TclassTag_methods(root_module, root_module['ns3::SocketIpv6TclassTag'])
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
register_Ns3Time_methods(root_module, root_module['ns3::Time'])
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
@@ -695,6 +715,7 @@ def register_methods(root_module):
register_Ns3V4Ping_methods(root_module, root_module['ns3::V4Ping'])
register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker'])
register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
+ register_Ns3BurstErrorModel_methods(root_module, root_module['ns3::BurstErrorModel'])
register_Ns3PbbAddressTlv_methods(root_module, root_module['ns3::PbbAddressTlv'])
return
@@ -819,6 +840,38 @@ def register_Ns3ApplicationContainer_methods(root_module, cls):
[param('ns3::Time', 'stop')])
return
+def register_Ns3AsciiFile_methods(root_module, cls):
+ ## ascii-file.h (module 'network'): ns3::AsciiFile::AsciiFile() [constructor]
+ cls.add_constructor([])
+ ## ascii-file.h (module 'network'): bool ns3::AsciiFile::Fail() const [member function]
+ cls.add_method('Fail',
+ 'bool',
+ [],
+ is_const=True)
+ ## ascii-file.h (module 'network'): bool ns3::AsciiFile::Eof() const [member function]
+ cls.add_method('Eof',
+ 'bool',
+ [],
+ is_const=True)
+ ## ascii-file.h (module 'network'): void ns3::AsciiFile::Open(std::string const & filename, std::_Ios_Openmode mode) [member function]
+ cls.add_method('Open',
+ 'void',
+ [param('std::string const &', 'filename'), param('std::_Ios_Openmode', 'mode')])
+ ## ascii-file.h (module 'network'): void ns3::AsciiFile::Close() [member function]
+ cls.add_method('Close',
+ 'void',
+ [])
+ ## ascii-file.h (module 'network'): void ns3::AsciiFile::Read(std::string & line) [member function]
+ cls.add_method('Read',
+ 'void',
+ [param('std::string &', 'line')])
+ ## ascii-file.h (module 'network'): static bool ns3::AsciiFile::Diff(std::string const & f1, std::string const & f2, uint64_t & lineNumber) [member function]
+ cls.add_method('Diff',
+ 'bool',
+ [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint64_t &', 'lineNumber')],
+ is_static=True)
+ return
+
def register_Ns3AsciiTraceHelper_methods(root_module, cls):
## trace-helper.h (module 'network'): ns3::AsciiTraceHelper::AsciiTraceHelper(ns3::AsciiTraceHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::AsciiTraceHelper const &', 'arg0')])
@@ -3883,6 +3936,52 @@ def register_Ns3Chunk_methods(root_module, cls):
is_pure_virtual=True, is_const=True, is_virtual=True)
return
+def register_Ns3DeviceNameTag_methods(root_module, cls):
+ ## packet-socket.h (module 'network'): ns3::DeviceNameTag::DeviceNameTag(ns3::DeviceNameTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::DeviceNameTag const &', 'arg0')])
+ ## packet-socket.h (module 'network'): ns3::DeviceNameTag::DeviceNameTag() [constructor]
+ cls.add_constructor([])
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## packet-socket.h (module 'network'): std::string ns3::DeviceNameTag::GetDeviceName() const [member function]
+ cls.add_method('GetDeviceName',
+ 'std::string',
+ [],
+ is_const=True)
+ ## packet-socket.h (module 'network'): ns3::TypeId ns3::DeviceNameTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): uint32_t ns3::DeviceNameTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): static ns3::TypeId ns3::DeviceNameTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::SetDeviceName(std::string n) [member function]
+ cls.add_method('SetDeviceName',
+ 'void',
+ [param('std::string', 'n')])
+ return
+
def register_Ns3FlowIdTag_methods(root_module, cls):
## flow-id-tag.h (module 'network'): ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')])
@@ -4040,8 +4139,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -4052,8 +4151,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -4131,6 +4230,61 @@ def register_Ns3PacketBurst_methods(root_module, cls):
visibility='private', is_virtual=True)
return
+def register_Ns3PacketSocketTag_methods(root_module, cls):
+ ## packet-socket.h (module 'network'): ns3::PacketSocketTag::PacketSocketTag(ns3::PacketSocketTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PacketSocketTag const &', 'arg0')])
+ ## packet-socket.h (module 'network'): ns3::PacketSocketTag::PacketSocketTag() [constructor]
+ cls.add_constructor([])
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## packet-socket.h (module 'network'): ns3::Address ns3::PacketSocketTag::GetDestAddress() const [member function]
+ cls.add_method('GetDestAddress',
+ 'ns3::Address',
+ [],
+ is_const=True)
+ ## packet-socket.h (module 'network'): ns3::TypeId ns3::PacketSocketTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): ns3::NetDevice::PacketType ns3::PacketSocketTag::GetPacketType() const [member function]
+ cls.add_method('GetPacketType',
+ 'ns3::NetDevice::PacketType',
+ [],
+ is_const=True)
+ ## packet-socket.h (module 'network'): uint32_t ns3::PacketSocketTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): static ns3::TypeId ns3::PacketSocketTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::SetDestAddress(ns3::Address a) [member function]
+ cls.add_method('SetDestAddress',
+ 'void',
+ [param('ns3::Address', 'a')])
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::SetPacketType(ns3::NetDevice::PacketType t) [member function]
+ cls.add_method('SetPacketType',
+ 'void',
+ [param('ns3::NetDevice::PacketType', 't')])
+ return
+
def register_Ns3PcapFileWrapper_methods(root_module, cls):
## pcap-file-wrapper.h (module 'network'): static ns3::TypeId ns3::PcapFileWrapper::GetTypeId() [member function]
cls.add_method('GetTypeId',
@@ -4827,6 +4981,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::Socket::SocketErrno',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function]
+ cls.add_method('GetIpTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function]
+ cls.add_method('GetIpTtl',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function]
+ cls.add_method('GetIpv6HopLimit',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function]
+ cls.add_method('GetIpv6Tclass',
+ 'uint8_t',
+ [],
+ is_const=True)
## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function]
cls.add_method('GetNode',
'ns3::Ptr< ns3::Node >',
@@ -4857,6 +5031,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function]
+ cls.add_method('IsIpRecvTos',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function]
+ cls.add_method('IsIpRecvTtl',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function]
+ cls.add_method('IsIpv6RecvHopLimit',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function]
+ cls.add_method('IsIpv6RecvTclass',
+ 'bool',
+ [],
+ is_const=True)
## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function]
cls.add_method('IsRecvPktInfo',
'bool',
@@ -4936,6 +5130,40 @@ def register_Ns3Socket_methods(root_module, cls):
cls.add_method('SetDataSentCallback',
'void',
[param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function]
+ cls.add_method('SetIpRecvTos',
+ 'void',
+ [param('bool', 'ipv4RecvTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function]
+ cls.add_method('SetIpRecvTtl',
+ 'void',
+ [param('bool', 'ipv4RecvTtl')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function]
+ cls.add_method('SetIpTos',
+ 'void',
+ [param('uint8_t', 'ipTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function]
+ cls.add_method('SetIpTtl',
+ 'void',
+ [param('uint8_t', 'ipTtl')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function]
+ cls.add_method('SetIpv6HopLimit',
+ 'void',
+ [param('uint8_t', 'ipHopLimit')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function]
+ cls.add_method('SetIpv6RecvHopLimit',
+ 'void',
+ [param('bool', 'ipv6RecvHopLimit')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function]
+ cls.add_method('SetIpv6RecvTclass',
+ 'void',
+ [param('bool', 'ipv6RecvTclass')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function]
+ cls.add_method('SetIpv6Tclass',
+ 'void',
+ [param('int', 'ipTclass')])
## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function]
cls.add_method('SetRecvCallback',
'void',
@@ -4963,6 +5191,26 @@ def register_Ns3Socket_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function]
+ cls.add_method('IsManualIpTos',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function]
+ cls.add_method('IsManualIpTtl',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function]
+ cls.add_method('IsManualIpv6HopLimit',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function]
+ cls.add_method('IsManualIpv6Tclass',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function]
cls.add_method('NotifyConnectionFailed',
'void',
@@ -5073,6 +5321,52 @@ def register_Ns3SocketFactory_methods(root_module, cls):
is_static=True)
return
+def register_Ns3SocketIpTosTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function]
+ cls.add_method('GetTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function]
+ cls.add_method('SetTos',
+ 'void',
+ [param('uint8_t', 'tos')])
+ return
+
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
@@ -5119,6 +5413,98 @@ def register_Ns3SocketIpTtlTag_methods(root_module, cls):
[param('uint8_t', 'ttl')])
return
+def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function]
+ cls.add_method('GetHopLimit',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function]
+ cls.add_method('SetHopLimit',
+ 'void',
+ [param('uint8_t', 'hopLimit')])
+ return
+
+def register_Ns3SocketIpv6TclassTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function]
+ cls.add_method('GetTclass',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function]
+ cls.add_method('SetTclass',
+ 'void',
+ [param('uint8_t', 'tclass')])
+ return
+
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
@@ -5612,8 +5998,8 @@ def register_Ns3Application_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## application.h (module 'network'): void ns3::Application::DoStart() [member function]
- cls.add_method('DoStart',
+ ## application.h (module 'network'): void ns3::Application::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -7058,8 +7444,8 @@ def register_Ns3Node_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## node.h (module 'network'): void ns3::Node::DoStart() [member function]
- cls.add_method('DoStart',
+ ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -7090,10 +7476,10 @@ def register_Ns3NormalRandomVariable_methods(root_module, cls):
'double',
[],
is_const=True)
- ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound) [member function]
+ ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function]
cls.add_method('GetValue',
'double',
- [param('double', 'mean'), param('double', 'variance'), param('double', 'bound')])
+ [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')])
## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function]
cls.add_method('GetInteger',
'uint32_t',
@@ -9581,6 +9967,49 @@ def register_Ns3AddressValue_methods(root_module, cls):
[param('ns3::Address const &', 'value')])
return
+def register_Ns3BurstErrorModel_methods(root_module, cls):
+ ## error-model.h (module 'network'): ns3::BurstErrorModel::BurstErrorModel(ns3::BurstErrorModel const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::BurstErrorModel const &', 'arg0')])
+ ## error-model.h (module 'network'): ns3::BurstErrorModel::BurstErrorModel() [constructor]
+ cls.add_constructor([])
+ ## error-model.h (module 'network'): int64_t ns3::BurstErrorModel::AssignStreams(int64_t stream) [member function]
+ cls.add_method('AssignStreams',
+ 'int64_t',
+ [param('int64_t', 'stream')])
+ ## error-model.h (module 'network'): double ns3::BurstErrorModel::GetBurstRate() const [member function]
+ cls.add_method('GetBurstRate',
+ 'double',
+ [],
+ is_const=True)
+ ## error-model.h (module 'network'): static ns3::TypeId ns3::BurstErrorModel::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::SetBurstRate(double rate) [member function]
+ cls.add_method('SetBurstRate',
+ 'void',
+ [param('double', 'rate')])
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::SetRandomBurstSize(ns3::Ptr arg0) [member function]
+ cls.add_method('SetRandomBurstSize',
+ 'void',
+ [param('ns3::Ptr< ns3::RandomVariableStream >', 'arg0')])
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::SetRandomVariable(ns3::Ptr arg0) [member function]
+ cls.add_method('SetRandomVariable',
+ 'void',
+ [param('ns3::Ptr< ns3::RandomVariableStream >', 'arg0')])
+ ## error-model.h (module 'network'): bool ns3::BurstErrorModel::DoCorrupt(ns3::Ptr p) [member function]
+ cls.add_method('DoCorrupt',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'p')],
+ visibility='private', is_virtual=True)
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::DoReset() [member function]
+ cls.add_method('DoReset',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
+ return
+
def register_Ns3PbbAddressTlv_methods(root_module, cls):
## packetbb.h (module 'network'): ns3::PbbAddressTlv::PbbAddressTlv() [constructor]
cls.add_constructor([])
diff --git a/src/applications/bindings/modulegen__gcc_LP64.py b/src/applications/bindings/modulegen__gcc_LP64.py
index f6d7fe0e4..33e4f84c7 100644
--- a/src/applications/bindings/modulegen__gcc_LP64.py
+++ b/src/applications/bindings/modulegen__gcc_LP64.py
@@ -30,6 +30,8 @@ def register_types(module):
module.add_enum('MaxSize_e', ['MAX_SIZE'], outer_class=root_module['ns3::Address'], import_from_module='ns.network')
## application-container.h (module 'network'): ns3::ApplicationContainer [class]
module.add_class('ApplicationContainer', import_from_module='ns.network')
+ ## ascii-file.h (module 'network'): ns3::AsciiFile [class]
+ module.add_class('AsciiFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::AsciiTraceHelper [class]
module.add_class('AsciiTraceHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::AsciiTraceHelperForDevice [class]
@@ -186,6 +188,8 @@ def register_types(module):
module.add_class('int64x64_t', import_from_module='ns.core')
## chunk.h (module 'network'): ns3::Chunk [class]
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
+ ## packet-socket.h (module 'network'): ns3::DeviceNameTag [class]
+ module.add_class('DeviceNameTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## flow-id-tag.h (module 'network'): ns3::FlowIdTag [class]
module.add_class('FlowIdTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## header.h (module 'network'): ns3::Header [class]
@@ -198,6 +202,8 @@ def register_types(module):
module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object'])
## packet-burst.h (module 'network'): ns3::PacketBurst [class]
module.add_class('PacketBurst', import_from_module='ns.network', parent=root_module['ns3::Object'])
+ ## packet-socket.h (module 'network'): ns3::PacketSocketTag [class]
+ module.add_class('PacketSocketTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## pcap-file-wrapper.h (module 'network'): ns3::PcapFileWrapper [class]
module.add_class('PcapFileWrapper', import_from_module='ns.network', parent=root_module['ns3::Object'])
## queue.h (module 'network'): ns3::Queue [class]
@@ -262,8 +268,14 @@ def register_types(module):
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket-factory.h (module 'network'): ns3::SocketFactory [class]
module.add_class('SocketFactory', import_from_module='ns.network', parent=root_module['ns3::Object'])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag [class]
+ module.add_class('SocketIpTosTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag [class]
+ module.add_class('SocketIpv6HopLimitTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag [class]
+ module.add_class('SocketIpv6TclassTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
## nstime.h (module 'core'): ns3::Time [class]
@@ -452,6 +464,8 @@ def register_types(module):
module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker'])
## address.h (module 'network'): ns3::AddressValue [class]
module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue'])
+ ## error-model.h (module 'network'): ns3::BurstErrorModel [class]
+ module.add_class('BurstErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel'])
## packetbb.h (module 'network'): ns3::PbbAddressTlv [class]
module.add_class('PbbAddressTlv', import_from_module='ns.network', parent=root_module['ns3::PbbTlv'])
module.add_container('std::vector< ns3::Ipv6Address >', 'ns3::Ipv6Address', container_type='vector')
@@ -504,6 +518,7 @@ def register_types_ns3_addressUtils(module):
def register_methods(root_module):
register_Ns3Address_methods(root_module, root_module['ns3::Address'])
register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
+ register_Ns3AsciiFile_methods(root_module, root_module['ns3::AsciiFile'])
register_Ns3AsciiTraceHelper_methods(root_module, root_module['ns3::AsciiTraceHelper'])
register_Ns3AsciiTraceHelperForDevice_methods(root_module, root_module['ns3::AsciiTraceHelperForDevice'])
register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList'])
@@ -572,12 +587,14 @@ def register_methods(root_module):
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
+ register_Ns3DeviceNameTag_methods(root_module, root_module['ns3::DeviceNameTag'])
register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag'])
register_Ns3Header_methods(root_module, root_module['ns3::Header'])
register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader'])
register_Ns3Object_methods(root_module, root_module['ns3::Object'])
register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
register_Ns3PacketBurst_methods(root_module, root_module['ns3::PacketBurst'])
+ register_Ns3PacketSocketTag_methods(root_module, root_module['ns3::PacketSocketTag'])
register_Ns3PcapFileWrapper_methods(root_module, root_module['ns3::PcapFileWrapper'])
register_Ns3Queue_methods(root_module, root_module['ns3::Queue'])
register_Ns3RadiotapHeader_methods(root_module, root_module['ns3::RadiotapHeader'])
@@ -604,7 +621,10 @@ def register_methods(root_module):
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
+ register_Ns3SocketIpTosTag_methods(root_module, root_module['ns3::SocketIpTosTag'])
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
+ register_Ns3SocketIpv6HopLimitTag_methods(root_module, root_module['ns3::SocketIpv6HopLimitTag'])
+ register_Ns3SocketIpv6TclassTag_methods(root_module, root_module['ns3::SocketIpv6TclassTag'])
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
register_Ns3Time_methods(root_module, root_module['ns3::Time'])
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
@@ -695,6 +715,7 @@ def register_methods(root_module):
register_Ns3V4Ping_methods(root_module, root_module['ns3::V4Ping'])
register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker'])
register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
+ register_Ns3BurstErrorModel_methods(root_module, root_module['ns3::BurstErrorModel'])
register_Ns3PbbAddressTlv_methods(root_module, root_module['ns3::PbbAddressTlv'])
return
@@ -819,6 +840,38 @@ def register_Ns3ApplicationContainer_methods(root_module, cls):
[param('ns3::Time', 'stop')])
return
+def register_Ns3AsciiFile_methods(root_module, cls):
+ ## ascii-file.h (module 'network'): ns3::AsciiFile::AsciiFile() [constructor]
+ cls.add_constructor([])
+ ## ascii-file.h (module 'network'): bool ns3::AsciiFile::Fail() const [member function]
+ cls.add_method('Fail',
+ 'bool',
+ [],
+ is_const=True)
+ ## ascii-file.h (module 'network'): bool ns3::AsciiFile::Eof() const [member function]
+ cls.add_method('Eof',
+ 'bool',
+ [],
+ is_const=True)
+ ## ascii-file.h (module 'network'): void ns3::AsciiFile::Open(std::string const & filename, std::_Ios_Openmode mode) [member function]
+ cls.add_method('Open',
+ 'void',
+ [param('std::string const &', 'filename'), param('std::_Ios_Openmode', 'mode')])
+ ## ascii-file.h (module 'network'): void ns3::AsciiFile::Close() [member function]
+ cls.add_method('Close',
+ 'void',
+ [])
+ ## ascii-file.h (module 'network'): void ns3::AsciiFile::Read(std::string & line) [member function]
+ cls.add_method('Read',
+ 'void',
+ [param('std::string &', 'line')])
+ ## ascii-file.h (module 'network'): static bool ns3::AsciiFile::Diff(std::string const & f1, std::string const & f2, uint64_t & lineNumber) [member function]
+ cls.add_method('Diff',
+ 'bool',
+ [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint64_t &', 'lineNumber')],
+ is_static=True)
+ return
+
def register_Ns3AsciiTraceHelper_methods(root_module, cls):
## trace-helper.h (module 'network'): ns3::AsciiTraceHelper::AsciiTraceHelper(ns3::AsciiTraceHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::AsciiTraceHelper const &', 'arg0')])
@@ -3883,6 +3936,52 @@ def register_Ns3Chunk_methods(root_module, cls):
is_pure_virtual=True, is_const=True, is_virtual=True)
return
+def register_Ns3DeviceNameTag_methods(root_module, cls):
+ ## packet-socket.h (module 'network'): ns3::DeviceNameTag::DeviceNameTag(ns3::DeviceNameTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::DeviceNameTag const &', 'arg0')])
+ ## packet-socket.h (module 'network'): ns3::DeviceNameTag::DeviceNameTag() [constructor]
+ cls.add_constructor([])
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## packet-socket.h (module 'network'): std::string ns3::DeviceNameTag::GetDeviceName() const [member function]
+ cls.add_method('GetDeviceName',
+ 'std::string',
+ [],
+ is_const=True)
+ ## packet-socket.h (module 'network'): ns3::TypeId ns3::DeviceNameTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): uint32_t ns3::DeviceNameTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): static ns3::TypeId ns3::DeviceNameTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::DeviceNameTag::SetDeviceName(std::string n) [member function]
+ cls.add_method('SetDeviceName',
+ 'void',
+ [param('std::string', 'n')])
+ return
+
def register_Ns3FlowIdTag_methods(root_module, cls):
## flow-id-tag.h (module 'network'): ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')])
@@ -4040,8 +4139,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -4052,8 +4151,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -4131,6 +4230,61 @@ def register_Ns3PacketBurst_methods(root_module, cls):
visibility='private', is_virtual=True)
return
+def register_Ns3PacketSocketTag_methods(root_module, cls):
+ ## packet-socket.h (module 'network'): ns3::PacketSocketTag::PacketSocketTag(ns3::PacketSocketTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PacketSocketTag const &', 'arg0')])
+ ## packet-socket.h (module 'network'): ns3::PacketSocketTag::PacketSocketTag() [constructor]
+ cls.add_constructor([])
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## packet-socket.h (module 'network'): ns3::Address ns3::PacketSocketTag::GetDestAddress() const [member function]
+ cls.add_method('GetDestAddress',
+ 'ns3::Address',
+ [],
+ is_const=True)
+ ## packet-socket.h (module 'network'): ns3::TypeId ns3::PacketSocketTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): ns3::NetDevice::PacketType ns3::PacketSocketTag::GetPacketType() const [member function]
+ cls.add_method('GetPacketType',
+ 'ns3::NetDevice::PacketType',
+ [],
+ is_const=True)
+ ## packet-socket.h (module 'network'): uint32_t ns3::PacketSocketTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): static ns3::TypeId ns3::PacketSocketTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::SetDestAddress(ns3::Address a) [member function]
+ cls.add_method('SetDestAddress',
+ 'void',
+ [param('ns3::Address', 'a')])
+ ## packet-socket.h (module 'network'): void ns3::PacketSocketTag::SetPacketType(ns3::NetDevice::PacketType t) [member function]
+ cls.add_method('SetPacketType',
+ 'void',
+ [param('ns3::NetDevice::PacketType', 't')])
+ return
+
def register_Ns3PcapFileWrapper_methods(root_module, cls):
## pcap-file-wrapper.h (module 'network'): static ns3::TypeId ns3::PcapFileWrapper::GetTypeId() [member function]
cls.add_method('GetTypeId',
@@ -4827,6 +4981,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::Socket::SocketErrno',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function]
+ cls.add_method('GetIpTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function]
+ cls.add_method('GetIpTtl',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function]
+ cls.add_method('GetIpv6HopLimit',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function]
+ cls.add_method('GetIpv6Tclass',
+ 'uint8_t',
+ [],
+ is_const=True)
## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function]
cls.add_method('GetNode',
'ns3::Ptr< ns3::Node >',
@@ -4857,6 +5031,26 @@ def register_Ns3Socket_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function]
+ cls.add_method('IsIpRecvTos',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function]
+ cls.add_method('IsIpRecvTtl',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function]
+ cls.add_method('IsIpv6RecvHopLimit',
+ 'bool',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function]
+ cls.add_method('IsIpv6RecvTclass',
+ 'bool',
+ [],
+ is_const=True)
## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function]
cls.add_method('IsRecvPktInfo',
'bool',
@@ -4936,6 +5130,40 @@ def register_Ns3Socket_methods(root_module, cls):
cls.add_method('SetDataSentCallback',
'void',
[param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function]
+ cls.add_method('SetIpRecvTos',
+ 'void',
+ [param('bool', 'ipv4RecvTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function]
+ cls.add_method('SetIpRecvTtl',
+ 'void',
+ [param('bool', 'ipv4RecvTtl')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function]
+ cls.add_method('SetIpTos',
+ 'void',
+ [param('uint8_t', 'ipTos')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function]
+ cls.add_method('SetIpTtl',
+ 'void',
+ [param('uint8_t', 'ipTtl')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function]
+ cls.add_method('SetIpv6HopLimit',
+ 'void',
+ [param('uint8_t', 'ipHopLimit')],
+ is_virtual=True)
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function]
+ cls.add_method('SetIpv6RecvHopLimit',
+ 'void',
+ [param('bool', 'ipv6RecvHopLimit')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function]
+ cls.add_method('SetIpv6RecvTclass',
+ 'void',
+ [param('bool', 'ipv6RecvTclass')])
+ ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function]
+ cls.add_method('SetIpv6Tclass',
+ 'void',
+ [param('int', 'ipTclass')])
## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function]
cls.add_method('SetRecvCallback',
'void',
@@ -4963,6 +5191,26 @@ def register_Ns3Socket_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function]
+ cls.add_method('IsManualIpTos',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function]
+ cls.add_method('IsManualIpTtl',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function]
+ cls.add_method('IsManualIpv6HopLimit',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function]
+ cls.add_method('IsManualIpv6Tclass',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function]
cls.add_method('NotifyConnectionFailed',
'void',
@@ -5073,6 +5321,52 @@ def register_Ns3SocketFactory_methods(root_module, cls):
is_static=True)
return
+def register_Ns3SocketIpTosTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function]
+ cls.add_method('GetTos',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function]
+ cls.add_method('SetTos',
+ 'void',
+ [param('uint8_t', 'tos')])
+ return
+
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
@@ -5119,6 +5413,98 @@ def register_Ns3SocketIpTtlTag_methods(root_module, cls):
[param('uint8_t', 'ttl')])
return
+def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function]
+ cls.add_method('GetHopLimit',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function]
+ cls.add_method('SetHopLimit',
+ 'void',
+ [param('uint8_t', 'hopLimit')])
+ return
+
+def register_Ns3SocketIpv6TclassTag_methods(root_module, cls):
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')])
+ ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor]
+ cls.add_constructor([])
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function]
+ cls.add_method('GetTclass',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function]
+ cls.add_method('SetTclass',
+ 'void',
+ [param('uint8_t', 'tclass')])
+ return
+
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
@@ -5612,8 +5998,8 @@ def register_Ns3Application_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## application.h (module 'network'): void ns3::Application::DoStart() [member function]
- cls.add_method('DoStart',
+ ## application.h (module 'network'): void ns3::Application::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -7058,8 +7444,8 @@ def register_Ns3Node_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## node.h (module 'network'): void ns3::Node::DoStart() [member function]
- cls.add_method('DoStart',
+ ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -7090,10 +7476,10 @@ def register_Ns3NormalRandomVariable_methods(root_module, cls):
'double',
[],
is_const=True)
- ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound) [member function]
+ ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function]
cls.add_method('GetValue',
'double',
- [param('double', 'mean'), param('double', 'variance'), param('double', 'bound')])
+ [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')])
## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function]
cls.add_method('GetInteger',
'uint32_t',
@@ -9581,6 +9967,49 @@ def register_Ns3AddressValue_methods(root_module, cls):
[param('ns3::Address const &', 'value')])
return
+def register_Ns3BurstErrorModel_methods(root_module, cls):
+ ## error-model.h (module 'network'): ns3::BurstErrorModel::BurstErrorModel(ns3::BurstErrorModel const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::BurstErrorModel const &', 'arg0')])
+ ## error-model.h (module 'network'): ns3::BurstErrorModel::BurstErrorModel() [constructor]
+ cls.add_constructor([])
+ ## error-model.h (module 'network'): int64_t ns3::BurstErrorModel::AssignStreams(int64_t stream) [member function]
+ cls.add_method('AssignStreams',
+ 'int64_t',
+ [param('int64_t', 'stream')])
+ ## error-model.h (module 'network'): double ns3::BurstErrorModel::GetBurstRate() const [member function]
+ cls.add_method('GetBurstRate',
+ 'double',
+ [],
+ is_const=True)
+ ## error-model.h (module 'network'): static ns3::TypeId ns3::BurstErrorModel::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::SetBurstRate(double rate) [member function]
+ cls.add_method('SetBurstRate',
+ 'void',
+ [param('double', 'rate')])
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::SetRandomBurstSize(ns3::Ptr arg0) [member function]
+ cls.add_method('SetRandomBurstSize',
+ 'void',
+ [param('ns3::Ptr< ns3::RandomVariableStream >', 'arg0')])
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::SetRandomVariable(ns3::Ptr arg0) [member function]
+ cls.add_method('SetRandomVariable',
+ 'void',
+ [param('ns3::Ptr< ns3::RandomVariableStream >', 'arg0')])
+ ## error-model.h (module 'network'): bool ns3::BurstErrorModel::DoCorrupt(ns3::Ptr p) [member function]
+ cls.add_method('DoCorrupt',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'p')],
+ visibility='private', is_virtual=True)
+ ## error-model.h (module 'network'): void ns3::BurstErrorModel::DoReset() [member function]
+ cls.add_method('DoReset',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
+ return
+
def register_Ns3PbbAddressTlv_methods(root_module, cls):
## packetbb.h (module 'network'): ns3::PbbAddressTlv::PbbAddressTlv() [constructor]
cls.add_constructor([])
diff --git a/src/applications/model/bulk-send-application.cc b/src/applications/model/bulk-send-application.cc
index c76fdda8e..03637c531 100644
--- a/src/applications/model/bulk-send-application.cc
+++ b/src/applications/model/bulk-send-application.cc
@@ -126,7 +126,15 @@ void BulkSendApplication::StartApplication (void) // Called at time specified by
"In other words, use TCP instead of UDP.");
}
- m_socket->Bind ();
+ if (Inet6SocketAddress::IsMatchingType (m_peer))
+ {
+ m_socket->Bind6 ();
+ }
+ else if (InetSocketAddress::IsMatchingType (m_peer))
+ {
+ m_socket->Bind ();
+ }
+
m_socket->Connect (m_peer);
m_socket->ShutdownRecv ();
m_socket->SetConnectCallback (
diff --git a/src/applications/model/onoff-application.cc b/src/applications/model/onoff-application.cc
index 830284161..158c4dcb6 100644
--- a/src/applications/model/onoff-application.cc
+++ b/src/applications/model/onoff-application.cc
@@ -26,6 +26,7 @@
#include "ns3/address.h"
#include "ns3/inet-socket-address.h"
#include "ns3/inet6-socket-address.h"
+#include "ns3/packet-socket-address.h"
#include "ns3/node.h"
#include "ns3/nstime.h"
#include "ns3/data-rate.h"
@@ -43,8 +44,6 @@
NS_LOG_COMPONENT_DEFINE ("OnOffApplication");
-using namespace std;
-
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (OnOffApplication);
@@ -94,18 +93,18 @@ OnOffApplication::GetTypeId (void)
OnOffApplication::OnOffApplication ()
+ : m_socket (0),
+ m_connected (false),
+ m_residualBits (0),
+ m_lastStartTime (Seconds (0)),
+ m_totBytes (0)
{
- NS_LOG_FUNCTION_NOARGS ();
- m_socket = 0;
- m_connected = false;
- m_residualBits = 0;
- m_lastStartTime = Seconds (0);
- m_totBytes = 0;
+ NS_LOG_FUNCTION (this);
}
OnOffApplication::~OnOffApplication()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
}
void
@@ -134,7 +133,7 @@ OnOffApplication::AssignStreams (int64_t stream)
void
OnOffApplication::DoDispose (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
m_socket = 0;
// chain up
@@ -144,16 +143,28 @@ OnOffApplication::DoDispose (void)
// Application Methods
void OnOffApplication::StartApplication () // Called at time specified by Start
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
// Create the socket if not already
if (!m_socket)
{
m_socket = Socket::CreateSocket (GetNode (), m_tid);
- m_socket->Bind ();
+ if (Inet6SocketAddress::IsMatchingType (m_peer))
+ {
+ m_socket->Bind6 ();
+ }
+ else if (InetSocketAddress::IsMatchingType (m_peer) ||
+ PacketSocketAddress::IsMatchingType (m_peer))
+ {
+ m_socket->Bind ();
+ }
m_socket->Connect (m_peer);
m_socket->SetAllowBroadcast (true);
m_socket->ShutdownRecv ();
+
+ m_socket->SetConnectCallback (
+ MakeCallback (&OnOffApplication::ConnectionSucceeded, this),
+ MakeCallback (&OnOffApplication::ConnectionFailed, this));
}
// Insure no pending event
CancelEvents ();
@@ -165,7 +176,7 @@ void OnOffApplication::StartApplication () // Called at time specified by Start
void OnOffApplication::StopApplication () // Called at time specified by Stop
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
CancelEvents ();
if(m_socket != 0)
@@ -180,7 +191,7 @@ void OnOffApplication::StopApplication () // Called at time specified by Stop
void OnOffApplication::CancelEvents ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_sendEvent.IsRunning ())
{ // Cancel the pending send packet event
@@ -196,7 +207,7 @@ void OnOffApplication::CancelEvents ()
// Event handlers
void OnOffApplication::StartSending ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
m_lastStartTime = Simulator::Now ();
ScheduleNextTx (); // Schedule the send packet event
ScheduleStopEvent ();
@@ -204,7 +215,7 @@ void OnOffApplication::StartSending ()
void OnOffApplication::StopSending ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
CancelEvents ();
ScheduleStartEvent ();
@@ -213,7 +224,7 @@ void OnOffApplication::StopSending ()
// Private helpers
void OnOffApplication::ScheduleNextTx ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_maxBytes == 0 || m_totBytes < m_maxBytes)
{
@@ -233,7 +244,7 @@ void OnOffApplication::ScheduleNextTx ()
void OnOffApplication::ScheduleStartEvent ()
{ // Schedules the event to start sending data (switch to the "On" state)
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Time offInterval = Seconds (m_offTime->GetValue ());
NS_LOG_LOGIC ("start at " << offInterval);
@@ -242,7 +253,7 @@ void OnOffApplication::ScheduleStartEvent ()
void OnOffApplication::ScheduleStopEvent ()
{ // Schedules the event to stop sending data (switch to "Off" state)
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Time onInterval = Seconds (m_onTime->GetValue ());
NS_LOG_LOGIC ("stop at " << onInterval);
@@ -252,7 +263,7 @@ void OnOffApplication::ScheduleStopEvent ()
void OnOffApplication::SendPacket ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
NS_ASSERT (m_sendEvent.IsExpired ());
Ptr packet = Create (m_pktSize);
@@ -282,18 +293,17 @@ void OnOffApplication::SendPacket ()
ScheduleNextTx ();
}
-void OnOffApplication::ConnectionSucceeded (Ptr)
-{
- NS_LOG_FUNCTION_NOARGS ();
+void OnOffApplication::ConnectionSucceeded (Ptr socket)
+{
+ NS_LOG_FUNCTION (this << socket);
m_connected = true;
- ScheduleStartEvent ();
}
-void OnOffApplication::ConnectionFailed (Ptr)
+void OnOffApplication::ConnectionFailed (Ptr socket)
{
- NS_LOG_FUNCTION_NOARGS ();
- cout << "OnOffApplication, Connection Failed" << endl;
+ NS_LOG_FUNCTION (this << socket);
}
+
} // Namespace ns3
diff --git a/src/applications/model/onoff-application.h b/src/applications/model/onoff-application.h
index e3ae3401c..ff1f9b306 100644
--- a/src/applications/model/onoff-application.h
+++ b/src/applications/model/onoff-application.h
@@ -160,9 +160,8 @@ private:
void ScheduleNextTx ();
void ScheduleStartEvent ();
void ScheduleStopEvent ();
- void ConnectionSucceeded (Ptr);
- void ConnectionFailed (Ptr);
- void Ignore (Ptr);
+ void ConnectionSucceeded (Ptr socket);
+ void ConnectionFailed (Ptr socket);
};
} // namespace ns3
diff --git a/src/applications/model/packet-loss-counter.cc b/src/applications/model/packet-loss-counter.cc
index 357cadb40..076b2b574 100644
--- a/src/applications/model/packet-loss-counter.cc
+++ b/src/applications/model/packet-loss-counter.cc
@@ -35,23 +35,27 @@ PacketLossCounter::PacketLossCounter (uint8_t bitmapSize)
m_lastMaxSeqNum (0),
m_receiveBitMap (0)
{
+ NS_LOG_FUNCTION (this << bitmapSize);
SetBitMapSize (bitmapSize);
}
PacketLossCounter::~PacketLossCounter ()
{
+ NS_LOG_FUNCTION (this);
delete [] m_receiveBitMap;
}
uint16_t
PacketLossCounter::GetBitMapSize () const
{
+ NS_LOG_FUNCTION (this);
return m_bitMapSize * 8;
}
void
PacketLossCounter::SetBitMapSize (uint16_t winSize)
{
+ NS_LOG_FUNCTION (this << winSize);
NS_ASSERT_MSG (winSize%8==0,"The packet window size should be a multiple of 8");
m_bitMapSize = winSize/8;
@@ -66,18 +70,21 @@ PacketLossCounter::SetBitMapSize (uint16_t winSize)
uint32_t
PacketLossCounter::GetLost () const
{
+ NS_LOG_FUNCTION (this);
return m_lost;
}
bool
PacketLossCounter::GetBit (uint32_t seqNum)
{
+ NS_LOG_FUNCTION (this << seqNum);
return ((m_receiveBitMap[(seqNum%(m_bitMapSize*8))/8] >> (7-(seqNum%8)))&0x01);
}
void
PacketLossCounter::SetBit (uint32_t seqNum, bool val)
{
+ NS_LOG_FUNCTION (this << seqNum << val);
if (val)
{
m_receiveBitMap[(seqNum%(m_bitMapSize*8))/8] |= 0x80 >> (seqNum%8);
@@ -103,6 +110,7 @@ PacketLossCounter::SetBit (uint32_t seqNum, bool val)
void
PacketLossCounter::NotifyReceived (uint32_t seqNum)
{
+ NS_LOG_FUNCTION (this << seqNum);
for (uint32_t i=m_lastMaxSeqNum+1; i<=seqNum; i++)
{
if (GetBit (i)!=1)
@@ -118,4 +126,5 @@ PacketLossCounter::NotifyReceived (uint32_t seqNum)
m_lastMaxSeqNum = seqNum;
}
}
-}
+
+} // namespace ns3
diff --git a/src/applications/model/packet-sink.cc b/src/applications/model/packet-sink.cc
index ca5c0af2d..168a684be 100644
--- a/src/applications/model/packet-sink.cc
+++ b/src/applications/model/packet-sink.cc
@@ -32,8 +32,6 @@
#include "ns3/udp-socket-factory.h"
#include "packet-sink.h"
-using namespace std;
-
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("PacketSink");
@@ -73,6 +71,7 @@ PacketSink::~PacketSink()
uint32_t PacketSink::GetTotalRx () const
{
+ NS_LOG_FUNCTION (this);
return m_totalRx;
}
diff --git a/src/applications/model/radvd-interface.cc b/src/applications/model/radvd-interface.cc
index d5b9c5bfd..0721d9920 100644
--- a/src/applications/model/radvd-interface.cc
+++ b/src/applications/model/radvd-interface.cc
@@ -19,13 +19,17 @@
*/
#include "radvd-interface.h"
+#include
namespace ns3
{
+NS_LOG_COMPONENT_DEFINE ("RadvdInterface");
+
RadvdInterface::RadvdInterface (uint32_t interface)
: m_interface (interface)
{
+ NS_LOG_FUNCTION (this << interface);
/* initialize default value as specified in radvd.conf manpage */
m_sendAdvert = true;
m_maxRtrAdvInterval = 600000;
@@ -51,6 +55,7 @@ RadvdInterface::RadvdInterface (uint32_t interface)
RadvdInterface::RadvdInterface (uint32_t interface, uint32_t maxRtrAdvInterval, uint32_t minRtrAdvInterval)
: m_interface (interface)
{
+ NS_LOG_FUNCTION (this << interface << maxRtrAdvInterval << minRtrAdvInterval);
NS_ASSERT (maxRtrAdvInterval > minRtrAdvInterval);
m_sendAdvert = true;
m_maxRtrAdvInterval = maxRtrAdvInterval;
@@ -75,6 +80,7 @@ RadvdInterface::RadvdInterface (uint32_t interface, uint32_t maxRtrAdvInterval,
RadvdInterface::~RadvdInterface ()
{
+ NS_LOG_FUNCTION (this);
/* clear prefixes */
for (RadvdPrefixListI it = m_prefixes.begin (); it != m_prefixes.end (); ++it)
{
@@ -85,207 +91,248 @@ RadvdInterface::~RadvdInterface ()
void RadvdInterface::AddPrefix (Ptr routerPrefix)
{
+ NS_LOG_FUNCTION (this << routerPrefix);
m_prefixes.push_back (routerPrefix);
}
uint32_t RadvdInterface::GetInterface () const
{
+ NS_LOG_FUNCTION (this);
return m_interface;
}
std::list > RadvdInterface::GetPrefixes () const
{
+ NS_LOG_FUNCTION (this);
return m_prefixes;
}
bool RadvdInterface::IsSendAdvert () const
{
+ NS_LOG_FUNCTION (this);
return m_sendAdvert;
}
void RadvdInterface::SetSendAdvert (bool sendAdvert)
{
+ NS_LOG_FUNCTION (this << sendAdvert);
m_sendAdvert = sendAdvert;
}
uint32_t RadvdInterface::GetMaxRtrAdvInterval () const
{
+ NS_LOG_FUNCTION (this);
return m_maxRtrAdvInterval;
}
void RadvdInterface::SetMaxRtrAdvInterval (uint32_t maxRtrAdvInterval)
{
+ NS_LOG_FUNCTION (this << maxRtrAdvInterval);
m_maxRtrAdvInterval = maxRtrAdvInterval;
}
uint32_t RadvdInterface::GetMinRtrAdvInterval () const
{
+ NS_LOG_FUNCTION (this);
return m_minRtrAdvInterval;
}
void RadvdInterface::SetMinRtrAdvInterval (uint32_t minRtrAdvInterval)
{
+ NS_LOG_FUNCTION (this << minRtrAdvInterval);
m_minRtrAdvInterval = minRtrAdvInterval;
}
uint32_t RadvdInterface::GetMinDelayBetweenRAs () const
{
+ NS_LOG_FUNCTION (this);
return m_minDelayBetweenRAs;
}
void RadvdInterface::SetMinDelayBetweenRAs (uint32_t minDelayBetweenRAs)
{
+ NS_LOG_FUNCTION (this << minDelayBetweenRAs);
m_minDelayBetweenRAs = minDelayBetweenRAs;
}
bool RadvdInterface::IsManagedFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_managedFlag;
}
void RadvdInterface::SetManagedFlag (bool managedFlag)
{
+ NS_LOG_FUNCTION (this << managedFlag);
m_managedFlag = managedFlag;
}
bool RadvdInterface::IsOtherConfigFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_otherConfigFlag;
}
void RadvdInterface::SetOtherConfigFlag (bool otherConfigFlag)
{
+ NS_LOG_FUNCTION (this << otherConfigFlag);
m_otherConfigFlag = otherConfigFlag;
}
uint32_t RadvdInterface::GetLinkMtu () const
{
+ NS_LOG_FUNCTION (this);
return m_linkMtu;
}
void RadvdInterface::SetLinkMtu (uint32_t linkMtu)
{
+ NS_LOG_FUNCTION (this << linkMtu);
m_linkMtu = linkMtu;
}
uint32_t RadvdInterface::GetReachableTime () const
{
+ NS_LOG_FUNCTION (this);
return m_reachableTime;
}
void RadvdInterface::SetReachableTime (uint32_t reachableTime)
{
+ NS_LOG_FUNCTION (this << reachableTime);
m_reachableTime = reachableTime;
}
uint32_t RadvdInterface::GetDefaultLifeTime () const
{
+ NS_LOG_FUNCTION (this);
return m_defaultLifeTime;
}
void RadvdInterface::SetDefaultLifeTime (uint32_t defaultLifeTime)
{
+ NS_LOG_FUNCTION (this << defaultLifeTime);
m_defaultLifeTime = defaultLifeTime;
}
uint32_t RadvdInterface::GetRetransTimer () const
{
+ NS_LOG_FUNCTION (this);
return m_retransTimer;
}
void RadvdInterface::SetRetransTimer (uint32_t retransTimer)
{
+ NS_LOG_FUNCTION (this << retransTimer);
m_retransTimer = retransTimer;
}
uint8_t RadvdInterface::GetCurHopLimit () const
{
+ NS_LOG_FUNCTION (this);
return m_curHopLimit;
}
void RadvdInterface::SetCurHopLimit (uint8_t curHopLimit)
{
+ NS_LOG_FUNCTION (this << curHopLimit);
m_curHopLimit = curHopLimit;
}
uint8_t RadvdInterface::GetDefaultPreference () const
{
+ NS_LOG_FUNCTION (this);
return m_defaultPreference;
}
void RadvdInterface::SetDefaultPreference (uint8_t defaultPreference)
{
+ NS_LOG_FUNCTION (this << defaultPreference);
m_defaultPreference = defaultPreference;
}
bool RadvdInterface::IsSourceLLAddress () const
{
+ NS_LOG_FUNCTION (this);
return m_sourceLLAddress;
}
void RadvdInterface::SetSourceLLAddress (bool sourceLLAddress)
{
+ NS_LOG_FUNCTION (this << sourceLLAddress);
m_sourceLLAddress = sourceLLAddress;
}
bool RadvdInterface::IsHomeAgentFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_homeAgentFlag;
}
void RadvdInterface::SetHomeAgentFlag (bool homeAgentFlag)
{
+ NS_LOG_FUNCTION (this << homeAgentFlag);
m_homeAgentFlag = homeAgentFlag;
}
bool RadvdInterface::IsHomeAgentInfo () const
{
+ NS_LOG_FUNCTION (this);
return m_homeAgentInfo;
}
void RadvdInterface::SetHomeAgentInfo (bool homeAgentInfo)
{
+ NS_LOG_FUNCTION (this << homeAgentInfo);
m_homeAgentInfo = homeAgentInfo;
}
uint32_t RadvdInterface::GetHomeAgentLifeTime () const
{
+ NS_LOG_FUNCTION (this);
return m_homeAgentLifeTime;
}
void RadvdInterface::SetHomeAgentLifeTime (uint32_t homeAgentLifeTime)
{
+ NS_LOG_FUNCTION (this << homeAgentLifeTime);
m_homeAgentLifeTime = homeAgentLifeTime;
}
uint32_t RadvdInterface::GetHomeAgentPreference () const
{
+ NS_LOG_FUNCTION (this);
return m_homeAgentPreference;
}
void RadvdInterface::SetHomeAgentPreference (uint32_t homeAgentPreference)
{
+ NS_LOG_FUNCTION (this << homeAgentPreference);
m_homeAgentPreference = homeAgentPreference;
}
bool RadvdInterface::IsMobRtrSupportFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_mobRtrSupportFlag;
}
void RadvdInterface::SetMobRtrSupportFlag (bool mobRtrSupportFlag)
{
+ NS_LOG_FUNCTION (this << mobRtrSupportFlag);
m_mobRtrSupportFlag = mobRtrSupportFlag;
}
bool RadvdInterface::IsIntervalOpt () const
{
+ NS_LOG_FUNCTION (this);
return m_intervalOpt;
}
void RadvdInterface::SetIntervalOpt (bool intervalOpt)
{
+ NS_LOG_FUNCTION (this << intervalOpt);
m_intervalOpt = intervalOpt;
}
} /* namespace ns3 */
diff --git a/src/applications/model/radvd-prefix.cc b/src/applications/model/radvd-prefix.cc
index 7d7de505c..c025a9dfd 100644
--- a/src/applications/model/radvd-prefix.cc
+++ b/src/applications/model/radvd-prefix.cc
@@ -19,10 +19,13 @@
*/
#include "radvd-prefix.h"
+#include
namespace ns3
{
+NS_LOG_COMPONENT_DEFINE ("RadvdPrefix");
+
RadvdPrefix::RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime, uint32_t validLifeTime, bool onLinkFlag, bool autonomousFlag, bool routerAddrFlag)
: m_network (network),
m_prefixLength (prefixLength),
@@ -32,79 +35,95 @@ RadvdPrefix::RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t pr
m_autonomousFlag (autonomousFlag),
m_routerAddrFlag (routerAddrFlag)
{
+ NS_LOG_FUNCTION (this << network << prefixLength << preferredLifeTime << validLifeTime << onLinkFlag << autonomousFlag << routerAddrFlag);
}
RadvdPrefix::~RadvdPrefix ()
{
+ NS_LOG_FUNCTION (this);
}
Ipv6Address RadvdPrefix::GetNetwork () const
{
+ NS_LOG_FUNCTION (this);
return m_network;
}
void RadvdPrefix::SetNetwork (Ipv6Address network)
{
+ NS_LOG_FUNCTION (this << network);
m_network = network;
}
uint8_t RadvdPrefix::GetPrefixLength () const
{
+ NS_LOG_FUNCTION (this);
return m_prefixLength;
}
void RadvdPrefix::SetPrefixLength (uint8_t prefixLength)
{
+ NS_LOG_FUNCTION (this << prefixLength);
m_prefixLength = prefixLength;
}
uint32_t RadvdPrefix::GetValidLifeTime () const
{
+ NS_LOG_FUNCTION (this);
return m_validLifeTime;
}
void RadvdPrefix::SetValidLifeTime (uint32_t validLifeTime)
{
+ NS_LOG_FUNCTION (this << validLifeTime);
m_validLifeTime = validLifeTime;
}
uint32_t RadvdPrefix::GetPreferredLifeTime () const
{
+ NS_LOG_FUNCTION (this);
return m_preferredLifeTime;
}
void RadvdPrefix::SetPreferredLifeTime (uint32_t preferredLifeTime)
{
+ NS_LOG_FUNCTION (this << preferredLifeTime);
m_preferredLifeTime = preferredLifeTime;
}
bool RadvdPrefix::IsOnLinkFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_onLinkFlag;
}
void RadvdPrefix::SetOnLinkFlag (bool onLinkFlag)
{
+ NS_LOG_FUNCTION (this << onLinkFlag);
m_onLinkFlag = onLinkFlag;
}
bool RadvdPrefix::IsAutonomousFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_autonomousFlag;
}
void RadvdPrefix::SetAutonomousFlag (bool autonomousFlag)
{
+ NS_LOG_FUNCTION (this << autonomousFlag);
m_autonomousFlag = autonomousFlag;
}
bool RadvdPrefix::IsRouterAddrFlag () const
{
+ NS_LOG_FUNCTION (this);
return m_routerAddrFlag;
}
void RadvdPrefix::SetRouterAddrFlag (bool routerAddrFlag)
{
+ NS_LOG_FUNCTION (this << routerAddrFlag);
m_routerAddrFlag = routerAddrFlag;
}
diff --git a/src/applications/model/radvd.cc b/src/applications/model/radvd.cc
index f6c6ad531..c7eee39bf 100644
--- a/src/applications/model/radvd.cc
+++ b/src/applications/model/radvd.cc
@@ -60,12 +60,12 @@ TypeId Radvd::GetTypeId ()
Radvd::Radvd ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
}
Radvd::~Radvd ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
for (RadvdInterfaceListI it = m_configurations.begin (); it != m_configurations.end (); ++it)
{
*it = 0;
@@ -76,13 +76,13 @@ Radvd::~Radvd ()
void Radvd::DoDispose ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Application::DoDispose ();
}
void Radvd::StartApplication ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (!m_socket)
{
@@ -106,7 +106,7 @@ void Radvd::StartApplication ()
void Radvd::StopApplication ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_socket)
{
@@ -122,6 +122,7 @@ void Radvd::StopApplication ()
void Radvd::AddConfiguration (Ptr routerInterface)
{
+ NS_LOG_FUNCTION (this << routerInterface);
m_configurations.push_back (routerInterface);
}
@@ -135,13 +136,13 @@ Radvd:: AssignStreams (int64_t stream)
void Radvd::ScheduleTransmit (Time dt, Ptr config, EventId& eventId, Ipv6Address dst, bool reschedule)
{
- NS_LOG_FUNCTION (this << dt);
+ NS_LOG_FUNCTION (this << dt << config << &eventId << dst << reschedule);
eventId = Simulator::Schedule (dt, &Radvd::Send, this, config, dst, reschedule);
}
void Radvd::Send (Ptr config, Ipv6Address dst, bool reschedule)
{
- NS_LOG_FUNCTION (this << dst);
+ NS_LOG_FUNCTION (this << dst << reschedule);
NS_ASSERT (m_eventIds[config->GetInterface ()].IsExpired ());
Icmpv6RA raHdr;
Icmpv6OptionLinkLayerAddress llaHdr;
diff --git a/src/applications/model/seq-ts-header.cc b/src/applications/model/seq-ts-header.cc
index f22976edf..437dfbd7e 100644
--- a/src/applications/model/seq-ts-header.cc
+++ b/src/applications/model/seq-ts-header.cc
@@ -34,22 +34,26 @@ SeqTsHeader::SeqTsHeader ()
: m_seq (0),
m_ts (Simulator::Now ().GetTimeStep ())
{
+ NS_LOG_FUNCTION (this);
}
void
SeqTsHeader::SetSeq (uint32_t seq)
{
+ NS_LOG_FUNCTION (this << seq);
m_seq = seq;
}
uint32_t
SeqTsHeader::GetSeq (void) const
{
+ NS_LOG_FUNCTION (this);
return m_seq;
}
Time
SeqTsHeader::GetTs (void) const
{
+ NS_LOG_FUNCTION (this);
return TimeStep (m_ts);
}
@@ -70,17 +74,20 @@ SeqTsHeader::GetInstanceTypeId (void) const
void
SeqTsHeader::Print (std::ostream &os) const
{
+ NS_LOG_FUNCTION (this << &os);
os << "(seq=" << m_seq << " time=" << TimeStep (m_ts).GetSeconds () << ")";
}
uint32_t
SeqTsHeader::GetSerializedSize (void) const
{
+ NS_LOG_FUNCTION (this);
return 4+8;
}
void
SeqTsHeader::Serialize (Buffer::Iterator start) const
{
+ NS_LOG_FUNCTION (this << &start);
Buffer::Iterator i = start;
i.WriteHtonU32 (m_seq);
i.WriteHtonU64 (m_ts);
@@ -88,6 +95,7 @@ SeqTsHeader::Serialize (Buffer::Iterator start) const
uint32_t
SeqTsHeader::Deserialize (Buffer::Iterator start)
{
+ NS_LOG_FUNCTION (this << &start);
Buffer::Iterator i = start;
m_seq = i.ReadNtohU32 ();
m_ts = i.ReadNtohU64 ();
diff --git a/src/applications/model/udp-client.cc b/src/applications/model/udp-client.cc
index d46848bbd..06c711cec 100644
--- a/src/applications/model/udp-client.cc
+++ b/src/applications/model/udp-client.cc
@@ -30,8 +30,8 @@
#include "ns3/uinteger.h"
#include "udp-client.h"
#include "seq-ts-header.h"
-#include
-#include
+#include
+#include
namespace ns3 {
@@ -74,7 +74,7 @@ UdpClient::GetTypeId (void)
UdpClient::UdpClient ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
m_sent = 0;
m_socket = 0;
m_sendEvent = EventId ();
@@ -82,12 +82,13 @@ UdpClient::UdpClient ()
UdpClient::~UdpClient ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
}
void
UdpClient::SetRemote (Ipv4Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_peerAddress = Address(ip);
m_peerPort = port;
}
@@ -95,6 +96,7 @@ UdpClient::SetRemote (Ipv4Address ip, uint16_t port)
void
UdpClient::SetRemote (Ipv6Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_peerAddress = Address(ip);
m_peerPort = port;
}
@@ -102,6 +104,7 @@ UdpClient::SetRemote (Ipv6Address ip, uint16_t port)
void
UdpClient::SetRemote (Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_peerAddress = ip;
m_peerPort = port;
}
@@ -109,14 +112,14 @@ UdpClient::SetRemote (Address ip, uint16_t port)
void
UdpClient::DoDispose (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Application::DoDispose ();
}
void
UdpClient::StartApplication (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_socket == 0)
{
@@ -139,16 +142,16 @@ UdpClient::StartApplication (void)
}
void
-UdpClient::StopApplication ()
+UdpClient::StopApplication (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Simulator::Cancel (m_sendEvent);
}
void
UdpClient::Send (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
NS_ASSERT (m_sendEvent.IsExpired ());
SeqTsHeader seqTs;
seqTs.SetSeq (m_sent);
diff --git a/src/applications/model/udp-echo-client.cc b/src/applications/model/udp-echo-client.cc
index 9c71d664e..29b3f85d5 100644
--- a/src/applications/model/udp-echo-client.cc
+++ b/src/applications/model/udp-echo-client.cc
@@ -73,7 +73,7 @@ UdpEchoClient::GetTypeId (void)
UdpEchoClient::UdpEchoClient ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
m_sent = 0;
m_socket = 0;
m_sendEvent = EventId ();
@@ -83,7 +83,7 @@ UdpEchoClient::UdpEchoClient ()
UdpEchoClient::~UdpEchoClient()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
m_socket = 0;
delete [] m_data;
@@ -94,6 +94,7 @@ UdpEchoClient::~UdpEchoClient()
void
UdpEchoClient::SetRemote (Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_peerAddress = ip;
m_peerPort = port;
}
@@ -101,6 +102,7 @@ UdpEchoClient::SetRemote (Address ip, uint16_t port)
void
UdpEchoClient::SetRemote (Ipv4Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_peerAddress = Address (ip);
m_peerPort = port;
}
@@ -108,6 +110,7 @@ UdpEchoClient::SetRemote (Ipv4Address ip, uint16_t port)
void
UdpEchoClient::SetRemote (Ipv6Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_peerAddress = Address (ip);
m_peerPort = port;
}
@@ -115,14 +118,14 @@ UdpEchoClient::SetRemote (Ipv6Address ip, uint16_t port)
void
UdpEchoClient::DoDispose (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Application::DoDispose ();
}
void
UdpEchoClient::StartApplication (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_socket == 0)
{
@@ -148,7 +151,7 @@ UdpEchoClient::StartApplication (void)
void
UdpEchoClient::StopApplication ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_socket != 0)
{
@@ -163,7 +166,7 @@ UdpEchoClient::StopApplication ()
void
UdpEchoClient::SetDataSize (uint32_t dataSize)
{
- NS_LOG_FUNCTION (dataSize);
+ NS_LOG_FUNCTION (this << dataSize);
//
// If the client is setting the echo packet data size this way, we infer
@@ -179,14 +182,14 @@ UdpEchoClient::SetDataSize (uint32_t dataSize)
uint32_t
UdpEchoClient::GetDataSize (void) const
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
return m_size;
}
void
UdpEchoClient::SetFill (std::string fill)
{
- NS_LOG_FUNCTION (fill);
+ NS_LOG_FUNCTION (this << fill);
uint32_t dataSize = fill.size () + 1;
@@ -208,6 +211,7 @@ UdpEchoClient::SetFill (std::string fill)
void
UdpEchoClient::SetFill (uint8_t fill, uint32_t dataSize)
{
+ NS_LOG_FUNCTION (this << fill << dataSize);
if (dataSize != m_dataSize)
{
delete [] m_data;
@@ -226,6 +230,7 @@ UdpEchoClient::SetFill (uint8_t fill, uint32_t dataSize)
void
UdpEchoClient::SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize)
{
+ NS_LOG_FUNCTION (this << fill << fillSize << dataSize);
if (dataSize != m_dataSize)
{
delete [] m_data;
@@ -264,14 +269,14 @@ UdpEchoClient::SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize)
void
UdpEchoClient::ScheduleTransmit (Time dt)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this << dt);
m_sendEvent = Simulator::Schedule (dt, &UdpEchoClient::Send, this);
}
void
UdpEchoClient::Send (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
NS_ASSERT (m_sendEvent.IsExpired ());
diff --git a/src/applications/model/udp-echo-server.cc b/src/applications/model/udp-echo-server.cc
index 4da3a54d3..f02d3d1a4 100644
--- a/src/applications/model/udp-echo-server.cc
+++ b/src/applications/model/udp-echo-server.cc
@@ -53,12 +53,12 @@ UdpEchoServer::GetTypeId (void)
UdpEchoServer::UdpEchoServer ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
}
UdpEchoServer::~UdpEchoServer()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
m_socket = 0;
m_socket6 = 0;
}
@@ -66,14 +66,14 @@ UdpEchoServer::~UdpEchoServer()
void
UdpEchoServer::DoDispose (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Application::DoDispose ();
}
void
UdpEchoServer::StartApplication (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_socket == 0)
{
@@ -124,7 +124,7 @@ UdpEchoServer::StartApplication (void)
void
UdpEchoServer::StopApplication ()
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
if (m_socket != 0)
{
@@ -141,6 +141,8 @@ UdpEchoServer::StopApplication ()
void
UdpEchoServer::HandleRead (Ptr socket)
{
+ NS_LOG_FUNCTION (this << socket);
+
Ptr packet;
Address from;
while ((packet = socket->RecvFrom (from)))
@@ -155,7 +157,7 @@ UdpEchoServer::HandleRead (Ptr socket)
{
NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s server received " << packet->GetSize () << " bytes from " <<
Inet6SocketAddress::ConvertFrom (from).GetIpv6 () << " port " <<
- InetSocketAddress::ConvertFrom (from).GetPort ());
+ Inet6SocketAddress::ConvertFrom (from).GetPort ());
}
packet->RemoveAllPacketTags ();
@@ -174,7 +176,7 @@ UdpEchoServer::HandleRead (Ptr socket)
{
NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s server sent " << packet->GetSize () << " bytes to " <<
Inet6SocketAddress::ConvertFrom (from).GetIpv6 () << " port " <<
- InetSocketAddress::ConvertFrom (from).GetPort ());
+ Inet6SocketAddress::ConvertFrom (from).GetPort ());
}
}
}
diff --git a/src/applications/model/udp-server.cc b/src/applications/model/udp-server.cc
index 28eb232c7..4655844d6 100644
--- a/src/applications/model/udp-server.cc
+++ b/src/applications/model/udp-server.cc
@@ -76,27 +76,29 @@ UdpServer::~UdpServer ()
uint16_t
UdpServer::GetPacketWindowSize () const
{
+ NS_LOG_FUNCTION (this);
return m_lossCounter.GetBitMapSize ();
}
void
UdpServer::SetPacketWindowSize (uint16_t size)
{
+ NS_LOG_FUNCTION (this << size);
m_lossCounter.SetBitMapSize (size);
}
uint32_t
UdpServer::GetLost (void) const
{
+ NS_LOG_FUNCTION (this);
return m_lossCounter.GetLost ();
}
uint32_t
UdpServer::GetReceived (void) const
{
-
+ NS_LOG_FUNCTION (this);
return m_received;
-
}
void
diff --git a/src/applications/model/udp-trace-client.cc b/src/applications/model/udp-trace-client.cc
index 1688e4d03..fa155ffc9 100644
--- a/src/applications/model/udp-trace-client.cc
+++ b/src/applications/model/udp-trace-client.cc
@@ -31,8 +31,8 @@
#include "ns3/string.h"
#include "seq-ts-header.h"
#include "udp-trace-client.h"
-#include
-#include
+#include
+#include
#include
namespace ns3 {
@@ -119,6 +119,7 @@ UdpTraceClient::~UdpTraceClient ()
void
UdpTraceClient::SetRemote (Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_entries.clear ();
m_peerAddress = ip;
m_peerPort = port;
@@ -127,6 +128,7 @@ UdpTraceClient::SetRemote (Address ip, uint16_t port)
void
UdpTraceClient::SetRemote (Ipv4Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_entries.clear ();
m_peerAddress = Address (ip);
m_peerPort = port;
@@ -135,6 +137,7 @@ UdpTraceClient::SetRemote (Ipv4Address ip, uint16_t port)
void
UdpTraceClient::SetRemote (Ipv6Address ip, uint16_t port)
{
+ NS_LOG_FUNCTION (this << ip << port);
m_entries.clear ();
m_peerAddress = Address (ip);
m_peerPort = port;
@@ -143,6 +146,7 @@ UdpTraceClient::SetRemote (Ipv6Address ip, uint16_t port)
void
UdpTraceClient::SetTraceFile (std::string traceFile)
{
+ NS_LOG_FUNCTION (this << traceFile);
if (traceFile == "")
{
LoadDefaultTrace ();
@@ -156,12 +160,14 @@ UdpTraceClient::SetTraceFile (std::string traceFile)
void
UdpTraceClient::SetMaxPacketSize (uint16_t maxPacketSize)
{
+ NS_LOG_FUNCTION (this << maxPacketSize);
m_maxPacketSize = maxPacketSize;
}
uint16_t UdpTraceClient::GetMaxPacketSize (void)
{
+ NS_LOG_FUNCTION (this);
return m_maxPacketSize;
}
@@ -169,7 +175,7 @@ uint16_t UdpTraceClient::GetMaxPacketSize (void)
void
UdpTraceClient::DoDispose (void)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (this);
Application::DoDispose ();
}
diff --git a/src/applications/model/v4ping.cc b/src/applications/model/v4ping.cc
index 5201c0e30..35f93aa41 100644
--- a/src/applications/model/v4ping.cc
+++ b/src/applications/model/v4ping.cc
@@ -69,9 +69,11 @@ V4Ping::V4Ping ()
m_verbose (false),
m_recv (0)
{
+ NS_LOG_FUNCTION (this);
}
V4Ping::~V4Ping ()
{
+ NS_LOG_FUNCTION (this);
}
void
@@ -85,6 +87,7 @@ V4Ping::DoDispose (void)
uint32_t
V4Ping::GetApplicationId (void) const
{
+ NS_LOG_FUNCTION (this);
Ptr node = GetNode ();
for (uint32_t i = 0; i < node->GetNApplications (); ++i)
{
@@ -165,6 +168,7 @@ V4Ping::Receive (Ptr socket)
void
V4Ping::Write32 (uint8_t *buffer, const uint32_t data)
{
+ NS_LOG_FUNCTION (this << buffer << data);
buffer[0] = (data >> 0) & 0xff;
buffer[1] = (data >> 8) & 0xff;
buffer[2] = (data >> 16) & 0xff;
@@ -175,13 +179,16 @@ V4Ping::Write32 (uint8_t *buffer, const uint32_t data)
void
V4Ping::Read32 (const uint8_t *buffer, uint32_t &data)
{
+ NS_LOG_FUNCTION (this << buffer << data);
data = (buffer[3] << 24) + (buffer[2] << 16) + (buffer[1] << 8) + buffer[0];
}
void
V4Ping::Send ()
{
- NS_LOG_FUNCTION (m_seq);
+ NS_LOG_FUNCTION (this);
+
+ NS_LOG_INFO ("m_seq=" << m_seq);
Ptr p = Create ();
Icmpv4Echo echo;
echo.SetSequenceNumber (m_seq);
diff --git a/src/applications/test/udp-client-server-test.cc b/src/applications/test/udp-client-server-test.cc
index 29963e542..c767bbc15 100644
--- a/src/applications/test/udp-client-server-test.cc
+++ b/src/applications/test/udp-client-server-test.cc
@@ -340,10 +340,10 @@ public:
UdpClientServerTestSuite::UdpClientServerTestSuite ()
: TestSuite ("udp-client-server", UNIT)
{
- AddTestCase (new UdpTraceClientServerTestCase);
- AddTestCase (new UdpClientServerTestCase);
- AddTestCase (new PacketLossCounterTestCase);
- AddTestCase (new UdpEchoClientSetFillTestCase);
+ AddTestCase (new UdpTraceClientServerTestCase, TestCase::QUICK);
+ AddTestCase (new UdpClientServerTestCase, TestCase::QUICK);
+ AddTestCase (new PacketLossCounterTestCase, TestCase::QUICK);
+ AddTestCase (new UdpEchoClientSetFillTestCase, TestCase::QUICK);
}
static UdpClientServerTestSuite udpClientServerTestSuite;
diff --git a/src/applications/wscript b/src/applications/wscript
index 684d1ce90..c07a5b0b2 100644
--- a/src/applications/wscript
+++ b/src/applications/wscript
@@ -32,7 +32,7 @@ def build(bld):
'test/udp-client-server-test.cc',
]
- headers = bld.new_task_gen(features=['ns3header'])
+ headers = bld(features='ns3header')
headers.module = 'applications'
headers.source = [
'model/bulk-send-application.h',
diff --git a/src/bridge/bindings/modulegen__gcc_ILP32.py b/src/bridge/bindings/modulegen__gcc_ILP32.py
index 66e6e82e6..083bd2cd9 100644
--- a/src/bridge/bindings/modulegen__gcc_ILP32.py
+++ b/src/bridge/bindings/modulegen__gcc_ILP32.py
@@ -1392,8 +1392,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -1404,8 +1404,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
diff --git a/src/bridge/bindings/modulegen__gcc_LP64.py b/src/bridge/bindings/modulegen__gcc_LP64.py
index 66e6e82e6..083bd2cd9 100644
--- a/src/bridge/bindings/modulegen__gcc_LP64.py
+++ b/src/bridge/bindings/modulegen__gcc_LP64.py
@@ -1392,8 +1392,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -1404,8 +1404,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
diff --git a/src/bridge/wscript b/src/bridge/wscript
index 8ff5e22af..d02ac7476 100644
--- a/src/bridge/wscript
+++ b/src/bridge/wscript
@@ -7,7 +7,7 @@ def build(bld):
'model/bridge-channel.cc',
'helper/bridge-helper.cc',
]
- headers = bld.new_task_gen(features=['ns3header'])
+ headers = bld(features='ns3header')
headers.module = 'bridge'
headers.source = [
'model/bridge-net-device.h',
@@ -16,6 +16,6 @@ def build(bld):
]
if bld.env['ENABLE_EXAMPLES']:
- bld.add_subdirs('examples')
+ bld.recurse('examples')
bld.ns3_python_bindings()
diff --git a/src/brite/doc/brite.rst b/src/brite/doc/brite.rst
new file mode 100644
index 000000000..f058cef44
--- /dev/null
+++ b/src/brite/doc/brite.rst
@@ -0,0 +1,144 @@
+.. include:: replace.txt
+
+BRITE Integration
+------------------
+
+This model implements an interface to BRITE, the Boston university
+Representative Internet Topology gEnerator [1]_. BRITE is a standard tool for
+generating realistic internet topologies. The ns-3 model, described herein,
+provides a helper class to facilitate generating ns-3 specific topologies
+using BRITE configuration files. BRITE builds the original graph which is
+stored as nodes and edges in the ns-3 BriteTopolgyHelper class. In the ns-3
+integration of BRITE, the generator generates a topology and then provides
+access to leaf nodes for each AS generated. ns-3 users can than attach
+custom topologies to these leaf nodes either by creating them manually or
+using topology generators provided in ns-3.
+
+There are three major types of topologies available in BRITE: Router,
+AS, and Hierarchical which is a combination of AS and Router. For the
+purposes of ns-3 simulation, the most useful are likely to be Router and
+Hierarchical. Router level topologies be generated using either the Waxman
+model or the Barabasi-Albert model. Each model has different parameters that
+effect topology creation. For flat router topologies, all nodes are considered
+to be in the same AS.
+
+BRITE Hierarchical topologies contain two levels. The first is the AS level.
+This level can be also be created by using either the Waxman model or the
+Barabasi-Albert model. Then for each node in the AS topology, a router level
+topology is constructed. These router level topologies can again either use
+the Waxman model or the Barbasi-Albert model. BRITE interconnects these separate
+router topologies as specified by the AS level topology. Once the hierarchical
+topology is constructed, it is flattened into a large router level topology.
+
+Further information can be found in the BRITE user manual:::
+
+ http://www.cs.bu.edu/brite/publications/usermanual.pdf
+
+Model Description
+*****************
+
+The model relies on building an external BRITE library,
+and then building some ns-3 helpers that call out to the library.
+The source code for the ns-3 helpers lives in the directory
+``src/brite/helper``.
+
+Design
+======
+
+To generate the BRITE topology, ns-3 helpers call out to the external BRITE library,
+and using a standard BRITE configuration file, the BRITE code builds a graph with nodes
+and edges according to this configuration file. Please see the BRITE documenation
+or the example configuration files in src/brite/examples/conf_files to get a better
+grasp of BRITE configuration options. The graph built by BRITE is returned to ns-3,
+and a ns-3 implementation of the graph is built. Leaf nodes for each AS are available
+for the user to either attach custom topologies or install ns-3 applications directly.
+
+
+References
+==========
+
+.. [1] Alberto Medina, Anukool Lakhina, Ibrahim Matta, and John Byers. BRITE: An Approach to Universal Topology Generation. In Proceedings of the International Workshop on Modeling, Analysis and Simulation of Computer and Telecommunications Systems- MASCOTS '01, Cincinnati, Ohio, August 2001.
+
+Usage
+*****
+
+The brite-generic-example can be referenced to see basic usage of the BRITE
+interface. In summary, the BriteTopologyHelper is used as the interface point
+by passing in a BRITE configuration file. Along with the configuration file a
+BRITE formatted random seed file can also be passed in. If a seed file is not
+passed in, the helper will create a seed file using ns-3's UniformRandomVariable.
+Once the topology has been generated by BRITE, BuildBriteTopology() is called to
+create the ns-3 representation. Next IP Address can be assigned to the topology
+using either AssignIpv4Addresses() or AssignIpv6Addresses(). It should be noted
+that each point-to-point link in the topology will be treated as a new network
+therefore for IPV4 a /30 subnet should be used to avoid wasting a large amount of
+the available address space.
+
+Example BRITE configuration files can be found in /src/brite/examples/conf_files/.
+ASBarbasi and ASWaxman are examples of AS only topologies. The RTBarabasi and
+RTWaxman files are examples of router only topologies. Finally the
+TD_ASBarabasi_RTWaxman configuration file is an example of a Hierarchical topology
+that uses the Barabasi-Albert model for the AS level and the Waxman model for each
+of the router level topologies. Information on the BRITE parameters used in these files
+can be found in the BRITE user manual.
+
+
+Building BRITE Integration
+==========================
+
+The first step is to download and build the ns-3 specific BRITE repository:::
+
+ $ hg clone http://code.nsnam.org/BRITE
+ $ cd BRITE
+ $ make
+
+This will build BRITE and create a library, libbrite.so, within the BRITE
+directory.
+
+Once BRITE has been built successfully, we proceed to configure ns-3 with
+BRITE support. Change to your ns-3 directory:::
+
+ $ ./waf configure --with-brite=/your/path/to/brite/source --enable-examples
+
+Make sure it says 'enabled' beside 'BRITE Integration'. If it does not, then
+something has gone wrong. Either you have forgotten to build BRITE first
+following the steps above, or ns-3 could not find your BRITE directory.
+
+Next, build ns-3:::
+
+ $ ./waf
+
+Examples
+========
+For an example demonstrating BRITE integration
+run:::
+
+ $ ./waf --run 'brite-generic-example'
+
+By enabling the verbose parameter, the example will print out the node and
+edge information in a similar format to standard BRITE output. There are
+many other command-line parameters including confFile, tracing, and nix, described below:
+
+ confFile: A BRITE configuration file. Many different BRITE configuration
+ file examples exist in the src/brite/examples/conf_files directory, for
+ example, RTBarabasi20.conf and RTWaxman.conf. Please refer to
+ the conf_files directory for more examples.
+
+ tracing: Enables ascii tracing.
+
+ nix: Enables nix-vector routing. Global routing is used by default.
+
+The generic BRITE example also support visualization using pyviz, assuming
+python bindings in ns-3 are enabled:::
+
+ $ ./waf --run brite-generic-example --vis
+
+Simulations involving BRITE can also be used with MPI. The total number of MPI instances is
+passed to the BRITE topology helper where a modulo divide is used to assign the nodes for each
+AS to a MPI instance. An example can be found in src/brite/examples:::
+
+ $ mpirun -np 2 ./waf --run brite-MPI-example
+
+Please see the ns-3 MPI documentation for information on setting up MPI with ns-3.
+
+
diff --git a/src/brite/examples/brite-MPI-example.cc b/src/brite/examples/brite-MPI-example.cc
new file mode 100644
index 000000000..9b13e7926
--- /dev/null
+++ b/src/brite/examples/brite-MPI-example.cc
@@ -0,0 +1,217 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include
+#include "ns3/core-module.h"
+#include "ns3/mpi-interface.h"
+#include "ns3/network-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/mobility-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/brite-module.h"
+#include "ns3/ipv4-nix-vector-helper.h"
+
+
+
+#include
+#include
+
+#ifdef NS3_MPI
+#include
+#endif
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("BriteMPITest");
+
+int
+main (int argc, char *argv[])
+{
+#ifdef NS3_MPI
+ // Distributed simulation setup
+ MpiInterface::Enable (&argc, &argv);
+ GlobalValue::Bind ("SimulatorImplementationType",
+ StringValue ("ns3::DistributedSimulatorImpl"));
+
+ LogComponentEnable ("BriteMPITest", LOG_LEVEL_ALL);
+ LogComponentEnable ("TcpSocketBase", LOG_LEVEL_INFO);
+
+ uint32_t systemId = MpiInterface::GetSystemId ();
+ uint32_t systemCount = MpiInterface::GetSize ();
+
+ // Check for valid distributed parameters.
+ // For just this particular example, must have 2 and only 2 Logical Processors (LPs)
+ NS_ASSERT_MSG (systemCount == 2, "This demonstration requires 2 and only 2 logical processors.");
+
+ // BRITE needs a configuration file to build its graph. By default, this
+ // example will use the TD_ASBarabasi_RTWaxman.conf file. There are many others
+ // which can be found in the BRITE/conf_files directory
+ std::string confFile = "src/brite/examples/conf_files/TD_ASBarabasi_RTWaxman.conf";
+ bool tracing = false;
+ bool nix = false;
+
+ CommandLine cmd;
+ cmd.AddValue ("confFile", "BRITE conf file", confFile);
+ cmd.AddValue ("tracing", "Enable or disable ascii tracing", tracing);
+ cmd.AddValue ("nix", "Enable or disable nix-vector routing", nix);
+
+ cmd.Parse (argc,argv);
+
+ // Invoke the BriteTopologyHelper and pass in a BRITE
+ // configuration file and a seed file. This will use
+ // BRITE to build a graph from which we can build the ns-3 topology
+ BriteTopologyHelper bth (confFile);
+
+ PointToPointHelper p2p;
+
+ Ipv4StaticRoutingHelper staticRouting;
+ Ipv4GlobalRoutingHelper globalRouting;
+ Ipv4ListRoutingHelper listRouting;
+ Ipv4NixVectorHelper nixRouting;
+
+ InternetStackHelper stack;
+
+ if (nix)
+ {
+ listRouting.Add (staticRouting, 0);
+ listRouting.Add (nixRouting, 10);
+ }
+ else
+ {
+ listRouting.Add (staticRouting, 0);
+ listRouting.Add (globalRouting, 10);
+ }
+
+ stack.SetRoutingHelper (listRouting);
+
+ Ipv4AddressHelper address;
+ address.SetBase ("10.0.0.0", "255.255.255.252");
+
+ //build topology as normal but also pass systemCount
+ bth.BuildBriteTopology (stack, systemCount);
+ bth.AssignIpv4Addresses (address);
+
+ NS_LOG_LOGIC ("Number of AS created " << bth.GetNAs ());
+
+ uint16_t port = 5001;
+
+ NodeContainer client;
+ NodeContainer server;
+
+ //For this example will use AS 0 and AS 1 which will be on seperate systems
+ //due to the mod divide used to assign AS to system.
+
+ //GetSystemNumberForAs (uint32_t) can be used to determine which system an
+ //AS is assigned to
+ NS_LOG_LOGIC ("AS 0 has been assigned to system " << bth.GetSystemNumberForAs (0));
+ NS_LOG_LOGIC ("As 1 has been assigned to system " << bth.GetSystemNumberForAs (1));
+
+ //install client node on last leaf node of AS 0
+ client.Add (CreateObject (0));
+ stack.Install (client);
+ int numLeafNodesInAsZero = bth.GetNLeafNodesForAs (0);
+ client.Add (bth.GetLeafNodeForAs (0, numLeafNodesInAsZero - 1));
+
+ //install server node on last leaf node on AS 1
+ server.Add (CreateObject (1));
+ stack.Install (server);
+ int numLeafNodesInAsOne = bth.GetNLeafNodesForAs (1);
+ server.Add (bth.GetLeafNodeForAs (1, numLeafNodesInAsOne - 1));
+
+ p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));
+
+ NetDeviceContainer p2pClientDevices;
+ NetDeviceContainer p2pServerDevices;
+
+ p2pClientDevices = p2p.Install (client);
+ p2pServerDevices = p2p.Install (server);
+
+ address.SetBase ("10.1.0.0", "255.255.0.0");
+ Ipv4InterfaceContainer clientInterfaces;
+ clientInterfaces = address.Assign (p2pClientDevices);
+
+ address.SetBase ("10.2.0.0", "255.255.0.0");
+ Ipv4InterfaceContainer serverInterfaces;
+ serverInterfaces = address.Assign (p2pServerDevices);
+
+ if (!nix)
+ {
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+ }
+
+ //only has two systems in this example. Install applications only on nodes in my system
+
+
+ //Moved here to get totalRX at end
+ ApplicationContainer sinkApps;
+
+ if (systemId == 1)
+ {
+
+ Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
+ PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", sinkLocalAddress);
+ sinkApps.Add (packetSinkHelper.Install (server.Get (0)));
+ sinkApps.Start (Seconds (0.0));
+ sinkApps.Stop (Seconds (10.0));
+ }
+
+ if (systemId == 0)
+ {
+ OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ());
+ clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
+ clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
+
+ ApplicationContainer clientApps;
+ AddressValue remoteAddress (InetSocketAddress (serverInterfaces.GetAddress (0), port));
+ clientHelper.SetAttribute ("Remote", remoteAddress);
+ clientApps.Add (clientHelper.Install (client.Get (0)));
+ clientApps.Start (Seconds (1.0)); // Start 1 second after sink
+ clientApps.Stop (Seconds (9.0)); // Stop before the sink
+ }
+
+ if (!nix)
+ {
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+ }
+
+ if (tracing)
+ {
+ AsciiTraceHelper ascii;
+ p2p.EnableAsciiAll (ascii.CreateFileStream ("briteLeaves.tr"));
+ }
+
+ // Run the simulator
+ Simulator::Stop (Seconds (200.0));
+ Simulator::Run ();
+ Simulator::Destroy ();
+
+ if (systemId == 1)
+ {
+ Ptr sink1 = DynamicCast (sinkApps.Get (0));
+ NS_LOG_DEBUG ("Total Bytes Received: " << sink1->GetTotalRx ());
+ }
+
+ MpiInterface::Disable ();
+
+ return 0;
+
+#else
+ NS_FATAL_ERROR ("Can't use distributed simulator without MPI compiled in");
+#endif
+}
diff --git a/src/brite/examples/brite-generic-example.cc b/src/brite/examples/brite-generic-example.cc
new file mode 100644
index 000000000..d6d60b1b2
--- /dev/null
+++ b/src/brite/examples/brite-generic-example.cc
@@ -0,0 +1,163 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include
+#include "ns3/core-module.h"
+#include "ns3/network-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/mobility-module.h"
+#include "ns3/applications-module.h"
+#include "ns3/brite-module.h"
+#include "ns3/ipv4-nix-vector-helper.h"
+#include
+#include
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("BriteExample");
+
+int
+main (int argc, char *argv[])
+{
+ LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_ALL);
+ LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_ALL);
+
+ LogComponentEnable ("BriteExample", LOG_LEVEL_ALL);
+
+ // BRITE needs a configuration file to build its graph. By default, this
+ // example will use the TD_ASBarabasi_RTWaxman.conf file. There are many others
+ // which can be found in the BRITE/conf_files directory
+ std::string confFile = "src/brite/examples/conf_files/TD_ASBarabasi_RTWaxman.conf";
+ bool tracing = false;
+ bool nix = false;
+
+ CommandLine cmd;
+ cmd.AddValue ("confFile", "BRITE conf file", confFile);
+ cmd.AddValue ("tracing", "Enable or disable ascii tracing", tracing);
+ cmd.AddValue ("nix", "Enable or disable nix-vector routing", nix);
+
+ cmd.Parse (argc,argv);
+
+ nix = false;
+
+ // Invoke the BriteTopologyHelper and pass in a BRITE
+ // configuration file and a seed file. This will use
+ // BRITE to build a graph from which we can build the ns-3 topology
+ BriteTopologyHelper bth (confFile);
+ bth.AssignStreams (3);
+
+ PointToPointHelper p2p;
+
+ Ipv4StaticRoutingHelper staticRouting;
+ Ipv4GlobalRoutingHelper globalRouting;
+ Ipv4ListRoutingHelper listRouting;
+ Ipv4NixVectorHelper nixRouting;
+
+ InternetStackHelper stack;
+
+ if (nix)
+ {
+ listRouting.Add (staticRouting, 0);
+ listRouting.Add (nixRouting, 10);
+ }
+ else
+ {
+ listRouting.Add (staticRouting, 0);
+ listRouting.Add (globalRouting, 10);
+ }
+
+ stack.SetRoutingHelper (listRouting);
+
+ Ipv4AddressHelper address;
+ address.SetBase ("10.0.0.0", "255.255.255.252");
+
+ bth.BuildBriteTopology (stack);
+ bth.AssignIpv4Addresses (address);
+
+ NS_LOG_INFO ("Number of AS created " << bth.GetNAs ());
+
+ //The BRITE topology generator generates a topology of routers. Here we create
+ //two subnetworks which we attach to router leaf nodes generated by BRITE
+ //Any NS3 topology may be used to attach to the BRITE leaf nodes but here we
+ //use just one node
+
+ NodeContainer client;
+ NodeContainer server;
+
+ client.Create (1);
+ stack.Install (client);
+
+ //install client node on last leaf node of AS 0
+ int numLeafNodesInAsZero = bth.GetNLeafNodesForAs (0);
+ client.Add (bth.GetLeafNodeForAs (0, numLeafNodesInAsZero - 1));
+
+ server.Create (1);
+ stack.Install (server);
+
+ //install server node on last leaf node on AS 1
+ int numLeafNodesInAsOne = bth.GetNLeafNodesForAs (1);
+ server.Add (bth.GetLeafNodeForAs (1, numLeafNodesInAsOne - 1));
+
+ p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));
+
+ NetDeviceContainer p2pClientDevices;
+ NetDeviceContainer p2pServerDevices;
+
+ p2pClientDevices = p2p.Install (client);
+ p2pServerDevices = p2p.Install (server);
+
+ address.SetBase ("10.1.0.0", "255.255.0.0");
+ Ipv4InterfaceContainer clientInterfaces;
+ clientInterfaces = address.Assign (p2pClientDevices);
+
+ address.SetBase ("10.2.0.0", "255.255.0.0");
+ Ipv4InterfaceContainer serverInterfaces;
+ serverInterfaces = address.Assign (p2pServerDevices);
+
+ UdpEchoServerHelper echoServer (9);
+ ApplicationContainer serverApps = echoServer.Install (server.Get (0));
+ serverApps.Start (Seconds (1.0));
+ serverApps.Stop (Seconds (5.0));
+
+ UdpEchoClientHelper echoClient (serverInterfaces.GetAddress (0), 9);
+ echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
+
+ ApplicationContainer clientApps = echoClient.Install (client.Get (0));
+ clientApps.Start (Seconds (2.0));
+ clientApps.Stop (Seconds (5.0));
+
+ if (!nix)
+ {
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+ }
+
+ if (tracing)
+ {
+ AsciiTraceHelper ascii;
+ p2p.EnableAsciiAll (ascii.CreateFileStream ("briteLeaves.tr"));
+ }
+ // Run the simulator
+ Simulator::Stop (Seconds (6.0));
+ Simulator::Run ();
+ Simulator::Destroy ();
+
+ return 0;
+}
diff --git a/src/brite/examples/conf_files/ASBarabasi.conf b/src/brite/examples/conf_files/ASBarabasi.conf
new file mode 100644
index 000000000..b75cb6de3
--- /dev/null
+++ b/src/brite/examples/conf_files/ASBarabasi.conf
@@ -0,0 +1,21 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 4 #Router Barabasi=2, AS Barabasi =4
+ N = 1000 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/ASWaxman.conf b/src/brite/examples/conf_files/ASWaxman.conf
new file mode 100644
index 000000000..ffed2b3f6
--- /dev/null
+++ b/src/brite/examples/conf_files/ASWaxman.conf
@@ -0,0 +1,23 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 3 #Router Waxman = 1, AS Waxman = 3
+ N = 1000 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTBarabasi.conf b/src/brite/examples/conf_files/RTBarabasi.conf
new file mode 100644
index 000000000..3b8a57e21
--- /dev/null
+++ b/src/brite/examples/conf_files/RTBarabasi.conf
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 100 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTBarabasi10.conf b/src/brite/examples/conf_files/RTBarabasi10.conf
new file mode 100644
index 000000000..52b0c3d54
--- /dev/null
+++ b/src/brite/examples/conf_files/RTBarabasi10.conf
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 10 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTBarabasi20.conf b/src/brite/examples/conf_files/RTBarabasi20.conf
new file mode 100644
index 000000000..0c3aef97e
--- /dev/null
+++ b/src/brite/examples/conf_files/RTBarabasi20.conf
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 20 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 1 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTBarabasi5.conf b/src/brite/examples/conf_files/RTBarabasi5.conf
new file mode 100644
index 000000000..1d47d9ae2
--- /dev/null
+++ b/src/brite/examples/conf_files/RTBarabasi5.conf
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 5 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTWaxman.conf b/src/brite/examples/conf_files/RTWaxman.conf
new file mode 100644
index 000000000..bcaa85ae6
--- /dev/null
+++ b/src/brite/examples/conf_files/RTWaxman.conf
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 1000 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 1 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTWaxman10.conf b/src/brite/examples/conf_files/RTWaxman10.conf
new file mode 100644
index 000000000..a2064be8d
--- /dev/null
+++ b/src/brite/examples/conf_files/RTWaxman10.conf
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 10 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTWaxman20.conf b/src/brite/examples/conf_files/RTWaxman20.conf
new file mode 100644
index 000000000..7e601bc17
--- /dev/null
+++ b/src/brite/examples/conf_files/RTWaxman20.conf
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 20 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/RTWaxman5.conf b/src/brite/examples/conf_files/RTWaxman5.conf
new file mode 100644
index 000000000..ce46dd5d6
--- /dev/null
+++ b/src/brite/examples/conf_files/RTWaxman5.conf
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 5 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
diff --git a/src/brite/examples/conf_files/TD_ASBarabasi_RTWaxman.conf b/src/brite/examples/conf_files/TD_ASBarabasi_RTWaxman.conf
new file mode 100644
index 000000000..65d8069f8
--- /dev/null
+++ b/src/brite/examples/conf_files/TD_ASBarabasi_RTWaxman.conf
@@ -0,0 +1,50 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+
+
+BeginModel
+ Name = 5 #Top Down = 5
+ edgeConn = 2 #Random=1, Smallest Nonleaf = 2, Smallest Deg = 3, k-Degree=4
+ k = -1 #Only needed if edgeConn is set to K-Degree, otherwise use -1
+ BWInter = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWInterMin = 10.0
+ BWInterMax = 1024.0
+ BWIntra = 3 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWIntraMin = 10.0
+ BWIntraMax = 1024.0
+EndModel
+
+BeginModel
+ Name = 4 #Router Barabasi=2, AS Barabasi =4
+ N = 2 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 1 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = -1.0
+ BWMax = -1.0
+EndModel
+
+BeginModel
+ Name = 1 #Router Waxman=2, AS Waxman =3
+ N = 20 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 2 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 1 #Number of neighboring node each new node connects to.
+ alpha = 0.5 #Waxman Parameter
+ beta = 0.8 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = -1.0
+ BWMax = -1.0
+EndModel
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
+
diff --git a/src/brite/examples/wscript b/src/brite/examples/wscript
new file mode 100644
index 000000000..24fe6f367
--- /dev/null
+++ b/src/brite/examples/wscript
@@ -0,0 +1,7 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+ obj = bld.create_ns3_program('brite-generic-example', ['brite', 'internet', 'point-to-point', 'nix-vector-routing', 'applications'])
+ obj.source = 'brite-generic-example.cc'
+ obj = bld.create_ns3_program('brite-MPI-example', ['brite', 'internet', 'point-to-point', 'nix-vector-routing', 'applications', 'mpi'])
+ obj.source = 'brite-MPI-example.cc'
diff --git a/src/brite/helper/brite-topology-helper.cc b/src/brite/helper/brite-topology-helper.cc
new file mode 100644
index 000000000..93ea94e5c
--- /dev/null
+++ b/src/brite/helper/brite-topology-helper.cc
@@ -0,0 +1,483 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include "ns3/log.h"
+#include "ns3/abort.h"
+#include "ns3/net-device.h"
+#include "ns3/net-device-container.h"
+#include "ns3/point-to-point-helper.h"
+#include "ns3/ipv4-address-helper.h"
+#include "ns3/random-variable-stream.h"
+#include "ns3/data-rate.h"
+#include "ns3/rng-seed-manager.h"
+
+#include "brite-topology-helper.h"
+
+#include
+#include
+
+NS_LOG_COMPONENT_DEFINE ("BriteTopologyHelper");
+
+namespace ns3 {
+
+BriteTopologyHelper::BriteTopologyHelper (std::string confFile,
+ std::string seedFile,
+ std::string newseedFile) : m_confFile (confFile),
+ m_seedFile (seedFile),
+ m_newSeedFile (newseedFile),
+ m_numAs (0),
+ m_topology (NULL),
+ m_numNodes (0),
+ m_numEdges (0)
+{
+ NS_LOG_FUNCTION (this);
+
+ m_uv = CreateObject ();
+
+}
+
+BriteTopologyHelper::BriteTopologyHelper (std::string confFile) : m_confFile (confFile),
+ m_numAs (0),
+ m_topology (NULL),
+ m_numNodes (0),
+ m_numEdges (0)
+{
+ NS_LOG_FUNCTION (this);
+
+ m_uv = CreateObject ();
+
+}
+
+BriteTopologyHelper::~BriteTopologyHelper ()
+{
+ NS_LOG_FUNCTION (this);
+ delete m_topology;
+
+ while (!m_netDevices.empty ())
+ {
+ delete m_netDevices.back ();
+ m_netDevices.pop_back ();
+ }
+
+ while (!m_asLeafNodes.empty ())
+ {
+ delete m_asLeafNodes.back ();
+ m_asLeafNodes.pop_back ();
+ }
+
+ while (!m_nodesByAs.empty ())
+ {
+ delete m_nodesByAs.back ();
+ m_nodesByAs.pop_back ();
+ }
+}
+
+void
+BriteTopologyHelper::AssignStreams (int64_t streamNumber)
+{
+ m_uv->SetStream (streamNumber);
+}
+
+void
+BriteTopologyHelper::BuildBriteNodeInfoList (void)
+{
+ NS_LOG_FUNCTION (this);
+ brite::Graph *g = m_topology->GetGraph ();
+ for (int i = 0; i < g->GetNumNodes (); ++i)
+ {
+ BriteNodeInfo nodeInfo;
+ nodeInfo.nodeId = g->GetNodePtr (i)->GetId ();
+ nodeInfo.xCoordinate = g->GetNodePtr (i)->GetNodeInfo ()->GetCoordX ();
+ nodeInfo.yCoordinate = g->GetNodePtr (i)->GetNodeInfo ()->GetCoordY ();
+ nodeInfo.inDegree = g->GetNodePtr (i)->GetInDegree ();
+ nodeInfo.outDegree = g->GetNodePtr (i)->GetOutDegree ();
+
+ switch (g->GetNodePtr (i)->GetNodeInfo ()->GetNodeType ())
+ {
+ case brite::NodeConf::RT_NODE:
+
+ if (((brite::RouterNodeConf*)(g->GetNodePtr (i)->GetNodeInfo ()))->GetASId () == -1)
+ {
+ m_numAs = nodeInfo.asId = 0;
+ }
+ else
+ {
+ m_numAs = nodeInfo.asId = ((brite::RouterNodeConf*)(g->GetNodePtr (i)->GetNodeInfo ()))->GetASId ();
+ }
+
+ switch (((brite::RouterNodeConf*)(g->GetNodePtr (i)->GetNodeInfo ()))->GetRouterType ())
+ {
+ case brite::RouterNodeConf::RT_NONE:
+ nodeInfo.type = "RT_NONE ";
+ break;
+ case brite::RouterNodeConf::RT_LEAF:
+ nodeInfo.type = "RT_LEAF ";
+ break;
+ case brite::RouterNodeConf::RT_BORDER:
+ nodeInfo.type = "RT_BORDER";
+ break;
+ case brite::RouterNodeConf::RT_STUB:
+ nodeInfo.type = "RT_STUB ";
+ break;
+ case brite::RouterNodeConf::RT_BACKBONE:
+ nodeInfo.type = "RT_BACKBONE ";
+ break;
+ default:
+ NS_FATAL_ERROR ("Topology::Output(): Improperly classfied Router node encountered...");
+ }
+ break;
+
+ case brite::NodeConf::AS_NODE:
+ m_numAs = nodeInfo.asId =
+ ((brite::ASNodeConf*)(g->GetNodePtr (i)->GetNodeInfo ()))->GetASId ();
+
+ switch (((brite::ASNodeConf*)(g->GetNodePtr (i)->GetNodeInfo ()))->GetASType ())
+ {
+ case brite::ASNodeConf::AS_NONE:
+ nodeInfo.type = "AS_NONE ";
+ break;
+ case brite::ASNodeConf::AS_LEAF:
+ nodeInfo.type = "AS_LEAF ";
+ break;
+ case brite::ASNodeConf::AS_STUB:
+ nodeInfo.type = "AS_STUB ";
+ break;
+ case brite::ASNodeConf::AS_BORDER:
+ nodeInfo.type = "AS_BORDER ";
+ break;
+ case brite::ASNodeConf::AS_BACKBONE:
+ nodeInfo.type = "AS_BACKBONE ";
+ break;
+ default:
+ NS_FATAL_ERROR ("Topology::Output(): Improperly classfied AS node encountered...");
+ }
+ break;
+ }
+
+ m_briteNodeInfoList.push_back (nodeInfo);
+ }
+
+ //Currently m_numAs stores the highest AS number. We want m_numAs to store the number
+ //of AS created in the topology. Since AS numbering starts at 0 we add one to get
+ //the correct count
+ m_numAs++;
+}
+
+void
+BriteTopologyHelper::BuildBriteEdgeInfoList (void)
+{
+ NS_LOG_FUNCTION (this);
+ brite::Graph *g = m_topology->GetGraph ();
+ std::list::iterator el;
+ std::list edgeList = g->GetEdges ();
+
+ for (el = edgeList.begin (); el != edgeList.end (); el++)
+ {
+ BriteEdgeInfo edgeInfo;
+ edgeInfo.edgeId = (*el)->GetId ();
+ edgeInfo.srcId = (*el)->GetSrc ()->GetId ();
+ edgeInfo.destId = (*el)->GetDst ()->GetId ();
+ edgeInfo.length = (*el)->Length ();
+
+ switch ((*el)->GetConf ()->GetEdgeType ())
+ {
+ case brite::EdgeConf::RT_EDGE:
+ edgeInfo.delay = ((brite::RouterEdgeConf*)((*el)->GetConf ()))->GetDelay ();
+ edgeInfo.bandwidth = (*el)->GetConf ()->GetBW ();
+ //If there is only one AS, BRITE will use -1 as AS Number. We want it to be 0 instead.
+ edgeInfo.asFrom = (((brite::RouterNodeConf*)((*el)->GetSrc ()->GetNodeInfo ()))->GetASId () == -1) ? 0 : ((brite::RouterNodeConf*)((*el)->GetSrc ()->GetNodeInfo ()))->GetASId ();
+ edgeInfo.asTo = (((brite::RouterNodeConf*)((*el)->GetDst ()->GetNodeInfo ()))->GetASId () == -1) ? 0 : ((brite::RouterNodeConf*)((*el)->GetDst ()->GetNodeInfo ()))->GetASId ();
+ break;
+
+ case brite::EdgeConf::AS_EDGE:
+ edgeInfo.delay = -1; /* No delay for AS Edges */
+ edgeInfo.bandwidth = (*el)->GetConf ()->GetBW ();
+ edgeInfo.asFrom = ((brite::ASNodeConf*)((*el)->GetSrc ()->GetNodeInfo ()))->GetASId ();
+ edgeInfo.asTo = ((brite::ASNodeConf*)((*el)->GetDst ()->GetNodeInfo ()))->GetASId ();
+ break;
+
+ default:
+ NS_FATAL_ERROR ("Topology::Output(): Invalid Edge type encountered...");
+ }
+
+ switch ((*el)->GetConf ()->GetEdgeType ())
+ {
+ case brite::EdgeConf::RT_EDGE:
+ switch (((brite::RouterEdgeConf*)(*el)->GetConf ())->GetRouterEdgeType ())
+ {
+ case brite::RouterEdgeConf::RT_NONE:
+ edgeInfo.type = "E_RT_NONE ";
+ break;
+ case brite::RouterEdgeConf::RT_STUB:
+ edgeInfo.type = "E_RT_STUB ";
+ break;
+ case brite::RouterEdgeConf::RT_BORDER:
+ edgeInfo.type = "E_RT_BORDER ";
+ break;
+ case brite::RouterEdgeConf::RT_BACKBONE:
+ edgeInfo.type = "E_RT_BACKBONE ";
+ break;
+ default:
+ NS_FATAL_ERROR ("Output(): Invalid router edge type...");
+ }
+ break;
+
+ case brite::EdgeConf::AS_EDGE:
+ switch (((brite::ASEdgeConf*)((*el)->GetConf ()))->GetASEdgeType ())
+ {
+ case brite::ASEdgeConf::AS_NONE:
+ edgeInfo.type = "E_AS_NONE ";
+ break;
+ case brite::ASEdgeConf::AS_STUB:
+ edgeInfo.type = "E_AS_STUB ";
+ break;
+ case brite::ASEdgeConf::AS_BORDER:
+ edgeInfo.type = "E_AS_BORDER ";
+ break;
+ case brite::ASEdgeConf::AS_BACKBONE:
+ edgeInfo.type = "E_AS_BACKBONE ";
+ break;
+ default:
+ NS_FATAL_ERROR ("BriteOutput(): Invalid AS edge type...");
+ }
+ break;
+
+ default:
+ NS_FATAL_ERROR ("BriteOutput(): Invalid edge type...");
+
+ }
+
+ m_briteEdgeInfoList.push_back (edgeInfo);
+ }
+}
+
+Ptr
+BriteTopologyHelper::GetLeafNodeForAs (uint32_t asNum, uint32_t leafNum)
+{
+ return m_asLeafNodes[asNum]->Get (leafNum);
+}
+
+Ptr
+BriteTopologyHelper::GetNodeForAs (uint32_t asNum, uint32_t nodeNum)
+{
+ return m_nodesByAs[asNum]->Get (nodeNum);
+}
+
+uint32_t
+BriteTopologyHelper::GetNNodesForAs (uint32_t asNum)
+{
+ return m_nodesByAs[asNum]->GetN ();
+}
+
+uint32_t
+BriteTopologyHelper::GetNLeafNodesForAs (uint32_t asNum)
+{
+ return m_asLeafNodes[asNum]->GetN ();
+}
+
+uint32_t
+BriteTopologyHelper::GetNNodesTopology () const
+{
+ return m_numNodes;
+}
+
+uint32_t
+BriteTopologyHelper::GetNEdgesTopology () const
+{
+ return m_numEdges;
+}
+
+uint32_t
+BriteTopologyHelper::GetNAs (void) const
+{
+ return m_numAs;
+}
+
+uint32_t
+BriteTopologyHelper::GetSystemNumberForAs (uint32_t asNum) const
+{
+ return m_systemForAs[asNum];
+}
+
+void BriteTopologyHelper::GenerateBriteTopology (void)
+{
+ NS_ASSERT_MSG (m_topology == NULL, "Brite Topology Already Created");
+
+ //check to see if need to generate seed file
+ bool generateSeedFile = m_seedFile.empty ();
+
+ if (generateSeedFile)
+ {
+ NS_LOG_LOGIC ("Generating BRITE Seed file");
+
+ std::ofstream seedFile;
+
+ //overwrite file if already there
+ seedFile.open ("briteSeedFile.txt", std::ios_base::out | std::ios_base::trunc);
+
+ //verify open
+ NS_ASSERT (!seedFile.fail ());
+
+ //Generate seed file expected by BRITE
+ //need unsigned shorts 0-65535
+ seedFile << "PLACES " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << std::endl;
+ seedFile << "CONNECT " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << std::endl;
+ seedFile << "EDGE_CONN " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << std::endl;
+ seedFile << "GROUPING " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << std::endl;
+ seedFile << "ASSIGNMENT " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << std::endl;
+ seedFile << "BANDWIDTH " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << " " << m_uv->GetInteger (0, 65535) << std::endl;
+ seedFile.close ();
+
+ //if we're using NS3 generated seed files don't want brite to create a new seed file.
+ m_seedFile = m_newSeedFile = "briteSeedFile.txt";
+ }
+
+ brite::Brite br (m_confFile, m_seedFile, m_newSeedFile);
+ m_topology = br.GetTopology ();
+ BuildBriteNodeInfoList ();
+ BuildBriteEdgeInfoList ();
+
+ //brite automatically spits out the seed values used to a seperate file so no need to keep this anymore
+ if (generateSeedFile)
+ {
+ remove ("briteSeedFile.txt");
+ }
+
+}
+
+void
+BriteTopologyHelper::BuildBriteTopology (InternetStackHelper& stack)
+{
+ NS_LOG_FUNCTION (this);
+
+ GenerateBriteTopology ();
+
+ //not using MPI so each AS is on system number 0
+ for (uint32_t i = 0; i < m_numAs; ++i)
+ {
+ m_systemForAs.push_back (0);
+ }
+
+ //create all nodes with system number 0
+ m_nodes.Create (m_briteNodeInfoList.size ());
+
+ m_numNodes = m_briteNodeInfoList.size ();
+
+ NS_LOG_DEBUG (m_numNodes << " nodes created in BRITE topology");
+
+ stack.Install (m_nodes);
+
+ ConstructTopology ();
+}
+
+void
+BriteTopologyHelper::BuildBriteTopology (InternetStackHelper& stack, const uint32_t systemCount)
+{
+ NS_LOG_FUNCTION (this);
+
+ GenerateBriteTopology ();
+
+ //determine as system number for each AS
+ NS_LOG_LOGIC ("Assigning << " << m_numAs << " AS to " << systemCount << " MPI instances");
+ for (uint32_t i = 0; i < m_numAs; ++i)
+ {
+ int val = i % systemCount;
+ m_systemForAs.push_back (val);
+ NS_LOG_INFO ("AS: " << i << " System: " << val);
+ }
+
+ //create nodes
+ for (BriteTopologyHelper::BriteNodeInfoList::iterator it = m_briteNodeInfoList.begin (); it != m_briteNodeInfoList.end (); ++it)
+ {
+ m_nodes.Add (CreateObject (GetSystemNumberForAs ((*it).asId)));
+ m_numNodes++;
+ }
+
+ NS_LOG_INFO (m_numNodes << " nodes created in BRITE topology");
+
+ stack.Install (m_nodes);
+
+ ConstructTopology ();
+}
+
+void
+BriteTopologyHelper::AssignIpv4Addresses (Ipv4AddressHelper& address)
+{
+ NS_LOG_FUNCTION (this);
+ //assign IPs
+ for (unsigned int i = 0; i < m_netDevices.size (); ++i)
+ {
+ address.Assign (*m_netDevices[i]);
+ address.NewNetwork ();
+ }
+}
+
+void
+BriteTopologyHelper::AssignIpv6Addresses (Ipv6AddressHelper& address)
+{
+ NS_LOG_FUNCTION (this);
+
+ for (unsigned int i = 0; i < m_netDevices.size (); ++i)
+ {
+ address.Assign (*m_netDevices[i]);
+ address.NewNetwork ();
+ }
+}
+
+void
+BriteTopologyHelper::ConstructTopology ()
+{
+ NS_LOG_FUNCTION (this);
+ //create one node container to hold leaf nodes for attaching
+ for (uint32_t i = 0; i < m_numAs; ++i)
+ {
+ m_asLeafNodes.push_back (new NodeContainer ());
+ m_nodesByAs.push_back (new NodeContainer ());
+ }
+
+ for (BriteTopologyHelper::BriteEdgeInfoList::iterator it = m_briteEdgeInfoList.begin (); it != m_briteEdgeInfoList.end (); ++it)
+ {
+ // Set the link delay
+ // The brite value for delay is given in milliseconds
+ m_britePointToPointHelper.SetChannelAttribute ("Delay",
+ TimeValue (MilliSeconds ((*it).delay)));
+
+ // The brite value for data rate is given in Mbps
+ m_britePointToPointHelper.SetDeviceAttribute ("DataRate",
+ DataRateValue (DataRate ((*it).bandwidth * mbpsToBps)));
+
+ m_netDevices.push_back ( new NetDeviceContainer ( m_britePointToPointHelper.Install (m_nodes.Get ((*it).srcId), m_nodes.Get ((*it).destId))));
+
+ m_numEdges++;
+
+ }
+
+ NS_LOG_INFO ("Created " << m_numEdges << " edges in BRITE topology");
+
+ //iterate through all nodes and add leaf nodes for each AS
+ for (BriteTopologyHelper::BriteNodeInfoList::iterator it = m_briteNodeInfoList.begin (); it != m_briteNodeInfoList.end (); ++it)
+ {
+ m_nodesByAs[(*it).asId]->Add (m_nodes.Get ((*it).nodeId));
+
+ if ((*it).type == "RT_LEAF ")
+ {
+ m_asLeafNodes[(*it).asId]->Add (m_nodes.Get ((*it).nodeId));
+ }
+ }
+}
+
+} // namespace ns3
diff --git a/src/brite/helper/brite-topology-helper.h b/src/brite/helper/brite-topology-helper.h
new file mode 100644
index 000000000..41e998c42
--- /dev/null
+++ b/src/brite/helper/brite-topology-helper.h
@@ -0,0 +1,298 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef BRITE_TOPOLOGY_HELPER_H
+#define BRITE_TOPOLOGY_HELPER_H
+
+#include
+#include
+
+#include "ns3/channel.h"
+#include "ns3/node-container.h"
+#include "ns3/node-list.h"
+#include "ns3/point-to-point-helper.h"
+#include "ns3/internet-stack-helper.h"
+#include "ns3/ipv6-address-helper.h"
+#include "ns3/random-variable-stream.h"
+
+//located in BRITE source directory
+#include "Brite.h"
+
+namespace ns3 {
+
+/**
+ * \brief Interface with BRITE, the Boston university Representative Internet
+ * Topology gEnerator
+ *
+ * This helper class creates an interface with BRITE and allows the user to
+ * easily create ns-3 topologies from BRITE generated graphs. This class
+ * accepts a BRITE configuration and seed file, much like the stand-alone
+ * BRITE software. Using these files, BRITE generates a graph which is
+ * stored herein. ns-3 examples can then grab the BRITE generated nodes and
+ * edges from this helper and create ns-3 specific topologies.
+ *
+ */
+
+class PointToPointHelper;
+
+class BriteTopologyHelper
+{
+public:
+ /*
+ * Construct a BriteTopologyHelper
+ *
+ * \param confFile a BRITE configuration file
+ * \param seedFile a BRITE seed file
+ * \param newseedFile a BRITE seed file with newly generated values
+ */
+ BriteTopologyHelper (std::string confFile,
+ std::string seedFile,
+ std::string newseedFile);
+
+ /*
+ * Construct a BriteTopologyHelper using NS3 to generate seed values
+ * need by BRITE
+ *
+ */
+ BriteTopologyHelper (std::string confFile);
+
+ ~BriteTopologyHelper ();
+
+ /*
+ * Assigns stream number to UniformRandomVariable used to
+ * generate brite seed file
+ *
+ * \param streamNumber the stream number to assign
+ *
+ */
+ void AssignStreams (int64_t streamNumber);
+
+ /*
+ * Create NS3 topology using information generated from BRITE.
+ *
+ * \param stack Internet stack to assign to nodes in topology
+ */
+ void BuildBriteTopology (InternetStackHelper& stack);
+
+ /*
+ * Create NS3 topology using information generated from BRITE and configure topology for MPI use.
+ *
+ * \param stack Internet stack to assign to nodes in topology.
+ * \param systemCount The number of MPI instances to be used in the simulation.
+ *
+ */
+ void BuildBriteTopology (InternetStackHelper& stack, const uint32_t systemCount);
+
+ /*
+ * Returns the number of router leaf nodes for a given AS
+ *
+ * \param asNum the AS number
+ * \returns the number of leaf nodes in the specified AS
+ *
+ */
+ uint32_t GetNLeafNodesForAs (uint32_t asNum);
+
+ /*
+ * Returns a given router leaf node from a given AS
+ *
+ * \param asNum the AS number
+ * \param leafNum the leaf number
+ * \returns the specified node
+ */
+ Ptr GetLeafNodeForAs (uint32_t asNum, uint32_t leafNum);
+
+ /*
+ * Returns the total number of nodes for a given AS
+ *
+ * \param asNum the AS number
+ * \returns the total number of nodes in the given AS
+ */
+ uint32_t GetNNodesForAs (uint32_t asNum);
+
+ /*
+ * Returns a given router node for a given AS
+ *
+ * \param asNum the AS number
+ * \return the specified node
+ *
+ */
+ Ptr GetNodeForAs (uint32_t asNum, uint32_t nodeNum);
+
+ /**
+ * Returns the number of AS created in the topology
+ *
+ * \returns the number of AS created in the topology
+ */
+ uint32_t GetNAs (void) const;
+
+ /**
+ * Returns the system number for the MPI instance that this AS is assigned to. Will always return 0 if MPI not used
+ *
+ * \returns The system number that the specified AS number belongs to
+ *
+ * param asNum The AS Number
+ */
+ uint32_t GetSystemNumberForAs (uint32_t asNum) const;
+
+ /**
+ * \param address an Ipv4AddressHelper which is used to install
+ * Ipv4 addresses on all the node interfaces in
+ * the topology
+ */
+ void AssignIpv4Addresses (Ipv4AddressHelper& address);
+
+ /**
+ * \param network an IPv6 address representing the network portion
+ * of the IPv6 Address
+ * \param prefix the prefix length
+ */
+ void AssignIpv6Addresses (Ipv6AddressHelper& address);
+
+ /**
+ * Returns the number of nodes created within
+ * the topology
+ *
+ * \returns the total number of nodes within the brite topology
+ */
+ uint32_t GetNNodesTopology () const;
+
+ /**
+ * Returns the number of edges created within
+ * the topology
+ *
+ * \returns the total number of edges within the brite topology
+ */
+ uint32_t GetNEdgesTopology () const;
+
+private:
+ //brite values are unitless however all examples provided use mbps to specify rate
+ //this constant value is used to convert the mbps provided by brite to bps.
+ static const int mbpsToBps = 1000000;
+
+ /**
+ * \brief Node information from BRITE
+ *
+ * The BRITE code generates a graph and returns
+ * information on the nodes generated. This is
+ * stored here in a struct.
+ */
+ struct BriteNodeInfo
+ {
+ int nodeId;
+ double xCoordinate;
+ double yCoordinate;
+ int inDegree;
+ int outDegree;
+ int asId;
+ std::string type;
+ };
+
+ /**
+ * \brief Edge information from BRITE
+ *
+ * The BRITE code generates a graph and returns
+ * information on the edges generated. This is
+ * stored here in a struct.
+ */
+ struct BriteEdgeInfo
+ {
+ int edgeId;
+ int srcId;
+ int destId;
+ double length;
+ double delay;
+ double bandwidth;
+ int asFrom;
+ int asTo;
+ std::string type;
+ };
+
+ //stores all of the nodes used in the BRITE generated topology
+ NodeContainer m_nodes;
+
+ /**
+ * \internal
+ */
+ void BuildBriteNodeInfoList (void);
+
+ /**
+ * \internal
+ */
+ void BuildBriteEdgeInfoList (void);
+
+ /**
+ * \internal
+ */
+ void ConstructTopology (void);
+
+ /**
+ * \internal
+ */
+ void GenerateBriteTopology (void);
+
+ //brite configuration file to use
+ std::string m_confFile;
+
+ //brite seed file to use
+ std::string m_seedFile;
+
+ //brite seed file to generate for next run
+ std::string m_newSeedFile;
+
+ //stores the number of AS in the BRITE generated topology
+ uint32_t m_numAs;
+
+ //stores the netdevices created for each AS
+ std::vector m_netDevices;
+
+ //stores the leaf router nodes for each AS
+ std::vector m_asLeafNodes;
+
+ //stores all of the nodes in the brite topology by AS number
+ std::vector m_nodesByAs;
+
+ //stores the MPI system number each AS assigned to. All assigned to 0 if MPI not used.
+ std::vector m_systemForAs;
+
+ brite::Topology* m_topology;
+
+ //stores the number of nodes created in the BRITE topology
+ uint32_t m_numNodes;
+
+ //stores the number of edges created in the BRITE topology
+ uint32_t m_numEdges;
+
+ /**
+ * The BRITE code generates multiple nodes and edges. Each
+ * node and edge is stored in a BriteNodeInfo or BriteEdgeInfo
+ * struct, and each instance is stored in a vector.
+ */
+ typedef std::vector BriteNodeInfoList;
+ typedef std::vector BriteEdgeInfoList;
+
+ BriteNodeInfoList m_briteNodeInfoList;
+ BriteEdgeInfoList m_briteEdgeInfoList;
+
+ //used to create the links within the topology
+ PointToPointHelper m_britePointToPointHelper;
+
+ Ptr m_uv;
+};
+
+} // namespace ns3
+
+#endif /* BRITE_TOPOLOGY_HELPER_H */
diff --git a/src/brite/test/brite-test-topology.cc b/src/brite/test/brite-test-topology.cc
new file mode 100644
index 000000000..b5f3138d1
--- /dev/null
+++ b/src/brite/test/brite-test-topology.cc
@@ -0,0 +1,200 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include
+#include "ns3/core-module.h"
+#include "ns3/network-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/packet-sink-helper.h"
+#include "ns3/packet-sink.h"
+#include "ns3/random-variable-stream.h"
+#include "ns3/on-off-helper.h"
+#include "ns3/brite-module.h"
+#include "ns3/test.h"
+#include
+#include
+
+namespace ns3 {
+
+class BriteTopologyStructureTestCase : public TestCase
+{
+public:
+ BriteTopologyStructureTestCase ();
+ virtual ~BriteTopologyStructureTestCase ();
+
+private:
+ virtual void DoRun (void);
+
+};
+
+BriteTopologyStructureTestCase::BriteTopologyStructureTestCase ()
+ : TestCase ("Test that two brite topologies created with same seed value produce same graph (not an exact test)")
+{
+}
+
+BriteTopologyStructureTestCase::~BriteTopologyStructureTestCase ()
+{
+}
+
+void BriteTopologyStructureTestCase::DoRun (void)
+{
+
+ std::string confFile = "src/brite/test/test.conf";
+
+ SeedManager::SetRun (1);
+ SeedManager::SetSeed (1);
+ BriteTopologyHelper bthA (confFile);
+ bthA.AssignStreams (1);
+
+ SeedManager::SetRun (1);
+ SeedManager::SetSeed (1);
+ BriteTopologyHelper bthB (confFile);
+ bthB.AssignStreams (1);
+
+ InternetStackHelper stack;
+
+ bthA.BuildBriteTopology (stack);
+ bthB.BuildBriteTopology (stack);
+
+ int numAsA = bthA.GetNAs ();
+ int numAsB = bthB.GetNAs ();
+
+ //numAs should be 2 for the conf file in /src/brite/test/test.conf
+ NS_TEST_ASSERT_MSG_EQ (numAsA, 2, "Number of AS for this topology must be 2");
+ NS_TEST_ASSERT_MSG_EQ (numAsA, numAsB, "Number of AS should be same for both test topologies");
+ NS_TEST_ASSERT_MSG_EQ (bthA.GetNNodesTopology (), bthB.GetNNodesTopology (), "Total number of nodes for each topology should be equal");
+ NS_TEST_ASSERT_MSG_EQ (bthA.GetNEdgesTopology (), bthB.GetNEdgesTopology (), "Total number of edges for each topology should be equal");
+
+ for (unsigned int i = 0; i < bthA.GetNAs (); ++i)
+ {
+ NS_TEST_ASSERT_MSG_EQ (bthA.GetNLeafNodesForAs (i), bthB.GetNLeafNodesForAs (i), "Total number of leaf nodes different for AS " << i);
+ }
+}
+
+class BriteTopologyFunctionTestCase : public TestCase
+{
+public:
+ BriteTopologyFunctionTestCase ();
+ virtual ~BriteTopologyFunctionTestCase ();
+
+private:
+ virtual void DoRun (void);
+
+};
+
+BriteTopologyFunctionTestCase::BriteTopologyFunctionTestCase ()
+ : TestCase ("Test that packets can be send across a BRITE topology using UDP")
+{
+}
+
+BriteTopologyFunctionTestCase::~BriteTopologyFunctionTestCase ()
+{
+}
+
+void BriteTopologyFunctionTestCase::DoRun (void)
+{
+
+ std::string confFile = "src/brite/test/test.conf";
+ BriteTopologyHelper bth (confFile);
+
+ PointToPointHelper p2p;
+ InternetStackHelper stack;
+ Ipv4AddressHelper address;
+
+ address.SetBase ("10.0.0.0", "255.255.255.0");
+
+ bth.BuildBriteTopology (stack);
+ bth.AssignIpv4Addresses (address);
+
+ NodeContainer source;
+ NodeContainer sink;
+
+ source.Create (1);
+ stack.Install (source);
+
+ //install source node on last leaf node of AS 0
+ int numNodesInAsZero = bth.GetNNodesForAs (0);
+ source.Add (bth.GetNodeForAs (0, numNodesInAsZero - 1));
+
+ sink.Create (1);
+ stack.Install (sink);
+
+ //install sink node on last leaf node on AS 1
+ int numNodesInAsOne = bth.GetNNodesForAs (1);
+ sink.Add (bth.GetNodeForAs (1, numNodesInAsOne - 1));
+
+ p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));
+
+ NetDeviceContainer p2pSourceDevices;
+ NetDeviceContainer p2pSinkDevices;
+
+ p2pSourceDevices = p2p.Install (source);
+ p2pSinkDevices = p2p.Install (sink);
+
+ address.SetBase ("10.1.0.0", "255.255.0.0");
+ Ipv4InterfaceContainer sourceInterfaces;
+ sourceInterfaces = address.Assign (p2pSourceDevices);
+
+ address.SetBase ("10.2.0.0", "255.255.0.0");
+ Ipv4InterfaceContainer sinkInterfaces;
+ sinkInterfaces = address.Assign (p2pSinkDevices);
+
+ uint16_t port = 9;
+
+ OnOffHelper onOff ("ns3::UdpSocketFactory",
+ Address (InetSocketAddress (sinkInterfaces.GetAddress (0), port)));
+ onOff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
+ onOff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
+ onOff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
+
+ ApplicationContainer apps = onOff.Install (source.Get (0));
+
+ apps.Start (Seconds (1.0));
+ apps.Stop (Seconds (10.0));
+
+ PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory",
+ Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
+ apps = sinkHelper.Install (sink.Get (0));
+
+ apps.Start (Seconds (1.0));
+ apps.Stop (Seconds (10.0));
+
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+
+ Simulator::Stop (Seconds (10.0));
+ Simulator::Run ();
+
+ Ptr sink1 = DynamicCast (apps.Get (0));
+ //NS_TEST_ASSERT_MSG_EQ (sink1->GetTotalRx (), 6656, "Not all packets received from source");
+
+ Simulator::Destroy ();
+
+}
+
+class BriteTestSuite : public TestSuite
+{
+public:
+ BriteTestSuite () : TestSuite ("brite-testing", UNIT)
+ {
+ AddTestCase (new BriteTopologyStructureTestCase, TestCase::QUICK);
+ AddTestCase (new BriteTopologyFunctionTestCase, TestCase::QUICK);
+ }
+} g_briteTestSuite;
+
+} // namespace ns3
diff --git a/src/brite/test/examples-to-run.py b/src/brite/test/examples-to-run.py
new file mode 100644
index 000000000..7dee389cf
--- /dev/null
+++ b/src/brite/test/examples-to-run.py
@@ -0,0 +1,20 @@
+#! /usr/bin/env python
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+# A list of C++ examples to run in order to ensure that they remain
+# buildable and runnable over time. Each tuple in the list contains
+#
+# (example_name, do_run, do_valgrind_run).
+#
+# See test.py for more information.
+cpp_examples = [
+ ("brite-generic-example", "ENABLE_BRITE == True", "False"),
+]
+
+# A list of Python examples to run in order to ensure that they remain
+# runnable over time. Each tuple in the list contains
+#
+# (example_name, do_run).
+#
+# See test.py for more information.
+python_examples = []
diff --git a/src/brite/test/test.conf b/src/brite/test/test.conf
new file mode 100644
index 000000000..4ea8d3266
--- /dev/null
+++ b/src/brite/test/test.conf
@@ -0,0 +1,50 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+
+
+BeginModel
+ Name = 5 #Top Down = 5
+ edgeConn = 2 #Random=1, Smallest Nonleaf = 2, Smallest Deg = 3, k-Degree=4
+ k = -1 #Only needed if edgeConn is set to K-Degree, otherwise use -1
+ BWInter = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWInterMin = 10.0
+ BWInterMax = 1024.0
+ BWIntra = 3 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWIntraMin = 10.0
+ BWIntraMax = 1024.0
+EndModel
+
+BeginModel
+ Name = 4 #Router Barabasi=2, AS Barabasi =4
+ N = 2 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 1 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = -1.0
+ BWMax = -1.0
+EndModel
+
+BeginModel
+ Name = 1 #Router Waxman=2, AS Waxman =3
+ N = 5 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 2 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 1 #Number of neighboring node each new node connects to.
+ alpha = 0.5 #Waxman Parameter
+ beta = 0.8 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = -1.0
+ BWMax = -1.0
+EndModel
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
+
diff --git a/src/brite/wscript b/src/brite/wscript
new file mode 100644
index 000000000..b44cbc53b
--- /dev/null
+++ b/src/brite/wscript
@@ -0,0 +1,105 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+import os
+
+from waflib import Options
+
+
+def options(opt):
+ opt.add_option('--with-brite',
+ help=('Use BRITE integration support, given by the indicated path,'
+ ' to allow the use of the BRITE topology generator'),
+ default=False, dest='with_brite')
+
+def configure(conf):
+ conf.env['ENABLE_BRITE'] = False
+
+ if Options.options.with_brite:
+ if os.path.isdir(Options.options.with_brite):
+ conf.msg("Checking BRITE location", ("%s (given)" % Options.options.with_brite))
+ conf.env['WITH_BRITE'] = os.path.abspath(Options.options.with_brite)
+ else:
+ brite_dir = os.path.join('..','BRITE')
+ if os.path.isdir(brite_dir):
+ conf.msg("Checking for BRITE location", ("%s (guessed)" % brite_dir))
+ conf.env['WITH_BRITE'] = os.path.abspath(brite_dir)
+ del brite_dir
+ if not conf.env['WITH_BRITE']:
+ conf.msg("Checking for BRITE location", False)
+ conf.report_optional_feature("brite", "BRITE Integration", False,
+ "BRITE not found (see option --with-brite)")
+ # Add this module to the list of modules that won't be built
+ # if they are enabled.
+ conf.env['MODULES_NOT_BUILT'].append('brite')
+
+ return
+ else:
+ conf.report_optional_feature("brite", "BRITE Integration", False, 'BRITE not enabled (see option --with-brite)')
+
+ # Add this module to the list of modules that won't be built
+ # if they are enabled.
+ conf.env['MODULES_NOT_BUILT'].append('brite')
+
+ return
+
+ test_code = '''
+#include "Brite.h"
+
+int main()
+{
+ return 0;
+}
+'''
+
+ conf.env['DL'] = conf.check(mandatory=True, lib='dl', define_name='DL', uselib='DL')
+
+ conf.env.append_value('NS3_MODULE_PATH',os.path.abspath(os.path.join(conf.env['WITH_BRITE'], '.')))
+
+ conf.env['INCLUDES_BRITE'] = os.path.abspath(os.path.join(conf.env['WITH_BRITE'],'.'))
+
+ conf.env['CPPPATH_BRITE'] = [
+ os.path.abspath(os.path.join(conf.env['WITH_BRITE'],'.')),
+ os.path.abspath(os.path.join(conf.env['WITH_BRITE'],'Models'))
+ ]
+ conf.env['LIBPATH_BRITE'] = [os.path.abspath(os.path.join(conf.env['WITH_BRITE'], '.'))]
+
+ conf.env.append_value('CXXDEFINES', 'NS3_BRITE')
+ conf.env.append_value('CPPPATH', conf.env['CPPPATH_BRITE'])
+
+ conf.env['BRITE'] = conf.check(fragment=test_code, lib='brite', libpath=conf.env['LIBPATH_BRITE'], use='BRITE DL')
+ conf.report_optional_feature("brite", "BRITE Integration",
+ conf.env['BRITE'], "BRITE library not found")
+
+ if conf.env['BRITE']:
+ conf.env['ENABLE_BRITE'] = True
+ conf.env.append_value('CXXDEFINES', 'NS3_BRITE')
+ conf.env.append_value('CPPPATH', conf.env['CPPPATH_BRITE'])
+
+def build(bld):
+ # Don't do anything for this module if brite's not enabled.
+ if 'brite' in bld.env['MODULES_NOT_BUILT']:
+ return
+
+ module = bld.create_ns3_module('brite', ['network', 'core', 'internet', 'point-to-point'])
+ module.source = [
+ ]
+
+ module_test = bld.create_ns3_module_test_library('brite')
+ module_test.source = [
+ ]
+
+ if bld.env['BRITE'] and bld.env['DL']:
+ module.uselib = 'BRITE DL'
+
+ headers = bld(features='ns3header')
+ headers.module = 'brite'
+ headers.source = [
+ ]
+
+ if bld.env['ENABLE_BRITE']:
+ module.source.append ('helper/brite-topology-helper.cc')
+ headers.source.append ('helper/brite-topology-helper.h')
+ module_test.source.append('test/brite-test-topology.cc')
+
+ if bld.env['ENABLE_EXAMPLES'] and bld.env['ENABLE_BRITE']:
+ bld.recurse('examples')
diff --git a/src/buildings/bindings/modulegen__gcc_ILP32.py b/src/buildings/bindings/modulegen__gcc_ILP32.py
index 104b5042c..e539b41f9 100644
--- a/src/buildings/bindings/modulegen__gcc_ILP32.py
+++ b/src/buildings/bindings/modulegen__gcc_ILP32.py
@@ -1715,8 +1715,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -1727,8 +1727,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -4013,8 +4013,8 @@ def register_Ns3Node_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## node.h (module 'network'): void ns3::Node::DoStart() [member function]
- cls.add_method('DoStart',
+ ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -4045,10 +4045,10 @@ def register_Ns3NormalRandomVariable_methods(root_module, cls):
'double',
[],
is_const=True)
- ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound) [member function]
+ ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function]
cls.add_method('GetValue',
'double',
- [param('double', 'mean'), param('double', 'variance'), param('double', 'bound')])
+ [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')])
## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function]
cls.add_method('GetInteger',
'uint32_t',
diff --git a/src/buildings/bindings/modulegen__gcc_LP64.py b/src/buildings/bindings/modulegen__gcc_LP64.py
index 104b5042c..e539b41f9 100644
--- a/src/buildings/bindings/modulegen__gcc_LP64.py
+++ b/src/buildings/bindings/modulegen__gcc_LP64.py
@@ -1715,8 +1715,8 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::TypeId',
[],
is_static=True)
- ## object.h (module 'core'): void ns3::Object::Start() [member function]
- cls.add_method('Start',
+ ## object.h (module 'core'): void ns3::Object::Initialize() [member function]
+ cls.add_method('Initialize',
'void',
[])
## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor]
@@ -1727,8 +1727,8 @@ def register_Ns3Object_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoStart() [member function]
- cls.add_method('DoStart',
+ ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -4013,8 +4013,8 @@ def register_Ns3Node_methods(root_module, cls):
'void',
[],
visibility='protected', is_virtual=True)
- ## node.h (module 'network'): void ns3::Node::DoStart() [member function]
- cls.add_method('DoStart',
+ ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function]
+ cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
@@ -4045,10 +4045,10 @@ def register_Ns3NormalRandomVariable_methods(root_module, cls):
'double',
[],
is_const=True)
- ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound) [member function]
+ ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function]
cls.add_method('GetValue',
'double',
- [param('double', 'mean'), param('double', 'variance'), param('double', 'bound')])
+ [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')])
## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function]
cls.add_method('GetInteger',
'uint32_t',
diff --git a/src/buildings/model/building-list.cc b/src/buildings/model/building-list.cc
index 4c5c0028e..063870de3 100644
--- a/src/buildings/model/building-list.cc
+++ b/src/buildings/model/building-list.cc
@@ -126,7 +126,7 @@ BuildingListPriv::Add (Ptr building)
{
uint32_t index = m_buildings.size ();
m_buildings.push_back (building);
- Simulator::ScheduleWithContext (index, TimeStep (0), &Building::Start, building);
+ Simulator::ScheduleWithContext (index, TimeStep (0), &Building::Initialize, building);
return index;
}
diff --git a/src/buildings/model/building.cc b/src/buildings/model/building.cc
index 717dbab38..3200ccc75 100644
--- a/src/buildings/model/building.cc
+++ b/src/buildings/model/building.cc
@@ -27,7 +27,7 @@
#include
#include
#include
-#include
+#include
NS_LOG_COMPONENT_DEFINE ("Building");
diff --git a/src/buildings/model/buildings-propagation-loss-model.cc b/src/buildings/model/buildings-propagation-loss-model.cc
index c60a6b8ab..684c9cc67 100644
--- a/src/buildings/model/buildings-propagation-loss-model.cc
+++ b/src/buildings/model/buildings-propagation-loss-model.cc
@@ -137,8 +137,8 @@ double
BuildingsPropagationLossModel::InternalWallsLoss (Ptr a, Ptrb) const
{
// approximate the number of internal walls with the Manhattan distance in "rooms" units
- double dx = abs (a->GetRoomNumberX () - b->GetRoomNumberX ());
- double dy = abs (a->GetRoomNumberY () - b->GetRoomNumberY ());
+ double dx = std::abs (a->GetRoomNumberX () - b->GetRoomNumberX ());
+ double dy = std::abs (a->GetRoomNumberY () - b->GetRoomNumberY ());
return m_lossInternalWall * (dx+dy);
}
@@ -195,7 +195,7 @@ const
}
else
{
- double sigma = sqrt ((m_shadowingSigmaOutdoor * m_shadowingSigmaOutdoor) + (m_shadowingSigmaExtWalls * m_shadowingSigmaExtWalls));
+ double sigma = std::sqrt ((m_shadowingSigmaOutdoor * m_shadowingSigmaOutdoor) + (m_shadowingSigmaExtWalls * m_shadowingSigmaExtWalls));
return (sigma);
}
}
@@ -206,7 +206,7 @@ const
}
else
{
- double sigma = sqrt ((m_shadowingSigmaOutdoor * m_shadowingSigmaOutdoor) + (m_shadowingSigmaExtWalls * m_shadowingSigmaExtWalls));
+ double sigma = std::sqrt ((m_shadowingSigmaOutdoor * m_shadowingSigmaOutdoor) + (m_shadowingSigmaExtWalls * m_shadowingSigmaExtWalls));
return (sigma);
}
}
diff --git a/src/buildings/model/itu-r-1238-propagation-loss-model.cc b/src/buildings/model/itu-r-1238-propagation-loss-model.cc
index 660dc8941..2f6883099 100644
--- a/src/buildings/model/itu-r-1238-propagation-loss-model.cc
+++ b/src/buildings/model/itu-r-1238-propagation-loss-model.cc
@@ -60,7 +60,7 @@ ItuR1238PropagationLossModel::GetLoss (Ptr a1, Ptr
NS_ASSERT_MSG ((a != 0) && (b != 0), "ItuR1238PropagationLossModel only works with BuildingsMobilityModel");
NS_ASSERT_MSG (a->GetBuilding ()->GetId () == b->GetBuilding ()->GetId (), "ITU-R 1238 applies only to nodes that are in the same building");
double N = 0.0;
- int n = abs (a->GetFloorNumber () - b->GetFloorNumber ());
+ int n = std::abs (a->GetFloorNumber () - b->GetFloorNumber ());
NS_LOG_LOGIC (this << " A floor " << (uint16_t)a->GetFloorNumber () << " B floor " << (uint16_t)b->GetFloorNumber () << " n " << n);
double Lf = 0.0;
Ptr aBuilding = a->GetBuilding ();
@@ -95,7 +95,7 @@ ItuR1238PropagationLossModel::GetLoss (Ptr a1, Ptr
{
NS_LOG_ERROR (this << " Unkwnon Wall Type");
}
- double loss = 20 * log10 (m_frequency / 1e6 /*MHz*/) + N*log10 (a->GetDistanceFrom (b)) + Lf - 28.0;
+ double loss = 20 * std::log10 (m_frequency / 1e6 /*MHz*/) + N * std::log10 (a->GetDistanceFrom (b)) + Lf - 28.0;
NS_LOG_INFO (this << " Node " << a->GetPosition () << " <-> " << b->GetPosition () << " loss = " << loss << " dB");
return loss;
diff --git a/src/buildings/model/oh-buildings-propagation-loss-model.cc b/src/buildings/model/oh-buildings-propagation-loss-model.cc
index 741da488c..b08361849 100644
--- a/src/buildings/model/oh-buildings-propagation-loss-model.cc
+++ b/src/buildings/model/oh-buildings-propagation-loss-model.cc
@@ -24,7 +24,7 @@
#include "ns3/mobility-model.h"
#include "ns3/double.h"
#include "ns3/pointer.h"
-#include
+#include
#include "oh-buildings-propagation-loss-model.h"
#include "ns3/buildings-mobility-model.h"
#include "ns3/okumura-hata-propagation-loss-model.h"
diff --git a/src/buildings/test/building-position-allocator-test.cc b/src/buildings/test/building-position-allocator-test.cc
index 86965eda9..1f6730dc2 100644
--- a/src/buildings/test/building-position-allocator-test.cc
+++ b/src/buildings/test/building-position-allocator-test.cc
@@ -231,8 +231,8 @@ BuildingPositionAllocatorTestSuite::BuildingPositionAllocatorTestSuite ()
{
NS_LOG_FUNCTION (this);
- AddTestCase (new RandomRoomPositionAllocatorTestCase);
- AddTestCase (new SameRoomPositionAllocatorTestCase);
+ AddTestCase (new RandomRoomPositionAllocatorTestCase, TestCase::QUICK);
+ AddTestCase (new SameRoomPositionAllocatorTestCase, TestCase::QUICK);
}
diff --git a/src/buildings/test/buildings-helper-test.cc b/src/buildings/test/buildings-helper-test.cc
index d974dd86d..8300afe8f 100644
--- a/src/buildings/test/buildings-helper-test.cc
+++ b/src/buildings/test/buildings-helper-test.cc
@@ -203,25 +203,25 @@ BuildingsHelperTestSuite::BuildingsHelperTestSuite ()
p1.rx = 1;
p1.ry = 1;
p1.fn = 1;
- AddTestCase (new BuildingsHelperOneTestCase (p1, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p1, b1), TestCase::QUICK);
Vector vp2 (1.5, 0.5, 0.5);
PositionInBuilding p2;
p2.pos = vp2;
p2.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p2, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p2, b1), TestCase::QUICK);
Vector vp3 (1.5, 2.5, 0.5);
PositionInBuilding p3;
p3.pos = vp3;
p3.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p3, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p3, b1), TestCase::QUICK);
Vector vp4 (1.5, 1.5, 5);
PositionInBuilding p4;
p4.pos = vp4;
p4.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p4, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p4, b1), TestCase::QUICK);
Vector vp5 (2.5, 1.6, 3.5);
PositionInBuilding p5;
@@ -231,31 +231,31 @@ BuildingsHelperTestSuite::BuildingsHelperTestSuite ()
p5.rx = 1;
p5.ry = 1;
p5.fn = 1;
- AddTestCase (new BuildingsHelperOneTestCase (p5, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p5, b1), TestCase::QUICK);
Vector vp6 (0.9999, 1.5, 1.5);
PositionInBuilding p6;
p6.pos = vp6;
p6.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p6, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p6, b1), TestCase::QUICK);
Vector vp7 (3.0001, 1.5, 2.5);
PositionInBuilding p7;
p7.pos = vp7;
p7.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p7, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p7, b1), TestCase::QUICK);
Vector vp8 (1.001, 1.001, -0.01);
PositionInBuilding p8;
p8.pos = vp8;
p8.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p8, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p8, b1), TestCase::QUICK);
Vector vp9 (1.5, 1.5, 4.001);
PositionInBuilding p9;
p9.pos = vp9;
p9.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (p9, b1));
+ AddTestCase (new BuildingsHelperOneTestCase (p9, b1), TestCase::QUICK);
@@ -279,7 +279,7 @@ BuildingsHelperTestSuite::BuildingsHelperTestSuite ()
q1.rx = 1;
q1.ry = 2;
q1.fn = 3;
- AddTestCase (new BuildingsHelperOneTestCase (q1, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q1, b2), TestCase::QUICK);
Vector vq2 (0.2, 0.3, 0.2);
PositionInBuilding q2;
@@ -289,37 +289,37 @@ BuildingsHelperTestSuite::BuildingsHelperTestSuite ()
q2.rx = 3;
q2.ry = 5;
q2.fn = 1;
- AddTestCase (new BuildingsHelperOneTestCase (q2, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q2, b2), TestCase::QUICK);
Vector vq3 (0.6, -1.75, 1.5);
PositionInBuilding q3;
q3.pos = vq3;
q3.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (q3, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q3, b2), TestCase::QUICK);
Vector vq4 (-1.01, 0.3, 1.99);
PositionInBuilding q4;
q4.pos = vq4;
q4.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (q4, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q4, b2), TestCase::QUICK);
Vector vq5 (-0.8, 0.7, 0.01);
PositionInBuilding q5;
q5.pos = vq5;
q5.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (q5, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q5, b2), TestCase::QUICK);
Vector vq6 (0.2, 0.3, -0.2);
PositionInBuilding q6;
q6.pos = vq6;
q6.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (q6, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q6, b2), TestCase::QUICK);
Vector vq7 (0.2, 0.3, 2.001);
PositionInBuilding q7;
q7.pos = vq7;
q7.indoor = false;
- AddTestCase (new BuildingsHelperOneTestCase (q7, b2));
+ AddTestCase (new BuildingsHelperOneTestCase (q7, b2), TestCase::QUICK);
}
static BuildingsHelperTestSuite buildingsHelperAntennaTestSuiteInstance;
diff --git a/src/buildings/test/buildings-pathloss-test.cc b/src/buildings/test/buildings-pathloss-test.cc
index 41e94c5a7..a60525d04 100644
--- a/src/buildings/test/buildings-pathloss-test.cc
+++ b/src/buildings/test/buildings-pathloss-test.cc
@@ -55,56 +55,56 @@ BuildingsPathlossTestSuite::BuildingsPathlossTestSuite ()
double freq = 869e6; // E_UTRA BAND #5 see table 5.5-1 of 36.101
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, LargeCity, 137.93, "OH Urban Large city"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, LargeCity, 137.93, "OH Urban Large city"), TestCase::QUICK);
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, SmallCity, 137.88, "OH Urban small city"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, SmallCity, 137.88, "OH Urban small city"), TestCase::QUICK);
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, SubUrbanEnvironment, LargeCity, 128.03, "loss OH SubUrban"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, SubUrbanEnvironment, LargeCity, 128.03, "loss OH SubUrban"), TestCase::QUICK);
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, OpenAreasEnvironment, LargeCity, 110.21, "loss OH OpenAreas"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, OpenAreasEnvironment, LargeCity, 110.21, "loss OH OpenAreas"), TestCase::QUICK);
// Test #2 COST231 Model (1500 < freq < 2000~2170 MHz) (Macro<->UE)
freq = 2.1140e9; // E_UTRA BAND #1 see table 5.5-1 of 36.101
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, LargeCity, 148.55, "COST231 Urban Large city"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, LargeCity, 148.55, "COST231 Urban Large city"), TestCase::QUICK);
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, SmallCity, 150.64, "COST231 Urban small city and suburban"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, SmallCity, 150.64, "COST231 Urban small city and suburban"), TestCase::QUICK);
// Test #3 2.6 GHz model (Macro<->UE)
freq = 2.620e9; // E_UTRA BAND #7 see table 5.5-1 of 36.101
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, SmallCity, 121.83, "2.6GHz model"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 2, UrbanEnvironment, SmallCity, 121.83, "2.6GHz model"), TestCase::QUICK);
// Test #4 ITU1411 LOS model (Macro<->UE)
freq = 2.1140e9; // E_UTRA BAND #1 see table 5.5-1 of 36.101
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 3, UrbanEnvironment, LargeCity, 81.00, "ITU1411 LOS"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 3, UrbanEnvironment, LargeCity, 81.00, "ITU1411 LOS"), TestCase::QUICK);
// Test #5 ITU1411 NLOS model (Macro<->UE)
freq = 2.1140e9; // E_UTRA BAND #1 see table 5.5-1 of 36.101
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 4, UrbanEnvironment, LargeCity, 143.69, "ITU1411 NLOS"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 4, UrbanEnvironment, LargeCity, 143.69, "ITU1411 NLOS"), TestCase::QUICK);
// Test #6 ITUP1238 (HeNB <-> UE)
freq = 2.1140e9; // E_UTRA BAND #1 see table 5.5-1 of 36.101
- AddTestCase (new BuildingsPathlossTestCase (freq, 5, 6, UrbanEnvironment, LargeCity, 88.3855, "ITUP1238"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 5, 6, UrbanEnvironment, LargeCity, 88.3855, "ITUP1238"), TestCase::QUICK);
// Test #7 Outdoor -> Indoor OkumuraHata (Macro<->UE)
freq = 2.1140e9; // E_UTRA BAND #1 see table 5.5-1 of 36.101
// The loss is as in test #2 (large city) plus the building penetration loss
// which for ConcreteWithWindows is equal to 7 dB -> 148.55 + 7 = 155.55
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 7, UrbanEnvironment, LargeCity, 155.55, "Okumura Hata Outdoor -> Indoor"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 7, UrbanEnvironment, LargeCity, 155.55, "Okumura Hata Outdoor -> Indoor"), TestCase::QUICK);
// Test #8 Outdoor -> Indoor ITU1411 (Macro<->UE)
freq = 2.1140e9; // E_UTRA BAND #1 see table 5.5-1 of 36.101
// The loss is as in test #4 plus the building penetration loss
// which for ConcreteWithWindows is equal to 7 dB -> 81.000 + 7 = 88.000
- AddTestCase (new BuildingsPathlossTestCase (freq, 1, 8, UrbanEnvironment, LargeCity, 88.000, "ITU1411 LOS Outdoor -> Indoor"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 1, 8, UrbanEnvironment, LargeCity, 88.000, "ITU1411 LOS Outdoor -> Indoor"), TestCase::QUICK);
// Test #9 Indoor -> Outdoor LOS (HeNB <-> UE)
@@ -112,7 +112,7 @@ BuildingsPathlossTestSuite::BuildingsPathlossTestSuite ()
// The loss is similar of test #4 plus the building penetration loss
// which for ConcreteWithWindows is equal to 7 dB and the height gain
// (2 floors x 2 dB/floor = 4) -> 81.838 + 7 - 4 = 84.838
- AddTestCase (new BuildingsPathlossTestCase (freq, 9, 10, UrbanEnvironment, LargeCity, 84.838, "ITU1411 LOS Indoor -> Outdoor"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 9, 10, UrbanEnvironment, LargeCity, 84.838, "ITU1411 LOS Indoor -> Outdoor"), TestCase::QUICK);
// Test #10 Indoor -> Outdoor NLOS (HeNB <-> UE)
@@ -120,7 +120,7 @@ BuildingsPathlossTestSuite::BuildingsPathlossTestSuite ()
// The loss is similar as in test #4 plus the building penetration loss
// which for ConcreteWithWindows is equal to 7 dB and the height gain
// (2 floors x 2 dB/floor = 4) -> 180.90 + 7 - 4 = 183.90
- AddTestCase (new BuildingsPathlossTestCase (freq, 9, 11, UrbanEnvironment, LargeCity, 183.90, "ITU1411 NLOS Indoor -> Outdoor"));
+ AddTestCase (new BuildingsPathlossTestCase (freq, 9, 11, UrbanEnvironment, LargeCity, 183.90, "ITU1411 NLOS Indoor -> Outdoor"), TestCase::QUICK);
}
diff --git a/src/buildings/test/buildings-shadowing-test.cc b/src/buildings/test/buildings-shadowing-test.cc
index 4ee83f1a9..aa1ffce12 100644
--- a/src/buildings/test/buildings-shadowing-test.cc
+++ b/src/buildings/test/buildings-shadowing-test.cc
@@ -54,13 +54,13 @@ BuildingsShadowingTestSuite::BuildingsShadowingTestSuite ()
LogComponentEnable ("BuildingsShadowingTest", LOG_LEVEL_ALL);
// Test #1 Outdoor Model
- AddTestCase (new BuildingsShadowingTestCase (1, 2, 148.86, 7.0, "Outdoor Shadowing"));
+ AddTestCase (new BuildingsShadowingTestCase (1, 2, 148.86, 7.0, "Outdoor Shadowing"), TestCase::QUICK);
// Test #2 Indoor model
- AddTestCase (new BuildingsShadowingTestCase (5, 6, 88.5724, 8.0, "Indoor Shadowing"));
+ AddTestCase (new BuildingsShadowingTestCase (5, 6, 88.5724, 8.0, "Indoor Shadowing"), TestCase::QUICK);
// Test #3 Indoor -> Outdoor
- AddTestCase (new BuildingsShadowingTestCase (9, 10, 85.0012, 8.6, "Indoor -> Outdoor Shadowing"));
+ AddTestCase (new BuildingsShadowingTestCase (9, 10, 85.0012, 8.6, "Indoor -> Outdoor Shadowing"), TestCase::QUICK);
}
@@ -112,13 +112,13 @@ BuildingsShadowingTestCase::DoRun (void)
sumSquared += (loss.at (loss.size () - 1) * loss.at (loss.size () - 1));
}
double mean = sum / samples;
- double sigma = sqrt (sumSquared / samples - (mean * mean));
+ double sigma = std::sqrt (sumSquared / samples - (mean * mean));
// test whether the distribution falls in the 99% confidence interval, as expected with a nornal distribution
- double ci = (2.575829303549 * sigma) / sqrt (samples);
+ double ci = (2.575829303549 * sigma) / std::sqrt (samples);
NS_LOG_INFO ("Mean from simulation " << mean << ", sigma " << sigma << ", reference value " << m_sigmaRef << ", CI(99%) " << ci);
- NS_TEST_ASSERT_MSG_EQ_TOL (fabs (mean), 0.0, ci, "Wrong shadowing distribution !");
+ NS_TEST_ASSERT_MSG_EQ_TOL (std::fabs (mean), 0.0, ci, "Wrong shadowing distribution !");
Simulator::Destroy ();
}
diff --git a/src/buildings/wscript b/src/buildings/wscript
index e6d512deb..e92077028 100644
--- a/src/buildings/wscript
+++ b/src/buildings/wscript
@@ -25,7 +25,7 @@ def build(bld):
'test/buildings-shadowing-test.cc',
]
- headers = bld.new_task_gen(features=['ns3header'])
+ headers = bld(features='ns3header')
headers.module = 'buildings'
headers.source = [
'model/building.h',
@@ -42,7 +42,7 @@ def build(bld):
]
if (bld.env['ENABLE_EXAMPLES']):
- bld.add_subdirs('examples')
+ bld.recurse('examples')
bld.ns3_python_bindings()
diff --git a/src/click/doc/click.rst b/src/click/doc/click.rst
index 6af1e254b..737b5d802 100644
--- a/src/click/doc/click.rst
+++ b/src/click/doc/click.rst
@@ -76,9 +76,11 @@ Usage
Building Click
==============
-The first step is to fetch (http://read.cs.ucla.edu/click/download) and build Click. At the top of your Click source directory::
+The first step is to clone Click from the github repository and build it::
- $: ./configure --enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi
+ $: git clone https://github.com/kohler/click
+ $: cd click/
+ $: ./configure --disable-linuxmodule --enable-nsclick --enable-wifi
$: make
The --enable-wifi flag may be skipped if you don't intend on using Click with Wifi.
diff --git a/src/click/examples/nsclick-defines.cc b/src/click/examples/nsclick-defines.cc
new file mode 100644
index 000000000..37127ddb9
--- /dev/null
+++ b/src/click/examples/nsclick-defines.cc
@@ -0,0 +1,66 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Authors: Sascha Jopen
+ */
+
+
+#include "ns3/core-module.h"
+#include "ns3/ipv4-click-routing.h"
+#include "ns3/click-internet-stack-helper.h"
+#include