Compare commits

..

431 Commits

Author SHA1 Message Date
Tom Henderson 4f10ff3ee6 fix tap-bridge module dependency 2015-01-08 18:16:55 -08:00
Tom Henderson f1a32c6a7c remove integer to double conversion leading to scheduling differences in optimized builds; remove dead code 2015-01-08 18:13:27 -08:00
Tommaso Pecorella 58af432dab [Tutorial] clarify that there is no mytest, and output an error if no test is to be run. 2015-01-06 16:51:29 +01:00
Tommaso Pecorella 911cb8512a [Tutorial] fix missing "s" from argument template 2015-01-05 19:43:49 +01:00
Tom Henderson 9ec51410d2 update RELEASE_NOTES 2015-01-04 10:17:20 -08:00
Tom Henderson 6e064c60de rescan wifi bindings 2015-01-04 10:13:44 -08:00
Sébastien Deronne c0090f77b3 remove unnecessary Time to double conversions in wifi models 2015-01-04 10:13:34 -08:00
Sébastien Deronne 03bb3c4a82 remove unused payload mode argument 2015-01-04 09:43:20 -08:00
Peter D. Barnes, Jr. 8de4b6ed1e [Doxygen] Clean up references to non-POD TracedValueCallbacks 2014-12-12 14:48:13 -08:00
Tom Henderson 8198c25bf0 fix URL 2014-12-20 20:34:36 -08:00
Tom Henderson 7ea01038c3 bug 2030: provide default values for WifiTxVector 2014-12-19 18:28:40 -08:00
Tom Henderson e1108928f1 rescan bindings 2014-12-19 16:22:49 -08:00
Nicola Baldo 6d8611cb32 updated RELEASE_NOTES 2014-12-19 17:10:25 +01:00
Nicola Baldo 6609007746 fixed Bug 1996 - RSRQ calculation: misleading variable names 2014-12-19 16:49:23 +01:00
Piotr Gawlowicz 95eae84b3f Bug 2029 - new CQI generation approach fix 2014-12-19 16:18:35 +01:00
Piotr Gawlowicz 433d2b3a70 Bug 1986 FIX 2014-12-19 16:16:27 +01:00
Nicola Baldo c3509f31ee LTE radio-link failure documentation fix 2014-12-19 11:41:18 +01:00
Vedran Miletić e5024de5b3 Fix compilation with GCC 4.2.1 on FreeBSD 9
Thanks to Domagoj Stolfa <shrinkd@gmail.com> for his aid in debugging this.
2014-12-18 18:44:14 +01:00
Vedran Miletić dba84a150e Fix building with Clang 3.5 2014-12-17 16:21:13 +01:00
Tom Henderson 2549938ad7 fix script problem with symbolic links 2014-12-16 12:45:04 -08:00
Piotr Gawlowicz a9e442320b figures redrawn 2014-12-16 12:43:23 -08:00
Tom Henderson 60e8768b83 Doxygen warnings for mobility/helper and mobility/model directories 2014-12-15 21:47:59 -08:00
Piotr Gawlowicz 16460c0a7b Doxygen warnings for lte/helper directory 2014-12-15 21:41:21 -08:00
Sébastien Deronne 9fef12b955 bug 1969: Support short guard interval durations in 802.11n 2014-12-12 11:58:51 -08:00
Sébastien Deronne ac56317859 bug 2027: Calculation of HT training symbol duration does not accurately follow 802.11n standard 2014-12-12 11:38:39 -08:00
Sébastien Deronne 18f8464a00 bug 2026: 802.11n Ness parameter badly set for data frames 2014-12-12 11:17:34 -08:00
Tom Henderson d74ec5df40 LTE documentation fix for disabling error models 2014-12-12 08:58:30 -08:00
Peter D. Barnes, Jr. f71a5e0b5c [Doxygen] Timer, TimerImpl and Watchdog. 2014-12-09 14:37:02 -08:00
Peter D. Barnes, Jr. 345c8a94ac [Doxygen] OS functions: filesystem, threading, wall clock. 2014-12-09 13:17:49 -08:00
Peter D. Barnes, Jr. 846fd6a6d9 [Doxygen] Objects 2014-12-07 22:08:04 -08:00
Peter D. Barnes, Jr. 2b7fafe698 [Doxygen] Events. 2014-12-07 20:53:37 -08:00
Peter D. Barnes, Jr. 63040fc74e [Doxygen] Smart pointers 2014-12-07 18:30:55 -08:00
Peter D. Barnes, Jr. a5c748e8ab [Doxygen] CommandLine 2014-12-07 18:27:56 -08:00
Peter D. Barnes, Jr. a790246c4b [Doxygen] specialized data types 2014-11-17 15:51:36 -08:00
Peter D. Barnes, Jr. c1b266efad Standardize EventId arguments as id.
This facilitates reuse of doxygen docs.
2014-11-17 15:49:59 -08:00
Peter D. Barnes, Jr. cd94f509c3 [Sphinx] Minor corrections, fix errors in energy.rst 2014-11-12 12:08:53 -08:00
Peter D. Barnes, Jr. 8de030d7fb New TracedCallback function signatures. 2014-12-04 22:33:11 -08:00
Peter D. Barnes, Jr. d32f30ed8a [Sphinx] Update the Tracing chapter in the Tutorial. 2014-12-04 10:03:07 -08:00
Peter D. Barnes, Jr. dc2307c5ae Deprecate AddTraceSource without callback signature. 2014-12-04 10:02:36 -08:00
Peter D. Barnes, Jr. 692bf472e6 TracedCallback function signatures, the rest. 2014-12-04 10:02:01 -08:00
Peter D. Barnes, Jr. 4cb9c7b916 TracedCallback function signatures, the simple ones.
These are TracedCallback function signatures for traces sources
using a single argument.
2014-10-03 02:24:42 -07:00
Tom Henderson 4cd32401ec clarify how to properly create random variable objects 2014-12-04 12:14:46 -08:00
Sébastien Deronne 0976e2d58a fix typos in wifi module 2014-12-03 14:47:28 -08:00
Nicola Baldo a47df0d6a3 clarified PRACH Config Index assumption in LTE docs 2014-12-04 12:49:50 +01:00
Nicola Baldo 4e9c93545f added LTE troubleshooting and debugging tips 2014-12-04 12:24:38 +01:00
Peter D. Barnes, Jr. 5b9e3507b7 [Bug 2022] Spurious characters in config paths
On Nov 24, 2014, at 12:48 PM, Tom Henderson <tomh@tomh.org> wrote:
> On 11/24/2014 12:39 PM, Peter Barnes wrote:
>> I see the '%' being use in two places, beginning at line 1156 in
>> StaticInformation::DoGather ()
>>
>> Mitch used the % to escape the class names so doxygen wouldn't
>> create links.  I'm not sure why the links are bad.  Is the config
>> path token with '::' sometimes not the same as a class name?
>> Then doxygen would be looking for a non-existent class and
>> complaining, so suppressing might be good.
>>
>> Looks like I might have added the surrounding '"' in r10977.
>> Could this be the problem?
>
> Not sure.  Let me know if you don't get to this before you
> disappear for a while, and I'll pick it up if so.

Removing the quotes fixes the problem.

Removing the '%' (and leaving the quotes) fixes the problem.
This is my preferred solution, since it's a reminder that
the config path is just a string.

So my recommendation is to remove the temporaryCharacter
formatting string completely.
2014-12-03 15:27:46 -08:00
Sébastien Deronne 8bdfaee6e9 bug 1758: Missing Yans and Nist error rate models for 5/6 code rate of 802.11n HT 2014-11-29 10:13:25 -08:00
Sébastien Deronne 81b4f79c43 bug 2020: Erroneous MCS field in 802.11n PCAP files 2014-11-29 09:57:24 -08:00
Tom Henderson 9878843ed3 update tutorial section on bake environment variables 2014-11-26 16:03:44 -08:00
Ben Newton 3f609f8e31 correct a Doxygen returns comment 2014-11-26 15:15:34 -08:00
Sébastien Deronne 6930a5263f remove unused parameter from Doxygen 2014-11-26 15:11:52 -08:00
Ben Newton 3395e180e1 Bug 2013: pygccxml versions > 1.0.0 prepend a 'v' to version number 2014-11-26 14:59:32 -08:00
Tom Henderson f140db6a63 update Doxygen version required 2014-11-26 14:56:17 -08:00
Natale Patriciello 37ed3b545b ToString method to Packet 2014-11-14 15:27:37 -08:00
Tom Henderson d4f2adc449 add wscript support for wifi-sleep.cc example 2014-11-24 06:29:58 -08:00
Tom Henderson d6edb8dcbd record Doxygen aggregation info for additional classes 2014-11-20 13:42:09 -08:00
Tom Henderson 9489036c50 fix typo 2014-11-20 13:41:38 -08:00
Tom Henderson 3ca7f202b4 register energy container classes 2014-11-20 13:39:32 -08:00
Tom Henderson 8855ecbf5b bug 1583: fix ./waf configure --enable-gcov 2014-11-20 10:50:30 -08:00
Tom Henderson c961293eed WifiRemoteStation needs virtual destructor for subclassing 2014-11-20 09:39:23 -08:00
Sébastien Deronne 497cb5cd28 fix misspelled attribute and doxygen in YansWifiPhy 2014-11-19 14:05:36 -08:00
Tom Henderson 5601229646 add logging to WifiRemoteStationManager 2014-11-19 13:22:52 -08:00
Nuno Cardoso 92fc236e1c Bug 2021: Missing const qualifier in TopologyReader::Link::Attributes{Begin,End}() 2014-11-19 00:38:17 +01:00
Tommaso Pecorella 8434fca41f Bug 2016 - Radvd do not consider the SendAdvert option and don't reply to RS 2014-11-19 00:13:58 +01:00
Tommaso Pecorella 891e8de991 Remove spurious cout logs from Icmpv6L4Protocol 2014-11-13 23:34:10 +01:00
Tom Henderson 2babf9f21e rescan wifi bindings 2014-11-12 10:40:02 -08:00
Daniel Lertpratchya 7f08ea7bb0 bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and Matías Richart) 2014-11-12 10:28:29 -08:00
Tom Henderson c0ab716d67 fix brite wscript, which broke due to waf-1.7.16 upgrade 2014-11-10 12:27:57 -08:00
Ben Newton 28da60a47c bug 1995: avoid multiple definitions of PI 2014-11-07 15:00:14 -08:00
Tom Henderson 9f00ef58da remove unnecessary include 2014-11-07 11:52:19 -08:00
Tom Henderson 8baac9e338 add comment about history of ns3/math.h 2014-11-07 11:51:49 -08:00
Sébastien Deronne fea8fe1b78 bug 1906: 802.11n PHY configuration should be different for 2.4GHz and 5GHz devices 2014-11-07 09:24:11 -08:00
Tom Henderson 48b150cbf3 some additional TcpNewReno logging details 2014-11-04 16:29:22 -08:00
Tom Henderson 42879179bd update tutorial sixth.cc program output 2014-11-04 16:26:52 -08:00
Tom Henderson 048d77d474 update tutorial fifth.cc program output 2014-11-04 16:22:42 -08:00
Tom Henderson 6e5e36c1c2 update tutorial third.cc program output 2014-11-04 11:46:16 -08:00
Tom Henderson e4d8f11e55 update tutorial second.cc program output 2014-11-04 11:36:43 -08:00
Tom Henderson f2f1683a60 add coverage of ./waf install to tutorial 2014-11-04 10:54:48 -08:00
Tom Henderson 2491fc7833 bug 1326: document the -- operator to build.py 2014-11-04 09:30:54 -08:00
Peter D. Barnes, Jr. 1e1a1edbdc [Doxygen] various in src/core 2014-11-03 12:40:24 -08:00
Peter D. Barnes, Jr. ee641c723b [Doxygen] Remove inappropriate uses of @internal 2014-11-03 12:33:13 -08:00
Pedro Silva c9cdd11ceb bug 1791: improve TCP endpoint deallocation code 2014-10-31 13:36:46 -07:00
Tom Henderson c568af328f update CHANGES.html and RELEASE_NOTES 2014-10-29 18:16:16 -07:00
Tom Henderson 96be4f282b rescan wifi bindings 2014-10-29 17:21:55 -07:00
Sébastien Deronne e013980b83 bug 1971: 802.11n at 2.4 GHz should include a signal extension duration 2014-10-29 13:46:45 -07:00
Pedro Silva 8fa5f0e741 bug 1791: TCP Endpoint never deallocates when closing 2014-10-29 10:12:53 -07:00
Tom Henderson 57bba404ab regenerate selected pcap traces due to change in default propagation speed in ConstantSpeedPropagationDelayModel (bug 2011) 2014-10-29 07:30:29 -07:00
Nicola Baldo fe56ee1741 fixed Bug 2011 - speed of light constant 2014-10-28 11:48:13 +01:00
Tom Henderson 033973ca72 upgrade waf to waf-1.7.16 2014-10-22 10:04:58 -07:00
Peter D. Barnes, Jr. cccfc167dd [Doxygen] Attribute implementations. 2014-10-21 16:14:35 -07:00
Peter D. Barnes, Jr. 9d326c107d [Doxygen] Attribute implementation. 2014-10-21 12:21:13 -07:00
Peter D. Barnes, Jr. 8903ab265e Streamline progress and error reporting, show full log on errors. 2014-10-17 12:50:15 -07:00
Sébastien Deronne cf5b6ec37f bug 1970: Missing NotifyAckTimeoutStartNow in MacLow::StartDataTxTimers 2014-10-16 13:26:10 -07:00
Sébastien Deronne e4848b2055 bug 1968: missing supported 802.11n HT rates in the WifiPhy contructor 2014-10-16 12:29:17 -07:00
Peter D. Barnes, Jr. 81f6d0c1c9 Sort and pretty-print result lists of SKIPped, FAILed, CRASHed and VALGR tests from ./test.py 2014-10-15 11:29:30 -07:00
Tom Henderson 3ad3ffaa2d fix some pylint complaints about first.py 2014-10-15 07:38:06 -07:00
Tom Henderson c3c3d4e98f rescan stats bindings 2014-10-15 07:34:36 -07:00
Tom Henderson 203c408a67 add TimeProbe class to data collection framework 2014-10-15 07:06:11 -07:00
Tom Henderson 5b64122a3e bug 1997: fix PlotProbe() documentation and usage for GnuplotHelper and FileHelper 2014-10-15 07:00:24 -07:00
Tom Henderson 98b82e35a7 update CHANGES.html 2014-10-14 13:29:05 -07:00
Tom Henderson 0674674ad0 remove execute permissions on source files 2014-10-14 12:56:57 -07:00
Tom Henderson 31d2a3aad7 rescan bindings 2014-10-14 11:36:00 -07:00
Tom Henderson be2a37427c replace deprecated API 2014-10-14 11:21:47 -07:00
Tom Henderson 5d2310d3d8 removed unused includes 2014-10-14 10:02:08 -07:00
Tom Henderson 37bab66bfe remove deprecated Packet::PeekData() 2014-10-14 09:36:10 -07:00
Tom Henderson cd7311b76c remove deprecated code in internet module 2014-10-14 08:15:46 -07:00
Tom Henderson a532ec20b1 remove deprecated test methods 2014-10-14 07:37:10 -07:00
Tom Henderson c41ba4e79a rescan bindings 2014-10-13 21:25:21 -07:00
Tom Henderson 411020b4c9 update regression packet traces to account for random variable stream assignment changes 2014-10-13 16:12:13 -07:00
Tom Henderson 41b83c9851 remove deprecated RandomVariable class 2014-10-13 16:09:59 -07:00
Tom Henderson 52ba1be9f9 fix some additional sources of randomness in mesh tests 2014-10-13 15:45:32 -07:00
Tom Henderson 9f3b3bf4d2 improve some mesh module logging 2014-10-13 15:18:49 -07:00
Tom Henderson 244f1cc32d fix log component name 2014-10-13 13:36:11 -07:00
Tommaso Pecorella cee4e4ac5e Print RT/NC should be static functions 2014-10-12 16:03:16 +02:00
Tommaso Pecorella da653eed57 Bug 1957 - UdpSocketImpl is stuck after a Close() 2014-10-12 15:51:05 +02:00
Tommaso Pecorella fcda743c44 [Doxygen] network module 2014-10-07 21:37:00 +02:00
Nicola Baldo f0a030b94b fixed typo in changeset 95cf4d40ee01 2014-10-09 17:39:14 +02:00
Nicola Baldo 455db9e086 fixed units in description of RandomWalk2dMobilityModel::Direction 2014-10-09 15:41:34 +02:00
Tommaso Pecorella 013d328e7d [PyBindings] rescan core module 2014-10-09 12:40:54 +02:00
Tommaso Pecorella b703ac7f27 Fix missing header 2014-10-09 12:40:49 +02:00
Peter D. Barnes, Jr. d767aaddd2 [Doxygen] Fix configuration errors; suppress mains. 2014-10-08 21:05:10 -07:00
Peter D. Barnes, Jr. dd7996b57d Set default TypeId size. 2014-10-08 21:04:32 -07:00
Peter D. Barnes, Jr. 3f92b8e1c5 [Doxygen] Remove more trivial and/or misused groupings 2014-10-08 20:59:31 -07:00
Peter D. Barnes, Jr. 6254c4b242 [Doxygen] Remove trivial and/or misused groupings 2014-10-08 20:58:33 -07:00
Peter D. Barnes, Jr. 2aebf37542 Sphinx] Reduce build chatter 2014-10-08 17:48:38 -07:00
Peter D. Barnes, Jr. 9e5633feff [Sphinx] fix error 2014-10-08 17:47:34 -07:00
Peter D. Barnes, Jr. 792c339edc [Doxygen] Include the size of registered types in the long description for the class. 2014-10-08 13:52:14 -07:00
Peter D. Barnes, Jr. 06777c4102 Missing NS_OBJECT_ENSURE_REGISTERED 2014-10-08 13:51:06 -07:00
Peter D. Barnes, Jr. bdad6336fe [Doxygen] Remove emu/examples 2014-10-08 12:02:05 -07:00
Peter D. Barnes, Jr. 9346f805f2 Generate doxygen list of all LogComponents 2014-10-06 17:24:00 -07:00
Peter D. Barnes, Jr. b2dc58dcb9 Use StringValue instead of PointerValue (CreateObject... in AddAttribute calls 2014-10-06 17:22:59 -07:00
Peter D. Barnes, Jr. 6313928fbc [doxygen] print-introspected-doxygen.cc 2014-10-05 20:42:52 -07:00
Peter D. Barnes, Jr. a4d68196e7 Refactor print-introspected-doxygen.cc 2014-10-05 17:58:48 -07:00
Peter D. Barnes, Jr. 132655443b Patches to doxygen.warnings.report.sh:
Don't assume we're in a repo.
Only count unique warnings.
2014-10-03 16:01:49 -07:00
Peter D. Barnes, Jr. c10b5622a0 [Doxygen] Minor fix-ups 2014-10-08 11:59:31 -07:00
Tom Henderson d471d382ac rescan bindings 2014-10-07 12:19:52 -07:00
Tommaso Pecorella 899626019f [Doxygen] minor fixes 2014-10-03 23:51:58 +02:00
Tommaso Pecorella bd3ba18da4 [Doxygen] LTE Asn1Header 2014-10-06 22:36:50 -07:00
Tommaso Pecorella a49957015e [Doxygen] propagation module fixes 2014-10-03 22:41:44 +02:00
Tommaso Pecorella 4943ed3c70 [Doxygen] internet module fixes 2014-10-03 17:10:26 +02:00
Natale Patriciello d9b1ff4d71 Point-to-point documentation patch 2014-10-06 16:48:51 -07:00
Tom Henderson 1ba5df7bc3 add doxygen 2014-10-06 16:32:44 -07:00
Budiarto Herman 6603ec2fb3 LTE doxygen additions 2014-10-06 16:05:46 -07:00
Tiago Cerqueira cedd6d624b Doxygen for mobility module 2014-10-06 16:00:06 -07:00
Tom Henderson 0bb6e095b3 bug 1343 (documentation): emu-udp-echo-client/server.cc missing, but referenced in HOWTOs 2014-10-06 14:52:08 -07:00
Tom Henderson 94cd3d8542 remove deprecated emu module 2014-10-06 14:50:49 -07:00
Tom Henderson d00ccf814c add missing GPLs 2014-10-06 10:24:56 -07:00
Peter D. Barnes, Jr. cc56e83767 TracedValue callback function signatures. 2014-10-02 21:17:48 -07:00
Peter D. Barnes, Jr. 24144c56f9 Implementation for documenting TracedValue and TracedCallback signatures. 2014-10-02 21:05:15 -07:00
Peter D. Barnes, Jr. 179361f956 Reflow tutorial page 2014-09-25 14:11:46 -07:00
Peter D. Barnes, Jr. fd0426c762 Replace erroneous "using namespace ns3" with namespace ns3. 2014-10-02 21:07:20 -07:00
Tom Henderson c9f4bc4e68 bug 1551 postfix: enable logging for functions outside namespace ns3 2014-10-01 20:50:46 -07:00
Gustavo Carneiro 504c41fa1b Pull new pybindgen version to fix the build, again. 2014-09-29 22:07:14 +01:00
Gustavo Carneiro 853105d4bd Use pybindgen revno 885 to pull container ref bug fix 2014-09-28 17:21:26 +01:00
Gustavo Carneiro 285124fa83 I meant to bump pybindgen version up, not down. Use latest PBG version. 2014-09-28 16:56:37 +01:00
Gustavo Carneiro a8b9cb97c2 Python: rescan bindings 2014-09-28 12:41:46 +01:00
Gustavo Carneiro d880a29e2d Python bindings: fix generation of callback wrappers with the newest pybindgen 2014-09-28 12:39:26 +01:00
Peter D. Barnes, Jr. bfdb6ef10a [Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace? 2014-09-26 15:51:00 -07:00
Peter D. Barnes, Jr. 3611bd11a5 [Bug 1551] NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace? 2014-09-26 12:44:13 -07:00
Peter D. Barnes, Jr. b489a74147 Verbose option to doxygen.warnings.report.sh: includes doxygen build chatter. 2014-09-26 12:25:13 -07:00
Tommaso Pecorella 5d52c03318 Bug 652 - no public API for IPv4 neighbor table - Print functions 2014-09-20 23:53:22 +02:00
Tommaso Pecorella 78985e5d68 Avoid forward declaration if not needed - silence Eclipse warning 2014-09-19 22:08:58 +02:00
Tommaso Pecorella 4231c89fee Example ht-wifi-network contains old random variable syntax 2014-09-19 22:07:09 +02:00
Tommaso Pecorella e6a48c0188 Bug 1983 - FlowMonitor returns containers copies instead of references 2014-09-19 21:25:48 +02:00
Tommaso Pecorella 234e84dc35 Bug 1991 - PcapFileWrapper::CaptureSize attribute (snaplen) has no effect. 2014-09-19 21:23:55 +02:00
Tom Henderson c0168538ae revert accidental commit of debugging code in changeset 55f1b7dc037e 2014-09-19 12:07:15 -07:00
Tom Henderson 29c216b93f update CHANGES.html for new release version 2014-09-19 12:01:58 -07:00
Tom Henderson aa9be76b3f update RELEASE_NOTES for new release version 2014-09-19 11:47:30 -07:00
Tom Henderson add76409e0 Added tag ns-3.21 for changeset fa4be182ef17 2014-09-17 18:52:01 -07:00
Tom Henderson c994aa10d8 rescan remaining bindings 2014-09-15 20:51:08 -07:00
Tom Henderson 47e3b01c82 silence uninitialized variable warning for unused member 2014-09-15 20:50:43 -07:00
Tom Henderson 55501d239e conditional include of fd-net-device for lte module 2014-09-15 20:49:38 -07:00
Peter D. Barnes, Jr. fdfece661a Bug 1972: documentation to clarify the behavior with repeated argument 2014-09-15 14:35:11 -07:00
Tom Henderson 9f77006419 remove outdated reference to statistics chapter 2014-09-15 13:01:31 -07:00
Tom Henderson 52567ff22b fix formatting for CoDel chapter 2014-09-15 13:00:23 -07:00
Tommaso Pecorella d01fcfd9ab update tutorial to describe Simulator::Stop 2014-09-15 11:29:15 -07:00
Tommaso Pecorella 9b1f7c5b4b Bug 1911 - AODV can not work on nodes with more than one NetDevice 2014-09-13 19:23:39 +02:00
Tom Henderson 4ea5aa6f01 update AUTHORS 2014-09-13 09:00:41 -07:00
Tom Henderson 8e781d4d16 update CHANGES.html 2014-09-13 08:50:02 -07:00
Tom Henderson 1bfd17915d update RELEASE_NOTES 2014-09-13 08:47:05 -07:00
Sébastien Deronne a39ea72650 update WiFi documentation 2014-09-12 20:48:46 -07:00
Tom Henderson 1d0b7ff106 temporarily disable two tests failing for OS X 2014-09-12 20:27:47 -07:00
Tom Henderson 9cfe687e4a prevent TcpHeader::Deserialize() from asserting; fix a few small bugs in option code 2014-09-12 18:29:47 -07:00
Tom Henderson 45b1b3daa1 silence compiler warning 2014-09-12 18:19:47 -07:00
Tom Henderson 4394d1d4ba clarify Header::Deserialize documentation 2014-09-12 17:49:06 -07:00
Alexander Afanasyev 5b1096a52a Bug 1673: Config::Set/Connect does not search for attributes in parent classes 2014-09-12 17:34:43 -07:00
Tom Henderson 161c703a1f test case for config path attribute search on parent classes (bug 1673) 2014-09-12 17:42:12 -07:00
Tom Henderson 6674f95bc1 equation formatting for latex 2014-09-12 14:07:32 -07:00
Tommaso Pecorella 066e14f83f Bug 1824 - aodv fixes 2014-09-12 22:51:20 +02:00
Tom Henderson 3d1daf7c5a chapter included multiple times in manual 2014-09-12 13:36:01 -07:00
Peter D. Barnes, Jr. 070e2da241 Bug 1964: GetInteger overflow 2014-09-12 13:03:06 -07:00
Tom Henderson 3048ebcced regression test for bug 1964 2014-09-12 12:55:00 -07:00
Tommaso Pecorella 077579b060 Bug 1824 - L4 protocol sockets should support BindToNetDevice over IPv6 2014-09-12 20:47:17 +02:00
Tom Henderson 2cafbd6dbd repair wscript 2014-09-12 10:18:55 -07:00
Tom Henderson e2f347c513 make openflow-switch peek transport headers based on IPv4 protocol number information 2014-09-11 21:51:29 -07:00
Tom Henderson 884ad61823 adjust ns3tcp-cwnd-test-suite response vector 2014-09-11 20:08:17 -07:00
Tom Henderson 3a872a1d8c update test vector for test ns3-tcp-interoperability 2014-09-11 17:43:37 -07:00
Tom Henderson cc9e4d787b improve printing of window scale option 2014-09-11 17:29:21 -07:00
Tom Henderson 80c9d1e629 update test vectors for test ns3-tcp-loss 2014-09-11 17:22:58 -07:00
Tom Henderson fb59f7982a update test vectors for test ns3-tcp-state 2014-09-11 15:29:42 -07:00
Tom Henderson bc68d4f0e0 new test vectors for devices-mesh-flame-regression 2014-09-11 14:56:06 -07:00
Tom Henderson 9133c72c96 update mesh flame tests to account for wifi random variables 2014-09-11 14:55:42 -07:00
Tom Henderson cbc91604dd new test vectors for devices-mesh-dot11s-regression 2014-09-11 14:20:28 -07:00
Tom Henderson fafad95f72 update mesh tests to account for wifi random variables 2014-09-11 14:06:19 -07:00
Tom Henderson f17bd8c546 Mesh Wifi uses also RegularWifiMac 2014-09-11 13:45:38 -07:00
Tommaso Pecorella 274fcc293a Update RELEASE_NOTES 2014-09-11 22:47:53 +02:00
Kristian A. Hiorth 8d4db65927 Bug 1981 - PyViz shell not compatible with ipython >= 0.11 2014-09-11 20:08:05 +01:00
Tom Henderson f627ad5df2 update regression traces for OLSR 2014-09-11 11:32:09 -07:00
Tom Henderson 9db13b8df4 fix the stream assignment of some additional random variables in OLSR test suite 2014-09-11 11:23:03 -07:00
Tom Henderson 87c3097be5 update AODV regression traces 2014-09-11 10:28:37 -07:00
Tom Henderson bb457316d4 rescan internet bindings 2014-09-10 21:07:04 -07:00
Tom Henderson d4901ad3b0 move unknown TCP option handling with the base class 2014-09-10 17:31:46 -07:00
Tom Henderson bf9893dbf3 add processing for unknown TCP options 2014-09-10 16:58:31 -07:00
Tom Henderson 15333eaf9a calculate send scale factor when sending the SYN-ACK instead of when reading the SYN options 2014-09-10 15:08:30 -07:00
Tom Henderson a80337baab add some logging 2014-09-10 15:06:10 -07:00
Tom Henderson 8443885e88 restore TCP option padding approach that avoids NOPs 2014-09-10 15:05:57 -07:00
Tom Henderson d559ff6c4c remove unsupported option types from enum 2014-09-09 16:15:49 -07:00
Tommaso Pecorella 0950f7f943 TcpOptions Deserialize should return zero if a deserialization error happens 2014-09-09 09:44:37 +02:00
Natale Patriciello b6d33fd296 TCP Options - Valgrind fixes 2014-09-10 19:09:06 +02:00
Daniel Lertpratchya 1857322c43 Bug 1858 - wireless examples not correctly recording packet reception - reported by Scott Carpenter <scarpen_at_ncsu.edu> 2014-09-10 08:27:26 +02:00
Tommaso Pecorella 208fdf2681 Update RELEASE_NOTE 2014-09-10 06:15:01 +02:00
Tommaso Pecorella 65d1ba667b rescan network bindings 2014-09-10 06:09:55 +02:00
Tommaso Pecorella ae9fbb2eaa rescan applications bindings 2014-09-10 05:58:38 +02:00
Tommaso Pecorella b489a41127 Bug 1811 - Basic traffic generator for network module 2014-09-10 06:09:45 +02:00
Tom Henderson 9d2770100d last TCP option should be END, not NOP 2014-09-06 09:40:18 -07:00
Tommaso Pecorella 287bda5b7e Move some tests from src/test to appropriate places 2014-09-06 07:09:08 +02:00
Tommaso Pecorella 98945439e1 Enhancements to SimpleNetDevice and SimpleChannel 2014-09-06 07:08:49 +02:00
Tommaso Pecorella 3ae1348425 Fix clang "errors" about uninitialized variables. 2014-09-06 06:57:27 +02:00
Tom Henderson a0fefe1074 rescan wifi bindings 2014-09-05 18:50:40 -07:00
Tom Henderson 5072f3a3c6 rescan energy bindings 2014-09-05 18:46:15 -07:00
Tom Henderson 68a33cd7ba rescan lte bindings 2014-09-05 18:19:30 -07:00
Tom Henderson f6fc901227 rescan internet bindings 2014-09-05 18:00:05 -07:00
Piotr Gawlowicz 74f0cf7073 GSoC 2014 FFR algorithms - figures 2014-09-05 01:46:10 +02:00
Piotr Gawlowicz a9ef49d196 GSoC 2014 FFR algorithms 2014-09-05 01:12:55 +02:00
Anh Nguyen a64d69ce19 documentation for CoDel queue 2014-09-04 12:33:50 -07:00
Anh Nguyen 07357e4048 examples for CoDel queue 2014-09-04 12:29:36 -07:00
Anh Nguyen 4c20e1b099 test suite for CoDel queue 2014-09-04 12:27:00 -07:00
Anh Nguyen 153479dac9 changes suggested in original code review, and aditional improvements made during 2014 GSoC project 2014-09-04 12:24:07 -07:00
Tom Henderson 16e4f9b004 move CoDel queue model to internet module 2014-09-04 12:18:19 -07:00
Dave Taht 6b05c585d1 Add Codel alogithm support
---
 src/network/utils/codel-queue.cc |  482 ++++++++++++++++++++++++++++++++++++++
 src/network/utils/codel-queue.h  |  130 ++++++++++
 2 files changed, 612 insertions(+), 0 deletions(-)
 create mode 100644 src/network/utils/codel-queue.cc
 create mode 100644 src/network/utils/codel-queue.h
2014-05-22 14:42:47 -05:00
Natale Patriciello 07364f0e31 Support for basic TCP options, window scale, and timestamps, based on original code proposal by Adrian S.-W. Tam 2014-09-05 16:57:11 -07:00
Natale Patriciello b4a48d02b2 GT_OR_EQ and LT_OR_EQ macros for testing 2014-09-04 15:17:22 -07:00
Stefano Avallone bd8c6c8a32 add support for a Wifi sleep mode 2014-09-05 16:33:57 -07:00
Cristiano Tapparello d3ff87aeb2 Energy harvester model 2014-09-05 15:38:55 -07:00
Tom Henderson 47d531fb41 support disabling of NSC by command-line argument 2014-09-05 15:25:10 -07:00
Budiarto Herman 81820dd14f Updated fix for Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted 2014-09-04 23:13:41 +03:00
Nicola Baldo c69d0bfe09 fixed Bug 1893 - issue in DoSchedUlTriggerReq with harq 2014-09-03 13:42:12 +02:00
Tommaso Pecorella 07040f354c Improve IPv6 LL multicast interface selection 2014-08-30 18:20:10 +02:00
Tommaso Pecorella 51aa7c22a4 Improve ICMPv6 NS printing 2014-08-30 18:19:25 +02:00
Tommaso Pecorella dda7b43d44 Bug 1967 - LL Multicast is not compressed in the right way in IPHC 2014-08-30 18:25:22 +02:00
Tommaso Pecorella 6d42b5f6c1 lr-wpan: remove dead code and add Doxygen 2014-08-25 19:15:36 +02:00
Tommaso Pecorella 8225948ffd [Doxygen] NetDevice small fix 2014-08-25 09:34:17 +02:00
Tommaso Pecorella be8cd47fc8 [PyBindGen] rescan internet module 2014-08-24 17:29:26 +02:00
Tommaso Pecorella 6ac283a20b [Doxygen] internet module fixes 2014-08-24 17:16:17 +02:00
Tommaso Pecorella 35f32fe073 Bug 1963 - AODV can tag the same packet twice (and raise an assert). 2014-08-23 17:37:24 +02:00
Tommaso Pecorella 62eaf4f7cb [manual] Packet::EnableMetadata doesn't exist anymore 2014-08-23 17:34:17 +02:00
Tom Henderson af37384cff Suppress binding for EmuEpcHelper if EmuFdNetDevice is not enabled 2014-08-19 14:29:52 -07:00
Peter D. Barnes, Jr. 16af384434 [Sphinx] Attributes manual chapter 2014-08-18 17:43:37 -07:00
Peter D. Barnes, Jr. e34b13367b Show default attribute value in command line example - cleanup 2014-08-18 16:00:42 -07:00
Tommaso Pecorella fb985d0860 Show default attibute value in command line example - fix 2014-08-18 23:45:04 +02:00
Peter D. Barnes, Jr. 97f06df836 Show initial values of arguments; show attribute value. 2014-08-18 12:36:07 -07:00
Peter D. Barnes, Jr. 06fe039cd9 Fix misspelled argument name; refactor to use LookupAttributeByName 2014-08-18 12:35:33 -07:00
Vedran Miletić e22f7b5958 Make ordering of member variables in NSC TCP socket implementation header/source consistent 2014-08-18 11:56:15 +02:00
Tommaso Pecorella 27e7935c6c [PyBindGen] Rescan core module 2014-08-15 14:27:15 +02:00
Peter D. Barnes, Jr. b8b676a8d7 CommandLine Attribute shorthand 2014-08-14 12:46:11 -07:00
Peter D. Barnes, Jr. fa19c3d5e3 [doxygen] CommandLine formatting 2014-08-14 12:41:38 -07:00
Peter D. Barnes, Jr. 60505541ec Sort output of the CommandLine::Print functions 2014-08-14 11:31:12 -07:00
Tommaso Pecorella 894e118a3b [PyBindGen] Rescan internet module 2014-08-14 06:34:47 +02:00
Peter D. Barnes, Jr. 49bf6a544f [Doxygen] Fix errors; fix organization of Callback; organize Time. 2014-08-13 17:17:26 -07:00
Tommaso Pecorella 2d79be2427 Improvements to tcp-variants-comparison example 2014-08-13 22:43:18 +02:00
Tommaso Pecorella fbad78fbb4 Bug 1831 - TcpSocket SlowStartThreshold is not a TraceSource 2014-08-13 23:46:16 +02:00
Alina Quereilhac 10269d0a5b Fix for Bug 1961 - planetlab-tap-creator "variable set but not used" 2014-08-06 11:00:06 +02:00
Tommaso Pecorella fe90df6c23 Bug 1960 - Wrong information on index range, about Node::GetDevice 2014-08-03 15:09:19 +02:00
Tom Henderson 9a8bbca8df rescan LTE bindings 2014-08-03 09:55:53 -07:00
Nicola Baldo d762f84977 refined fix for Bug 1762 2014-08-01 14:30:42 +02:00
Budiarto Herman c53882872b fix Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted 2014-07-31 14:00:06 +02:00
Tommaso Pecorella 6af34ad829 Bug 1941 - [cont.] Remove unnecessary dependency on Application module in other modules 2014-07-27 23:02:38 +02:00
Tommaso Pecorella e3729362c9 Avoid checking all Link-Local Multicast cases in IPv6 routing 2014-07-26 13:08:33 +02:00
Lynne Salameh 691b9f892f Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple 2014-07-20 11:29:28 +02:00
Roman Naumann f0d6341ddf Bug 1951 - AODV does not update nexthop for 1-hop nodes 2014-07-20 10:13:02 +02:00
Peter D. Barnes, Jr. f8bb25d058 Enable explicit setting of the maximum look ahead in distributed simulation. 2014-07-17 15:38:07 -07:00
Peter D. Barnes, Jr. e4f944939c NS_LOG_CONDITION to control logging based on file-local state. 2014-07-17 15:34:57 -07:00
Dmitrii Shakshin 005ea81ecf NetAnim: Support for system id associated with nodes 2014-07-10 08:19:06 -07:00
Sascha Alexander Jopen 9fd85ad079 Add const double& operator[] to SpectrumValue 2014-07-08 08:27:21 +02:00
Tom Henderson b3a080b633 enable emu-related files based on waf configuration check results 2014-07-05 09:51:04 -07:00
Sascha Alexander Jopen 4078d90539 Bug 1943 - Waveform generator signal duration calc error 2014-07-04 20:22:47 +02:00
Nicola Baldo 19653b4a77 updated LTE user docs and RELEASE_NOTES for EmuEpcHelper 2014-07-03 16:43:58 +02:00
Nicola Baldo 057f56133b merge 2014-07-03 15:39:00 +02:00
Nicola Baldo fe5ee0c29b merge 2014-07-03 10:48:41 +02:00
Tom Henderson 4af772ceaa print error message when test.py list printing fails 2014-06-30 11:09:35 -07:00
John Abraham 7ec65a1816 NetAnim: Valgrind fixes 2014-06-29 20:19:00 -07:00
John Abraham b397d2775e NetAnim: Cleanup and support for more built-in counters 2014-06-28 09:59:03 -07:00
Tommaso Pecorella 31f05a6594 Bug 1941 - [cont.] Remove unnecessary dependency on Application module in other modules 2014-06-28 12:35:08 +02:00
Tommaso Pecorella d7731afca3 Bug 1941 - [partial] Remove unnecessary dependency on Application module in other modules 2014-06-28 08:31:24 +02:00
Tommaso Pecorella 16671aa50d Bug 1937 - FlowMonitor fails to track multiplexed packets 2014-06-27 22:28:07 +02:00
Tom Henderson aa3a17d3e5 improve point-to-point-net-device.cc logging 2014-06-26 13:15:49 -07:00
mmiozzo 7716182610 Bug-fix: Bug 1935 - Bug in all Uplink Schedulers regarding HARQ retx handling 2014-06-26 13:44:03 +02:00
Tom Henderson a0be1da4b5 update pybindgen version 2014-06-23 09:52:33 -07:00
Tommaso Pecorella 6bde2bde12 Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet 2014-06-18 19:03:10 +02:00
Tommaso Pecorella b7a3cff456 Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing 2014-06-17 23:31:52 +02:00
Roman Naumann 69d284bc83 Credit for Bug 1930 finding and patch. 2014-06-17 22:44:08 +02:00
Tommaso Pecorella 5a3b3d38e3 Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple 2014-06-17 22:40:32 +02:00
Tom Henderson 71d0c0f554 start RELEASE_NOTES and CHANGES.html for next version 2014-06-17 10:59:19 -07:00
Tom Henderson 060d270a04 Added tag ns-3.20 for changeset da0eb48df23f 2014-06-16 21:58:35 -07:00
Alina Quereilhac e6fc8c2ad2 update fd-tap-ping.cc instructions 2014-06-15 08:54:48 -07:00
Tom Henderson 14ee3219ae update RELEASE_NOTES 2014-06-12 12:36:44 -07:00
Sascha Jopen 5a00199a04 bug 1924 - sensing radius and CCA 2014-06-12 12:35:32 -07:00
Tom Henderson eac8c0a104 update RELEASE_NOTES 2014-06-11 20:27:12 -07:00
Unknown b9b6bacc5f bug 1923: Patch for disabling active probe requests 2014-06-11 20:26:02 -07:00
Tom Henderson ba584e1ac1 update CHANGES.html 2014-06-06 12:43:03 -07:00
Tom Henderson 2a1014565d update release notes 2014-06-06 12:32:41 -07:00
Tom Henderson 620d770f3c add author 2014-06-06 12:01:56 -07:00
Tom Henderson 15a9d1bb55 rescan wifi bindings 2014-06-06 12:00:58 -07:00
Scott Carpenter 131381a91a bug 1922- GetSsid() should not be fatal 2014-06-06 10:49:03 -07:00
Tom Henderson 50cb988c49 bug 1920 - remove DSR attribute that was conflicting with config store 2014-06-06 10:47:21 -07:00
Scott Carpenter f80a00ba88 bug 1919 - Strip trailing semicolons from mobility trace files 2014-06-06 10:18:10 -07:00
Sébastien Deronne b5f51f5366 Bug 1907- Add IsMcsSupported() 2014-06-06 10:15:54 -07:00
Tom Henderson 243e8a0645 bug 1868: restrict the compiler version for Wstrict-overflow=5 until gcc-4.9 issues are addressed 2014-06-06 10:11:35 -07:00
Tom Henderson b6a990f767 describe bug 1770 issue and workaround 2014-06-06 10:10:51 -07:00
Tom Henderson 0c9e87a440 update CHANGES.html for release 2014-05-30 21:39:15 -07:00
Tom Henderson c9051e4101 update AUTHORS list 2014-05-30 21:38:48 -07:00
Tom Henderson c9c31cce11 update RELEASE_NOTES 2014-05-30 17:38:31 -07:00
Tom Henderson 70f3450c5e update bindings 2014-05-30 10:07:22 -07:00
Unknown b9c2b3087c bug 1913: avoid crash in BlockAckManager::GetNextPacket 2014-05-29 23:00:30 -07:00
Tom Henderson 0cc9e25227 update traces for bug 1912 fix 2014-05-29 22:52:23 -07:00
Unknown 17ef04d50b bug 1912: avoid multiple MacTxMiddle instances 2014-05-29 22:51:05 -07:00
Tommaso Pecorella d1171adee8 Clarify doxygen for [Tcp,Udp]Socket ForwardUp functions 2014-05-29 21:37:33 +02:00
Tom Henderson fe5b9e2242 bug 1868: enable -Wstrict-overflow only for newer gcc versions 2014-05-28 23:03:23 -07:00
Tom Henderson f5b4f0961e remove extra newline 2014-05-28 13:10:59 -07:00
Tom Henderson f32803f7b9 bug 1900: adjust an AODV test to provide consistent traces and avoid floating point differences 2014-05-28 13:00:15 -07:00
Tommaso Pecorella e77f033498 Update RELEASE_NOTES 2014-05-21 21:03:33 +02:00
Tommaso Pecorella e74cb7f6cd Bug 1916 - RandomWalk2dMobilityMode default "Bounds" attribute is not a rectangle 2014-05-21 21:01:41 +02:00
Chris Hood 23a3e5f751 Bug 1915 - BRITE channel delay is rounded to an integer 2014-05-19 21:34:20 +02:00
Peter D. Barnes, Jr. 1164685c68 [doxygen] Fix generation of Time docs 2014-05-15 16:09:51 -07:00
Tommaso Pecorella cd8eaad8cb lr-wpan - Add Enqueue and Dequeue ASCII trace 2014-05-08 22:25:56 +02:00
Tom Henderson 23a41e0e22 add netanim capability to mixed-wireless.cc 2014-05-04 18:46:44 -07:00
Tom Henderson 7867d64876 make mobility and visualization more reasonable for example 2014-05-04 18:37:17 -07:00
Tom Henderson ddd060a1cc re-align mixed-wireless C++ and Python example 2014-05-04 17:59:01 -07:00
Alexander Afanasyev 894699eccf bug 1857: detect location of installed boost libraries 2014-05-03 15:56:25 -07:00
Tom Henderson 2661df4606 make waf smarter about finding BRITE automatically 2014-05-03 10:12:46 -07:00
Tommaso Pecorella 6fcc641c25 Update RELEASE_NOTE 2014-05-02 23:52:36 +02:00
Biljana Bojovic c4269df612 Bug 1894 - CqaFfMacScheduler needs an update 2014-05-02 17:06:37 +02:00
Nicola Baldo c612a2b43a added missing bugs in RELEASE_NOTES 2014-05-02 16:48:50 +02:00
Yufei Cheng ea04312f27 Bug 1872 and 1895 - DSR model improvements (credits also to Tomasz Seweryn <tomasz.seweryn7@gmail.com>) 2014-05-02 16:38:06 +02:00
Tommaso Pecorella d9e06f64fa fix RELEASE_NOTES 2014-05-02 08:58:51 +02:00
Tommaso Pecorella 8604dad16c lr-wpan ascii trace fix 2014-05-02 08:47:44 +02:00
Brian Swenson 7dbc7f63e4 Bug1791 patch reverted 2014-05-01 16:49:11 -04:00
Tommaso Pecorella d746b4a9d9 Add sixlowpan example using lr-wpan 2014-05-01 15:18:41 +02:00
Peter D. Barnes, Jr. a43d770825 [Bug 1868] Optimized builds are sensitive to -fstrict-overflow 2014-04-30 21:32:57 -07:00
Peter D. Barnes, Jr. 84d277bfa3 Disambiguate std::pow 2014-04-30 20:54:05 -07:00
Tom Henderson 08a075ef1d fix lr-wpan documentation build 2014-04-30 13:40:07 -07:00
Tom Henderson ff1f9f9c5f append list of skipped/failed/crashed/valgrined tests to end of test.py output 2014-04-30 13:06:17 -07:00
Tom Henderson 2c89f96f00 add lr-wpan bindings 2014-04-30 13:05:31 -07:00
Tom Henderson e0bb22b2f2 disable another copy constructor 2014-04-30 13:01:22 -07:00
Tom Henderson 20e713630a some fixes to enable Python bindings scanning 2014-04-30 12:19:33 -07:00
Sascha Jopen 022360d1f3 Reverted lr-wpan-error-model "fix", the differences were due to randomness problems. 2014-04-27 10:48:18 +02:00
Tom Henderson 2d87ec3973 update AUTHORS 2014-04-26 23:29:46 -07:00
Tom Henderson 57889369b1 Apply utils/check-style.py script on lr-wpan source code again 2014-04-26 23:27:34 -07:00
Tom Henderson 2d90b21794 more verbose test name for lr-wpan-energy-detection 2014-04-26 23:11:44 -07:00
Sascha Jopen fa763e41c5 Added firing of missing MAC TX trace sources.
Fixed error model test case after changes to the interference handling.
More code cleanup and documentation.
2014-04-26 22:23:25 +02:00
Sascha Jopen 1e7427bab1 More documentation for the PHY. 2014-04-26 09:06:00 +02:00
Margherita Filippetti 74081e597a Add number of CSMA retries to sent packet trace 2014-04-25 23:46:03 +02:00
Tom Henderson 45884e4786 assign fixed random variable streams to lr-wpan tests 2014-04-26 22:21:13 -07:00
Tom Henderson 95b22341a9 enable assignment of lr-wpan random variable stream indices 2014-04-26 22:21:03 -07:00
Tom Henderson 7059e4d396 add TestCase type specifier 2014-04-26 14:09:57 -07:00
Tom Henderson d53f68be0c multiple inclusion of lr-wpan-collision-test.cc 2014-04-26 05:44:11 -07:00
Tom Henderson ce1c08f9a7 restore Start/DoStart change to Initialize/DoInitialize to LrWpanNetDevice 2014-04-26 05:33:42 -07:00
Sascha Jopen cc1ff6ac3b First Doxygen documentation batch and code cleanups.
Moved to new random variable streams.
Use Time class where times are calculated.
Use std::min/max provided by standard library instead of own macros.
Always return a 0 FCS value for MAC trailers without FCS calculation.
2014-04-25 19:02:57 +02:00
Sascha Jopen 2eda1ac2e6 Removed sixlowpan example from scratch folder. This should go to the respective module. 2014-04-25 18:58:47 +02:00
Sascha Jopen 6ded61e205 Bug fixes and test for energy detection code. 2014-04-25 12:51:56 +02:00
Sascha Jopen bdbf0fd6e7 Changed default receiver sensitivity value. 2014-04-24 12:47:09 +02:00
Sascha Jopen 42ccc4e1dc Added log components. 2014-04-24 12:46:33 +02:00
Tom Henderson b5f0ebcab2 add lr-wpan documentation links to model library Makefile 2014-04-25 14:50:39 -07:00
Sascha Jopen e49d50c75a Updated documentation. Added debugging code. 2014-04-24 12:45:49 +02:00
Tommaso Pecorella 9c76f9ff43 Add Trace to measure the number of packet retires (for Etx metric) 2014-04-18 23:32:55 +02:00
Sascha Jopen a6316eb5a3 Make ED and CCA interference aware.
Fix a bug in interference handling.
2014-04-16 15:32:59 +02:00
Sascha Jopen c6f406fe8a Added test for ACK ordering. 2014-04-15 15:41:12 +02:00
Sascha Jopen f9fedcc59e Added LQI calculation as the PER of the complete packet scaled to 255.
Removed debugging outputs.
2014-04-15 15:40:39 +02:00
Tommaso Pecorella c65a263dbd Collision tests, the bug was a shadow 2014-04-08 21:37:23 +02:00
Tommaso Pecorella f6ad02364e Add back debugging code, seems we have a bug in interference handling. 2014-04-08 15:57:59 +02:00
Tommaso Pecorella 1e75a2cb6b Remove logging cout 2014-04-08 15:06:52 +02:00
Tommaso Pecorella 92b2936c5d Tweaks to the collision tests 2014-04-08 14:58:28 +02:00
Tommaso Pecorella d486f26151 Preliminary Collision tests 2014-04-06 23:01:10 +02:00
Sascha Jopen 6c6dcbaf31 Fixed compile errors in examples. 2014-04-06 16:35:15 +02:00
Tommaso Pecorella e0d8349d71 Possible bug fix and sequence number as SequenceNumber8 2014-04-06 12:36:51 +02:00
Tommaso Pecorella 7b51212b96 Bug in receiving a packet. Assert to highlight the problem. 2014-04-06 10:00:58 +02:00
Tommaso Pecorella 65d236b00a Add example script in scratch 2014-04-04 09:50:08 +02:00
Tommaso Pecorella 29e97984bd Tweaks to Rx values 2014-03-27 23:02:43 +01:00
Sascha Jopen 4507193d46 Removed debug output. 2014-03-27 17:25:12 +01:00
Sascha Jopen 62afc9063e First version with interference handling. 2014-03-27 16:56:15 +01:00
Tommaso Pecorella 29f5bd43f3 Align error model test to actual results after bug fixing 2014-03-25 23:21:02 +01:00
Sascha Jopen a32593c948 Relicense lr-wpan-lqi-tag.{cc,h} to GPLv2. 2014-03-25 14:55:27 +01:00
Erwan Livolant 4737871613 Fixed missing FCS calculation for ACKs. 2014-03-20 14:44:10 +01:00
Tommaso Pecorella 74d8c0d6c7 Helper: associate nodes to a PAN 2014-03-16 22:33:50 +01:00
Tommaso Pecorella ff799f5cbd Fix Hel'er's install and add ping6/6LoWPAN example 2014-03-16 20:46:00 +01:00
Tommaso Pecorella 90dc67f344 Set rx sensitivity to -110 dBm (temporary) 2014-03-16 20:45:13 +01:00
Sascha Jopen f4b5e5e4e2 - Fixed error in MAC state machine when sending an ACK and enqueuing a data packet at the same time.
- Fixed error when switching the PHY transceiver while a switch is already in progress.
2014-02-24 12:51:06 +01:00
Tommaso Pecorella 131f31f56a ACK (Sascha Jopen), NetDevice (Tommaso Pecorella and Margherita Filippetti), FCS changes (Erwan Livolant), and clang compliance 2014-02-23 16:24:11 +01:00
Tom Henderson b5d3e81f81 fix LrWpanNetDevice::GetAddress() 2014-04-26 22:42:10 -07:00
Tom Henderson ba22dba981 update lr-wpan wscript format 2014-04-26 22:41:19 -07:00
Nicola Baldo 5084f6a5af minor fix in LTE RRC logging format 2014-01-21 19:57:53 +01:00
Nicola Baldo c162fcb75b other minor fix in LTE user docs 2014-01-21 19:38:34 +01:00
Nicola Baldo b5735684f1 minor fix in LTE user docs 2014-01-21 19:36:55 +01:00
Nicola Baldo b1c73cc5d5 updated LTE standalone docs generation 2014-01-21 15:46:37 +01:00
Nicola Baldo 5a1d345b0e merge 2013-11-20 19:31:46 +01:00
Nicola Baldo 11f6f2330f improvements in lena-simple-epc-emu 2013-11-15 13:04:27 +01:00
Nicola Baldo 2b751f4a2e fixed eNB IP addresses in EmuEpcHelper 2013-11-15 13:04:01 +01:00
Nicola Baldo fb295e22c9 added EmuEpcHelper 2013-11-14 17:41:18 +01:00
Tom Henderson a4ac0f8915 update figure reference 2013-03-22 16:16:53 -07:00
Tom Henderson 8d895fc3c3 enable pcap on a lr-wpan example 2012-07-04 21:34:18 -07:00
Tom Henderson e9dc5fbd4c remove comparison that is always true due to limited range of data type 2012-07-04 21:29:55 -07:00
Tom Henderson 8f70c1a43f align with SpectrumPhy antenna model changes for ns-3.14 2012-07-04 21:26:40 -07:00
Gary Pei f74b34aac2 align lr-wpan with ns-3.13 spectrum API changes 2012-03-29 19:31:11 -07:00
Tom Henderson 1acbf3eb64 roll-up of many updates to models, tests, examples 2011-11-16 22:01:06 -08:00
Tom Henderson 9a66307754 Initial lr-wpan checkin 2011-05-29 14:38:53 -07:00
Mitch Watrous d7bd267c7e Bug 1717 - Detect unsettable attributes 2014-04-29 22:38:13 +02:00
Christopher Kosecki a15640d10e Bug 1876 - enable OLSR HNA table access 2014-04-29 20:35:34 +02:00
Tommaso Pecorella b314b544e5 [Python bindings] refresh OLSR module 2014-04-29 10:54:16 +02:00
Tommaso Pecorella 1c8972af9d Bug 1817 - IPv4 Identification field should consider protocol as well. 2014-04-29 10:07:25 +02:00
Tommaso Pecorella ae5d2c7131 Bug 1276 - optimize NistErrorRateModel 2014-04-29 10:01:47 +02:00
Konstantinos Katsaros 058c71d944 Bug 1903 - Namespace usage in olsr-state.cc/h 2014-04-29 09:50:21 +02:00
Tommaso Pecorella c75d24d0d3 RIPng - avoid spaces in ConfigStore names 2014-04-28 22:14:15 +02:00
Tom Henderson f30b671683 clarify some points about the ConfigStore 2014-04-28 10:50:25 -07:00
Tom Henderson 3588837aa6 fix typo 2014-04-28 10:38:37 -07:00
Tomasz Seweryn f7e18f35b4 Bug 1873 - Energy source checked to be aggregated to the node 2014-04-26 23:01:09 +02:00
Tom Henderson af31d858d2 add missing include 2014-04-24 17:38:36 -07:00
John Abraham 16187bdb69 NetAnim: Remove obsolete functionalities 2014-04-23 08:30:00 -07:00
Tommaso Pecorella f7769e0ea0 Update RELEASE_NOTES 2014-04-22 21:42:28 +02:00
Tommaso Pecorella 2834944fc2 Bug1829 2014-04-22 14:43:02 -04:00
Brian Swenson 2f07ece0bb Bug 1850 update tests 2014-04-22 14:16:48 -04:00
Unknown 9d815d019d Bug 1850 2014-04-22 13:58:22 -04:00
1438 changed files with 63777 additions and 56330 deletions
+2
View File
@@ -67,3 +67,5 @@ ae540de68a2534213342c5e0b12afb47d7518a90 ns-3.14
b4a70b99171ade6e9628a87780994238950a1df1 ns-3.17
cfbc9491d7e7c9d346cc042fd35b8afb8836e81f ns-3.18
322102df792e2be6c74df74f776b3470fb1db795 ns-3.19
da0eb48df23f96335f32a37f047a6bc27e197c8d ns-3.20
fa4be182ef17746cea50e89af557c79a28b76533 ns-3.21
+40 -31
View File
@@ -2,6 +2,7 @@ Alexander Afanasyev (alexander.afanasyev@ucla.edu)
Rohit Agarwal (mindprince@gmail.com)
Kirill Andreev (andreev@iitp.ru)
Dean Armstrong (deanarm@gmail.com)
Stefano Avallone (stefano.avallone@unina.it)
Ghada Badawy (gbadawy@gmail.com)
Nicola Baldo (nbaldo@cttc.es)
Mirko Banchi (mk.banchi@gmail.com)
@@ -11,12 +12,12 @@ Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
Raj Bhattacharjea (raj.b@gatech.edu)
Timo Bingmann (timo.bingmann@student.kit.edu)
Julien Boite (juboite@gmail.com)
Biljana Bojovic <bbojovic@cttc.es>
Biljana Bojovic (bbojovic@cttc.es)
Elena Borovkova (borokovaes@iitp.ru)
Pavel Boyko (boyko@iitp.ru)
Dan Broyles (muxman@sbcglobal.net)
Jonathan Brugge (j.d.brugge@student.utwente.nl)
Junling Bu <linlinjavaer@gmail.com>
Junling Bu (linlinjavaer@gmail.com)
Elena Buchatskaia (borovkovaes@iitp.ru)
Gustavo Carneiro (gjc@inescporto.pt, gjcarneiro@gmail.com)
Scott Carpenter (scarpen@ncsu.edu)
@@ -31,18 +32,19 @@ Luca Costantino (luca.costantino@gmail.com)
Alexander D'souza (moijes12@gmail.com)
Sébastien Deronne (sebastien.deronne@gmail.com)
Craig Dowell (craigdo@ee.washington.edu)
Gilaras Drakeson <gilaras@gmail.com>
Christian Facchini <c.facchini@gmail.com>
Gilaras Drakeson (gilaras@gmail.com)
Christian Facchini (c.facchini@gmail.com)
Denis Fakhriev (fakhriev@iitp.ru)
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
Luca Favatella <slackydeb@gmail.com>
Margherita Filippetti <morag87@gmail.com>
Luca Favatella (slackydeb@gmail.com)
Margherita Filippetti (morag87@gmail.com)
Pedro Fortuna (pedro.fortuna@inescporto.pt)
Juliana Freitag Borin (juliana.freitag@gmail.com)
Piotr Gawlowicz (gawlowicz.p@gmail.com)
Eric Gamess (egamess@gmail.com)
Yida Gao <yidapb@gmail.com>
Yida Gao (yidapb@gmail.com)
Thomas Geithner (thomas.geithner@dai-labor.de)
Ashim Ghosh <ashim.atiit@gmail.com>
Ashim Ghosh (ashim.atiit@gmail.com)
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
Tom Goff (tgoff@tgoff.net)
Juan C. Granda (jcgranda@uniovi.es)
@@ -53,9 +55,10 @@ Daniel Halperin (daniel@halper.in)
Bruno Haick (bghaick@hotmail.com)
Frank Helbert (frank@ime.usp.br)
Tom Henderson (tomhend@u.washington.edu)
Budiarto Herman <budiarto.herman@magister.fi>
Tom Hewer <tomhewer@mac.com>
Kim Højgaard-Hansen <kimrhh@gmail.com>
Budiarto Herman (budiarto.herman@magister.fi)
Tom Hewer (tomhewer@mac.com)
Kristian A. Hiorth (kristahi@ifi.uio.no)
Kim Højgaard-Hansen (kimrhh@gmail.com)
Chris Hood (chood8@gatech.edu)
Blake Hurd (naimorai@gmail.com)
ishan (ishan.chhabra@gmail.com)
@@ -67,7 +70,7 @@ Sam Jansen (sam.jansen@gmail.com)
Liu Jian (liujatp@gmail.com)
Piotr Jurkiewicz (piotr.jerzy.jurkiewicz@gmail.com)
Evgeny Kalishenko (ydginster@gmail.com)
Konstantinos Katsaros <dinos.katsaros@gmail.com>
Konstantinos Katsaros (dinos.katsaros@gmail.com)
Morteza Kheirkhah (m.kheirkhah@sussex.ac.uk)
Flavio Kobuta (flaviokubota@gmail.com)
Joe Kopena (tjkopena@cs.drexel.edu)
@@ -75,11 +78,11 @@ Christopher Kosecki (christopher.l.kosecki.ctr@mail.mil)
Aleksey Kovalenko (kovalenko@iitp.ru)
Mathieu Lacage (mathieu.lacage@inria.fr)
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
Kristijan Lenković <k.lenkovic@me.com>
Kristijan Lenković (k.lenkovic@me.com)
Daniel Lertpratchya (nikkipui@gmail.com)
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
Timo Lindhorst <tlnd@online.de>
Erwan Livolant <erwan.livolant@inria.fr>
Timo Lindhorst (tlnd@online.de)
Erwan Livolant (erwan.livolant@inria.fr)
Keith Ma (keith.nwsuaf@gmail.com)
Federico Maguolo (maguolof@dei.unipd.it)
Antti Makela (zarhan@cc.hut.fi)
@@ -88,26 +91,29 @@ Rubén Martínez (rmartinez@deic.uab.cat)
Fabian Mauchle (f1mauchl@hsr.ch)
Andrey Mazo (mazo@iitp.ru)
Jonathan McCrohan (jmccroha@tcd.ie)
Andrew McGregor (andrewmcgr@gmail.com)
Vedran Miletić (rivanvx@gmail.com)
Jens Mittag <jens.mittag@kit.edu>
Jens Mittag (jens.mittag@kit.edu)
Marco Miozzo (mmiozzo@cttc.es)
Faker Moatamri (faker.moatamri@inria.fr)
Edvin Močibob <edvin.mocibob@gmail.com>
Edvin Močibob (edvin.mocibob@gmail.com)
Mike Moreton (mjvm_ns@hotmail.com)
Michele Muccio <michelemuccio@virgilio.it>
Michele Muccio (michelemuccio@virgilio.it)
Sidharth Nabar (snabar@uw.edu)
Hemanth Narra (hemanth@ittc.ku.edu)
Andreas Nilsson <andrnils@gmail.com>
Roman Naumann (naumann@informatik.hu-berlin.de)
Andreas Nilsson (andrnils@gmail.com)
Jaume Nin (jnin@cttc.es)
Michael Nowatkowski (nowatkom@gmail.com)
Anh Nguyen <annguyen@ittc.ku.edu>
Anh Nguyen (annguyen@ittc.ku.edu)
Duy Nguyen (duy@soe.ucsc.edu)
Lluís Parcerisa <parcerisa@gmail.com>
Lluís Parcerisa (parcerisa@gmail.com)
Natale Patriciello (natale.patriciello@gmail.com)
Tommaso Pecorella (tommaso.pecorella@unifi.it)
Vikas Pushkar (vikaskupushkar@gmail.com)
Josh Pelkey (jpelkey@gatech.edu)
Per <per_e_lists@rocketmail.com>
Fernando Pereira <ferdonfeup@gmail.com>
Per (per_e_lists@rocketmail.com)
Fernando Pereira (ferdonfeup@gmail.com)
Colin Perkins (csp@csperkins.org)
Giuseppe Piro (g.piro@poliba.it)
Yana Podkosova (yanapdk@rambler.ru)
@@ -117,30 +123,33 @@ Bruno Ranieri (Yrrsinn@googlemail.com)
Ken Renard (kenneth.renard@arl.army.mil)
Manuel Requena (mrequena@cttc.es)
George F. Riley (riley@ece.gatech.edu)
Juergen Rinas <jrinas@gmx.de>
Juergen Rinas (jrinas@gmx.de)
Sebastian Rohde (sebastian.rohde@tu-dortmund.de)
Karsten Roscher <sfx@rocktale.de>
Karsten Roscher (sfx@rocktale.de)
Bill Roome (wdr@bell-labs.com)
David <david.rua@gmail.com>
David (david.rua@gmail.com)
Andrea Sacco (andrea.sacco85@gmail.com)
Lynne Salameh (l.salameh@cs.ucl.ac.uk)
Providence Salumu Munga (Providence.Salumu@gmail.com, Providence.Salumu_Munga@it-sudparis.eu)
Francisco Javier Sánchez-Roselly <fnavarro@ujaen.es>
l.salameh@cs.ucl.ac.uk
Francisco Javier Sánchez-Roselly (fnavarro@ujaen.es)
Florian Schmidt (Florian.Schmidt@cs.rwth-aachen.de)
Guillaume Seguin (guillaume.seguin@inria.fr)
Tomasz Seweryn (tomasz.seweryn7@gmail.com)
Dmitrii Shakshin (d.shakshin@gmail.com)
Kulin Shah (m.kulin@gmail.com)
Guowang Shi <shiguowang2007@gmail.com>
Guowang Shi (shiguowang2007@gmail.com)
Phillip Sitbon (phillip.sitbon@gmail.com)
Anirudh Sivaraman (sk.anirudh@gmail.com)
Steven Smith <smith84@llnl.gov>
Andrew Stanton <acstanton515@gmail.com>
Steven Smith (smith84@llnl.gov)
Andrew Stanton (acstanton515@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)
Dave Taht (dave.taht@bufferbloat.net)
Marcos Talau (talau@users.sourceforge.net)
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
Cristiano Tapparello (cristiano.tapparello@rochester.edu)
Hajime Tazaki (tazaki@sfc.wide.ad.jp)
Wilson Thong (wilsonwk@ee.cityu.edu.hk)
Mauro Tortonesi (mauro.tortonesi@unife.it)
+134
View File
@@ -50,6 +50,136 @@ 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.</p>
<hr>
<h1>Changes from ns-3.21 to ns-3.22</h1>
<h2>New API:</h2>
<ul>
<li> It is now possible to print the Neighbor Cache (ARP and NDISC) by using
the RoutingProtocolHelper
</li>
<li> A TimeProbe class has been added to the data collection framework in
the stats module, enabling TracedValues emitting values of type
ns3::Time to be handled by the framework.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> Several deprecated classes and class methods were removed, including EmuNetDevice, RandomVariable and derived classes, Packet::PeekData(), Ipv6AddressHelper::NewNetwork(Ipv6Address, Ipv6Prefix), Ipv6InterfaceContainer::SetRouter(), Ipv4Route::GetOutputTtl(), TestCase::AddTestCase(TestCase*), and TestCase::GetErrorStatus().
</li>
<li> Print methods involving routing tables and neighbor caches, in classes Ipv4RoutingHelper and Ipv6RoutingHelper, were converted to static methods.
</li>
<li>PointerValue attribute types in class UanChannel (NoiseModel), UanPhyGen (PerModel and SinrModel), UanPhyDual (PerModelPhy1, PerModelPhy2, SinrModelPhy1, and SinrModelPhy2), and SimpleNetDevice (TxQueue), were changed from PointerValue type to StringValue type, making them configurable via the Config subsystem.
</li>
<li> WifiPhy::CalculateTxDuration() and WifiPhy::GetPayloadDurationMicroSeconds () now take an additional frequency parameter.
</li>
<li> The attribute 'Recievers' in class YansWifiPhy was misspelled, so
this has been corrected to 'Receivers'.
</li>
<li> We have now documented the callback function signatures
for all TracedSources, using an extra (fourth) argument to
TypeId::AddTraceSource to pass the fully-qualified name
of the signature typedef. To ensure that future TraceSources
are similarly documented we have deprecated the three
argument version of AddTraceSource.
</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> waf was upgraded to version 1.7.16
</li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> The default value of the `Speed` attribute of ConstantSpeedPropagationDelayModel was changed from 300,000,000 m/s to 299,792,458 m/s (speed of light in a vacuum), causing propagation delays using this model to vary slightly.
</li>
</ul>
<hr>
<h1>Changes from ns-3.20 to ns-3.21</h1>
<h2>New API:</h2>
<ul>
<li> New "const double& SpectrumValue:: operator[] (size_t index) const".
</li>
<li> A new TraceSource has been added to TCP sockets: SlowStartThreshold.
</li>
<li> New method CommmandLine::AddValue (name, attibutePath) to provide a
shorthand argument "name" for the Attribute "path". This also has
the effect of including the help string for the Attribute in the
Usage message.
</li>
<li> The GSoC 2014 project in the LTE module has brought some additional APIs:
<ul>
<li>a new abstract class LteFfrAlgorithm, which every future
implementation of frequency reuse algorithm should inherit from</li>
<li>a new SAPs: one between MAC Scheduler and FrAlgorithm, one between
RRC and FrAlgorithm</li>
<li>new attribute to enable Uplink Power Control in LteUePhy</li>
<li>new LteUePowerControl class, an implementation of Uplink Power Control, which is
configurable by attributes. ReferenceSignalPower is sent by eNB in SIB2.
Uplink Power Control in Closed Loop Accumulative Mode is enabled by default</li>
<li>seven different Frequency Reuse Algorithms (each has its own attributes): </li>
<ul>
<li>LteFrNoOpAlgorithm</li>
<li>LteFrHardAlgorithm</li>
<li>LteFrStrictAlgorithm</li>
<li>LteFrSoftAlgorithm</li>
<li>LteFfrSoftAlgorithm</li>
<li>LteFfrEnhancedAlgorithm</li>
<li>LteFfrDistributedAlgorithm</li>
</ul>
<li>attribute in LteFfrAlgorithm to set FrCellTypeId which is used in automatic
Frequency Reuse algorithm configuration</li>
<li>LteHelper has been updated with new methods related to frequency reuse algorithm:
SetFfrAlgorithmType and SetFfrAlgorithmAttribute</li>
</ul>
</li>
<li> A new SimpleNetDeviceHelper can now be used to install SimpleNetDevices.
</li>
<li> New PacketSocketServer and PacketSocketClient apps, meant to be used in tests.
</li>
<li> Tcp Timestamps and Window Scale options have been added and are enabled by default (controllable by attribute).
</li>
<li> A new CoDel queue model has been added to the 'internet' module.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> "Icmpv6L4Protocol::ForgeEchoRequest" is now returning a packet with the proper IPv6 header.
</li>
<li> The TCP socket Attribute "SlowStartThreshold" has been renamed "InitialSlowStartThreshold" to
clarify that the effect is only on the initial value.
</li>
<li> all schedulers were updated to interact with FR entity via FFR-SAP. Only PF, PSS, CQA,
FD-TBFQ, TD-TBFQ schedulers supports Frequency Reuse functionality. In the beginning
of scheduling process, schedulers ask FR entity for avaiable RBGs and then ask if UE
can be scheduled on RB</li>
<li> eNB RRC interacts with FFR entity via RRC-FFR SAP</li>
<li> new DL-CQI generation approach was implemented. Now DL-CQI is computed from control channel as signal
and data channel (if received) as interference. New attribute in LteHelper was added to specify
DL-CQI generation approach. New approach is default one in LteHelper </li>
<li> RadioEnvironmentMap can be generated for Data or Control channel and for specified RbId;
Data or Control channel and RbId can be configured by new attributes in RadioEnvironmentMapHelper </li>
<li> lte-sinr-chunk-processor refactored to lte-chunk-processor. Removed all lte-xxx-chunk-processor
implementations</li>
<li> BindToNetDevice affects also sockets using IPv6.</li>
<li> BindToNetDevice now calls implicitly Bind (). To bind a socket to a NetDevice and to a specific address,
the correct sequence is Bind (address) - BindToNetDevice (device). The opposite will raise an error.</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> None for this release. </li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> Behavior will be changed due to the list of bugs fixed (listed in RELEASE_NOTES); users are requested to review that list as well.
</ul>
<hr>
<h1>Changes from ns-3.19 to ns-3.20</h1>
<h2>New API:</h2>
@@ -204,6 +334,10 @@ failure. </li>
value class that represents simulation time; the largest unit prior to
this addition was Second.
</li>
<li> SimpleNetDevice and SimpleChannel are not so simple anymore. SimpleNetDevice can be now a
Broadcast or PointToPoint NetDevice, it can have a limited bandwidth and it uses an output
queue.
</li>
</ul>
<h2>Changes to build system:</h2>
+138
View File
@@ -16,6 +16,144 @@ Availability
------------
This release is not yet available.
Supported platforms
-------------------
New user-visible features
-------------------------
- It is now possible to print the Neighbor Cache (ARP and NDISC) by using
the RoutingProtocolHelper
- The PrintRoutingTable... and PrintNeighborCache... are now static funtions
i.e., it's not anymore needed to instantiate an helper just to use them.
- A new TimeProbe class has been added to hook the data collection framework
to traced values emitting Time objects
Bugs fixed
----------
- Bug 1551 - NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
- Bug 1726 - WiFi Minstrel rate control algorithm doesn't save state
- Bug 1758 - Yans and Nist error rate models for 5/6 code rate 802.11n HT
- Bug 1791 - TCP Endpoint never deallocates when closing
- Bug 1906 - 802.11n PHY configuration for 2.4GHz and 5GHz devices
- Bug 1957 - UdpSocketImpl is stuck after a Close()
- Bug 1968 - Missing supported 802.11n HT rates in the WifiPhy constructor
- Bug 1969 - Support short guard interval durations in 802.11n
- Bug 1970 - Missing NotifyAckTimeoutStartNow in MacLow::StartDataTxTimers
- Bug 1971 - 802.11n at 2.4 GHz should include a signal extension duration
- Bug 1983 - FlowMonitor returns containers copies instead of references.
- Bug 1986 - test result divergence for lte-frequency-reuse test
- Bug 1991 - PcapFileWrapper::CaptureSize attribute (snaplen) has no effect.
- Bug 1996 - RSRQ calculation: misleading variable names
- Bug 1997 - Fix PlotProbe() documentation and usage for GnuplotHelper and FileHelper
- Bug 2011 - Default Speed attribute in ConstantSpeedPropagationDelayModel
- Bug 2016 - Radvd do not consider the SendAdvert option and don't reply to RS
- Bug 2020 - Erroneous MCS field in 802.11n PCAP files
- Bug 2021 - Missing const qualifier in TopologyReader::Link::Attributes{Begin,End}()
- Bug 2026 - 802.11n Ness parameter badly set for data frames
- Bug 2027 - Calculation of HT training symbol duration does not accurately follow 802.11n standard
- Bug 2028 - remove unnecessary Time to double conversions in Wifi models
- Bug 2029 - new CQI generation approach fix
- Bug 2030 - provide default values for WifiTxVector
Known issues
------------
Release 3.21
============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.21.tar.bz2
Supported platforms
-------------------
- Fedora Core 20 (32/64 bit) with g++-4.8.2
- Ubuntu 14.04 (32/64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- CentOS/RHEL 6.5 (64-bit) with g++-4.4.7
- OS X Mavericks 10.9 with Xcode 5.1.1 and clang-503.0.40
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- The LTE module now supports the transport of the S1-U, X2-U and X2-C
interfaces over emulated links via the new helper class EmuEpcHelper.
- CommandLine can now provide a shorthand argument name for any
Attribute.
- Implemented support for Frequency Reuse algorithms in LTE module, as the
outcome of GSoC 2014 project.
The project also includes several sub-features, such as:
- implementation of Downlink Power Control
- implementation of Uplink Power Control
- new DL-CQI generation approach, which increases throughput if FR algorithms
are used
- seven options of Frequency Reuse algorithms: LteFrNoOpAlgorithm,
LteFrHardAlgorithm, LteFrStrictAlgorithm, LteFrSoftAlgorithm,
LteFfrSoftAlgorithm, LteFfrEnhancedAlgorithm, LteFfrDistributedAlgorithm
- updated RadioEnvironmentMapHelper. Now RadioEnvironmentMap can be generated
for Data or Control channel and for specified RbId, what is helpful when
using FR algorithms
- Added a CoDel queue model. CoDel queues measure and control the queue
traversal delay. The ns-3 implementation is a port of the Linux
implementation.
- Added support for TCP timestamp and window scale options, and added
ability to trace the TCP slow start threshold value.
- SimpleNetDevice and SimpleChannel (used for adding basic link effects
for testing of higher-layer protocols) have been extended to support
the option of broadcast or PointToPoint link semantics. The bandwidth
and link delay can be constrained, and it uses an output queue.
- SimpleNetDevice and SimpleChannel can be installed in a node through
a new helper: SimpleNetDeviceHelper.
- Implemented new PacketSocketServer and PacketSocketClient applications.
The primary use is in tests, to avoid using the ones from the
application module that also bring in a dependency on the internet module.
Bugs fixed
----------
- Bug 1673 - Config::Set/Connect does not search for attributes in parent class
- Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted
- Bug 1811 - basic traffic generator for network module
- Bug 1824 - L4 protocol sockets should support BindToNetDevice over IPv6
- Bug 1831 - TcpSocket SlowStartThreshold is not a TraceSource
- Bug 1851 - WifiRadioEnergyModel energy consumption values are taken from a 802.15.4 chip
- Bug 1854 - std::out_of_range Problem
- Bug 1858 - wireless examples not correctly recording packet reception
- Bug 1860 - TCP needs the Window Scale option
- Bug 1893 - issue in DoSchedUlTriggerReq with harq
- Bug 1911 - AODV cannot work on nodes with more than one netdevice
- Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet
- Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple
- Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing.
- Bug 1937 - FlowMonitor fails to track multiplexed packets
- Bug 1942 - refactoring of lte-sinr-chunk-processor -> lte-chunk-processor
- Bug 1943 - Waveform generator signal duration calc error
- Bug 1951 - AODV does not update nexthop for 1-hop nodes
- Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple
- Bug 1960 - Wrong information on index range, about Node::GetDevice
- Bug 1961 - planetlab-tap-creator "variable set but not used"
- Bug 1963 - AODV can tag the same packet twice (and raise an assert)
- Bug 1964 - Integer overflow on UniformRandomVariable::GetInteger()
- Bug 1967 - LL Multicast is not compressed in the right way in IPHC
- Bug 1981 - PyViz shell not compatible with ipython >= 0.11
Known issues
------------
- Bug 1770 - The mesh module will crash if used for g++ version >= 4.8.1
in optimized mode, on a 32-bit Linux machine. Lowering the optimization
level to -O1 in this case can be used as a workaround.
Release 3.20
=============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.20.tar.bz2
Supported platforms
-------------------
- Fedora Core 20 (32/64 bit) with g++-4.8.2
+4 -6
View File
@@ -103,7 +103,7 @@ def main(argv):
module_customization.post_register_types(root_module)
# register Callback<...> type handlers
ns3modulegen_core_customizations.generate_callback_classes(root_module.after_forward_declarations,
ns3modulegen_core_customizations.register_callback_classes(root_module.after_forward_declarations,
callback_classes)
# -----------
@@ -114,20 +114,18 @@ def main(argv):
ns3modulegen_core_customizations.Object_customizations(root_module)
ns3modulegen_core_customizations.Attribute_customizations(root_module)
ns3modulegen_core_customizations.generate_callback_classes(root_module,
callback_classes)
# -----------
module_apidefs.register_functions(root_module)
if hasattr(module_customization, 'post_register_functions'):
module_customization.post_register_functions(root_module)
# -----------
root_module.generate(out)
if __name__ == '__main__':
import sys
main(sys.argv)
@@ -112,7 +112,73 @@ class CallbackImplProxyMethod(typehandlers.ReverseWrapperBase):
def generate_callback_classes(out, callbacks):
def register_callback_classes(out, callbacks):
for callback_impl_num, template_parameters in enumerate(callbacks):
cls_name = "ns3::Callback< %s >" % ', '.join(template_parameters)
#print >> sys.stderr, "***** trying to register callback: %r" % cls_name
class_name = "PythonCallbackImpl%i" % callback_impl_num
class PythonCallbackParameter(Parameter):
"Class handlers"
CTYPES = [cls_name]
print("***** registering callback handler: %r (%r)" % (ctypeparser.normalize_type_string(cls_name), cls_name), file=sys.stderr)
DIRECTIONS = [Parameter.DIRECTION_IN]
PYTHON_CALLBACK_IMPL_NAME = class_name
TEMPLATE_ARGS = template_parameters
DISABLED = False
def convert_python_to_c(self, wrapper):
"parses python args to get C++ value"
assert isinstance(wrapper, typehandlers.ForwardWrapperBase)
if self.DISABLED:
raise CodeGenerationError("wrapper could not be generated")
if self.default_value is None:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name)
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name)
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
callback_impl = wrapper.declarations.declare_variable(
'ns3::Ptr<%s>' % self.PYTHON_CALLBACK_IMPL_NAME,
'%s_cb_impl' % self.name)
wrapper.before_call.write_code("%s = ns3::Create<%s> (%s);"
% (callback_impl, self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.call_params.append(
'ns3::Callback<%s> (%s)' % (', '.join(self.TEMPLATE_ARGS), callback_impl))
else:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name, 'NULL')
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name, optional=True)
value = wrapper.declarations.declare_variable(
'ns3::Callback<%s>' % ', '.join(self.TEMPLATE_ARGS),
self.name+'_value',
self.default_value)
wrapper.before_call.write_code("if (%s) {" % (py_callback,))
wrapper.before_call.indent()
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
wrapper.before_call.write_code("%s = ns3::Callback<%s> (ns3::Create<%s> (%s));"
% (value, ', '.join(self.TEMPLATE_ARGS),
self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.before_call.unindent()
wrapper.before_call.write_code("}") # closes: if (py_callback) {
wrapper.call_params.append(value)
def convert_c_to_python(self, wrapper):
raise typehandlers.NotSupportedError("Reverse wrappers for ns3::Callback<...> types "
"(python using callbacks defined in C++) not implemented.")
def generate_callback_classes(module, callbacks):
out = module.after_forward_declarations
for callback_impl_num, template_parameters in enumerate(callbacks):
sink = MemoryCodeSink()
cls_name = "ns3::Callback< %s >" % ', '.join(template_parameters)
@@ -181,68 +247,23 @@ public:
Warning)
ok = False
if not ok:
try:
typehandlers.return_type_matcher.lookup(cls_name)[0].DISABLED = True
except typehandlers.TypeLookupError:
pass
try:
typehandlers.param_type_matcher.lookup(cls_name)[0].DISABLED = True
except typehandlers.TypeLookupError:
pass
continue
wrapper = CallbackImplProxyMethod(return_type, arguments)
wrapper.generate(sink, 'operator()', decl_modifiers=[])
sink.unindent()
sink.writeln('};\n')
print("Flushing to ", out, file=sys.stderr)
sink.flush_to(out)
class PythonCallbackParameter(Parameter):
"Class handlers"
CTYPES = [cls_name]
print("***** registering callback handler: %r" % ctypeparser.normalize_type_string(cls_name), file=sys.stderr)
DIRECTIONS = [Parameter.DIRECTION_IN]
PYTHON_CALLBACK_IMPL_NAME = class_name
TEMPLATE_ARGS = template_parameters
def convert_python_to_c(self, wrapper):
"parses python args to get C++ value"
assert isinstance(wrapper, typehandlers.ForwardWrapperBase)
if self.default_value is None:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name)
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name)
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
callback_impl = wrapper.declarations.declare_variable(
'ns3::Ptr<%s>' % self.PYTHON_CALLBACK_IMPL_NAME,
'%s_cb_impl' % self.name)
wrapper.before_call.write_code("%s = ns3::Create<%s> (%s);"
% (callback_impl, self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.call_params.append(
'ns3::Callback<%s> (%s)' % (', '.join(self.TEMPLATE_ARGS), callback_impl))
else:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name, 'NULL')
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name, optional=True)
value = wrapper.declarations.declare_variable(
'ns3::Callback<%s>' % ', '.join(self.TEMPLATE_ARGS),
self.name+'_value',
self.default_value)
wrapper.before_call.write_code("if (%s) {" % (py_callback,))
wrapper.before_call.indent()
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
wrapper.before_call.write_code("%s = ns3::Callback<%s> (ns3::Create<%s> (%s));"
% (value, ', '.join(self.TEMPLATE_ARGS),
self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.before_call.unindent()
wrapper.before_call.write_code("}") # closes: if (py_callback) {
wrapper.call_params.append(value)
def convert_c_to_python(self, wrapper):
raise typehandlers.NotSupportedError("Reverse wrappers for ns3::Callback<...> types "
"(python using callbacks defined in C++) not implemented.")
# def write_preamble(out):
@@ -374,7 +395,7 @@ def add_std_ofstream(module):
ofstream.add_constructor([Parameter.new("const char *", 'filename'),
Parameter.new("::std::ofstream::openmode", 'mode', default_value="std::ios_base::out")])
ofstream.add_method('close', None, [])
add_std_ios_openmode(module)
+5 -3
View File
@@ -13,7 +13,7 @@ from waflib.Errors import WafError
# after = TaskGen.after
## https://launchpad.net/pybindgen/
REQUIRED_PYBINDGEN_VERSION = (0, 17, 0, 868)
REQUIRED_PYBINDGEN_VERSION = (0, 17, 0, 886)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
RUN_ME=-3
@@ -255,6 +255,8 @@ int main ()
"import pygccxml; print pygccxml.__version__"],
stdout=subprocess.PIPE).communicate()[0]
pygccxml_version_str = out.strip()
# Bug 2013: pygccxml versions > 1.0.0 prepend a 'v' to version number
pygccxml_version_str = pygccxml_version_str.lstrip('v')
pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
conf.msg('Checking for pygccxml version', pygccxml_version_str)
if not (pygccxml_version >= REQUIRED_PYGCCXML_VERSION):
@@ -265,7 +267,7 @@ int main ()
conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
"pygccxml too old")
return
## Check gccxml version
try:
@@ -409,7 +411,7 @@ class gen_ns3_compat_pymod_task(Task.Task):
"""Generates a 'ns3.py' compatibility module."""
before = 'cxx'
color = 'BLUE'
def run(self):
assert len(self.outputs) == 1
outfile = file(self.outputs[0].abspath(), "w")
+15 -22
View File
@@ -344,22 +344,6 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = YES
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
# determine which symbols to keep in memory and which to flush to disk.
# When the cache is full, less often used symbols will be written to disk.
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penalty.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 1
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
# their name and scope. Since this can be an expensive process and often the
@@ -746,7 +730,7 @@ EXCLUDE_PATTERNS = */.hg/* \
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
EXCLUDE_SYMBOLS =
EXCLUDE_SYMBOLS = main
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
@@ -763,7 +747,6 @@ EXAMPLE_PATH = src/aodv/examples \
src/csma-layout/examples \
src/dsdv/examples \
src/dsr/examples \
src/emu/examples \
src/energy/examples \
src/fd-net-device/examples \
src/flow-monitor/examples \
@@ -1675,7 +1658,8 @@ PREDEFINED = \
NS3_LOG_ENABLE \
NS_LOG_COMPONENT_DEFINE()=1 \
NS_LOG_COMPONENT_DEFINE_MASK()=1 \
NS_OBJECT_ENSURE_REGISTERED()=1 \
NS_OBJECT_ENSURE_REGISTERED()=1 \
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
@@ -1683,9 +1667,18 @@ PREDEFINED = \
# Use the PREDEFINED tag if you want to use a different macro definition that
# overrules the definition found in the source code.
EXPAND_AS_DEFINED = ATTRIBUTE_VALUE_DEFINE \
EXPAND_AS_DEFINED = ATTRIBUTE_ACCESSOR_DEFINE \
ATTRIBUTE_CHECKER_DEFINE \
ATTRIBUTE_CHECKER_IMPLEMENT \
ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME \
ATTRIBUTE_CONVERTER_DEFINE \
ATTRIBUTE_HELPER_CPP \
ATTRIBUTE_HELPER_HEADER \
ATTRIBUTE_VALUE_DEFINE \
ATTRIBUTE_VALUE_DEFINE_WITH_NAME \
ATTRIBUTE_HELPER_HEADER_2
ATTRIBUTE_VALUE_IMPLEMENT \
ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME \
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all references to function-like macros
@@ -1784,7 +1777,7 @@ DOT_NUM_THREADS = 0
# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
# directory containing the font.
DOT_FONTNAME = FreeSans
DOT_FONTNAME = Helvetica
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
# The default size is 10pt.
+72 -19
View File
@@ -5,7 +5,8 @@
me=$(basename $0)
DIR="$(dirname $0)"
ROOT="$(hg root)"
# Trick to get the absolute physical path, since doxygen prefixes errors that way
ROOT=$(cd "$DIR/.."; pwd -P)
# Known log files
STANDARDLOGFILE=doxygen.log
@@ -13,6 +14,9 @@ WARNINGSLOGFILE=doxygen.warnings.log
# Default choice: generate it
LOG="$DIR/$WARNINGSLOGFILE"
# Verbose log
VERBLOG="$DIR/doxygen.verbose.log"
# Options ------------------------------
#
@@ -21,7 +25,7 @@ function usage
{
cat <<-EOF
Usage: $me [-eth] [-f <log-file> | -l | -s] [-m <module> | -F <regex>]
Usage: $me [-ethv] [-f <log-file> | -l | -s] [-m <module> | -F <regex>]
Run doxygen to generate all errors; report error counts
by module and file.
@@ -50,12 +54,50 @@ function usage
-s Skip doxygen run; use existing warnings log doc/$WARNINGSLOGFILE
-l Skip doxygen run; use the normal doxygen log doc/$STANDARDLOGFILE
-v Show the doxygen run output
-h Print this usage message
EOF
exit 1
}
# Messaging ----------------------------
#
# Arg -v Verbosity level
verbosity=0
function verbose
{
if [ "$1" == "-n" ]; then
echo -n "$2"
elif [ $verbosity -eq 1 ]; then
echo "$1 $2"
else
echo "$2"
fi
}
# Use file handle 6 for verbose output
rm -f $VERBLOG
exec 6>$VERBLOG
function status_report
{
local status="$1"
local long_msg="$2"
if [ $status -eq 0 ]; then
verbose "$long_msg " "done."
rm -f $VERBLOG
else
verbose "$long_msg " "FAILED. Details:"
cat $VERBLOG
rm -f $VERBLOG
exit 1
fi
}
# Argument processing ------------------
#
@@ -73,7 +115,10 @@ filter_test=0
filter_module=""
filter_regex=""
while getopts :etm:F:lF:sh option ; do
echo
echo "$me:"
while getopts :etm:F:lF:svh option ; do
case $option in
@@ -95,9 +140,16 @@ while getopts :etm:F:lF:sh option ; do
logfilearg="$DIR/$WARNINGSLOGFILE"
;;
(v) verbosity=1
exec 6>&1
;;
(h) usage ;;
(:) echo "$me: Missing argument to -$OPTARG" ; usage ;;
(\?) echo "$me: Invalid option: -$OPTARG" ; usage ;;
esac
done
@@ -128,7 +180,9 @@ if [ $SKIPDOXY -eq 1 ]; then
else
# Run introspection, which may require a build
(cd "$ROOT" && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h)
verbose -n "Building and running print-introspected-doxygen..."
(cd "$ROOT" && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h >&6 2>&6 )
status_report $? "./waf build"
# Modify doxygen.conf to generate all the warnings
# (We also suppress dot graphs, so shorten the run time.)
@@ -137,20 +191,14 @@ else
sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT |^WARNINGS /s/YES/no/' $conf
echo
echo -n "Rebuilding doxygen docs with full errors..."
(cd "$ROOT" && ./waf --doxygen >/dev/null 2>&1)
verbose -n "Rebuilding doxygen (v$(doxygen --version)) docs with full errors..."
(cd "$ROOT" && ./waf --doxygen >&6 2>&6 )
status=$?
rm -f $conf
mv -f $conf.bak $conf
if [ $status -eq 0 ]; then
echo "Done."
else
echo "FAILED."
exit 1
fi
status_report $status "Doxygen run"
cp -f "$DIR/$STANDARDLOGFILE" "$DIR/$WARNINGSLOGFILE"
@@ -162,7 +210,7 @@ fi
# Filter regular expression for -m and -F
filter_inRE=""
if [ "$filter_module" != "" ] ; then
filter_inRE="src/$filter_module"
filter_inRE="${filter_inRE:-}${filter_inRE:+\\|}src/$filter_module"
fi
if [ "$filter_regex" != "" ] ; then
filter_inRE="${filter_inRE:-}${filter_inRE:+\\|}$filter_regex"
@@ -171,7 +219,7 @@ fi
# Filter regular expression for -e and -t
filter_outRE=""
if [ $filter_examples -eq 1 ]; then
filter_outRE="/examples/"
filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}/examples/"
fi
if [ $filter_test -eq 1 ]; then
filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}/test/"
@@ -199,9 +247,14 @@ function filter_log
flog=$( echo "$flog" | grep -v "$filter_outRE" )
fi
flog=$( \
echo "$flog" | \
sort -t ':' -k1,1 -k2,2n | \
uniq \
)
echo "$flog"
}
# Analyze the log ----------------------
#
@@ -266,9 +319,9 @@ filecount=$( \
# Filtered in warnings
filterin=
if [ "${filter_inRE:-}" != "" ] ; then
filterin=$( \
filter_log | \
sed "s|$ROOT/||g" \
filterin=$( \
filter_log | \
sed "s|$ROOT/||g" \
)
fi
+1 -2
View File
@@ -13,8 +13,7 @@
*
* \section install-sec Building the Documentation
*
* ns-3 requires Doxygen version 1.5.4 or greater to fully build all items,
* although earlier versions of Doxygen will mostly work.
* ns-3 requires Doxygen version 1.8.3.1 or greater.
*
* Type "./waf --doxygen" or "./waf --doxygen-no-build" to build the
* documentation. The doc/ directory contains
+16 -7
View File
@@ -90,13 +90,22 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
RESCALE = ../../utils/rescale-pdf.sh
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.eps; $(CONVERT) $< $@
%.pdf : %.eps;
$(EPSTOPDF) $< -o=$@
if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
# You can set these variables from the command line.
SPHINXOPTS =
@@ -135,7 +144,7 @@ help:
copy-sources: $(SOURCES)
@rm -rf $(SOURCETEMP)
@mkdir -p $(SOURCETEMP)
@mkdir -p $(FIGURES)
@mkdir -p $(FIGURES)
@cp -r $(SOURCES) $(SOURCETEMP)
@cp -r $(SOURCEFIGS) $(FIGURES)
File diff suppressed because it is too large Load Diff
+11 -1
View File
@@ -476,7 +476,7 @@ urgent in a single module:
src/mesh/helper/dot11s/dot11s-installer.h:72: warning: Member m_root (variable) of class ns3::Dot11sStack is not documented.
src/mesh/helper/dot11s/dot11s-installer.h:35: warning: return type of member ns3::Dot11sStack::GetTypeId is not documented
src/mesh/helper/dot11s/dot11s-installer.h:56: warning: return type of member ns3::Dot11sStack::InstallStack is not documented
src/mesh/helper/flame/flame-installer.h:40: warning: Member GetTypeId() (function) of class ns3::FlameStack is not documented.
src/mesh/helper/flame/lfame-installer.h:40: warning: Member GetTypeId() (function) of class ns3::FlameStack is not documented.
src/mesh/helper/flame/flame-installer.h:60: warning: return type of member ns3::FlameStack::InstallStack is not documented
src/mesh/helper/mesh-helper.h:213: warning: Member m_nInterfaces (variable) of class ns3::MeshHelper is not documented.
src/mesh/helper/mesh-helper.h:214: warning: Member m_spreadChannelPolicy (variable) of class ns3::MeshHelper is not documented.
@@ -519,6 +519,16 @@ usage for |ns3|.
*/
class Foo
* Did you know ``typedefs`` can have formal arguments? This enables
documentation of function pointer signatures::
/**
* Bar callback function signature.
*
* \param ale The size of a pint of ale, in Imperial ounces.
*/
typedef void (* BarCallback)(const int ale);
* Copy the ``Attribute`` help strings from the ``GetTypeId`` method to use
as the brief descriptions of associated members.
+9 -2
View File
@@ -10,8 +10,8 @@ available in five forms:
* Tutorial, Manual *(this document)*, and Model Library for the `latest release <http://www.nsnam.org/documentation/latest/>`_ and `development tree <http://www.nsnam.org/ns-3-dev/documentation/>`_
* `ns-3 wiki <http://www.nsnam.org/wiki/Main_Page>`_
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/manual`` directory of ns-3's source code.
Contents
--------
.. toctree::
:maxdepth: 2
@@ -34,3 +34,10 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
python
tests
support
Source
------
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/manual`` directory of ns-3's source code.
+3 -3
View File
@@ -320,7 +320,7 @@ How to add logging to your code
Adding logging to your code is very simple:
1. Invoke the ``NS_LOG_COMPONENT_DEFINE (...);`` macro
outside of ``namespace ns3``.
inside of ``namespace ns3``.
Create a unique string identifier (usually based on the name of the file
and/or class defined within the file) and register it with a macro call
@@ -328,9 +328,9 @@ Adding logging to your code is very simple:
::
NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
...
This registers ``Ipv4L3Protocol`` as a log component.
+204 -178
View File
@@ -11,14 +11,15 @@ used with existing |ns3| modules and by other researchers.
This chapter walks you through the steps necessary to add a new module
to |ns3|.
Step 1 - Familiarize yourself with the module layout
****************************************************
.. _Step-0:
Step 0 - Module Layout
**********************
All modules can be found in the ``src`` directory. Each module can be
found in a directory that has the same name as the module. For
example, the spectrum module can be found here: ::
src/spectrum
example, the ``spectrum`` module can be found here: ``src/spectrum``.
We'll be quoting from the ``spectrum`` module for illustration.
A prototypical module has the following directory structure and
required files:
@@ -26,129 +27,164 @@ required files:
.. sourcecode:: text
src/
module-name/
bindings/
doc/
examples/
wscript
helper/
model/
test/
examples-to-run.py
wscript
module-name/
bindings/
doc/
examples/
wscript
helper/
model/
test/
examples-to-run.py
wscript
Not all directories will be present in each module.
Step 2 - Create your new module based on the template module
************************************************************
Step 1 - Create a Module Skeleton
*********************************
A python program is provided in the source directory that will create a skeleton for a new module
.. sourcecode:: bash
$ src/create-module.py
For the purposes of this discussion we will assume that your new module is called "new-module". From the ``src`` directory, do the following to create the new module:
A python program is provided in the source directory that
will create a skeleton for a new module. For the purposes
of this discussion we will assume that your new module
is called ``new-module``. From the ``src`` directory, do the following
to create the new module:
.. sourcecode:: bash
$ ./create-module.py new-module
Next, cd into ``new-module``; you will find this directory layout:
Next, ``cd`` into ``new-module``; you will find this directory layout:
.. sourcecode:: text
$ examples helper model test wscript
$ cd new-module
$ ls
doc examples helper model test wscript
We next walk through how to customize this module. All |ns3| modules
depend on the 'core' module and usually on other modules. This
dependency is specified in the wscript file.
Let's assume that 'new-module' depends on the internet,
mobility, and aodv modules. Then the call to the function that will
create this module should look like this before editing:
In more detail, the ``create-module.py`` script will create the
directories as well as initial skeleton ``wscript``, ``.h``, ``.cc``
and ``.rst`` files. The complete module with skeleton files looks like this:
.. sourcecode:: text
src/
new-module/
doc/
new-module.rst
examples/
new-module-example.cc
wscript
helper/
new-module-helper.cc
new-module-helper.h
model/
new-module.cc
new-module.h
test/
new-module-test-suite.cc
wscript
(If required the ``bindings/`` directory listed in
:ref:`Step-0 <Step-0>` will be created automatically during
the build.)
We next walk through how to customize this module. Informing ``waf``
about the files which make up your module is done by editing the two
``wscript`` files. We will walk through the main steps in this chapter.
All |ns3| modules depend on the ``core`` module and usually on
other modules. This dependency is specified in the ``wscript`` file
(at the top level of the module, not the separate ``wscript`` file
in the ``examples`` directory!). In the skeleton ``wscript``
the call that will declare your new module to ``waf`` will look
like this (before editing):
.. sourcecode:: python
def build(bld):
module = bld.create_ns3_module('new-module', ['core'])
and after editing:
Let's assume that ``new-module`` depends on the ``internet``,
``mobility``, and ``aodv`` modules. After editing it the ``wscript`` file
should look like:
.. sourcecode:: python
def build(bld):
module = bld.create_ns3_module('new-module', ['internet', 'mobility', 'aodv'])
Your module will most likely have model source files. Initial skeletons (which will compile successfully) are created in ``model/new-module.cc`` and ``model/new-module.h``.
Note that only first level module dependencies should be listed, which
is why we removed ``core``; the ``internet`` module in turn depends on
``core``.
If your module will have helper source files, then they will go into the helper/ directory; again, initial skeletons are created in that directory.
Your module will most likely have model source files. Initial skeletons
(which will compile successfully) are created in ``model/new-module.cc``
and ``model/new-module.h``.
Finally, it is good practice to write tests. A skeleton test suite and test case is created in the test/ directory. The below constructor specifies that it will be a unit test named 'new-module': ::
If your module will have helper source files, then they will go into
the ``helper/`` directory; again, initial skeletons are created
in that directory.
New-moduleTestSuite::New-moduleTestSuite ()
Finally, it is good practice to write tests and examples. These will
almost certainly be required for new modules to be accepted into
the official |ns3| source tree. A skeleton
test suite and test case is created in the ``test/`` directory.
The skeleton test suite will contain the below constructor,
which declares a new unit test named ``new-module``,
with a single test case consisting of the class ``NewModuleTestCase1``::
NewModuleTestSuite::NewModuleTestSuite ()
: TestSuite ("new-module", UNIT)
{
AddTestCase (new New-moduleTestCase1);
AddTestCase (new NewModuleTestCase1);
}
Step 3 - Adding to your module's source files
*********************************************
Step 3 - Declare Source Files
*****************************
If your new module has model and/or helper source files, then they
must be specified in your
The public header and source code files for your new module
should be specified in the ``wscript`` file by modifying it with
your text editor.
.. sourcecode:: text
src/new-module/wscript
file by modifying it with your text editor.
As an example, the source files for the spectrum module are specified
in
.. sourcecode:: text
src/spectrum/wscript
with the following list of source files:
As an example, after declaring the ``spectrum`` module,
the ``src/spectrum/wscript`` specifies the source code files
with the following list:
.. sourcecode:: python
module.source = [
'model/spectrum-model.cc',
'model/spectrum-value.cc',
def build(bld):
module = bld.create_ns3_module('spectrum', ['internet', 'propagation', 'antenna', 'applications'])
module.source = [
'model/spectrum-model.cc',
'model/spectrum-value.cc',
.
.
.
'model/microwave-oven-spectrum-value-helper.cc',
'helper/spectrum-helper.cc',
'helper/adhoc-aloha-noack-ideal-phy-helper.cc',
'helper/waveform-generator-helper.cc',
'helper/spectrum-analyzer-helper.cc',
]
'model/microwave-oven-spectrum-value-helper.cc',
'helper/spectrum-helper.cc',
'helper/adhoc-aloha-noack-ideal-phy-helper.cc',
'helper/waveform-generator-helper.cc',
'helper/spectrum-analyzer-helper.cc',
]
Step 4 - Specify your module's header files
*******************************************
The objects resulting from compiling these sources will be assembled
into a link library, which will be linked to any programs relying on this
module.
If your new module has model and/or helper header files, then they
must be specified in your
But how do such programs learn the public API of our new module? Read on!
.. sourcecode:: text
Step 4 - Declare Public Header Files
************************************
src/new-module/wscript
The header files defining the public API of your model and helpers
also should be specified in the ``wscript`` file.
file by modifying it with your text editor.
As an example, the header files for the spectrum module are specified
in
.. sourcecode:: text
src/spectrum/wscript
with the following function call, module name, and list of header
files. Note that the argument for the function new_task_gen() tells
waf to install this module's headers with the other |ns3| headers:
Continuing with the ``spectrum`` model illustration,
the public header files are specified with the following stanza.
(Note that the argument to the ``bld`` function tells
``waf`` to install this module's headers with the other |ns3| headers):
.. sourcecode:: python
@@ -169,24 +205,29 @@ waf to install this module's headers with the other |ns3| headers:
'helper/spectrum-analyzer-helper.h',
]
Step 5 - Specify your module's tests
************************************
Headers made public in this way will be accessible to users of your model
with include statements like
.. sourcecode:: cpp
#include "ns3/spectrum-model.h"
Headers used strictly internally in your implementation should not
be included here. They are still accessible to your implemenation by
include statements like
.. sourcecode:: cpp
#include "my-module-implementation.h"
Step 5 - Declare Tests
**********************
If your new module has tests, then they must be specified in your
``wscript`` file by modifying it with your text editor.
.. sourcecode:: text
src/new-module/wscript
file by modifying it with your text editor.
As an example, the tests for the spectrum module are specified in
.. sourcecode:: text
src/spectrum/wscript
with the following function call and list of test suites:
The ``spectrum`` model tests are specified with the following stanza:
.. sourcecode:: python
@@ -197,62 +238,62 @@ with the following function call and list of test suites:
'test/spectrum-value-test.cc',
]
See :doc:`Tests <tests>` for more information on how to write test cases.
Step 6 - Specify your module's examples
***************************************
Step 6 - Declare Examples
*************************
If your new module has examples, then they must be specified in your
``examples/wscript`` file. (The skeleton top-level ``wscript`` will
recursively include ``examples/wscript`` only if the examples were
enabled at configure time.)
.. sourcecode:: text
src/new-module/examples/wscript
file by modifying it with your text editor.
As an example, the examples for the core module are specified in
.. sourcecode:: text
src/core/examples/wscript
The core module's C++ examples are specified using the following
function calls and source file names. Note that the second argument
for the function ``create_ns3_program()`` is the list of modules that the
program being created depends on:
The ``spectrum`` model defines it's first example in
``src/spectrum/examples/wscript`` with
.. sourcecode:: python
obj = bld.create_ns3_program('main-callback', ['core'])
obj.source = 'main-callback.cc'
def build(bld):
obj = bld.create_ns3_program('adhoc-aloha-ideal-phy',
['spectrum', 'mobility'])
obj.source = 'adhoc-aloha-ideal-phy.cc'
obj = bld.create_ns3_program('sample-simulator', ['core'])
obj.source = 'sample-simulator.cc'
Note that the second argument to the function ``create_ns3_program()``
is the list of modules that the program being created depends on; again,
don't forget to include ``new-module`` in the list. It's best practice
to list only the direct module dependencies, and let ``waf`` deduce
the full dependency tree.
The core module's Python examples are specified using the following
Occasionally, for clarity, you may want to split the implementation
for your example among several source files. In this case, just
include those files as additional explicit sources of the example:
.. sourcecode:: python
obj = bld.create_ns3_program('new-module-example', [new-module])
obj.source = ['new-module-example.cc', 'new-module-example-part.cc']
Python examples are specified using the following
function call. Note that the second argument for the function
register_ns3_script() is the list of modules that the Python example
``register_ns3_script()`` is the list of modules that the Python example
depends on:
.. sourcecode:: python
bld.register_ns3_script('sample-simulator.py', ['core'])
bld.register_ns3_script('new-module-example.py', ['new-module'])
Step 7 - Specify which of your module's examples should be run as tests
***********************************************************************
Step 7 - Examples Run as Tests
******************************
The test framework can also be instrumented to run example programs to
In addition to running explicit test code, the test framework
can also be instrumented to run full example programs to
try to catch regressions in the examples. However, not all examples
are suitable for regression tests. A file called ``examples-to-run.py``
that exists in each module's test directory can control the invocation
of the examples when the test framework runs.
are suitable for regression tests. The file ``test/examples-to-run.py``
controls the invocation of the examples when the test framework runs.
As an example, the examples that are run by ``test.py`` for the core module are specified in
.. sourcecode:: text
src/core/test/examples-to-run.py
using the following two lists of C++ and Python examples:
The ``spectrum`` model examples run by ``test.py`` are specified in
``src/spectrum/test/examples-to-run.py`` using the following
two lists of C++ and Python examples:
.. sourcecode:: python
@@ -263,12 +304,9 @@ using the following two lists of C++ and Python examples:
#
# See test.py for more information.
cpp_examples = [
("main-attribute-value", "True", "True"),
("main-callback", "True", "True"),
("sample-simulator", "True", "True"),
("main-ptr", "True", "True"),
("main-random-variable", "True", "True"),
("sample-random-variable", "True", "True"),
("adhoc-aloha-ideal-phy", "True", "True"),
("adhoc-aloha-ideal-phy-with-microwave-oven", "True", "True"),
("adhoc-aloha-ideal-phy-matrix-propagation-loss-model", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain
@@ -281,57 +319,43 @@ using the following two lists of C++ and Python examples:
("sample-simulator.py", "True"),
]
Each tuple in the C++ list of examples to run contains
As indicated in the comment, each entry in the C++ list of examples to run
contains the tuple ``(example_name, do_run, do_valgrind_run)``, where
.. sourcecode:: python
(example_name, do_run, do_valgrind_run)
where example_name is the executable to be run, do_run is a
condition under which to run the example, and do_valgrind_run is
a condition under which to run the example under valgrind. This
is needed because NSC causes illegal instruction crashes with
some tests when they are run under valgrind.
* ``example_name`` is the executable to be run,
* ``do_run`` is a condition under which to run the example, and
* ``do_valgrind_run`` is a condition under which to run the example
under valgrind. (This is needed because NSC causes illegal instruction
crashes with some tests when they are run under valgrind.)
Note that the two conditions are Python statements that
can depend on waf configuration variables. For example,
can depend on ``waf`` configuration variables. For example,
.. sourcecode:: python
("tcp-nsc-lfn", "NSC_ENABLED == True", "NSC_ENABLED == False"),
Each tuple in the Python list of examples to run contains
Each entry in the Python list of examples to run contains the tuple
``(example_name, do_run)``, where, as for the C++ examples,
.. sourcecode:: python
* ``example_name`` is the Python script to be run, and
* ``do_run`` is a condition under which to run the example.
(example_name, do_run)
where example_name is the Python script to be run and
do_run is a condition under which to run the example.
Note that the condition is a Python statement that can
depend on waf configuration variables. For example,
Again, the condition is a Python statement that can
depend on ``waf`` configuration variables. For example,
.. sourcecode:: python
("realtime-udp-echo.py", "ENABLE_REAL_TIME == False"),
If your new module has examples, then you must specify which of them
should be run in your
.. sourcecode:: text
Step 8 - Configure and Build
****************************
src/new-module/test/examples-to-run.py
file by modifying it with your text editor. These examples are run by
test.py.
Step 8 - Build and test your new module
***************************************
You can now build and test your module as normal. You must reconfigure
the project as a first step or else your new module will not be included
in the build.
You can now configure, build and test your module as normal.
You must reconfigure the project as a first step so that ``waf``
caches the new information in your ``wscript`` files,
or else your new module will not be included in the build.
.. sourcecode:: bash
@@ -339,9 +363,11 @@ in the build.
$ ./waf build
$ ./test.py
and look for your new module's test suite (and example programs, if enabled) in the test output.
Look for your new module's test suite (and example programs,
if your module has any enabled) in the test output.
Step 9 - Python bindings
Step 9 - Python Bindings
************************
Adding Python bindings to your module is optional, and the step is
+35
View File
@@ -105,6 +105,41 @@ use a single RNG and streams and substreams from it.
.. _seeding-and-independent-replications:
Creating random variables
*************************
|ns3| supports a number of random variable objects from the base class
:cpp:class:`RandomVariableStream`. These objects derive from
:cpp:class:`ns3::Object` and are handled by smart pointers.
The correct way to create these objects is to use the templated
`CreateObject<>` method, such as:
::
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
then you can access values by calling methods on the object such as:
::
myRandomNo = x->GetInteger ();
If you try to instead do something like this:
::
myRandomNo = UniformRandomVariable().GetInteger ();
your program will encounter a segmentation fault, because the implementation
relies on some attribute construction that occurs only when `CreateObject`
is called.
Much of the rest of this chapter now discusses the properties of the
stream of pseudo-random numbers generated from such objects, and how to
control the seeding of such objects.
Seeding and independent replications
************************************
+63 -12
View File
@@ -34,7 +34,6 @@ SOURCES = \
$(SRC)/csma/doc/csma.rst \
$(SRC)/dsdv/doc/dsdv.rst \
$(SRC)/dsr/doc/dsr.rst \
$(SRC)/emu/doc/emu.rst \
$(SRC)/mpi/doc/distributed.rst \
$(SRC)/energy/doc/energy.rst \
$(SRC)/fd-net-device/doc/fd-net-device.rst \
@@ -58,6 +57,7 @@ SOURCES = \
$(SRC)/internet/doc/ipv6.rst \
$(SRC)/internet/doc/routing-overview.rst \
$(SRC)/internet/doc/tcp.rst \
$(SRC)/internet/doc/codel.rst \
$(SRC)/mobility/doc/mobility.rst \
$(SRC)/olsr/doc/olsr.rst \
$(SRC)/openflow/doc/openflow-switch.rst \
@@ -75,7 +75,6 @@ SOURCES = \
$(SRC)/stats/doc/data-collection.rst \
$(SRC)/stats/doc/probe.rst \
$(SRC)/stats/doc/scope-and-limitations.rst \
$(SRC)/stats/doc/statistics.rst \
$(SRC)/netanim/doc/animation.rst \
$(SRC)/flow-monitor/doc/flow-monitor.rst \
$(SRC)/wave/doc/wave.rst \
@@ -143,12 +142,12 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/epcSimulationTime.eps \
$(SRC)/lte/doc/source/figures/epcEutranRunningTime.eps \
$(SRC)/lte/doc/source/figures/profiling-memory.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-implementation-model.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-dl.eps \
$(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-entity-saps.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-implementation-model.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-dl.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-dl.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-ul.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.dia \
$(SRC)/lte/doc/source/figures/lte-epc-x2-entity-saps.dia \
$(SRC)/lte/doc/source/figures/lte-strongest-cell-handover-algorithm.eps \
$(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \
$(SRC)/lte/doc/source/figures/lte-phy-interference.png \
@@ -176,6 +175,24 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/fading_vehicular.png \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.pdf \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \
$(SRC)/lte/doc/source/figures/fr-enhanced-fractional-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-full-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-hard-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-soft-fractional-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v1.dia \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v2.dia \
$(SRC)/lte/doc/source/figures/fr-strict-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/ffr-distributed-scheme.dia \
$(SRC)/lte/doc/source/figures/lte-fr-soft-1-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-soft-1-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-ffr-soft-2-spectrum-trace.png \
$(SRC)/lte/doc/source/figures/lte-ffr-soft-2-spectrum-trace.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-1-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-1-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-2-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-2-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-3-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-3-rem.pdf \
$(SRC)/lte/doc/source/figures/MCS_1_4.pdf \
$(SRC)/lte/doc/source/figures/MCS_1_4.png \
$(SRC)/lte/doc/source/figures/MCS_5_8.pdf \
@@ -200,6 +217,8 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/MCS_16_test.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
$(SRC)/lte/doc/source/figures/lte-dl-power-control.dia \
$(SRC)/lte/doc/source/figures/lte-ffr-scheduling.dia \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.png \
$(SRC)/lte/doc/source/figures/lte-legacy-handover-algorithm.pdf \
@@ -266,6 +285,16 @@ IMAGES_EPS = \
$(FIGURES)/eutran-profiling-scenario.eps \
$(FIGURES)/ff-example.eps \
$(FIGURES)/ff-mac-saps.eps \
$(FIGURES)/lte-dl-power-control.eps \
$(FIGURES)/lte-ffr-scheduling.eps \
$(FIGURES)/fr-enhanced-fractional-frequency-reuse-scheme.eps \
$(FIGURES)/fr-full-frequency-reuse-scheme.eps \
$(FIGURES)/fr-hard-frequency-reuse-scheme.eps \
$(FIGURES)/fr-soft-fractional-frequency-reuse-scheme.eps \
$(FIGURES)/fr-soft-frequency-reuse-scheme-v1.eps \
$(FIGURES)/fr-soft-frequency-reuse-scheme-v2.eps \
$(FIGURES)/fr-strict-frequency-reuse-scheme.eps \
$(FIGURES)/ffr-distributed-scheme.eps \
$(FIGURES)/lte-arch-enb-data.eps \
$(FIGURES)/lte-arch-enb-ctrl.eps \
$(FIGURES)/lte-arch-ue-data.eps \
@@ -334,6 +363,16 @@ $(FIGURES)/lte-arch-data-rrc-pdcp-rlc.pdf_width = 3in
$(FIGURES)/lte-epc-e2e-data-protocol-stack.pdf_width = 15cm
$(FIGURES)/ff-mac-saps.pdf_width = 5in
$(FIGURES)/ff-example.pdf_width = 5in
$(FIGURES)/lte-dl-power-control.pdf_width = 8cm
$(FIGURES)/lte-ffr-scheduling.pdf_width = 8cm
$(FIGURES)/fr-enhanced-fractional-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-full-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-hard-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-soft-fractional-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-soft-frequency-reuse-scheme-v1.pdf_width = 8cm
$(FIGURES)/fr-soft-frequency-reuse-scheme-v2.pdf_width = 8cm
$(FIGURES)/fr-strict-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/ffr-distributed-scheme.pdf_width = 8cm
$(FIGURES)/lte-arch-enb-data.pdf_width = 6cm
$(FIGURES)/lte-arch-enb-ctrl.pdf_width = 10cm
$(FIGURES)/lte-arch-ue-data.pdf_width = 6cm
@@ -341,7 +380,9 @@ $(FIGURES)/lte-arch-ue-ctrl.pdf_width = 10cm
$(FIGURES)/lte-rlc-implementation-model.pdf_width = 20in
$(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-retx-dl.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm
$(FIGURES)/lte-epc-x2-entity-saps.pdf_width = 12cm
$(FIGURES)/lte-phy-interference.pdf_width = 12cm
$(FIGURES)/lte-subframe-structure.pdf_width = 2in
$(FIGURES)/mac-random-access-contention.pdf_width = 10cm
@@ -359,11 +400,21 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
RESCALE = ../../utils/rescale-pdf.sh
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.eps; $(CONVERT) $< $@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
# You can set these variables from the command line.
+1 -3
View File
@@ -18,8 +18,7 @@ any combination of simulated or emulated devices.
**Note:** Prior to ns-3.17, the emulation capability was provided by a
special device called an ``Emu`` NetDevice; the ``Emu`` NetDevice has
been superseded by the ``FdNetDevice``, and will be deprecated and removed
in future revisions of |ns3|.
been replaced by the ``FdNetDevice``.
One of the use-cases we want to support is that of a testbed. A concrete example
of an environment of this kind is the ORBIT testbed. ORBIT is a laboratory
@@ -83,6 +82,5 @@ simulated |ns3| networks.
.. toctree::
emu
fd-net-device
tap
+1
View File
@@ -8,3 +8,4 @@ Internet Models
ipv6
routing-overview
tcp
codel
+16 -3
View File
@@ -27,9 +27,22 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.NOTPARALLEL:
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
help:
@echo "Please use \`make <target>' where <target> is one of"
+16 -3
View File
@@ -27,9 +27,22 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.NOTPARALLEL:
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
help:
@echo "Please use \`make <target>' where <target> is one of"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

+96 -90
View File
@@ -1,6 +1,8 @@
.. include:: replace.txt
.. highlight:: cpp
.. _BuildingTopologies:
Building Topologies
-------------------
@@ -413,7 +415,7 @@ You should see the contents of the pcap file displayed:
reading from file second-0-0.pcap, link-type PPP (PPP)
2.000000 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.007602 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.017607 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
The first line of the dump indicates that the link type is PPP (point-to-point)
which we expect. You then see the echo packet leaving node zero via the
@@ -433,7 +435,7 @@ link:
reading from file second-1-0.pcap, link-type PPP (PPP)
2.003686 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Here we see that the link type is also PPP as we would expect. You see the
packet from IP address 10.1.1.1 (that was sent at 2.000000 seconds) headed
@@ -453,12 +455,12 @@ You should now see the promiscuous dump of node two, device zero:
.. sourcecode:: text
reading from file second-2-0.pcap, link-type EN10MB (Ethernet)
2.003696 arp who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003707 arp reply 10.1.2.4 is-at 00:00:00:00:00:06
2.003801 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4
2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.007698 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.007710 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
2.007803 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.013815 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.013828 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
As you can see, the link type is now "Ethernet". Something new has appeared,
though. The bus network needs ``ARP``, the Address Resolution Protocol.
@@ -473,15 +475,15 @@ This exchange is seen in the following lines,
.. sourcecode:: text
2.003696 arp who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003707 arp reply 10.1.2.4 is-at 00:00:00:00:00:06
2.007698 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.007710 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
Then node one, device one goes ahead and sends the echo packet to the UDP echo
server at IP address 10.1.2.4.
.. sourcecode:: text
2.003801 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.007803 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
The server receives the echo request and turns the packet around trying to send
it back to the source. The server knows that this address is on another network
@@ -492,14 +494,14 @@ just like the first CSMA node had to do.
.. sourcecode:: text
2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4
2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03
2.013815 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.013828 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
The server then sends the echo back to the forwarding node.
.. sourcecode:: text
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Looking back at the rightmost node of the point-to-point link,
@@ -514,7 +516,7 @@ the last line of the trace dump.
reading from file second-1-0.pcap, link-type PPP (PPP)
2.003686 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Lastly, you can look back at the node that originated the echo
@@ -528,7 +530,7 @@ and see that the echoed packet arrives back at the source at 2.007602 seconds,
reading from file second-0-0.pcap, link-type PPP (PPP)
2.000000 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.007602 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.017607 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Finally, recall that we added the ability to control the number of CSMA devices
in the simulation by command line argument. You can change this argument in
@@ -547,9 +549,10 @@ You should now see,
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'
'build' finished successfully (0.405s)
Sent 1024 bytes to 10.1.2.5
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.2.5
At time 2s client sent 1024 bytes to 10.1.2.5 port 9
At time 2.0118s server received 1024 bytes from 10.1.1.1 port 49153
At time 2.0118s server sent 1024 bytes to 10.1.1.1 port 49153
At time 2.02461s client received 1024 bytes from 10.1.2.5 port 9
Notice that the echo server has now been relocated to the last of the CSMA
nodes, which is 10.1.2.5 instead of the default case, 10.1.2.4.
@@ -621,9 +624,10 @@ you will see the following output:
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'
'build' finished successfully (0.407s)
Sent 1024 bytes to 10.1.2.101
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.2.101
At time 2s client sent 1024 bytes to 10.1.2.101 port 9
At time 2.0068s server received 1024 bytes from 10.1.1.1 port 49153
At time 2.0068s server sent 1024 bytes to 10.1.1.1 port 49153
At time 2.01761s client received 1024 bytes from 10.1.2.101 port 9
Note that the echo server is now located at 10.1.2.101 which corresponds to
having 100 "extra" CSMA nodes with the echo server on the last one. If you
@@ -655,8 +659,8 @@ entire CSMA network.
.. sourcecode:: text
reading from file second-100-0.pcap, link-type EN10MB (Ethernet)
2.003696 arp who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101
2.006698 ARP, Request who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.013815 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101, length 50
Now take a look at the ``tcpdump`` for ``second-101-0.pcap``.
@@ -669,12 +673,12 @@ You can now see that node 101 is really the participant in the echo exchange.
.. sourcecode:: text
reading from file second-101-0.pcap, link-type EN10MB (Ethernet)
2.003696 arp who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003696 arp reply 10.1.2.101 is-at 00:00:00:00:00:67
2.003801 IP 10.1.1.1.49153 > 10.1.2.101.9: UDP, length 1024
2.003801 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101
2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03
2.003822 IP 10.1.2.101.9 > 10.1.1.1.49153: UDP, length 1024
2.006698 ARP, Request who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.006698 ARP, Reply 10.1.2.101 is-at 00:00:00:00:00:67, length 50
2.006803 IP 10.1.1.1.49153 > 10.1.2.101.9: UDP, length 1024
2.013803 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101, length 50
2.013828 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.013828 IP 10.1.2.101.9 > 10.1.1.1.49153: UDP, length 1024
Models, Attributes and Reality
******************************
@@ -1183,7 +1187,7 @@ repository you would type,
.. sourcecode:: bash
$ cp examples/third.cc scratch/mythird.cc
$ cp examples/tutorial/third.cc scratch/mythird.cc
$ ./waf
$ ./waf --run scratch/mythird
@@ -1195,9 +1199,10 @@ Again, since we have set up the UDP echo applications just as we did in the
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'
'build' finished successfully (0.407s)
Sent 1024 bytes to 10.1.2.4
Received 1024 bytes from 10.1.3.3
Received 1024 bytes from 10.1.2.4
At time 2s client sent 1024 bytes to 10.1.2.4 port 9
At time 2.01796s server received 1024 bytes from 10.1.3.3 port 49153
At time 2.01796s server sent 1024 bytes to 10.1.3.3 port 49153
At time 2.03364s client received 1024 bytes from 10.1.2.4 port 9
Recall that the first message, ``Sent 1024 bytes to 10.1.2.4``," is the
UDP echo client sending a packet to the server. In this case, the client
@@ -1235,19 +1240,18 @@ You should see some wifi-looking contents you haven't seen here before:
reading from file third-0-1.pcap, link-type IEEE802_11 (802.11)
0.000025 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
0.000263 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000279 Acknowledgment RA:00:00:00:00:00:09
0.000552 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000568 Acknowledgment RA:00:00:00:00:00:07
0.000664 Assoc Response AID(0) :: Succesful
0.001001 Assoc Response AID(0) :: Succesful
0.001145 Acknowledgment RA:00:00:00:00:00:0a
0.001233 Assoc Response AID(0) :: Succesful
0.001377 Acknowledgment RA:00:00:00:00:00:0a
0.001597 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.001613 Acknowledgment RA:00:00:00:00:00:08
0.001691 Assoc Response AID(0) :: Succesful
0.001835 Acknowledgment RA:00:00:00:00:00:0a
0.000308 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000324 Acknowledgment RA:00:00:00:00:00:08
0.000402 Assoc Response AID(0) :: Successful
0.000546 Acknowledgment RA:00:00:00:00:00:0a
0.000721 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000737 Acknowledgment RA:00:00:00:00:00:07
0.000824 Assoc Response AID(0) :: Successful
0.000968 Acknowledgment RA:00:00:00:00:00:0a
0.001134 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.001150 Acknowledgment RA:00:00:00:00:00:09
0.001273 Assoc Response AID(0) :: Successful
0.001417 Acknowledgment RA:00:00:00:00:00:0a
0.102400 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
0.204800 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
0.307200 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
@@ -1268,8 +1272,8 @@ Again, you should see some familiar looking contents:
.. sourcecode:: text
reading from file third-0-0.pcap, link-type PPP (PPP)
2.002160 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.009767 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
2.008151 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.026758 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
This is the echo packet going from left to right (from Wifi to CSMA) and back
again across the point-to-point link.
@@ -1285,8 +1289,8 @@ Again, you should see some familiar looking contents:
.. sourcecode:: text
reading from file third-1-0.pcap, link-type PPP (PPP)
2.005846 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.006081 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
2.011837 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
This is also the echo packet going from left to right (from Wifi to CSMA) and
back again across the point-to-point link with slightly different timings
@@ -1304,12 +1308,12 @@ You should see some familiar looking contents:
.. sourcecode:: text
reading from file third-1-1.pcap, link-type EN10MB (Ethernet)
2.005846 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.005870 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
2.005870 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.005975 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.005975 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.006081 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
2.017837 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.017861 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
2.017861 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.022966 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.022966 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
This should be easily understood. If you've forgotten, go back and look at
the discussion in ``second.cc``. This is the same sequence.
@@ -1385,37 +1389,39 @@ they happen.
.. sourcecode:: text
Build finished successfully (00:00:01)
'build' finished successfully (5.989s)
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10, y = 0
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.41539, y = -0.811313
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.46199, y = -1.11303
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.52738, y = -1.46869
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.67099, y = -1.98503
/NodeList/7/$ns3::MobilityModel/CourseChange x = 5.6835, y = -2.14268
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.70932, y = -1.91689
Sent 1024 bytes to 10.1.2.4
Received 1024 bytes from 10.1.3.3
Received 1024 bytes from 10.1.2.4
/NodeList/7/$ns3::MobilityModel/CourseChange x = 5.53175, y = -2.48576
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.58021, y = -2.17821
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.18915, y = -1.25785
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.7572, y = -0.434856
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.62404, y = 0.556238
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.74127, y = 1.54934
/NodeList/7/$ns3::MobilityModel/CourseChange x = 5.73934, y = 1.48729
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.18521, y = 0.59219
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.58121, y = 1.51044
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.27897, y = 2.22677
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.42888, y = 1.70014
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.40519, y = 1.91654
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.51981, y = 1.45166
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.34588, y = 2.01523
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.81046, y = 2.90077
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.89186, y = 3.29596
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.46617, y = 2.47732
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.05492, y = 1.56579
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.00393, y = 1.25054
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.00968, y = 1.35768
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.33503, y = 2.30328
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.18682, y = 3.29223
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.96865, y = 2.66873
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.3841, y = 0.923277
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.2049, y = 1.90708
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.8136, y = 1.11368
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.8452, y = 2.11318
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.9797, y = 3.10409
At time 2s client sent 1024 bytes to 10.1.2.4 port 9
At time 2.01796s server received 1024 bytes from 10.1.3.3 port 49153
At time 2.01796s server sent 1024 bytes to 10.1.3.3 port 49153
At time 2.03364s client received 1024 bytes from 10.1.2.4 port 9
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.3273, y = 4.04175
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.013, y = 4.76955
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.4317, y = 5.67771
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.4607, y = 5.91681
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.0155, y = 6.74878
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.0076, y = 6.62336
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.6285, y = 5.698
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.32, y = 4.97559
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.1134, y = 3.99715
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.8359, y = 4.68851
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.5953, y = 3.71789
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.7595, y = 4.26688
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.7629, y = 4.34913
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.2292, y = 5.19485
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.2344, y = 5.09394
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.3601, y = 4.60846
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.40025, y = 4.32795
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.14292, y = 4.99761
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.08299, y = 5.99581
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.26068, y = 5.42677
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.35917, y = 6.42191
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.66805, y = 7.14466
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.71414, y = 6.84456
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.42489, y = 7.80181
@@ -743,6 +743,69 @@ took care of the hard part for you. The remaining lines of our first
return 0;
}
When the simulator will stop?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|ns3| is a Discrete Event (DE) simulator. In such a simulator, each event is
associated with its execution time, and the simulation proceeds by executing
events in the temporal order of simulation time. Events may cause future
events to be scheduled (for example, a timer may reschedule itself to
expire at the next interval).
The initial events are usually triggered by each object, e.g., IPv6 will
schedule Router Advertisements, Neighbor Solicitations, etc.,
an Application schedule the first packet sending event, etc.
When an event is processed, it may generate zero, one or more events.
As a simulation executes, events are consumed, but more events may (or may
not) be generated.
The simulation will stop automatically when no further events are in the
event queue, or when a special Stop event is found. The Stop event is
created through the
``Simulator::Stop (stopTime);`` function.
There is a typical case where ``Simulator::Stop`` is absolutely necessary
to stop the simulation: when there is a self-sustaining event.
Self-sustaining (or recurring) events are events that always reschedule
themselves. As a consequence, they always keep the event queue non-empty.
There are many protocols and modules containing recurring events, e.g.:
* FlowMonitor - periodic check for lost packets
* RIPng - periodic broadcast of routing tables update
* etc.
In these cases, ``Simulator::Stop`` is necessary to gracefully stop the
simulation. In addition, when |ns3| is in emulation mode, the
``RealtimeSimulator`` is used to keep the simulation clock aligned with
the machine clock, and ``Simulator::Stop`` is necessary to stop the
process.
Many of the simulation programs in the tutorial do not explicitly call
``Simulator::Stop``, since the event queue will automatically run out
of events. However, these programs will also accept a call to
``Simulator::Stop``. For example, the following additional statement
in the first example program will schedule an explicit stop at 11 seconds:
::
+ Simulator::Stop (Seconds (11.0));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
The above wil not actually change the behavior of this program, since
this particular simulation naturally ends after 10 seconds. But if you
were to change the stop time in the above statement from 11 seconds to 1
second, you would notice that the simulation stops before any output is
printed to the screen (since the output occurs around time 2 seconds of
simulation time).
It is important to call ``Simulator::Stop`` *before* calling
``Simulator::Run``; otherwise, ``Simulator::Run`` may never return control
to the main program to execute the stop!
Building Your Script
++++++++++++++++++++
We have made it trivial to build your simple scripts. All you have to do is
+29 -25
View File
@@ -103,19 +103,19 @@ some of the new lines of this diff:
::
+ std::string probeName;
+ std::string probeTrace;
+ std::string probeType;
+ std::string tracePath;
+ if (useV6 == false)
+ {
...
+ probeName = "ns3::Ipv4PacketProbe";
+ probeTrace = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
+ probeType = "ns3::Ipv4PacketProbe";
+ tracePath = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
+ }
+ else
+ {
...
+ probeName = "ns3::Ipv6PacketProbe";
+ probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
+ probeType = "ns3::Ipv6PacketProbe";
+ tracePath = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
+ }
...
+ // Use GnuplotHelper to plot the packet byte count over time
@@ -129,12 +129,12 @@ some of the new lines of this diff:
+ "Time (Seconds)",
+ "Packet Byte Count");
+
+ // Specify the probe type, probe path (in configuration namespace), and
+ // Specify the probe type, trace source path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to plot. The fourth argument
+ // specifies the name of the data series label on the plot. The last
+ // argument formats the plot by specifying where the key should be placed.
+ plotHelper.PlotProbe (probeName,
+ probeTrace,
+ plotHelper.PlotProbe (probeType,
+ tracePath,
+ "OutputBytes",
+ "Packet Byte Count",
+ GnuplotAggregator::KEY_BELOW);
@@ -151,8 +151,8 @@ some of the new lines of this diff:
+
+ // Specify the probe type, probe path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to write.
+ fileHelper.WriteProbe (probeName,
+ probeTrace,
+ fileHelper.WriteProbe (probeType,
+ tracePath,
+ "OutputBytes");
+
Simulator::Stop (Seconds (20));
@@ -161,7 +161,7 @@ some of the new lines of this diff:
The careful reader will have noticed, when testing the IPv6 command
line attribute, that ``seventh.cc`` had created a number of new output files:
line attribute above, that ``seventh.cc`` had created a number of new output files:
::
@@ -178,6 +178,8 @@ by hooking the data collection components to |ns3| trace sources, and
marshaling the data into a formatted ``gnuplot`` and into a formatted
text file. In the next sections, we'll review each of these.
.. _GnuPlotHelper:
GnuplotHelper
*************
@@ -257,26 +259,26 @@ variables for later use:
::
+ std::string probeName;
+ std::string probeTrace;
+ probeName = "ns3::Ipv6PacketProbe";
+ probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
+ std::string probeType;
+ std::string tracePath;
+ probeType = "ns3::Ipv6PacketProbe";
+ tracePath = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
We use them here:
::
+ // Specify the probe type, probe path (in configuration namespace), and
+ // Specify the probe type, trace source path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to plot. The fourth argument
+ // specifies the name of the data series label on the plot. The last
+ // argument formats the plot by specifying where the key should be placed.
+ plotHelper.PlotProbe (probeName,
+ probeTrace,
+ plotHelper.PlotProbe (probeType,
+ tracePath,
+ "OutputBytes",
+ "Packet Byte Count",
+ GnuplotAggregator::KEY_BELOW);
The first two arguments are the name of the probe type and the probe trace.
The first two arguments are the name of the probe type and the trace source path.
These two are probably the hardest to determine when you try to use
this framework to plot other traces. The probe trace here is the ``Tx``
trace source of class ``Ipv6L3Protocol``. When we examine this class
@@ -359,6 +361,8 @@ The following traced values are supported with Probes as of this writing:
+------------------+-------------------+------------------------------------+
| bool | BooleanProbe | stats/model/uinteger-16-probe.h |
+------------------+-------------------+------------------------------------+
| ns3::Time | TimeProbe | stats/model/time-probe.h |
+------------------+-------------------+------------------------------------+
The following TraceSource types are supported by Probes as of this writing:
@@ -417,17 +421,17 @@ FORMATTED is specified) with a format string such as follows:
+ // Set the labels for this formatted output file.
+ fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f");
Finally, the probe of interest must be hooked. Again, the probeName and
probeTrace variables in this example are used, and the probe's output
Finally, the trace source of interest must be hooked. Again, the probeType and
tracePath variables in this example are used, and the probe's output
trace source "OutputBytes" is hooked:
::
+
+ // Specify the probe type, probe path (in configuration namespace), and
+ // Specify the probe type, trace source path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to write.
+ fileHelper.WriteProbe (probeName,
+ probeTrace,
+ fileHelper.WriteProbe (probeType,
+ tracePath,
+ "OutputBytes");
+
+86 -16
View File
@@ -62,7 +62,7 @@ and running on the target system.
The |ns3| code is available in Mercurial repositories on the server
http://code.nsnam.org. You can also download a tarball release at
http://www.nsnam.org/releases/, or you can work with repositories
http://www.nsnam.org/release/, or you can work with repositories
using Mercurial. We recommend using Mercurial unless there's a good reason
not to. See the end of this section for instructions on how to get a tarball
release.
@@ -90,7 +90,7 @@ get a copy of a release by typing the following into your Linux shell
$ cd
$ mkdir workspace
$ cd workspace
$ wget http://www.nsnam.org/releases/ns-allinone-3.20.tar.bz2
$ wget http://www.nsnam.org/release/ns-allinone-3.20.tar.bz2
$ tar xjf ns-allinone-3.20.tar.bz2
If you change into the directory ``ns-allinone-3.20`` you should see a
@@ -182,15 +182,20 @@ 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)::
to put bake into your path, such as follows (Linux bash shell example).
First, change into the 'bake' directory, and then set the following
environment variables
$ export BAKE_HOME=`pwd`/bake
$ export PATH=$PATH:$BAKE_HOME
$ export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
::
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.
$ export BAKE_HOME=`pwd`
$ export PATH=$PATH:$BAKE_HOME:$BAKE_HOME/build/bin
$ export PYTHONPATH=$PYTHONPATH:$BAKE_HOME:$BAKE_HOME/build/lib
This will put the bake.py program into the shell's path, and will allow
other programs to find executables and libraries created by bake. Although
several bake use cases do not require setting PATH and PYTHONPATH as above,
full builds of ns-3-allinone (with the optional packages) typically do.
Step into the workspace directory and type the following into your shell::
@@ -478,6 +483,29 @@ the |ns3| programs by simply typing
Okay, sorry, I made you build the |ns3| part of the system twice,
but now you know how to change the configuration and build optimized code.
The build.py script discussed above supports also the ``--enable-examples``
and ``enable-tests`` arguments, but in general, does not directly support
other waf options; for example, this will not work:
::
$ ./build.py --disable-python
will result in
::
build.py: error: no such option: --disable-python
However, the special operator ``--`` can be used to pass additional
options through to waf, so instead of the above, the following will work:
::
$ ./build.py -- --disable-python
as it generates the underlying command ``./waf configure --disable-python``.
Here are a few more introductory tips about Waf.
Configure vs. Build
@@ -573,6 +601,46 @@ More info on ``distcc`` and distributed compilation can be found on it's
<http://code.google.com/p/distcc/>`_
under Documentation section.
Install
=======
Waf may be used to install libraries in various places on the system.
The default location where libraries and executables are built is
in the ``build`` directory, and because Waf knows the location of these
libraries and executables, it is not necessary to install the libraries
elsewhere.
If users choose to install things outside of the build directory, users
may issue the ``./waf install`` command. By default, the prefix for
installation is ``/usr/local``, so ``./waf install`` will install programs
into ``/usr/local/bin``, libraries into ``/usr/local/lib``, and headers
into ``/usr/local/include``. Superuser privileges are typically needed
to install to the default prefix, so the typical command would be
``sudo ./waf install``. When running programs with Waf, Waf will
first prefer to use shared libraries in the build directory, then
will look for libraries in the library path configured in the local
environment. So when installing libraries to the system, it is good
practice to check that the intended libraries are being used.
Users may choose to install to a different prefix by passing the ``--prefix``
option at configure time, such as:
::
./waf configure --prefix=/opt/local
If later after the build the user issues the ``./waf install`` command, the
prefix ``/opt/local`` will be used.
The ``./waf clean`` command should be used prior to reconfiguring
the project if Waf will be used to install things at a different prefix.
In summary, it is not necessary to call ``./waf install`` to use |ns3|.
Most users will not need this command since Waf will pick up the
current libraries from the ``build`` directory, but some users may find
it useful if their use case involves working with programs outside
of the |ns3| directory.
One Waf
=======
@@ -725,17 +793,19 @@ using the provided command line template,
inserting the program name for the ``%s`` placeholder.
(I admit this is a bit awkward, but that's the way it is. Patches welcome!)
Another particularly useful example is to run the ``mytest`` test suite
by itself. Above, we used the ``./test.py`` script to run a whole slew of
Another particularly useful example is to run a test suite by itself.
Let's assume that a ``mytest`` test suite exists (it doesn't).
Above, we used the ``./test.py`` script to run a whole slew of
tests in parallel, by repeatedly invoking the real testing program,
``test-runner``. To invoke ``test-runner`` directly for a single test::
$ ./waf --run test-runner --command-template="% --suite=mytest --verbose"
$ ./waf --run test-runner --command-template="%s --suite=mytest --verbose"
This passes the arguments to the ``test-runner`` program. To print the
available ``test-runner`` options::
This passes the arguments to the ``test-runner`` program.
Since ``mytest`` does not exist, an error message will be generated.
To print the available ``test-runner`` options::
$ ./waf --run test-runner --command-template="% --help"
$ ./waf --run test-runner --command-template="%s --help"
Debugging
+++++++++
@@ -744,7 +814,7 @@ To run |ns3| programs under the control of another utility, such as
a debugger (*e.g.* ``gdb``) or memory checker (*e.g.* ``valgrind``),
you use a similar ``--command-template="..."`` form.
For example, to run your |ns3| program ``mysim`` with the arguments
For example, to run your |ns3| program ``hello-simulator`` with the arguments
``<args>`` under the ``gdb`` debugger::
$ ./waf --run=hello-simulator --command-template="gdb %s --args <args>"
File diff suppressed because it is too large Load Diff
+6
View File
@@ -5,6 +5,8 @@
Tweaking
--------
.. _UsingLogging:
Using the Logging Module
************************
@@ -412,6 +414,8 @@ message,
Using Command Line Arguments
****************************
.. _Attribute:
Overriding Default Attributes
+++++++++++++++++++++++++++++
Another way you can change how |ns3| scripts behave without editing
@@ -722,6 +726,8 @@ they will automatically be available for setting by your users through the
command line system. If you are a script author, you can add new variables to
your scripts and hook them into the command line system quite painlessly.
.. _UsingTracingSystem:
Using the Tracing System
************************
+2 -2
View File
@@ -31,10 +31,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("EnergyExample");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("EnergyExample");
static inline std::string
PrintReceivedPacket (Address& from)
{
@@ -0,0 +1,337 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Wireless Communications and Networking Group (WCNG),
* University of Rochester, Rochester, NY, USA.
*
* 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: Cristiano Tapparello <cristiano.tapparello@rochester.edu>
*/
/**
*
* This example extends the energy model example by connecting a basic energy
* harvester to the nodes.
*
* The example considers a simple communication link between a source and a
* destination node, where the source node sends a packet to the destination
* every 1 second. Each node is powered by a BasiEnergySource, which is recharged
* by a BasicEnergyHarvester, and the WiFi radio consumes energy for the transmission/
* reception of the packets.
*
* For the receiver node, the example prints the energy consumption of the WiFi radio,
* the power harvested by the energy harvester and the residual energy in the
* energy source.
*
* The nodes initial energy is set to 1.0 J, the transmission and reception entail a
* current consumption of 0.0174 A and 0.0197 A, respectively (default values in
* WifiRadioEnergyModel). The energy harvester provides an amount of power that varies
* according to a random variable uniformly distributed in [0 0.1] W, and is updated
* every 1 s. The energy source voltage is 3 V (default value in BasicEnergySource) and
* the residual energy level is updated every 1 second (default value).
*
* The simulation start at time 0 and it is hard stopped at time 10 seconds. Given the
* packet size and the distance between the nodes, each transmission lasts 0.0023s.
* As a result, the destination node receives 10 messages.
*
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/energy-module.h"
#include "ns3/internet-module.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample");
static inline std::string
PrintReceivedPacket (Address& from)
{
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (from);
std::ostringstream oss;
oss << "--\nReceived one packet! Socket: " << iaddr.GetIpv4 ()
<< " port: " << iaddr.GetPort ()
<< " at time = " << Simulator::Now ().GetSeconds ()
<< "\n--";
return oss.str ();
}
/**
* \param socket Pointer to socket.
*
* Packet receiving sink.
*/
void
ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
Address from;
while ((packet = socket->RecvFrom (from)))
{
if (packet->GetSize () > 0)
{
NS_LOG_UNCOND (PrintReceivedPacket (from));
}
}
}
/**
* \param socket Pointer to socket.
* \param pktSize Packet size.
* \param n Pointer to node.
* \param pktCount Number of packets to generate.
* \param pktInterval Packet sending interval.
*
* Traffic generator.
*/
static void
GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize, Ptr<Node> n,
uint32_t pktCount, Time pktInterval)
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic, socket, pktSize, n,
pktCount - 1, pktInterval);
}
else
{
socket->Close ();
}
}
/// Trace function for remaining energy at node.
void
RemainingEnergy (double oldValue, double remainingEnergy)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Current remaining energy = " << remainingEnergy << "J" << std::endl;
}
/// Trace function for total energy consumption at node.
void
TotalEnergy (double oldValue, double totalEnergy)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Total energy consumed by radio = " << totalEnergy << "J" << std::endl;
}
/// Trace function for the power harvested by the energy harvester.
void
HarvestedPower (double oldValue, double harvestedPower)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Current harvested power = " << harvestedPower << " W" << std::endl;
}
/// Trace function for the total energy harvested by the node.
void
TotalEnergyHarvested (double oldValue, double TotalEnergyHarvested)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Total energy harvested by harvester = "
<< TotalEnergyHarvested << " J" << std::endl;
}
int
main (int argc, char *argv[])
{
/*
LogComponentEnable ("EnergySource", LOG_LEVEL_DEBUG);
LogComponentEnable ("BasicEnergySource", LOG_LEVEL_DEBUG);
LogComponentEnable ("DeviceEnergyModel", LOG_LEVEL_DEBUG);
LogComponentEnable ("WifiRadioEnergyModel", LOG_LEVEL_DEBUG);
LogComponentEnable ("EnergyHarvester", LOG_LEVEL_DEBUG);
LogComponentEnable ("BasicEnergyHarvester", LOG_LEVEL_DEBUG);
*/
std::string phyMode ("DsssRate1Mbps");
double Prss = -80; // dBm
uint32_t PpacketSize = 200; // bytes
bool verbose = false;
// simulation parameters
uint32_t numPackets = 10000; // number of packets to send
double interval = 1; // seconds
double startTime = 0.0; // seconds
double distanceToRx = 100.0; // meters
/*
* This is a magic number used to set the transmit power, based on other
* configuration.
*/
double offset = 81;
// Energy Harvester variables
double harvestingUpdateInterval = 1; // seconds
CommandLine cmd;
cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("Prss", "Intended primary RSS (dBm)", Prss);
cmd.AddValue ("PpacketSize", "size of application packet sent", PpacketSize);
cmd.AddValue ("numPackets", "Total number of packets to send", numPackets);
cmd.AddValue ("startTime", "Simulation start time", startTime);
cmd.AddValue ("distanceToRx", "X-Axis distance between nodes", distanceToRx);
cmd.AddValue ("verbose", "Turn on all device log components", verbose);
cmd.Parse (argc, argv);
// Convert to time object
Time interPacketInterval = Seconds (interval);
// disable fragmentation for frames below 2200 bytes
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold",
StringValue ("2200"));
// turn off RTS/CTS for frames below 2200 bytes
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold",
StringValue ("2200"));
// Fix non-unicast data rate to be the same as that of unicast
Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
StringValue (phyMode));
NodeContainer c;
c.Create (2); // create 2 nodes
NodeContainer networkNodes;
networkNodes.Add (c.Get (0));
networkNodes.Add (c.Get (1));
// The below set of helpers will help us to put together the wifi NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents ();
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
/** Wifi PHY **/
/***************************************************************************/
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
wifiPhy.Set ("RxGain", DoubleValue (-10));
wifiPhy.Set ("TxGain", DoubleValue (offset + Prss));
wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
/***************************************************************************/
/** wifi channel **/
YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
// create wifi channel
Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
wifiPhy.SetChannel (wifiChannelPtr);
/** MAC layer **/
// Add a non-QoS upper MAC, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",
StringValue (phyMode), "ControlMode",
StringValue (phyMode));
// Set it to ad-hoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
/** install PHY + MAC **/
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, networkNodes);
/** mobility **/
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (2 * distanceToRx, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
/** Energy Model **/
/***************************************************************************/
/* energy source */
BasicEnergySourceHelper basicSourceHelper;
// configure energy source
basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (1.0));
// install source
EnergySourceContainer sources = basicSourceHelper.Install (c);
/* device energy model */
WifiRadioEnergyModelHelper radioEnergyHelper;
// configure radio energy model
radioEnergyHelper.Set ("TxCurrentA", DoubleValue (0.0174));
radioEnergyHelper.Set ("RxCurrentA", DoubleValue (0.0197));
// install device model
DeviceEnergyModelContainer deviceModels = radioEnergyHelper.Install (devices, sources);
/* energy harvester */
BasicEnergyHarvesterHelper basicHarvesterHelper;
// configure energy harvester
basicHarvesterHelper.Set ("PeriodicHarvestedPowerUpdateInterval", TimeValue (Seconds (harvestingUpdateInterval)));
basicHarvesterHelper.Set ("HarvestablePower", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=0.1]"));
// install harvester on all energy sources
EnergyHarvesterContainer harvesters = basicHarvesterHelper.Install (sources);
/***************************************************************************/
/** Internet stack **/
InternetStackHelper internet;
internet.Install (networkNodes);
Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (networkNodes.Get (1), tid); // node 1, Destination
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
Ptr<Socket> source = Socket::CreateSocket (networkNodes.Get (0), tid); // node 0, Source
InetSocketAddress remote = InetSocketAddress (Ipv4Address::GetBroadcast (), 80);
source->SetAllowBroadcast (true);
source->Connect (remote);
/** connect trace sources **/
/***************************************************************************/
// all traces are connected to node 1 (Destination)
// energy source
Ptr<BasicEnergySource> basicSourcePtr = DynamicCast<BasicEnergySource> (sources.Get (1));
basicSourcePtr->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback (&RemainingEnergy));
// device energy model
Ptr<DeviceEnergyModel> basicRadioModelPtr =
basicSourcePtr->FindDeviceEnergyModels ("ns3::WifiRadioEnergyModel").Get (0);
NS_ASSERT (basicRadioModelPtr != 0);
basicRadioModelPtr->TraceConnectWithoutContext ("TotalEnergyConsumption", MakeCallback (&TotalEnergy));
// energy harvester
Ptr<BasicEnergyHarvester> basicHarvesterPtr = DynamicCast<BasicEnergyHarvester> (harvesters.Get (1));
basicHarvesterPtr->TraceConnectWithoutContext ("HarvestedPower", MakeCallback (&HarvestedPower));
basicHarvesterPtr->TraceConnectWithoutContext ("TotalEnergyHarvested", MakeCallback (&TotalEnergyHarvested));
/***************************************************************************/
/** simulation setup **/
// start traffic
Simulator::Schedule (Seconds (startTime), &GenerateTraffic, source, PpacketSize,
networkNodes.Get (0), numPackets, interPacketInterval);
Simulator::Stop (Seconds (10.0));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
+2
View File
@@ -3,3 +3,5 @@
def build(bld):
obj = bld.create_ns3_program('energy-model-example', ['core', 'mobility', 'wifi', 'energy', 'internet'])
obj.source = 'energy-model-example.cc'
obj = bld.create_ns3_program('energy-model-with-harvesting-example', ['core', 'mobility', 'wifi', 'energy', 'internet'])
obj.source = 'energy-model-with-harvesting-example.cc'
-1
View File
@@ -41,7 +41,6 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6Example");
int main (int argc, char** argv)
{
bool verbose = false;
+1
View File
@@ -44,6 +44,7 @@
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-header.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("LooseRoutingIpv6Example");
+6 -1
View File
@@ -115,10 +115,15 @@ int main (int argc, char** argv)
/* radvd configuration */
RadvdHelper radvdHelper;
/* R interface (n0 - R) */
radvdHelper.AddAnnouncedPrefix(iic1.GetInterfaceIndex (1), Ipv6Address("2001:1::0"), 64);
/* n0 will receive unsolicited (periodic) RA */
radvdHelper.AddAnnouncedPrefix (iic1.GetInterfaceIndex (1), Ipv6Address("2001:1::0"), 64);
/* R interface (R - n1) */
/* n1 will have to use RS, as RA are not sent automatically */
radvdHelper.AddAnnouncedPrefix(iic2.GetInterfaceIndex (1), Ipv6Address("2001:2::0"), 64);
radvdHelper.GetRadvdInterface (iic2.GetInterfaceIndex (1))->SetSendAdvert (false);
ApplicationContainer radvdApps = radvdHelper.Install (r);
radvdApps.Start (Seconds (1.0));
+2 -2
View File
@@ -24,10 +24,10 @@
#include "ns3/node.h"
#include "ns3/mac48-address.h"
NS_LOG_COMPONENT_DEFINE ("TestIpv6");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TestIpv6");
int
main (int argc, char *argv[])
{
+7 -7
View File
@@ -1,13 +1,13 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('icmpv6-redirect', ['csma', 'internet'])
obj = bld.create_ns3_program('icmpv6-redirect', ['csma', 'internet', 'applications'])
obj.source = 'icmpv6-redirect.cc'
obj = bld.create_ns3_program('ping6', ['csma', 'internet'])
obj = bld.create_ns3_program('ping6', ['csma', 'internet', 'applications'])
obj.source = 'ping6.cc'
obj = bld.create_ns3_program('radvd', ['csma', 'internet'])
obj = bld.create_ns3_program('radvd', ['csma', 'internet', 'applications'])
obj.source = 'radvd.cc'
obj = bld.create_ns3_program('radvd-two-prefix', ['csma', 'internet', 'applications'])
@@ -16,15 +16,15 @@ def build(bld):
obj = bld.create_ns3_program('test-ipv6', ['point-to-point', 'internet'])
obj.source = 'test-ipv6.cc'
obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet'])
obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet', 'applications'])
obj.source = 'fragmentation-ipv6.cc'
obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet'])
obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet', 'applications'])
obj.source = 'fragmentation-ipv6-two-MTU.cc'
obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet'])
obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet', 'applications'])
obj.source = 'loose-routing-ipv6.cc'
obj = bld.create_ns3_program('wsn-ping6', ['lr-wpan', 'internet', 'sixlowpan', 'mobility'])
obj = bld.create_ns3_program('wsn-ping6', ['lr-wpan', 'internet', 'sixlowpan', 'mobility', 'applications'])
obj.source = 'wsn-ping6.cc'
+1 -1
View File
@@ -1,5 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('object-names', ['core', 'csma', 'internet'])
obj = bld.create_ns3_program('object-names', ['core', 'csma', 'internet', 'applications'])
obj.source = 'object-names.cc'
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet'])
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet', 'applications'])
obj.source = 'realtime-udp-echo.cc'
bld.register_ns3_script('realtime-udp-echo.py', ['csma', 'internet', 'applications'])
+6 -4
View File
@@ -70,12 +70,14 @@ def main(argv):
# Create networks and assign IPv6 Addresses
print "Addressing"
ipv6 = ns.internet.Ipv6AddressHelper();
ipv6.NewNetwork(ns.network.Ipv6Address("2001:1::"), ns.network.Ipv6Prefix(64));
ipv6.SetBase(ns.network.Ipv6Address("2001:1::"), ns.network.Ipv6Prefix(64));
i1 = ipv6.Assign(d1);
i1.SetRouter(1, True);
ipv6.NewNetwork(ns.network.Ipv6Address("2001:2::"), ns.network.Ipv6Prefix(64));
i1.SetForwarding(1, True);
i1.SetDefaultRouteInAllNodes(1);
ipv6.SetBase(ns.network.Ipv6Address("2001:2::"), ns.network.Ipv6Prefix(64));
i2 = ipv6.Assign(d2);
i2.SetRouter(0, True);
i2.SetForwarding(0, True);
i2.SetDefaultRouteInAllNodes(0);
# Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via r
print "Application"
+7 -7
View File
@@ -2,19 +2,19 @@
def build(bld):
obj = bld.create_ns3_program('dynamic-global-routing',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'dynamic-global-routing.cc'
obj = bld.create_ns3_program('static-routing-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'static-routing-slash32.cc'
obj = bld.create_ns3_program('global-routing-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'global-routing-slash32.cc'
obj = bld.create_ns3_program('global-injection-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'global-injection-slash32.cc'
obj = bld.create_ns3_program('simple-global-routing',
@@ -25,12 +25,12 @@ def build(bld):
['point-to-point', 'internet', 'applications'])
obj.source = 'simple-alternate-routing.cc'
obj = bld.create_ns3_program( 'mixed-global-routing',
['point-to-point', 'internet', 'csma'])
obj = bld.create_ns3_program('mixed-global-routing',
['point-to-point', 'internet', 'csma', 'applications'])
obj.source = 'mixed-global-routing.cc'
obj = bld.create_ns3_program('simple-routing-ping6',
['csma', 'internet'])
['csma', 'internet', 'applications'])
obj.source = 'simple-routing-ping6.cc'
obj = bld.create_ns3_program('manet-routing-compare',
+1 -1
View File
@@ -4,7 +4,7 @@ def build(bld):
obj = bld.create_ns3_program('socket-bound-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-bound-static-routing.cc'
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet', 'applications'])
obj.source = 'socket-bound-tcp-static-routing.cc'
obj = bld.create_ns3_program('socket-options-ipv4', ['network', 'csma', 'point-to-point', 'internet'])
+2 -1
View File
@@ -66,7 +66,8 @@ Sender::GetTypeId (void)
MakePointerAccessor (&Sender::m_interval),
MakePointerChecker <RandomVariableStream>())
.AddTraceSource ("Tx", "A new packet is created and is sent",
MakeTraceSourceAccessor (&Sender::m_txTrace))
MakeTraceSourceAccessor (&Sender::m_txTrace),
"ns3::Packet::TracedCallback")
;
return tid;
}
-3
View File
@@ -49,9 +49,6 @@ using namespace std;
NS_LOG_COMPONENT_DEFINE ("WiFiDistanceExperiment");
void TxCallback (Ptr<CounterCalculator<uint32_t> > datac,
std::string path, Ptr<const Packet> packet) {
NS_LOG_INFO ("Sent frame counted in " <<
-1
View File
@@ -44,7 +44,6 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpLargeTransfer");
// The number of bytes to send in this simulation.
static const uint32_t totalTxBytes = 2000000;
static uint32_t currentTxBytes = 0;
+122 -143
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
* 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
@@ -54,92 +54,63 @@ 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;
bool firstCwnd = true;
bool firstSshThr = true;
Ptr<OutputStreamWrapper> cWndStream;
Ptr<OutputStreamWrapper> ssThreshStream;
uint32_t cWndValue;
uint32_t ssThreshValue;
static void
OutputTrace ()
CwndTracer (uint32_t oldval, uint32_t newval)
{
// *stream->GetStream() << newtime << " " << newval << std::endl;
// old_time = newval;
}
static void
CwndTracer (Ptr<OutputStreamWrapper>stream, 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())
if (firstCwnd)
{
*stream->GetStream() << new_time << " " << newval << std::endl;
output.Cancel();
output = Simulator::Schedule(current,&OutputTrace);
*cWndStream->GetStream () << "0.0 " << oldval << std::endl;
firstCwnd = false;
}
*cWndStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval << std::endl;
cWndValue = newval;
if (!firstSshThr)
{
*ssThreshStream->GetStream () << Simulator::Now ().GetSeconds () << " " << ssThreshValue << std::endl;
}
}
}
static void
SsThreshTracer (Ptr<OutputStreamWrapper>stream, uint32_t oldval, uint32_t newval)
SsThreshTracer (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())
if (firstSshThr)
{
*stream->GetStream() << new_time << " " << newval << std::endl;
output.Cancel();
output = Simulator::Schedule(current,&OutputTrace);
*ssThreshStream->GetStream () << "0.0 " << oldval << std::endl;
firstSshThr = false;
}
*ssThreshStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval << std::endl;
ssThreshValue = newval;
if (!firstCwnd)
{
*cWndStream->GetStream () << Simulator::Now ().GetSeconds () << " " << cWndValue << std::endl;
}
}
}
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<OutputStreamWrapper> stream = ascii.CreateFileStream(cwnd_tr_file_name.c_str());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow",MakeBoundCallback (&CwndTracer, stream));
}
cWndStream = ascii.CreateFileStream (cwnd_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow", MakeCallback (&CwndTracer));
}
static void
TraceSsThresh(std::string ssthresh_tr_file_name)
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<OutputStreamWrapper> stream = ascii.CreateFileStream(ssthresh_tr_file_name.c_str());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold",MakeBoundCallback (&SsThreshTracer, stream));
}
ssThreshStream = ascii.CreateFileStream (ssthresh_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold",MakeCallback (&SsThreshTracer));
}
int main (int argc, char *argv[])
@@ -162,25 +133,25 @@ int main (int argc, char *argv[])
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.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);
SeedManager::SetSeed (1);
SeedManager::SetRun (run);
// User may find it convenient to enable logging
//LogComponentEnable("TcpVariantsComparison", LOG_LEVEL_ALL);
@@ -188,12 +159,12 @@ int main (int argc, char *argv[])
//LogComponentEnable("DropTailQueue", LOG_LEVEL_ALL);
// Calculate the ADU size
Header* temp_header = new Ipv4Header();
uint32_t ip_header = temp_header->GetSerializedSize();
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();
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);
@@ -204,22 +175,28 @@ int main (int argc, char *argv[])
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)
if (transport_prot.compare ("TcpTahoe") == 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));
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
{
@@ -231,18 +208,18 @@ int main (int argc, char *argv[])
NodeContainer gateways;
gateways.Create (1);
NodeContainer sources;
sources.Create(num_flows);
sources.Create (num_flows);
NodeContainer sinks;
sinks.Create(num_flows);
sinks.Create (num_flows);
// Configure the error model
// Here we use RateErrorModel with packet error rate
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable>();
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable> ();
uv->SetStream (50);
RateErrorModel error_model;
error_model.SetRandomVariable(uv);
error_model.SetUnit(RateErrorModel::ERROR_UNIT_PACKET);
error_model.SetRate(error_p);
error_model.SetRandomVariable (uv);
error_model.SetUnit (RateErrorModel::ERROR_UNIT_PACKET);
error_model.SetRate (error_p);
PointToPointHelper UnReLink;
UnReLink.SetDeviceAttribute ("DataRate", StringValue (bandwidth));
@@ -262,16 +239,16 @@ int main (int argc, char *argv[])
LocalLink.SetDeviceAttribute ("DataRate", StringValue (access_bandwidth));
LocalLink.SetChannelAttribute ("Delay", StringValue (access_delay));
Ipv4InterfaceContainer sink_interfaces;
for (int i=0; i<num_flows; i++)
for (int i = 0; i < num_flows; i++)
{
NetDeviceContainer devices;
devices = LocalLink.Install(sources.Get(i), gateways.Get(0));
address.NewNetwork();
devices = LocalLink.Install (sources.Get (i), gateways.Get (0));
address.NewNetwork ();
Ipv4InterfaceContainer interfaces = address.Assign (devices);
devices = UnReLink.Install(gateways.Get(0), sinks.Get(i));
address.NewNetwork();
devices = UnReLink.Install (gateways.Get (0), sinks.Get (i));
address.NewNetwork ();
interfaces = address.Assign (devices);
sink_interfaces.Add(interfaces.Get(1));
sink_interfaces.Add (interfaces.Get (1));
}
NS_LOG_INFO ("Initialize Global Routing.");
@@ -281,29 +258,29 @@ int main (int argc, char *argv[])
Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory", sinkLocalAddress);
for(uint16_t i=0; i<sources.GetN(); i++)
for (uint16_t i = 0; i < sources.GetN (); i++)
{
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress(i, 0), port));
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress (i, 0), port));
if (transport_prot.compare("TcpTahoe") == 0
|| transport_prot.compare("TcpReno") == 0
|| transport_prot.compare("TcpNewReno") == 0
|| transport_prot.compare("TcpWestwood") == 0
|| transport_prot.compare("TcpWestwoodPlus") == 0)
if (transport_prot.compare ("TcpTahoe") == 0
|| transport_prot.compare ("TcpReno") == 0
|| transport_prot.compare ("TcpNewReno") == 0
|| transport_prot.compare ("TcpWestwood") == 0
|| transport_prot.compare ("TcpWestwoodPlus") == 0)
{
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (tcp_adu_size));
BulkSendHelper ftp("ns3::TcpSocketFactory", Address());
BulkSendHelper ftp ("ns3::TcpSocketFactory", Address ());
ftp.SetAttribute ("Remote", remoteAddress);
ftp.SetAttribute ("SendSize", UintegerValue (tcp_adu_size));
ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes*1000000)));
ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes * 1000000)));
ApplicationContainer sourceApp = ftp.Install (sources.Get(i));
sourceApp.Start (Seconds (start_time*i));
ApplicationContainer sourceApp = ftp.Install (sources.Get (i));
sourceApp.Start (Seconds (start_time * i));
sourceApp.Stop (Seconds (stop_time - 3));
sinkHelper.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
ApplicationContainer sinkApp = sinkHelper.Install (sinks);
sinkApp.Start (Seconds (start_time*i));
sinkApp.Start (Seconds (start_time * i));
sinkApp.Stop (Seconds (stop_time));
}
else
@@ -316,41 +293,43 @@ int main (int argc, char *argv[])
// Set up tracing if enabled
if (tracing)
{
std::ofstream ascii;
Ptr<OutputStreamWrapper> ascii_wrap;
if (tr_file_name.compare("") == 0)
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);
std::ofstream ascii;
Ptr<OutputStreamWrapper> ascii_wrap;
ascii.open (tr_file_name.c_str ());
ascii_wrap = new OutputStreamWrapper (tr_file_name.c_str (), std::ios::out);
stack.EnableAsciiIpv4All (ascii_wrap);
}
stack.EnableAsciiIpv4All (ascii_wrap);
if (cwnd_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceCwnd, cwnd_tr_file_name);
}
if (ssthresh_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceSsThresh, ssthresh_tr_file_name);
}
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);
UnReLink.EnablePcapAll ("TcpVariantsComparison", true);
LocalLink.EnablePcapAll ("TcpVariantsComparison", true);
// Flow monitor
FlowMonitorHelper flowHelper;
if (flow_monitor)
{
flowHelper.InstallAll();
flowHelper.InstallAll ();
}
Simulator::Stop (Seconds(stop_time));
Simulator::Stop (Seconds (stop_time));
Simulator::Run ();
if (flow_monitor)
{
flowHelper.SerializeToXmlFile("TcpVariantsComparison.flowmonitor", true, true);
flowHelper.SerializeToXmlFile ("TcpVariantsComparison.flowmonitor", true, true);
}
Simulator::Destroy ();
+4 -3
View File
@@ -35,9 +35,10 @@ stack = ns.internet.InternetStackHelper()
stack.Install(nodes)
address = ns.internet.Ipv4AddressHelper()
address.SetBase(ns.network.Ipv4Address("10.1.1.0"), ns.network.Ipv4Mask("255.255.255.0"))
address.SetBase(ns.network.Ipv4Address("10.1.1.0"),
ns.network.Ipv4Mask("255.255.255.0"))
interfaces = address.Assign (devices);
interfaces = address.Assign(devices)
echoServer = ns.applications.UdpEchoServerHelper(9)
@@ -47,7 +48,7 @@ serverApps.Stop(ns.core.Seconds(10.0))
echoClient = ns.applications.UdpEchoClientHelper(interfaces.GetAddress(1), 9)
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds(1.0)))
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
clientApps = echoClient.Install(nodes.Get(0))
+2 -1
View File
@@ -33,7 +33,8 @@ public:
.AddConstructor<MyObject> ()
.AddTraceSource ("MyInteger",
"An integer value to trace.",
MakeTraceSourceAccessor (&MyObject::m_myInt))
MakeTraceSourceAccessor (&MyObject::m_myInt),
"ns3::TracedValue::Int32Callback")
;
return tid;
}
+2 -2
View File
@@ -16,10 +16,10 @@
#include "ns3/core-module.h"
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
int
main (int argc, char *argv[])
{
+12 -12
View File
@@ -210,8 +210,8 @@ main (int argc, char *argv[])
uint16_t sinkPort = 8080;
Address sinkAddress;
Address anyAddress;
std::string probeName;
std::string probeTrace;
std::string probeType;
std::string tracePath;
if (useV6 == false)
{
Ipv4AddressHelper address;
@@ -219,8 +219,8 @@ main (int argc, char *argv[])
Ipv4InterfaceContainer interfaces = address.Assign (devices);
sinkAddress = InetSocketAddress (interfaces.GetAddress (1), sinkPort);
anyAddress = InetSocketAddress (Ipv4Address::GetAny (), sinkPort);
probeName = "ns3::Ipv4PacketProbe";
probeTrace = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
probeType = "ns3::Ipv4PacketProbe";
tracePath = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
}
else
{
@@ -229,8 +229,8 @@ main (int argc, char *argv[])
Ipv6InterfaceContainer interfaces = address.Assign (devices);
sinkAddress = Inet6SocketAddress (interfaces.GetAddress (1,1), sinkPort);
anyAddress = Inet6SocketAddress (Ipv6Address::GetAny (), sinkPort);
probeName = "ns3::Ipv6PacketProbe";
probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
probeType = "ns3::Ipv6PacketProbe";
tracePath = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
}
PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", anyAddress);
@@ -265,12 +265,12 @@ main (int argc, char *argv[])
"Time (Seconds)",
"Packet Byte Count");
// Specify the probe type, probe path (in configuration namespace), and
// Specify the probe type, trace source path (in configuration namespace), and
// probe output trace source ("OutputBytes") to plot. The fourth argument
// specifies the name of the data series label on the plot. The last
// argument formats the plot by specifying where the key should be placed.
plotHelper.PlotProbe (probeName,
probeTrace,
plotHelper.PlotProbe (probeType,
tracePath,
"OutputBytes",
"Packet Byte Count",
GnuplotAggregator::KEY_BELOW);
@@ -285,10 +285,10 @@ main (int argc, char *argv[])
// Set the labels for this formatted output file.
fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f");
// Specify the probe type, probe path (in configuration namespace), and
// Specify the probe type, trace source path (in configuration namespace), and
// probe output trace source ("OutputBytes") to write.
fileHelper.WriteProbe (probeName,
probeTrace,
fileHelper.WriteProbe (probeType,
tracePath,
"OutputBytes");
Simulator::Stop (Seconds (20));
+1 -1
View File
@@ -12,7 +12,7 @@ def build(bld):
obj = bld.create_ns3_program('second', ['core', 'point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'second.cc'
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet'])
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet', 'applications'])
obj.source = 'third.cc'
obj = bld.create_ns3_program('fourth', ['core'])
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('udp-client-server', ['csma', 'internet'])
obj = bld.create_ns3_program('udp-client-server', ['csma', 'internet', 'applications'])
obj.source = 'udp-client-server.cc'
obj = bld.create_ns3_program('udp-trace-client-server', ['csma', 'internet', 'applications'])
+1 -1
View File
@@ -1,5 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('udp-echo', ['csma', 'internet'])
obj = bld.create_ns3_program('udp-echo', ['csma', 'internet', 'applications'])
obj.source = 'udp-echo.cc'
+2 -2
View File
@@ -205,8 +205,8 @@ int main (int argc, char *argv[])
sink1App.Stop (Seconds (t));
OnOffHelper onoff ("ns3::TcpSocketFactory",Ipv4Address::GetAny ());
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable(30)));//in seconds
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable(0)));
onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=30.0]")); //in seconds
onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
onoff.SetAttribute ("PacketSize", UintegerValue (1500-30));//1024
onoff.SetAttribute ("DataRate", DataRateValue (100000000));//51200
ApplicationContainer apps;
+2 -2
View File
@@ -64,10 +64,10 @@
#include <iostream>
#include <fstream>
NS_LOG_COMPONENT_DEFINE ("multirate");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("multirate");
class Experiment
{
public:
+106
View File
@@ -0,0 +1,106 @@
/* -*- 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: Sébastien Deronne <sebastien.deronne@gmail.com>
*/
#include "ns3/core-module.h"
#include "ns3/yans-error-rate-model.h"
#include "ns3/nist-error-rate-model.h"
#include "ns3/gnuplot.h"
#include <fstream>
#include <vector>
#include <cmath>
using namespace ns3;
int main (int argc, char *argv[])
{
uint32_t FrameSize = 2000;
std::ofstream yansfile ("yans-frame-success-rate-n.plt");
std::ofstream nistfile ("nist-frame-success-rate-n.plt");
std::vector <std::string> modes;
modes.push_back ("OfdmRate6_5MbpsBW20MHz");
modes.push_back ("OfdmRate13MbpsBW20MHz");
modes.push_back ("OfdmRate19_5MbpsBW20MHz");
modes.push_back ("OfdmRate26MbpsBW20MHz");
modes.push_back ("OfdmRate39MbpsBW20MHz");
modes.push_back ("OfdmRate52MbpsBW20MHz");
modes.push_back ("OfdmRate58_5MbpsBW20MHz");
modes.push_back ("OfdmRate65MbpsBW20MHz");
CommandLine cmd;
cmd.AddValue ("FrameSize", "The frame size", FrameSize);
cmd.Parse (argc, argv);
Gnuplot yansplot = Gnuplot ("yans-frame-success-rate-n.eps");
Gnuplot nistplot = Gnuplot ("nist-frame-success-rate-n.eps");
Ptr <YansErrorRateModel> yans = CreateObject<YansErrorRateModel> ();
Ptr <NistErrorRateModel> nist = CreateObject<NistErrorRateModel> ();
for (uint32_t i = 0; i < modes.size (); i++)
{
std::cout << modes[i] << std::endl;
Gnuplot2dDataset yansdataset (modes[i]);
Gnuplot2dDataset nistdataset (modes[i]);
for (double snr = -5.0; snr <= 30.0; snr += 0.1)
{
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]), std::pow (10.0,snr / 10.0), FrameSize * 8);
nistdataset.Add (snr, ps);
}
yansplot.AddDataset (yansdataset);
nistplot.AddDataset (nistdataset);
}
yansplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\"");
yansplot.SetLegend ("SNR(dB)", "Frame Success Rate");
yansplot.SetExtra ("set xrange [-5:30]\n\
set yrange [0:1.2]\n\
set style line 1 linewidth 5\n\
set style line 2 linewidth 5\n\
set style line 3 linewidth 5\n\
set style line 4 linewidth 5\n\
set style line 5 linewidth 5\n\
set style line 6 linewidth 5\n\
set style line 7 linewidth 5\n\
set style line 8 linewidth 5\n\
set style increment user" );
yansplot.GenerateOutput (yansfile);
yansfile.close ();
nistplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\"");
nistplot.SetLegend ("SNR(dB)", "Frame Success Rate");
nistplot.SetExtra ("set xrange [-5:30]\n\
set yrange [0:1.2]\n\
set style line 1 linewidth 5\n\
set style line 2 linewidth 5\n\
set style line 3 linewidth 5\n\
set style line 4 linewidth 5\n\
set style line 5 linewidth 5\n\
set style line 6 linewidth 5\n\
set style line 7 linewidth 5\n\
set style line 8 linewidth 5\n\
set style increment user" );
nistplot.GenerateOutput (nistfile);
nistfile.close ();
}
+2 -2
View File
@@ -27,10 +27,10 @@
#include <iostream>
NS_LOG_COMPONENT_DEFINE ("Main");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("Main");
class Experiment
{
public:
+2 -2
View File
@@ -30,10 +30,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("Main");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("Main");
class Experiment
{
public:
+1 -1
View File
@@ -149,7 +149,7 @@ void experiment (bool enableCtsRts)
// 10. Print per flow statistics
monitor->CheckForLostPackets ();
Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier> (flowmon.GetClassifier ());
std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();
FlowMonitor::FlowStatsContainer stats = monitor->GetFlowStats ();
for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i = stats.begin (); i != stats.end (); ++i)
{
// first 2 FlowIds are for ECHO apps, we don't want to display them
+9 -4
View File
@@ -84,13 +84,16 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid");
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
while (socket->Recv ())
{
NS_LOG_UNCOND ("Received one packet!");
}
}
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
@@ -224,6 +227,8 @@ int main (int argc, char *argv[])
// Trace routing tables
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper> ("wifi-simple-adhoc-grid.routes", std::ios::out);
olsr.PrintRoutingTableAllEvery (Seconds (2), routingStream);
Ptr<OutputStreamWrapper> neighborStream = Create<OutputStreamWrapper> ("wifi-simple-adhoc-grid.neighbors", std::ios::out);
olsr.PrintNeighborCacheAllEvery (Seconds (2), neighborStream);
// To do-- enable an IP-level trace that shows forwarding events only
}
@@ -235,7 +240,7 @@ int main (int argc, char *argv[])
// Output what we are doing
NS_LOG_UNCOND ("Testing from node " << sourceNode << " to " << sinkNode << " with grid distance " << distance);
Simulator::Stop (Seconds (32.0));
Simulator::Stop (Seconds (33.0));
Simulator::Run ();
Simulator::Destroy ();
+6 -3
View File
@@ -63,13 +63,16 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
while (socket->Recv ())
{
NS_LOG_UNCOND ("Received one packet!");
}
}
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
+6 -3
View File
@@ -64,13 +64,16 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInfra");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInfra");
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
while (socket->Recv ())
{
NS_LOG_UNCOND ("Received one packet!");
}
}
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
+10 -5
View File
@@ -92,18 +92,23 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference");
static inline std::string PrintReceivedPacket (Ptr<Socket> socket)
{
Address addr;
socket->GetSockName (addr);
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
std::ostringstream oss;
oss << "Received one packet! Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ();
while (socket->Recv ())
{
socket->GetSockName (addr);
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
oss << "Received one packet! Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ();
}
return oss.str ();
}
+247
View File
@@ -0,0 +1,247 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 The Boeing Company
* 2014 Universita' degli Studi di Napoli "Federico II"
*
* 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
*
*/
//
// This script configures two nodes on an 802.11b physical layer, with
// 802.11b NICs in adhoc mode. One of the nodes generates on-off traffic
// destined to the other node.
//
// The purpose is to test the energy depletion on the nodes and the
// activation of the callback that puts a node in the sleep state when
// its energy is depleted. Furthermore, this script can be used to test
// the available policies for updating the transmit current based on
// the nominal tx power used to transmit each frame.
//
// There are a number of command-line options available to control
// the default behavior. The list of available command-line options
// can be listed with the following command:
// ./waf --run "wifi-sleep --help"
//
// Note that all ns-3 attributes (not just the ones exposed in the below
// script) can be changed at command line; see the documentation.
//
// This script can also be helpful to put the Wifi layer into verbose
// logging mode; this command will turn on all wifi logging:
//
// ./waf --run "wifi-sleep --verbose=1"
//
// When you are done, you will notice four trace files in your directory:
// two for the remaining energy on each node and two for the state transitions
// of each node.
//
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
#include "ns3/energy-module.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <sstream>
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSleep");
template <int node>
void RemainingEnergyTrace (double oldValue, double newValue)
{
std::stringstream ss;
ss << "energy_" << node << ".log";
static std::fstream f (ss.str().c_str(), std::ios::out);
f << Simulator::Now().GetSeconds() << " remaining energy=" << newValue << std::endl;
}
template <int node>
void PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state)
{
std::stringstream ss;
ss << "state_" << node << ".log";
static std::fstream f (ss.str().c_str(), std::ios::out);
f << Simulator::Now().GetSeconds() << " state=" << state << " start=" << start << " duration=" << duration << std::endl;
}
int main (int argc, char *argv[])
{
std::string dataRate = "1Mbps";
uint32_t packetSize = 1000; // bytes
double duration = 10.0; // seconds
double initialEnergy = 7.5; // joule
double voltage = 3.0; // volts
double txPowerStart = 0.0; // dbm
double txPowerEnd = 15.0; // dbm
uint32_t nTxPowerLevels = 16;
uint32_t txPowerLevel = 0;
double idleCurrent = 0.273; // Ampere
double txCurrent = 0.380; // Ampere
bool verbose = false;
CommandLine cmd;
cmd.AddValue ("dataRate", "Data rate", dataRate);
cmd.AddValue ("packetSize", "size of application packet sent", packetSize);
cmd.AddValue ("duration", "duration (seconds) of the experiment", duration);
cmd.AddValue ("initialEnergy", "Initial Energy (Joule) of each node", initialEnergy);
cmd.AddValue ("voltage", "Supply voltage (Joule)", voltage);
cmd.AddValue ("txPowerStart", "Minimum available transmission level (dbm)", txPowerStart);
cmd.AddValue ("txPowerEnd", "Maximum available transmission level (dbm)", txPowerEnd);
cmd.AddValue ("nTxPowerLevels", "Number of transmission power levels available between txPowerStart and txPowerEnd included", nTxPowerLevels);
cmd.AddValue ("txPowerLevel", "Transmission power level", txPowerLevel);
cmd.AddValue ("idleCurrent", "The radio Idle current in Ampere", idleCurrent);
cmd.AddValue ("txCurrent", "The radio Tx current in Ampere", txCurrent);
cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose);
cmd.Parse (argc, argv);
NodeContainer c;
c.Create (2);
// The below set of helpers will help us to put together the wifi NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents (); // Turn on all Wifi logging
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
wifiPhy.Set ("TxPowerStart", DoubleValue (txPowerStart));
wifiPhy.Set ("TxPowerEnd", DoubleValue (txPowerEnd));
wifiPhy.Set ("TxPowerLevels", UintegerValue (nTxPowerLevels));
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());
// Add a non-QoS upper mac, and set the selected tx power level
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ArfWifiManager", "DefaultTxPowerLevel", UintegerValue (txPowerLevel));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c);
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (10.0, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
InternetStackHelper internet;
internet.Install (c);
Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);
ApplicationContainer apps;
std::string transportProto = std::string("ns3::UdpSocketFactory");
OnOffHelper onOff(transportProto, InetSocketAddress (Ipv4Address ("10.1.1.2"), 9000));
onOff.SetAttribute ("DataRate", DataRateValue (DataRate (dataRate)));
onOff.SetAttribute ("PacketSize", UintegerValue (packetSize));
onOff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.001]"));
apps = onOff.Install (c.Get (0));
apps.Start (Seconds (0.01));
apps.Stop (Seconds (duration));
// Create a packet sink to receive these packets
PacketSinkHelper sink (transportProto, InetSocketAddress (Ipv4Address::GetAny (), 9001));
apps = sink.Install (c.Get (1));
apps.Start (Seconds (0.01));
apps.Stop (Seconds (duration));
// Energy sources
EnergySourceContainer eSources;
BasicEnergySourceHelper basicSourceHelper;
WifiRadioEnergyModelHelper radioEnergyHelper;
basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (initialEnergy));
basicSourceHelper.Set ("BasicEnergySupplyVoltageV", DoubleValue (voltage));
radioEnergyHelper.Set ("IdleCurrentA", DoubleValue (idleCurrent));
radioEnergyHelper.Set ("TxCurrentA", DoubleValue (txCurrent));
// compute the efficiency of the power amplifier (eta) assuming that the provided value for tx current
// corresponds to the minimum tx power level
double eta = WifiTxCurrentModel::DbmToW (txPowerStart) / ((txCurrent - idleCurrent) * voltage);
radioEnergyHelper.SetTxCurrentModel ("ns3::LinearWifiTxCurrentModel",
"Voltage", DoubleValue (voltage),
"IdleCurrent", DoubleValue (idleCurrent),
"Eta", DoubleValue (eta));
// install an energy source on each node
for (NodeContainer::Iterator n = c.Begin(); n != c.End(); n++)
{
eSources.Add (basicSourceHelper.Install (*n));
Ptr<WifiNetDevice> wnd;
for (uint32_t i = 0; i < (*n)->GetNDevices (); ++i)
{
wnd = (*n)->GetDevice (i)->GetObject<WifiNetDevice> ();
// if it is a WifiNetDevice
if (wnd != 0)
{
// this device draws power from the last created energy source
radioEnergyHelper.Install (wnd, eSources.Get (eSources.GetN()-1));
}
}
}
// Tracing
eSources.Get (0)->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback(&RemainingEnergyTrace<0>));
eSources.Get (1)->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback(&RemainingEnergyTrace<1>));
Config::Connect ("/NodeList/0/DeviceList/*/Phy/State/State", MakeCallback (&PhyStateTrace<0>));
Config::Connect ("/NodeList/1/DeviceList/*/Phy/State/State", MakeCallback (&PhyStateTrace<1>));
// wifiPhy.EnablePcap ("wifi-sleep", devices);
Simulator::Stop (Seconds(duration+1));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
+6
View File
@@ -46,8 +46,14 @@ def build(bld):
obj = bld.create_ns3_program('ofdm-validation', ['core', 'mobility', 'wifi', 'config-store', 'stats'])
obj.source = 'ofdm-validation.cc'
obj = bld.create_ns3_program('ofdm-ht-validation', ['core', 'mobility', 'wifi', 'config-store', 'stats'])
obj.source = 'ofdm-ht-validation.cc'
obj = bld.create_ns3_program('wifi-hidden-terminal', ['internet', 'mobility', 'wifi', 'applications', 'propagation', 'flow-monitor'])
obj.source = 'wifi-hidden-terminal.cc'
obj = bld.create_ns3_program('ht-wifi-network', ['core','internet', 'mobility', 'wifi', 'applications', 'propagation'])
obj.source = 'ht-wifi-network.cc'
obj = bld.create_ns3_program('wifi-sleep', ['core', 'network', 'internet', 'mobility', 'wifi', 'applications', 'energy', 'config-store'])
obj.source = 'wifi-sleep.cc'
+2 -2
View File
@@ -16,10 +16,10 @@
#include "ns3/core-module.h"
NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
int
main (int argc, char *argv[])
{
+2 -2
View File
@@ -16,10 +16,10 @@
#include "ns3/core-module.h"
NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
int
main (int argc, char *argv[])
{
+19 -3
View File
@@ -325,10 +325,10 @@ def register_Ns3ObjectBase_methods(root_module, cls):
'void',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function]
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & value) const [member function]
cls.add_method('GetAttributeFailSafe',
'bool',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')],
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function]
cls.add_method('GetInstanceTypeId',
@@ -422,7 +422,12 @@ def register_Ns3TypeId_methods(root_module, cls):
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')])
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')],
deprecated=True)
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor, std::string callback) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor'), param('std::string', 'callback')])
## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function]
cls.add_method('GetAttribute',
'ns3::TypeId::AttributeInformation',
@@ -473,6 +478,11 @@ def register_Ns3TypeId_methods(root_module, cls):
'uint32_t',
[],
is_static=True)
## type-id.h (module 'core'): std::size_t ns3::TypeId::GetSize() const [member function]
cls.add_method('GetSize',
'std::size_t',
[],
is_const=True)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function]
cls.add_method('GetTraceSource',
'ns3::TypeId::TraceSourceInformation',
@@ -549,6 +559,10 @@ def register_Ns3TypeId_methods(root_module, cls):
cls.add_method('SetParent',
'ns3::TypeId',
[param('ns3::TypeId', 'tid')])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
cls.add_method('SetSize',
'ns3::TypeId',
[param('std::size_t', 'size')])
## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function]
cls.add_method('SetUid',
'void',
@@ -583,6 +597,8 @@ def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls):
cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')])
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable]
cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::callback [variable]
cls.add_instance_attribute('callback', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable]
cls.add_instance_attribute('help', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable]
+19 -3
View File
@@ -325,10 +325,10 @@ def register_Ns3ObjectBase_methods(root_module, cls):
'void',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function]
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & value) const [member function]
cls.add_method('GetAttributeFailSafe',
'bool',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')],
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function]
cls.add_method('GetInstanceTypeId',
@@ -422,7 +422,12 @@ def register_Ns3TypeId_methods(root_module, cls):
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')])
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')],
deprecated=True)
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor, std::string callback) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor'), param('std::string', 'callback')])
## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function]
cls.add_method('GetAttribute',
'ns3::TypeId::AttributeInformation',
@@ -473,6 +478,11 @@ def register_Ns3TypeId_methods(root_module, cls):
'uint32_t',
[],
is_static=True)
## type-id.h (module 'core'): std::size_t ns3::TypeId::GetSize() const [member function]
cls.add_method('GetSize',
'std::size_t',
[],
is_const=True)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function]
cls.add_method('GetTraceSource',
'ns3::TypeId::TraceSourceInformation',
@@ -549,6 +559,10 @@ def register_Ns3TypeId_methods(root_module, cls):
cls.add_method('SetParent',
'ns3::TypeId',
[param('ns3::TypeId', 'tid')])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
cls.add_method('SetSize',
'ns3::TypeId',
[param('std::size_t', 'size')])
## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function]
cls.add_method('SetUid',
'void',
@@ -583,6 +597,8 @@ def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls):
cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')])
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable]
cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::callback [variable]
cls.add_instance_attribute('callback', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable]
cls.add_instance_attribute('help', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable]
+1 -2
View File
@@ -24,10 +24,9 @@
#include "angles.h"
NS_LOG_COMPONENT_DEFINE ("Angles");
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("Angles");
double DegreesToRadians (double degrees)
{
+2 -2
View File
@@ -24,10 +24,10 @@
#include "antenna-model.h"
NS_LOG_COMPONENT_DEFINE ("AntennaModel");
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("AntennaModel");
NS_OBJECT_ENSURE_REGISTERED (AntennaModel);
+2 -2
View File
@@ -27,10 +27,10 @@
#include "cosine-antenna-model.h"
NS_LOG_COMPONENT_DEFINE ("CosineAntennaModel");
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("CosineAntennaModel");
NS_OBJECT_ENSURE_REGISTERED (CosineAntennaModel);
+2 -2
View File
@@ -25,10 +25,10 @@
#include "isotropic-antenna-model.h"
NS_LOG_COMPONENT_DEFINE ("IsotropicAntennaModel");
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("IsotropicAntennaModel");
NS_OBJECT_ENSURE_REGISTERED (IsotropicAntennaModel);
+2 -2
View File
@@ -27,10 +27,10 @@
#include "parabolic-antenna-model.h"
NS_LOG_COMPONENT_DEFINE ("ParabolicAntennaModel");
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("ParabolicAntennaModel");
NS_OBJECT_ENSURE_REGISTERED (ParabolicAntennaModel);
+2 -2
View File
@@ -29,10 +29,10 @@
#include <sstream>
NS_LOG_COMPONENT_DEFINE ("TestCosineAntennaModel");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TestCosineAntennaModel");
enum CosineAntennaModelGainTestCondition {
EQUAL = 0,
LESSTHAN = 1
+2 -2
View File
@@ -29,10 +29,10 @@
#include <sstream>
NS_LOG_COMPONENT_DEFINE ("TestParabolicAntennaModel");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TestParabolicAntennaModel");
enum ParabolicAntennaModelGainTestCondition {
EQUAL = 0,
LESSTHAN = 1
+81 -46
View File
@@ -1553,26 +1553,46 @@ def register_Ns3Ipv4RoutingHelper_methods(root_module, cls):
'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
[param('ns3::Ptr< ns3::Node >', 'node')],
is_pure_virtual=True, is_const=True, is_virtual=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableAllAt(ns3::Time printTime, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheAllAt(ns3::Time printTime, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheAllAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheAllEvery(ns3::Time printInterval, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheAllEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheAt(ns3::Time printTime, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheEvery(ns3::Time printInterval, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableAllAt(ns3::Time printTime, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableAllAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableAllEvery(ns3::Time printInterval, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableAllEvery(ns3::Time printInterval, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableAllEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableAt(ns3::Time printTime, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableAt(ns3::Time printTime, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableEvery(ns3::Time printInterval, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableEvery(ns3::Time printInterval, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
is_static=True)
return
def register_Ns3Ipv6Address_methods(root_module, cls):
@@ -1978,10 +1998,10 @@ def register_Ns3ObjectBase_methods(root_module, cls):
'void',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function]
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & value) const [member function]
cls.add_method('GetAttributeFailSafe',
'bool',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')],
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function]
cls.add_method('GetInstanceTypeId',
@@ -2569,7 +2589,12 @@ def register_Ns3TypeId_methods(root_module, cls):
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')])
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')],
deprecated=True)
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor, std::string callback) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor'), param('std::string', 'callback')])
## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function]
cls.add_method('GetAttribute',
'ns3::TypeId::AttributeInformation',
@@ -2620,6 +2645,11 @@ def register_Ns3TypeId_methods(root_module, cls):
'uint32_t',
[],
is_static=True)
## type-id.h (module 'core'): std::size_t ns3::TypeId::GetSize() const [member function]
cls.add_method('GetSize',
'std::size_t',
[],
is_const=True)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function]
cls.add_method('GetTraceSource',
'ns3::TypeId::TraceSourceInformation',
@@ -2696,6 +2726,10 @@ def register_Ns3TypeId_methods(root_module, cls):
cls.add_method('SetParent',
'ns3::TypeId',
[param('ns3::TypeId', 'tid')])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
cls.add_method('SetSize',
'ns3::TypeId',
[param('std::size_t', 'size')])
## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function]
cls.add_method('SetUid',
'void',
@@ -2730,6 +2764,8 @@ def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls):
cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')])
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable]
cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::callback [variable]
cls.add_instance_attribute('callback', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable]
cls.add_instance_attribute('help', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable]
@@ -3998,10 +4034,10 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
@@ -4012,25 +4048,25 @@ def register_Ns3Time_methods(root_module, cls):
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -4147,20 +4183,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -4891,6 +4927,10 @@ def register_Ns3ArpCache_methods(root_module, cls):
cls.add_method('Lookup',
'ns3::ArpCache::Entry *',
[param('ns3::Ipv4Address', 'destination')])
## arp-cache.h (module 'internet'): void ns3::ArpCache::PrintArpCache(ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintArpCache',
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')])
## arp-cache.h (module 'internet'): void ns3::ArpCache::SetAliveTimeout(ns3::Time aliveTimeout) [member function]
cls.add_method('SetAliveTimeout',
'void',
@@ -5249,14 +5289,14 @@ def register_Ns3EnumChecker_methods(root_module, cls):
cls.add_constructor([param('ns3::EnumChecker const &', 'arg0')])
## enum.h (module 'core'): ns3::EnumChecker::EnumChecker() [constructor]
cls.add_constructor([])
## enum.h (module 'core'): void ns3::EnumChecker::Add(int v, std::string name) [member function]
## enum.h (module 'core'): void ns3::EnumChecker::Add(int value, std::string name) [member function]
cls.add_method('Add',
'void',
[param('int', 'v'), param('std::string', 'name')])
## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int v, std::string name) [member function]
[param('int', 'value'), param('std::string', 'name')])
## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int value, std::string name) [member function]
cls.add_method('AddDefault',
'void',
[param('int', 'v'), param('std::string', 'name')])
[param('int', 'value'), param('std::string', 'name')])
## enum.h (module 'core'): bool ns3::EnumChecker::Check(ns3::AttributeValue const & value) const [member function]
cls.add_method('Check',
'bool',
@@ -5294,8 +5334,8 @@ def register_Ns3EnumValue_methods(root_module, cls):
cls.add_constructor([param('ns3::EnumValue const &', 'arg0')])
## enum.h (module 'core'): ns3::EnumValue::EnumValue() [constructor]
cls.add_constructor([])
## enum.h (module 'core'): ns3::EnumValue::EnumValue(int v) [constructor]
cls.add_constructor([param('int', 'v')])
## enum.h (module 'core'): ns3::EnumValue::EnumValue(int value) [constructor]
cls.add_constructor([param('int', 'value')])
## enum.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::EnumValue::Copy() const [member function]
cls.add_method('Copy',
'ns3::Ptr< ns3::AttributeValue >',
@@ -5316,10 +5356,10 @@ def register_Ns3EnumValue_methods(root_module, cls):
'std::string',
[param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
is_const=True, is_virtual=True)
## enum.h (module 'core'): void ns3::EnumValue::Set(int v) [member function]
## enum.h (module 'core'): void ns3::EnumValue::Set(int value) [member function]
cls.add_method('Set',
'void',
[param('int', 'v')])
[param('int', 'value')])
return
def register_Ns3ErlangRandomVariable_methods(root_module, cls):
@@ -6048,11 +6088,6 @@ def register_Ns3Ipv4MulticastRoute_methods(root_module, cls):
'ns3::Ipv4Address',
[],
is_const=True)
## ipv4-route.h (module 'internet'): uint32_t ns3::Ipv4MulticastRoute::GetOutputTtl(uint32_t oif) [member function]
cls.add_method('GetOutputTtl',
'uint32_t',
[param('uint32_t', 'oif')],
deprecated=True)
## ipv4-route.h (module 'internet'): std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > ns3::Ipv4MulticastRoute::GetOutputTtlMap() const [member function]
cls.add_method('GetOutputTtlMap',
'std::map< unsigned int, unsigned int >',
@@ -6804,11 +6839,6 @@ def register_Ns3Packet_methods(root_module, cls):
'uint64_t',
[],
is_const=True)
## packet.h (module 'network'): uint8_t const * ns3::Packet::PeekData() const [member function]
cls.add_method('PeekData',
'uint8_t const *',
[],
deprecated=True, is_const=True)
## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function]
cls.add_method('PeekHeader',
'uint32_t',
@@ -6879,6 +6909,11 @@ def register_Ns3Packet_methods(root_module, cls):
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
## packet.h (module 'network'): std::string ns3::Packet::ToString() const [member function]
cls.add_method('ToString',
'std::string',
[],
is_const=True)
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+81 -46
View File
@@ -1553,26 +1553,46 @@ def register_Ns3Ipv4RoutingHelper_methods(root_module, cls):
'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
[param('ns3::Ptr< ns3::Node >', 'node')],
is_pure_virtual=True, is_const=True, is_virtual=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableAllAt(ns3::Time printTime, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheAllAt(ns3::Time printTime, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheAllAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheAllEvery(ns3::Time printInterval, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheAllEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheAt(ns3::Time printTime, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintNeighborCacheEvery(ns3::Time printInterval, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintNeighborCacheEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableAllAt(ns3::Time printTime, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableAllAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableAllEvery(ns3::Time printInterval, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableAllEvery(ns3::Time printInterval, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableAllEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableAt(ns3::Time printTime, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableAt(ns3::Time printTime, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableAt',
'void',
[param('ns3::Time', 'printTime'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
## ipv4-routing-helper.h (module 'internet'): void ns3::Ipv4RoutingHelper::PrintRoutingTableEvery(ns3::Time printInterval, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
is_static=True)
## ipv4-routing-helper.h (module 'internet'): static void ns3::Ipv4RoutingHelper::PrintRoutingTableEvery(ns3::Time printInterval, ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintRoutingTableEvery',
'void',
[param('ns3::Time', 'printInterval'), param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True)
is_static=True)
return
def register_Ns3Ipv6Address_methods(root_module, cls):
@@ -1978,10 +1998,10 @@ def register_Ns3ObjectBase_methods(root_module, cls):
'void',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function]
## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & value) const [member function]
cls.add_method('GetAttributeFailSafe',
'bool',
[param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')],
[param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
is_const=True)
## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function]
cls.add_method('GetInstanceTypeId',
@@ -2569,7 +2589,12 @@ def register_Ns3TypeId_methods(root_module, cls):
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')])
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')],
deprecated=True)
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor, std::string callback) [member function]
cls.add_method('AddTraceSource',
'ns3::TypeId',
[param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor'), param('std::string', 'callback')])
## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function]
cls.add_method('GetAttribute',
'ns3::TypeId::AttributeInformation',
@@ -2620,6 +2645,11 @@ def register_Ns3TypeId_methods(root_module, cls):
'uint32_t',
[],
is_static=True)
## type-id.h (module 'core'): std::size_t ns3::TypeId::GetSize() const [member function]
cls.add_method('GetSize',
'std::size_t',
[],
is_const=True)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function]
cls.add_method('GetTraceSource',
'ns3::TypeId::TraceSourceInformation',
@@ -2696,6 +2726,10 @@ def register_Ns3TypeId_methods(root_module, cls):
cls.add_method('SetParent',
'ns3::TypeId',
[param('ns3::TypeId', 'tid')])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
cls.add_method('SetSize',
'ns3::TypeId',
[param('std::size_t', 'size')])
## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function]
cls.add_method('SetUid',
'void',
@@ -2730,6 +2764,8 @@ def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls):
cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')])
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable]
cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::callback [variable]
cls.add_instance_attribute('callback', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable]
cls.add_instance_attribute('help', 'std::string', is_const=False)
## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable]
@@ -3998,10 +4034,10 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
@@ -4012,25 +4048,25 @@ def register_Ns3Time_methods(root_module, cls):
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -4147,20 +4183,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -4891,6 +4927,10 @@ def register_Ns3ArpCache_methods(root_module, cls):
cls.add_method('Lookup',
'ns3::ArpCache::Entry *',
[param('ns3::Ipv4Address', 'destination')])
## arp-cache.h (module 'internet'): void ns3::ArpCache::PrintArpCache(ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function]
cls.add_method('PrintArpCache',
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')])
## arp-cache.h (module 'internet'): void ns3::ArpCache::SetAliveTimeout(ns3::Time aliveTimeout) [member function]
cls.add_method('SetAliveTimeout',
'void',
@@ -5249,14 +5289,14 @@ def register_Ns3EnumChecker_methods(root_module, cls):
cls.add_constructor([param('ns3::EnumChecker const &', 'arg0')])
## enum.h (module 'core'): ns3::EnumChecker::EnumChecker() [constructor]
cls.add_constructor([])
## enum.h (module 'core'): void ns3::EnumChecker::Add(int v, std::string name) [member function]
## enum.h (module 'core'): void ns3::EnumChecker::Add(int value, std::string name) [member function]
cls.add_method('Add',
'void',
[param('int', 'v'), param('std::string', 'name')])
## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int v, std::string name) [member function]
[param('int', 'value'), param('std::string', 'name')])
## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int value, std::string name) [member function]
cls.add_method('AddDefault',
'void',
[param('int', 'v'), param('std::string', 'name')])
[param('int', 'value'), param('std::string', 'name')])
## enum.h (module 'core'): bool ns3::EnumChecker::Check(ns3::AttributeValue const & value) const [member function]
cls.add_method('Check',
'bool',
@@ -5294,8 +5334,8 @@ def register_Ns3EnumValue_methods(root_module, cls):
cls.add_constructor([param('ns3::EnumValue const &', 'arg0')])
## enum.h (module 'core'): ns3::EnumValue::EnumValue() [constructor]
cls.add_constructor([])
## enum.h (module 'core'): ns3::EnumValue::EnumValue(int v) [constructor]
cls.add_constructor([param('int', 'v')])
## enum.h (module 'core'): ns3::EnumValue::EnumValue(int value) [constructor]
cls.add_constructor([param('int', 'value')])
## enum.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::EnumValue::Copy() const [member function]
cls.add_method('Copy',
'ns3::Ptr< ns3::AttributeValue >',
@@ -5316,10 +5356,10 @@ def register_Ns3EnumValue_methods(root_module, cls):
'std::string',
[param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
is_const=True, is_virtual=True)
## enum.h (module 'core'): void ns3::EnumValue::Set(int v) [member function]
## enum.h (module 'core'): void ns3::EnumValue::Set(int value) [member function]
cls.add_method('Set',
'void',
[param('int', 'v')])
[param('int', 'value')])
return
def register_Ns3ErlangRandomVariable_methods(root_module, cls):
@@ -6048,11 +6088,6 @@ def register_Ns3Ipv4MulticastRoute_methods(root_module, cls):
'ns3::Ipv4Address',
[],
is_const=True)
## ipv4-route.h (module 'internet'): uint32_t ns3::Ipv4MulticastRoute::GetOutputTtl(uint32_t oif) [member function]
cls.add_method('GetOutputTtl',
'uint32_t',
[param('uint32_t', 'oif')],
deprecated=True)
## ipv4-route.h (module 'internet'): std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > ns3::Ipv4MulticastRoute::GetOutputTtlMap() const [member function]
cls.add_method('GetOutputTtlMap',
'std::map< unsigned int, unsigned int >',
@@ -6804,11 +6839,6 @@ def register_Ns3Packet_methods(root_module, cls):
'uint64_t',
[],
is_const=True)
## packet.h (module 'network'): uint8_t const * ns3::Packet::PeekData() const [member function]
cls.add_method('PeekData',
'uint8_t const *',
[],
deprecated=True, is_const=True)
## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function]
cls.add_method('PeekHeader',
'uint32_t',
@@ -6879,6 +6909,11 @@ def register_Ns3Packet_methods(root_module, cls):
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
## packet.h (module 'network'): std::string ns3::Packet::ToString() const [member function]
cls.add_method('ToString',
'std::string',
[],
is_const=True)
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+3 -6
View File
@@ -54,8 +54,8 @@ public:
void Report (std::ostream & os);
private:
///\name parameters
//\{
// parameters
/// Number of nodes
uint32_t size;
/// Distance between nodes, meters
@@ -66,14 +66,11 @@ private:
bool pcap;
/// Print routes if true
bool printRoutes;
//\}
///\name network
//\{
// network
NodeContainer nodes;
NetDeviceContainer devices;
Ipv4InterfaceContainer interfaces;
//\}
private:
void CreateNodes ();
+1 -1
View File
@@ -2,5 +2,5 @@
def build(bld):
obj = bld.create_ns3_program('aodv',
['wifi', 'internet', 'aodv'])
['wifi', 'internet', 'aodv', 'applications'])
obj.source = 'aodv.cc'
+3 -1
View File
@@ -30,10 +30,12 @@
#include "ns3/log.h"
#include <algorithm>
NS_LOG_COMPONENT_DEFINE ("AodvNeighbors");
namespace ns3
{
NS_LOG_COMPONENT_DEFINE ("AodvNeighbors");
namespace aodv
{
Neighbors::Neighbors (Time delay) :
+3 -3
View File
@@ -85,11 +85,11 @@ public:
/// Get callback to ProcessTxError
Callback<void, WifiMacHeader const &> GetTxErrorCallback () const { return m_txErrorCallback; }
///\name Handle link failure callback
//\{
/// Handle link failure callback
void SetCallback (Callback<void, Ipv4Address> cb) { m_handleLinkFailure = cb; }
/// Handle link failure callback
Callback<void, Ipv4Address> GetCallback () const { return m_handleLinkFailure; }
//\}
private:
/// link failure callback
Callback<void, Ipv4Address> m_handleLinkFailure;
+10 -30
View File
@@ -56,15 +56,13 @@ public:
/// c-tor
TypeHeader (MessageType t = AODVTYPE_RREQ);
///\name Header serialization/deserialization
//\{
// Header serialization/deserialization
static TypeId GetTypeId ();
TypeId GetInstanceTypeId () const;
uint32_t GetSerializedSize () const;
void Serialize (Buffer::Iterator start) const;
uint32_t Deserialize (Buffer::Iterator start);
void Print (std::ostream &os) const;
//\}
/// Return type
MessageType Get () const { return m_type; }
@@ -108,18 +106,15 @@ public:
uint32_t dstSeqNo = 0, Ipv4Address origin = Ipv4Address (),
uint32_t originSeqNo = 0);
///\name Header serialization/deserialization
//\{
// Header serialization/deserialization
static TypeId GetTypeId ();
TypeId GetInstanceTypeId () const;
uint32_t GetSerializedSize () const;
void Serialize (Buffer::Iterator start) const;
uint32_t Deserialize (Buffer::Iterator start);
void Print (std::ostream &os) const;
//\}
///\name Fields
//\{
// Fields
void SetHopCount (uint8_t count) { m_hopCount = count; }
uint8_t GetHopCount () const { return m_hopCount; }
void SetId (uint32_t id) { m_requestID = id; }
@@ -132,17 +127,14 @@ public:
Ipv4Address GetOrigin () const { return m_origin; }
void SetOriginSeqno (uint32_t s) { m_originSeqNo = s; }
uint32_t GetOriginSeqno () const { return m_originSeqNo; }
//\}
///\name Flags
//\{
// Flags
void SetGratiousRrep (bool f);
bool GetGratiousRrep () const;
void SetDestinationOnly (bool f);
bool GetDestinationOnly () const;
void SetUnknownSeqno (bool f);
bool GetUnknownSeqno () const;
//\}
bool operator== (RreqHeader const & o) const;
private:
@@ -184,18 +176,15 @@ public:
RrepHeader (uint8_t prefixSize = 0, uint8_t hopCount = 0, Ipv4Address dst =
Ipv4Address (), uint32_t dstSeqNo = 0, Ipv4Address origin =
Ipv4Address (), Time lifetime = MilliSeconds (0));
///\name Header serialization/deserialization
//\{
// Header serialization/deserialization
static TypeId GetTypeId ();
TypeId GetInstanceTypeId () const;
uint32_t GetSerializedSize () const;
void Serialize (Buffer::Iterator start) const;
uint32_t Deserialize (Buffer::Iterator start);
void Print (std::ostream &os) const;
//\}
///\name Fields
//\{
// Fields
void SetHopCount (uint8_t count) { m_hopCount = count; }
uint8_t GetHopCount () const { return m_hopCount; }
void SetDst (Ipv4Address a) { m_dst = a; }
@@ -206,15 +195,12 @@ public:
Ipv4Address GetOrigin () const { return m_origin; }
void SetLifeTime (Time t);
Time GetLifeTime () const;
//\}
///\name Flags
//\{
// Flags
void SetAckRequired (bool f);
bool GetAckRequired () const;
void SetPrefixSize (uint8_t sz);
uint8_t GetPrefixSize () const;
//\}
/// Configure RREP to be a Hello message
void SetHello (Ipv4Address src, uint32_t srcSeqNo, Time lifetime);
@@ -249,15 +235,13 @@ public:
/// c-tor
RrepAckHeader ();
///\name Header serialization/deserialization
//\{
// Header serialization/deserialization
static TypeId GetTypeId ();
TypeId GetInstanceTypeId () const;
uint32_t GetSerializedSize () const;
void Serialize (Buffer::Iterator start) const;
uint32_t Deserialize (Buffer::Iterator start);
void Print (std::ostream &os) const;
//\}
bool operator== (RrepAckHeader const & o) const;
private:
@@ -291,21 +275,17 @@ public:
/// c-tor
RerrHeader ();
///\name Header serialization/deserialization
//\{
// Header serialization/deserialization
static TypeId GetTypeId ();
TypeId GetInstanceTypeId () const;
uint32_t GetSerializedSize () const;
void Serialize (Buffer::Iterator i) const;
uint32_t Deserialize (Buffer::Iterator start);
void Print (std::ostream &os) const;
//\}
///\name No delete flag
//\{
// No delete flag
void SetNoDelete (bool f);
bool GetNoDelete () const;
//\}
/**
* Add unreachable node address and its sequence number in RERR header
+105 -9
View File
@@ -42,10 +42,11 @@
#include <algorithm>
#include <limits>
NS_LOG_COMPONENT_DEFINE ("AodvRoutingProtocol");
namespace ns3
{
NS_LOG_COMPONENT_DEFINE ("AodvRoutingProtocol");
namespace aodv
{
NS_OBJECT_ENSURE_REGISTERED (RoutingProtocol);
@@ -283,6 +284,12 @@ RoutingProtocol::DoDispose ()
iter->first->Close ();
}
m_socketAddresses.clear ();
for (std::map<Ptr<Socket>, Ipv4InterfaceAddress>::iterator iter =
m_socketSubnetBroadcastAddresses.begin (); iter != m_socketSubnetBroadcastAddresses.end (); iter++)
{
iter->first->Close ();
}
m_socketSubnetBroadcastAddresses.clear ();
Ipv4RoutingProtocol::DoDispose ();
}
@@ -613,18 +620,34 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i)
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketAddresses.insert (std::make_pair (socket, iface));
// create also a subnet broadcast socket
socket = Socket::CreateSocket (GetObject<Node> (),
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->Bind (InetSocketAddress (iface.GetBroadcast (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketSubnetBroadcastAddresses.insert (std::make_pair (socket, iface));
// Add local broadcast record to the routing table
Ptr<NetDevice> dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (iface.GetLocal ()));
RoutingTableEntry rt (/*device=*/ dev, /*dst=*/ iface.GetBroadcast (), /*know seqno=*/ true, /*seqno=*/ 0, /*iface=*/ iface,
/*hops=*/ 1, /*next hop=*/ iface.GetBroadcast (), /*lifetime=*/ Simulator::GetMaximumSimulationTime ());
m_routingTable.AddRoute (rt);
if (l3->GetInterface (i)->GetArpCache ())
{
m_nb.AddArpCache (l3->GetInterface (i)->GetArpCache ());
}
// Allow neighbor manager use this interface for layer 2 feedback if possible
Ptr<WifiNetDevice> wifi = dev->GetObject<WifiNetDevice> ();
if (wifi == 0)
@@ -634,7 +657,6 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i)
return;
mac->TraceConnectWithoutContext ("TxErrHeader", m_nb.GetTxErrorCallback ());
m_nb.AddArpCache (l3->GetInterface (i)->GetArpCache ());
}
void
@@ -662,6 +684,13 @@ RoutingProtocol::NotifyInterfaceDown (uint32_t i)
NS_ASSERT (socket);
socket->Close ();
m_socketAddresses.erase (socket);
// Close socket
socket = FindSubnetBroadcastSocketWithInterfaceAddress (m_ipv4->GetAddress (i, 0));
NS_ASSERT (socket);
socket->Close ();
m_socketSubnetBroadcastAddresses.erase (socket);
if (m_socketAddresses.empty ())
{
NS_LOG_LOGIC ("No aodv interfaces");
@@ -693,12 +722,22 @@ RoutingProtocol::NotifyAddAddress (uint32_t i, Ipv4InterfaceAddress address)
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv,this));
socket->Bind (InetSocketAddress (iface.GetLocal (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
// Bind to any IP address so that broadcasts can be received
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), AODV_PORT));
socket->SetAllowBroadcast (true);
m_socketAddresses.insert (std::make_pair (socket, iface));
// create also a subnet directed broadcast socket
socket = Socket::CreateSocket (GetObject<Node> (),
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->Bind (InetSocketAddress (iface.GetBroadcast (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketSubnetBroadcastAddresses.insert (std::make_pair (socket, iface));
// Add local broadcast record to the routing table
Ptr<NetDevice> dev = m_ipv4->GetNetDevice (
m_ipv4->GetInterfaceForAddress (iface.GetLocal ()));
@@ -722,7 +761,16 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t i, Ipv4InterfaceAddress address)
if (socket)
{
m_routingTable.DeleteAllRoutesFromInterface (address);
socket->Close ();
m_socketAddresses.erase (socket);
Ptr<Socket> unicastSocket = FindSubnetBroadcastSocketWithInterfaceAddress (address);
if (unicastSocket)
{
unicastSocket->Close ();
m_socketAddresses.erase (unicastSocket);
}
Ptr<Ipv4L3Protocol> l3 = m_ipv4->GetObject<Ipv4L3Protocol> ();
if (l3->GetNAddresses (i))
{
@@ -733,10 +781,23 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t i, Ipv4InterfaceAddress address)
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
// Bind to any IP address so that broadcasts can be received
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), AODV_PORT));
socket->Bind (InetSocketAddress (iface.GetLocal (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketAddresses.insert (std::make_pair (socket, iface));
// create also a unicast socket
socket = Socket::CreateSocket (GetObject<Node> (),
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->Bind (InetSocketAddress (iface.GetBroadcast (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketSubnetBroadcastAddresses.insert (std::make_pair (socket, iface));
// Add local broadcast record to the routing table
Ptr<NetDevice> dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (iface.GetLocal ()));
RoutingTableEntry rt (/*device=*/ dev, /*dst=*/ iface.GetBroadcast (), /*know seqno=*/ true, /*seqno=*/ 0, /*iface=*/ iface,
@@ -937,7 +998,20 @@ RoutingProtocol::RecvAodv (Ptr<Socket> socket)
Ptr<Packet> packet = socket->RecvFrom (sourceAddress);
InetSocketAddress inetSourceAddr = InetSocketAddress::ConvertFrom (sourceAddress);
Ipv4Address sender = inetSourceAddr.GetIpv4 ();
Ipv4Address receiver = m_socketAddresses[socket].GetLocal ();
Ipv4Address receiver;
if (m_socketAddresses.find (socket) != m_socketAddresses.end ())
{
receiver = m_socketAddresses[socket].GetLocal ();
}
else if(m_socketSubnetBroadcastAddresses.find (socket) != m_socketSubnetBroadcastAddresses.end ())
{
receiver = m_socketSubnetBroadcastAddresses[socket].GetLocal ();
}
else
{
NS_ASSERT_MSG (false, "Received a packet from an unknown socket");
}
NS_LOG_DEBUG ("AODV node " << this << " received a AODV packet from " << sender << " to " << receiver);
UpdateRouteToNeighbor (sender, receiver);
@@ -1116,6 +1190,8 @@ RoutingProtocol::RecvRequest (Ptr<Packet> p, Ipv4Address receiver, Ipv4Address s
toNeighbor.SetFlag (VALID);
toNeighbor.SetOutputDevice (m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)));
toNeighbor.SetInterface (m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0));
toNeighbor.SetHop (1);
toNeighbor.SetNextHop (src);
m_routingTable.Update (toNeighbor);
}
m_nb.Update (src, Time (AllowedHelloLoss * HelloInterval));
@@ -1444,6 +1520,8 @@ RoutingProtocol::ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiv
toNeighbor.SetFlag (VALID);
toNeighbor.SetOutputDevice (m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)));
toNeighbor.SetInterface (m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0));
toNeighbor.SetHop (1);
toNeighbor.SetNextHop (rrepHeader.GetDst ());
m_routingTable.Update (toNeighbor);
}
if (EnableHello)
@@ -1802,7 +1880,9 @@ RoutingProtocol::SendRerrMessage (Ptr<Packet> packet, std::vector<Ipv4Address> p
Ptr<Socket> socket = FindSocketWithInterfaceAddress (*i);
NS_ASSERT (socket);
NS_LOG_LOGIC ("Broadcast RERR message from interface " << i->GetLocal ());
// std::cout << "Broadcast RERR message from interface " << i->GetLocal () << std::endl;
// Send to all-hosts broadcast if on /32 addr, subnet-directed otherwise
Ptr<Packet> p = packet->Copy ();
Ipv4Address destination;
if (i->GetMask () == Ipv4Mask::GetOnes ())
{
@@ -1812,7 +1892,7 @@ RoutingProtocol::SendRerrMessage (Ptr<Packet> packet, std::vector<Ipv4Address> p
{
destination = i->GetBroadcast ();
}
Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, destination);
Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, p, destination);
}
}
@@ -1832,5 +1912,21 @@ RoutingProtocol::FindSocketWithInterfaceAddress (Ipv4InterfaceAddress addr ) con
return socket;
}
Ptr<Socket>
RoutingProtocol::FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAddress addr ) const
{
NS_LOG_FUNCTION (this << addr);
for (std::map<Ptr<Socket>, Ipv4InterfaceAddress>::const_iterator j =
m_socketSubnetBroadcastAddresses.begin (); j != m_socketSubnetBroadcastAddresses.end (); ++j)
{
Ptr<Socket> socket = j->first;
Ipv4InterfaceAddress iface = j->second;
if (iface == addr)
return socket;
}
Ptr<Socket> socket;
return socket;
}
}
}
+11 -11
View File
@@ -61,8 +61,7 @@ public:
virtual ~RoutingProtocol();
virtual void DoDispose ();
///\name From Ipv4RoutingProtocol
//\{
// Inherited from Ipv4RoutingProtocol
Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr);
bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
UnicastForwardCallback ucb, MulticastForwardCallback mcb,
@@ -73,10 +72,8 @@ public:
virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
virtual void SetIpv4 (Ptr<Ipv4> ipv4);
virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const;
//\}
///\name Handle protocol parameters
//\{
// Handle protocol parameters
Time GetMaxQueueTime () const { return MaxQueueTime; }
void SetMaxQueueTime (Time t);
uint32_t GetMaxQueueLen () const { return MaxQueueLen; }
@@ -89,7 +86,6 @@ public:
bool GetHelloEnable () const { return EnableHello; }
void SetBroadcastEnable (bool f) { EnableBroadcast = f; }
bool GetBroadcastEnable () const { return EnableBroadcast; }
//\}
/**
* Assign a fixed random variable stream number to the random variables
@@ -102,8 +98,8 @@ public:
int64_t AssignStreams (int64_t stream);
private:
///\name Protocol parameters.
//\{
// Protocol parameters.
uint32_t RreqRetries; ///< Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route
uint16_t RreqRateLimit; ///< Maximum number of RREQ per second.
uint16_t RerrRateLimit; ///< Maximum number of REER per second.
@@ -140,8 +136,10 @@ private:
/// IP protocol
Ptr<Ipv4> m_ipv4;
/// Raw socket per each IP interface, map socket -> iface address (IP + mask)
/// Raw unicast socket per each IP interface, map socket -> iface address (IP + mask)
std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketAddresses;
/// Raw subnet directed broadcast socket per each IP interface, map socket -> iface address (IP + mask)
std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketSubnetBroadcastAddresses;
/// Loopback device used to defer RREQ until packet will be fully formed
Ptr<NetDevice> m_lo;
@@ -191,8 +189,10 @@ private:
void UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver);
/// Check that packet is send from own interface
bool IsMyOwnAddress (Ipv4Address src);
/// Find socket with local interface address iface
/// Find unicast socket with local interface address iface
Ptr<Socket> FindSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
/// Find subnet directed broadcast socket with local interface address iface
Ptr<Socket> FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
/// Process hello message
void ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiverIfaceAddr);
/// Create loopback route for given header
@@ -241,7 +241,7 @@ private:
* \param origin - originating node IP address
*/
void SendRerrWhenNoRouteToForward (Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin);
//\}
/// @}
void SendTo (Ptr<Socket> socket, Ptr<Packet> packet, Ipv4Address destination);
+3 -2
View File
@@ -32,10 +32,11 @@
#include "ns3/socket.h"
#include "ns3/log.h"
NS_LOG_COMPONENT_DEFINE ("AodvRequestQueue");
namespace ns3
{
NS_LOG_COMPONENT_DEFINE ("AodvRequestQueue");
namespace aodv
{
uint32_t
+7 -6
View File
@@ -61,8 +61,8 @@ public:
{
return ((m_packet == o.m_packet) && (m_header.GetDestination () == o.m_header.GetDestination ()) && (m_expire == o.m_expire));
}
///\name Fields
//\{
// Fields
UnicastForwardCallback GetUnicastForwardCallback () const { return m_ucb; }
void SetUnicastForwardCallback (UnicastForwardCallback ucb) { m_ucb = ucb; }
ErrorCallback GetErrorCallback () const { return m_ecb; }
@@ -73,8 +73,9 @@ public:
void SetIpv4Header (Ipv4Header h) { m_header = h; }
void SetExpireTime (Time exp) { m_expire = exp + Simulator::Now (); }
Time GetExpireTime () const { return m_expire - Simulator::Now (); }
//\}
private:
/// Data packet
Ptr<const Packet> m_packet;
/// IP header
@@ -110,15 +111,15 @@ public:
bool Find (Ipv4Address dst);
/// Number of entries
uint32_t GetSize ();
///\name Fields
//\{
// Fields
uint32_t GetMaxQueueLen () const { return m_maxLen; }
void SetMaxQueueLen (uint32_t len) { m_maxLen = len; }
Time GetQueueTimeout () const { return m_queueTimeout; }
void SetQueueTimeout (Time t) { m_queueTimeout = t; }
//\}
private:
std::vector<QueueEntry> m_queue;
/// Remove all expired entries
void Purge ();
+3 -2
View File
@@ -32,10 +32,11 @@
#include "ns3/simulator.h"
#include "ns3/log.h"
NS_LOG_COMPONENT_DEFINE ("AodvRoutingTable");
namespace ns3
{
NS_LOG_COMPONENT_DEFINE ("AodvRoutingTable");
namespace aodv
{
+2 -3
View File
@@ -101,8 +101,8 @@ public:
/// Mark entry as "down" (i.e. disable it)
void Invalidate (Time badLinkLifetime);
///\name Fields
//\{
// Fields
Ipv4Address GetDestination () const { return m_ipv4Route->GetDestination (); }
Ptr<Ipv4Route> GetRoute () const { return m_ipv4Route; }
void SetRoute (Ptr<Ipv4Route> r) { m_ipv4Route = r; }
@@ -131,7 +131,6 @@ public:
Time GetBlacklistTimeout () const { return m_blackListTimeout; }
/// RREP_ACK timer
Timer m_ackTimer;
//\}
/**
* \brief Compare destination address
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More