Compare commits

..
Author SHA1 Message Date
Alexander Afanasyev 77d5d5efad Merge branch 'hg/default'
Conflicts:
	src/core/model/command-line.cc
	src/core/model/default-simulator-impl.cc
	src/mpi/examples/nms-p2p-nix-distributed.cc
	utils/print-introspected-doxygen.cc
2013-01-03 23:16:39 -08:00
Vedran Miletić 4e26fa54fc Minor fixes and improvements to logging chapter in manual. 2012-12-28 04:22:19 +01:00
Tom Henderson 4fc15d74ad start the logging chapter of the manual 2012-12-24 08:27:19 -08:00
Tom Henderson 786af4b8ce start CHANGES.html and RELEASE_NOTES for next ns-3 version 2012-12-24 06:25:22 -08:00
Tom Henderson d2b42428d7 update release steps documentation 2012-12-24 06:17:58 -08:00
Vedran Miletić e07f9ce08d Fix indentation in comment in ILP32 Python bindings. 2012-12-23 22:16:02 +01:00
Vedran Miletić a946fff2a5 Do not install LTE scheduler test headers in ns3/ directory. 2012-12-23 22:12:39 +01:00
Tom Henderson 54e21fb887 workaround for bug 1561: doxygen for optional modules 2012-12-21 15:50:25 -08:00
Tom Henderson 1859d3cc23 Added tag ns-3.16 for changeset 49d343e55cae 2012-12-21 14:42:54 -08:00
Tom Henderson 9149c16d12 update release notes 2012-12-21 14:41:04 -08:00
Brian Swenson 90187b9242 (bug 1560) temporary workaround for variable-length arrays 2012-12-19 22:15:26 -08:00
John Abraham 47fd265296 NetAnim: Lte trace sources changed since ns-3.15 2012-12-19 22:08:19 -08:00
Vedran Miletić b01fb1cd09 Add newline at the end of file to silence gcc on FreeBSD 9. 2012-12-20 01:06:45 +01:00
Alexander Afanasyev 4313d64e60 core: LogComponent now stores name as std::string: caused troubles for complex logging initialization
core: Disable all logging in DefaultSimulatorImpl, as it caused segfaults
2012-12-11 12:19:36 -08:00
Alexander Afanasyev 11d3c7a759 build: Add colors to optional features report 2012-11-23 21:37:00 -08:00
Alexander Afanasyev 8eeda671b4 core: Extending public interface of CommandLine class.
Now it is possible to request printing command line arguments using a
couple of alternative methods.
2012-11-20 20:06:29 -08:00
Alexander Afanasyev ff2a09dc05 visualizer: Adding ability to assign position to mobility model is env{NS_VIS_ASSIGN} is set to any value 2012-11-19 23:48:42 -08:00
Alexander Afanasyev 171b77527b core: Declare MakeAttributeAccessor* helper function inline (caused problems with apple gcc) 2012-11-19 14:09:52 -08:00
Alexander Afanasyev e6caaea0e0 python:mobility+topology-read: rescanned bindings 2012-11-06 15:36:57 -08:00
Alexander Afanasyev 62bc70ca4b visualizer: adding a couple of ndnSIM-related plugins 2012-11-06 15:14:59 -08:00
Alexander Afanasyev fccb4d7020 internet: correcting RTT estimator. Multiplier was not enabled (I
disabled it long time ago, don't exactly remember why)
2012-11-06 15:14:59 -08:00
Alexander Afanasyev 8329459cc6 many: Correcting compilation issues (there were errors for gcc with -std=c++11) 2012-11-06 15:14:55 -08:00
Alexander Afanasyev 3604504faa core: Config/Connect will search for attributes in parent classes 2012-11-06 15:14:05 -08:00
Alexander Afanasyev 9f735f106f visualizer: output node ID 2012-11-06 15:14:05 -08:00
Alexander Afanasyev 2d42167353 visualizer: Update visualizer plugins to reflect refactored ndnSIM code 2012-11-06 15:14:05 -08:00
Alexander Afanasyev bb665c1f32 dsdv+dsr+mpi: small correction related to warnings by clang compiler 2012-11-06 15:14:05 -08:00
Alexander Afanasyev 54064bf48f topology-read: Create instead of CreateObject 2012-11-06 15:14:05 -08:00
Alexander Afanasyev ed3d22fc1c mobility+visualizer+python: A specialized version of GetObject
(GetMobilityModel) is now implemented in MobilityModel class. This
method is now used by the visualizer to obtain mobility interface.

This trick is necessary in order to use in python mobility models that
are not explicitly exported (or impossible to export) to python bindings
generation.
2012-11-06 15:14:02 -08:00
Alexander Afanasyev 5358beed81 visualizer+ndnSIM: implementing ccnx_pit plugin to show PIT status 2012-11-06 15:13:12 -08:00
Alexander Afanasyev a0c026f0b8 visualizer+ndnSIM: repairing ccnx_fib plugin 2012-11-06 15:13:12 -08:00
Alexander Afanasyev b633d78c1e visualizer+ndnSIM: Correcting ccnx_fib plugin 2012-11-06 15:13:11 -08:00
Alexander Afanasyev 62e8cba857 core: Give ability to generate subset of documentation by utils/print-introspected-doxygen 2012-11-06 15:13:11 -08:00
Alexander Afanasyev ee175bbba7 core: Add disclaimer note in README 2012-11-06 15:13:11 -08:00
Alexander Afanasyev d05b973015 internet: Corrections of RttEstimator:
Introducing RTO upper bound
Introducing gain2 for smoothing the variance
Making RTO calculation according to the RFC

For future: may need to calculate RTO as in linux implementation
2012-11-06 15:13:11 -08:00
Alexander Afanasyev caca9151c1 point-to-point: Making loss (again) independent on packet type 2012-11-06 15:13:11 -08:00
Alexander Afanasyev dfc3b875cf point-to-point: Add experimental support for random losses 2012-11-06 15:13:11 -08:00
Alexander Afanasyev 207b0bb8b1 point-to-point, netanim: Adding ChannelID to PointToPointChannel trace 2012-11-06 15:13:08 -08:00
Alexander Afanasyev 0bd223f377 network: Adding Read (Buffer::Iterator start, uint32_t size) and PeakU8 methods to ns3::Buffer::Iterator class 2012-11-06 15:10:53 -08:00
Alexander Afanasyev 5eeea627e1 internet: A new templated static method Ipv(4|6)RoutingHelper::GetRouting that allows search for any routing protocol
Examples:
Ptr<Ipv4RoutingProtocol> ptr = ...

...

Ptr<Ipv4StaticRouting> sr = Ipv4RoutingHelper::GetRouting<Ipv4StaticRouting> (ptr);
2012-11-06 15:10:53 -08:00
Alexander Afanasyev e5c1e134a4 core+openflow: Moving boost-related configuration to main wscript.
There is a problem when two different modules require different boost
libs.  Only requirements of the last module are actually picked up by
the build system.
2012-11-06 15:10:53 -08:00
Alexander Afanasyev 735b9dd7b8 visualizer: Making a periodic topology rescan 2012-11-06 15:10:53 -08:00
Alexander Afanasyev a2fd831cd3 visualizer: Adding plugin to display a CCNx FIB state 2012-11-06 15:10:53 -08:00
Alexander Afanasyev 159d9c5d9c core: Adding inline specifiers for DoMakeAttributeAccessor (there was a
strange duplicate symbols error using apple compiler...)
2012-11-06 15:10:53 -08:00
Alexander Afanasyev 7bf1354a48 internet: Making rtt-estimator.h of the Internet module accessible to other modules 2012-11-06 15:10:53 -08:00
Alexander Afanasyev deed64bf40 core: Small extension of Vector class (math operations) 2012-11-06 15:10:52 -08:00
Alexander Afanasyev fc1413a133 topology-read: Making default constructor for TopologyReader::Link public.
This is necessary for some STL containers operations.
2012-11-06 15:10:52 -08:00
Alexander Afanasyev 074515d307 topology-read: TopologyReader and derivatives are no longer Objects
To allow smart pointers, TopologyReader is just inherited from
SimpleRefCount<TopologyReader> class
2012-11-06 15:10:52 -08:00
Alexander Afanasyev b108a54865 topology-read: Several extensions of TopologyReader 2012-11-06 15:10:52 -08:00
Ilya Moiseenko 7ec47b8e85 point-to-point: Add support of PPP->Ethernet and Ethernet->PPP frame type conversion for CCNx protocol
point-to-point: Adding support for CCNx payload in PppHeader::Print method
2012-11-06 15:10:52 -08:00
Alexander Afanasyev e15c2605e7 Adding .gitignore 2012-11-06 15:10:52 -08:00
Peter D. Barnes, Jr. a2a8494407 [Bug 1521] Have doxygen log more warnings; remove obsolete items from log report script. 2012-11-05 13:52:58 -08:00
Peter D. Barnes, Jr. fb905b1676 [Bug 1496] Print the LOG_LEVEL (severity) in NS_LOG messages. 2012-11-05 12:10:55 -08:00
Brian Swenson 392f8cf154 bug 1509 RTTEstimator invalid values fix 2012-11-05 14:07:02 -05:00
Peter D. Barnes, Jr. 4ed212117a Automated merge with file:///Users/barnes26/Code/netsim/ns3/repos/ns-3-dev 2012-11-02 15:39:41 -07:00
John Abraham 19930c4c7d NetAnim: Skip ipaddress check if index cannot be found 2012-10-31 23:17:27 -07:00
Tom Henderson 98aebe2f16 rescan bindings 2012-10-29 05:33:13 -07:00
Nicola Baldo b64d2671e6 make MultiModelSpectrumChannel support SpectrumModel changes at run time 2012-10-26 14:10:40 +02:00
Tom Henderson d889f2685d bug 1514: make TimeValue usage consistent in the tutorial 2012-10-21 15:48:47 -07:00
Daniel Lertpratchya f7e259cab5 Updates CHANGES.html and RELEASE_NOTES 2012-10-18 13:58:31 -04:00
Daniel L. e63073011e Checksum for Ipv4RawSocket 2012-10-15 17:35:09 -04:00
John Abraham da5379e80a NetAnim: Add support for ipv4 address printing for non-p2p 2012-10-11 12:21:17 -07:00
John Abraham 2ec7d91a92 NetAnim: Redundant margin calculations 2012-10-10 22:11:07 -07:00
Tom Henderson ecbf3929cf fix small tutorial typo 2012-10-09 12:47:50 -07:00
mmiozzo 8d2cbf62fb Bug-fix inhibit Error Model when receiving data frame with only control messages in LteSpectrumPhy::EndRxData 2012-10-09 17:02:40 +02:00
Tom Henderson 4fa10f3837 update RELEASE_NOTES 2012-12-16 23:41:26 -08:00
Tom Henderson f70d4b28a5 documentation nits on release_steps.txt 2012-12-16 23:29:44 -08:00
Tom Henderson 4f489c8795 update AUTHORS list 2012-12-16 23:29:03 -08:00
Mathieu Lacage 5ae94a37b4 start to document simulator in the manual 2012-12-16 22:52:36 -08:00
Tom Henderson 64d086a823 fix static build 2012-12-16 22:37:14 -08:00
Tom Henderson afc5cbd384 remove logging from Time operators 2012-12-16 17:02:18 -08:00
Tom Henderson 57e441304c bug 954: back out changesets 1a2abe07b53d, 8934b7c0c1cb, and 8ef8d8bae350 2012-12-15 23:02:03 -08:00
Tom Henderson 85869a362f turn down logging verbosity 2012-12-15 11:32:58 -08:00
Mitch Watrous 9b25074177 Remove more log messages from operators and copy constructors 2012-12-14 14:07:33 -08:00
Mitch Watrous 7cc28756fc Remove log messages from some operators and copy constructors 2012-12-13 17:02:39 -08:00
Tom Henderson decce04a1f bug 1549: remove logging statements causing stack overflows 2012-12-12 22:43:49 -08:00
Tom Henderson 714fd8c535 update bindings 2012-12-12 13:14:40 -08:00
Vedran Miletić d7efc67a04 Document building with distcc in tutorial, add it to RELEASE_NOTES and CHANGES.html. 2012-12-12 19:52:06 +01:00
Tom Henderson a4b69cdcbc remove logging that leads to stack overflow 2012-12-12 10:23:05 -08:00
Mathieu Lacage d604a15c1e try to nail down some of the subtler aspects of calling Time::SetResolution 2012-12-12 04:50:46 -05:00
Mathieu Lacage 029a151da4 bug 954: avoid segfault upon startup due to recursion in TimeSet code to Simulator::Schedule 2012-12-12 04:10:25 -05:00
Mitch Watrous 2920e2e2f0 Make sure csma module is enabled before building the doxygen scanning script 2012-12-10 10:54:28 -08:00
Peter D. Barnes, Jr. dfc903cb67 bug 1531: Crash when using NS_LOG in destructors of static objects 2012-12-08 21:44:45 -08:00
Peter D. Barnes, Jr. 03ce821d48 bug 954: Changing the simulation time resolution does not work well with attributes 2012-12-08 21:23:44 -08:00
Tom Henderson 5b0bb47174 signed/unsigned comparison warning 2012-12-08 10:11:07 -08:00
Tom Henderson 006d0060ea delete 15 UEs test cases to improve test runtimes 2012-12-07 21:18:20 -08:00
Dizhi Zhou 845e45c1a1 Initialize 'bankSize' and 'rbgIndex' in fdtbfq-ff-mac-scheduler.cc, and 'bankSize' in tdtbfq-ff-mac-scheduler.cc 2012-12-07 15:52:36 -05:00
Mitch Watrous 2f87d0e0ad Fix unsigned integer comparison error 2012-12-07 14:31:32 -08:00
Brian Swenson 8a351520df bug 1342 ns3tcp-cwnd-test-suite.cc test failing 2012-12-07 15:59:05 -05:00
Daniel Lertpratchya f230b16e1d Bug 555 - DCF immediate access fix 2012-12-07 14:38:59 -05:00
Mitch Watrous 7e36fb5f33 Update release notes 2012-12-07 11:36:27 -08:00
Daniel Lertpratchya 810c0907b1 Bug 555 - DCF immediate access fix 2012-12-07 14:36:01 -05:00
Mitch Watrous 8a8b4f2a18 Bug 1520 (More partially) - config paths not documented 2012-12-07 10:12:40 -08:00
Brian Swenson ee8c2b6b36 bug 1525 Linker error with mpi on Mac 10.8 2012-12-07 10:19:29 -05:00
Nicola Baldo 01ef3538cb uncommented LteUeNetDevice::Imsi attribute 2012-12-07 11:12:43 +01:00
John Abraham 06d9e19f22 NetAnim: Bump version, update doc 2012-12-06 13:17:48 -08:00
Tom Henderson 17c8b9e989 include BRITE documentation in the build 2012-12-06 08:45:57 -08:00
Tom Henderson b8caced971 clarify 'Modules not built' waf report 2012-12-05 20:45:38 -08:00
Alexander Afanasyev 487647b761 add colors to optional features report 2012-12-05 20:35:21 -08:00
Dizhi Zhou 74dbc01404 Current achievableRate calculate in tta-ff-wmac-scheduler.cc 2012-12-05 14:54:14 -05:00
Mitch Watrous 00f2105449 Bug 152 (Partially)- config paths not documented 2012-12-05 17:06:27 -08:00
Daniel Lertpratchya b9d74d0fd9 Bug 1524 - WiFi fragmentation issue 2012-12-05 14:27:54 -05:00
Brian Swenson a8671a21e5 Brite Integration 2012-12-04 11:53:47 -05:00
Vedran Miletić 8d18360a09 Minor fixes and corrections to tutorial formatting. 2012-12-04 13:56:31 +01:00
Vedran Miletić 16b55bb2b4 Minor fixes and corrections to manual formatting. 2012-12-04 13:55:59 +01:00
John Abraham 4b5475ff89 NetAnim: Add support for tracking routing table 2012-12-03 13:30:17 -08:00
Dizhi Zhou 3344539847 Initialize some parameters in GSoC 2012 LTE NS-3 MAC FD-TBFQ schedulers 2012-12-03 10:18:06 -05:00
Dizhi Zhou ae630e4752 Initialize some metric parameters in GSoC 2012 LTE NS-3 MAC schedulers 2012-12-01 19:08:52 -05:00
John Abraham 1e9a5cf4fb NetAnim: Add support for tracking MAC addresses at link level 2012-12-02 18:08:59 -08:00
Maja Grubišić 028d9c2822 Fix printing of uint8_t data in NS_LOG_FUNCTION introduced by 9144:6a15c50388bc Clean up function logging of network module. 2012-12-01 20:05:49 +01:00
Nicola Baldo 6ec8ef2ba3 disabled useless tracing and loggin in lte-*-ff-mac-scheduler tests 2012-12-01 14:00:18 +01:00
moijes12@gmail.com 43249dbe7b fixed bug 1532 - unimplemented LTE Scheduler methods 2012-12-01 12:22:18 +01:00
Nicola Baldo 0a4f8914e5 merge 2012-12-01 11:40:51 +01:00
Dizhi Zhou 29861e187e correct code style errors in GSoC 2012 LTE NS-3 MAC schedulers 2012-11-30 18:05:02 -05:00
Dizhi Zhou e51729fa70 GSoC 2012 NS-3 LTE schedulers: updated version based on Tom's comment 2012-11-30 18:40:56 -04:00
Tommaso Pecorella a99693f747 Bug 1528 - BindToNetDevice not working for IPv6 sockets 2012-11-28 21:32:28 +01:00
Tommaso Pecorella 053ee33bba Bug 1527 - Ipv4RawSocket's BindToNetDevice not doing anything 2012-11-11 16:29:57 +01:00
Tom Henderson 17a68c2942 complete TOS patch for NSC code 2012-11-22 07:15:19 -08:00
Daniel Lertpratchya 2660c1f9dd Bug 1361 - Set TOS from Application level (sockets) 2012-11-20 17:52:39 -05:00
Maja Grubišić 90ec1005cb Clean up function logging of network module. 2012-11-16 22:27:18 +01:00
Vedran Miletić 56a19e020d Fix bug introduced by changeset 9137:822abb428976 Allow using CXX='distcc g++' with ./waf configure. 2012-11-16 22:23:40 +01:00
Tom Henderson 850d745997 unused forward declarations 2012-11-13 16:49:05 -08:00
Peter D. Barnes, Jr. b9e091833d Automated merge with file:///Users/barnes26/Code/netsim/ns3/repos/ns-3-dev 2012-11-13 10:27:52 -08:00
Vedran Miletić 2b369e0d13 Remove NS_LOG_FUNCTION stuff from ::GetTypeId() functions. 2012-11-13 15:02:39 +01:00
Vedran Miletić 726d75a7ac Allow using CXX='distcc g++' with ./waf configure. 2012-11-13 14:24:27 +01:00
Gary Pei 649c3e24fc add some more documentation on DCF operation 2012-11-12 22:57:01 -08:00
Craig Dowell 3e93356a64 restore material from callbacks manual chapter that was truncated during conversion to Sphinx 2012-11-12 11:46:24 -08:00
Maja Grubišić 241b8565ac Clean up function logging of core module. 2012-11-10 19:16:38 +01:00
Vedran Miletić 06718d19a4 Clean up function logging of applications module. 2012-11-10 18:45:37 +01:00
Vedran Miletić 1ea9b521a6 Clean up OnOffApplication logging and connection notification, remove unused function declaration. 2012-11-10 15:08:32 +01:00
Peter D. Barnes, Jr. 13f4973b45 Fix oxygen errors in doc/introspected-doxygen.h 2012-11-09 17:57:28 -08:00
Peter D. Barnes, Jr. 9089bc1d65 Doxygen warnings report updates
Report total number of errors, files, directories (modules).
List all files with error count.
2012-11-09 17:56:59 -08:00
Vedran Miletić e8936dffe6 Change to C++-style includes in log.cc. 2012-11-09 21:14:59 +01:00
socket 6fda6203a2 Merge with head 2012-11-08 19:58:57 +01:00
Peter D. Barnes, Jr. 298b707723 Doxygenate print-introspected-doxygen.cc 2012-11-07 15:32:36 -08:00
Andrea Sacco 96ae5e4c42 Bugfix 1526 2012-11-07 23:54:01 +01:00
Andrea Sacco 880e6148e9 Bugfix 1055 (Reopened) 2012-11-07 23:50:10 +01:00
Peter D. Barnes, Jr. fda813ec33 Preserve doxygen.warnings.log from last report.
Direct doxygen warnings to doxygen.log.
doxygen.warnings.report.sh moves this to doxygen.warnings.log, so
subsequent normal oxygen builds don't overwrite it.
2012-11-07 14:29:47 -08:00
Peter D. Barnes, Jr. c498ece0e2 Automated merge with file:///Users/barnes26/Code/netsim/ns3/repos/ns-3-dev 2012-11-07 13:32:23 -08:00
Peter D. Barnes, Jr. b8f6cc4dc0 Highlight attribute flags in doxygen html 2012-11-07 13:32:15 -08:00
Peter D. Barnes, Jr. 72d0b8a0d4 [Bug 1521] Use custom doxygen run to log all errors in doxygen.warnings.report.sh 2012-11-07 13:21:37 -08:00
Peter D. Barnes, Jr. 94d96a83df Revert to creating doxygen for *all* functions. 2012-11-07 12:58:29 -08:00
Tom Henderson 80dcaec642 add license to file 2012-11-06 21:35:13 -08:00
Dizhi Zhou f6f16667c9 correct code style errors in GSoC 2012 LTE NS-3 MAC schedulers 2012-10-21 21:48:38 -04:00
Dizhi Zhou 3c4c756bf7 merge changes from GSoC 2012 NS-3 LTE MAC schedulers 2012-10-21 22:22:45 -03:00
Dizhi Zhou 7f2ecf85ce GSoC 2012 NS-3 LTE MAC schedulers 2012-10-21 21:47:17 -03:00
Tom Henderson be66c766d8 rescan bindings for bug 1507 2012-10-07 07:43:32 -07:00
Jonathan McCrohan 6b374f0532 bug 1507: typo: s/bandwdith/bandwidth/g 2012-10-07 07:26:08 -07:00
Vedran Miletić 07330798c7 Improve logging part in tutorial, and make clear distinction between logging level and logging macro. 2012-10-07 14:37:05 +02:00
Vedran Miletić 31a38fad1a Add logging to default-simulator-impl.cc and fix some outdated documentation. 2012-10-06 21:36:39 +02:00
Brian Swenson 29adc8404c bug 1341 tcp state unit test. New vectors 2012-10-05 10:08:41 -04:00
Brian Swenson 0106318da8 bug 1340 ns3tcp-loss-suite.cc tests failing. New response generated 2012-10-04 13:51:42 -04:00
Mitch Watrous ad3392a85d Update release notes 2012-10-03 12:06:18 -07:00
Mitch Watrous 52bcbf9712 Bug 976 2012-10-03 10:06:52 -07:00
Mitch Watrous 58cc2ad010 Update changes file again 2012-09-28 14:33:15 -07:00
Mitch Watrous 6401ac49b9 Update changes file 2012-09-28 13:41:30 -07:00
Mitch Watrous ba72597fd3 Make MobilityHelper use an output stream wrapper 2012-09-28 12:22:18 -07:00
Tommaso Pecorella fc87d61e85 bug 1359 TCP cannot receive ICMP 2012-09-27 13:29:03 -04:00
Mitch Watrous 62da8e567f Add an ns-2 mobility trace test case for Bug 1316 2012-09-25 14:08:22 -07:00
Tom Henderson a6c01fba06 clean up some comments on an example 2012-09-25 06:52:57 -07:00
Tom Henderson c8fa709e2a more documentation of ns-2 trace file mobility examples 2012-09-25 06:52:39 -07:00
Tom Henderson ec538fb681 remove redundant file references 2012-09-25 06:51:40 -07:00
Gustavo J. A. M. Carneiro e5392dbb92 ensure that -ldl follows -lopenflow 2012-09-23 21:32:12 -07:00
Tom Henderson 3f4e7967eb fix test header inclusion 2012-09-22 08:59:22 -07:00
Tom Henderson 2ec548b523 merge heads 2012-09-21 16:28:49 -07:00
Tom Henderson 2a877b43aa document the example 2012-09-21 16:27:45 -07:00
Tom Henderson 1de1ab4fb1 remove test headers from bindings 2012-09-21 16:26:19 -07:00
Eric Gamess a6afb8fc7e BonnMotion mobility example 2012-09-21 16:19:42 -07:00
Tom Henderson d29d359a63 add missing copyrights 2012-09-21 16:10:07 -07:00
Tom Henderson 51d286f501 merge heads 2012-09-21 15:18:18 -07:00
Tom Henderson 0f4705a818 remove extra append 2012-09-21 15:12:31 -07:00
Tom Henderson f7e4fba0b2 complete move of mobility example to src/mobility
--HG--
rename : examples/mobility/default.ns_movements => src/mobility/examples/default.ns_movements
2012-09-21 13:48:41 -07:00
Tom Henderson 660371d08c move ns-2 mobility example to mobility module
--HG--
rename : examples/mobility/ns2-mobility-trace.cc => src/mobility/examples/ns2-mobility-trace.cc
2012-09-21 12:43:24 -07:00
Vedran Miletić 77171cbbb2 Clean up core, network, internet, point-to-point tests that don't access private class attributes and methods in accordance to sample-test-suite.cc. 2012-09-21 13:47:41 +02:00
Brian Swenson 6e88721aca bug 1506 dup ack piggyback fix 2012-09-20 10:13:28 -04:00
Vedran Miletić c5c471f4f1 Really fix bug 1345 - ns-3 should build with clang >= 3.0 (requires -Wno-deprecated due to sgi-hashmap.h) 2012-09-14 22:07:40 +02:00
Mitch Watrous e3bc8c4f9e Bug 1463 - ./test.py --example should automatically detect the path 2012-09-14 11:48:14 -07:00
Mitch Watrous 92bb097e5c Bug 1493 - test.py --list should show the test type 2012-09-12 14:59:21 -07:00
Mitch Watrous 24211d56ca Bug 1494 - test.py --constrain doesn't work 2012-09-11 15:29:26 -07:00
Mitch Watrous 8b1630d0de Bug 1495 - test.py claims test passed when no test was run 2012-09-11 13:23:53 -07:00
Mitch Watrous d8f0a089d2 Bug 1284 - ./test.py performance tests do not exist 2012-09-10 17:15:07 -07:00
Tom Henderson 0e04372504 fix error: call of overloaded pow() is ambiguous 2012-09-08 09:39:45 -07:00
Tom Henderson 09a196abdc fix error: call of overloaded pow() is ambiguous 2012-09-07 12:45:26 -07:00
Tom Henderson 2e8f12b4cb remove unnecessary cast 2012-09-07 09:29:31 -07:00
Vedran Miletić 86e06ea1de Fix MPI build (bug 1237 regression). 2012-09-06 16:35:31 +02:00
John Abraham 387f201fb5 NetAnim: typo 2012-09-06 09:47:38 -04:00
John Abraham e298506b91 NetAnim: Update Preamble 2012-09-06 09:44:54 -04:00
Mitch Watrous 68a3b939df lround is not a member of std namespace 2012-09-05 12:18:17 -07:00
John Abraham fa5017da03 NetAnim: more compact packet format 2012-09-04 11:06:39 -04:00
Vedran Miletić 9f84609b94 Bug 1237 - code cleanups related to includes 2012-09-01 20:57:21 +02:00
Nicola Baldo b0bbb640bb fixed Makefiles for LTE sphinx docs 2012-08-31 12:24:28 +02:00
Tom Henderson 2889137217 update documentation: SeedManager->RngSeedManager 2012-08-30 20:30:52 -07:00
Tom Henderson 541536d268 update bindings 2012-08-30 12:08:54 -07:00
Tom Henderson 95b3698448 fix maybe-uninitialized warnings 2012-08-30 12:08:46 -07:00
Nicola Baldo bf2e393ddb updated Wifi NetDevice architecture figure 2012-08-30 16:00:36 +02:00
Nicola Baldo 6e04c5de45 merge ns-3-lena-dev with ns-3-dev 2012-08-30 13:00:17 +02:00
Mitch Watrous 0bad8a4e48 Update release notes 2012-08-29 09:06:15 -07:00
Mitch Watrous 96c91933b6 Bug 1485 - Setting global properties in config file (raw text) does not have any effect 2012-08-29 08:47:39 -07:00
Tom Henderson 1e7a82441e Added tag ns-3.15 for changeset 26a511d6dbad 2012-08-29 05:42:00 -07:00
Tom Henderson ae3b58c5d9 delete some stale documentation 2012-08-28 21:39:30 -07:00
Tom Henderson 045317f68a suppress maybe-uninitialized warnings 2012-08-28 21:30:41 -07:00
Josh Pelkey 3069cff0ce bug 1481: openflow example doesn't run 2012-08-27 00:19:20 -07:00
Per d1ebaf4b05 bug 1473 - GetQueue/SetQueue missing from Csma python bindings 2012-08-27 00:13:18 -07:00
Tom Henderson 7fb24e8ba4 robustly import ns.visualizer in example 2012-08-26 23:55:21 -07:00
Alexander Afanasyev 456efd362f bug 1470 - define default parameter for constructor in .h file 2012-08-26 23:42:38 -07:00
Peter J. Scheibel f6a89b13af bug 1486 - Segfaults in nix-vector-routing with bridges 2012-08-26 23:38:11 -07:00
Tom Henderson b61089cc36 bug 1489 - Jakes Log component is missing 2012-08-26 23:28:25 -07:00
Tom Henderson 905707e11c bug 1256: Unnecessary SND.NXT advance, missing ACK for Out of Order segments 2012-08-26 23:23:52 -07:00
Tom Henderson 26de040646 make wifi-olsr-flowmon.py import the visualizer module 2012-08-26 23:09:13 -07:00
Tom Henderson 513e885310 fix tutorial typo 2012-08-26 13:50:04 -07:00
Tom Henderson 60f803028a update release notes 2012-08-26 13:35:52 -07:00
Tom Henderson 5ff7fc92b1 merge 2012-08-26 12:58:00 -07:00
Tom Henderson ec1fe253a9 update pcap regression traces 2012-08-26 12:56:51 -07:00
John Abraham 7ac3e35365 NetAnim: Bump version 2012-08-25 23:57:19 -07:00
Tom Henderson 41469d5091 remove static random variable from buildings module 2012-08-25 21:39:25 -07:00
Tom Henderson 776e205ed0 Make bound use a default argument 2012-08-25 21:12:50 -07:00
Tom Henderson ae6c1d33da rescan bindings 2012-08-24 19:44:02 -07:00
Tom Henderson c3e84cd743 Update mesh test traces due to random variable perturbations 2012-08-24 19:11:51 -07:00
Tom Henderson 4ab8b91ba0 Update OLSR test traces due to random variable perturbations 2012-08-24 16:01:24 -07:00
Tom Henderson a3a67e3bda change TEST_EXPECT to TEST_ASSERT 2012-08-24 15:52:46 -07:00
Tom Henderson a7723b5fc4 merge heads 2012-08-24 15:49:20 -07:00
Tom Henderson 22cdb0dbc2 Update AODV test traces to random variable perturbations 2012-08-24 15:44:31 -07:00
Tom Henderson 30d4cf3ec0 adjust API for wifi helpers for AssignStreams() 2012-08-24 15:24:35 -07:00
Peter D. Barnes, Jr. 71418237c0 test-runner reports times in seconds, not ms 2012-08-24 15:03:13 -07:00
Tom Henderson e6be0abc52 update OnOffHelper usage for one more test suite 2012-08-24 11:34:13 -07:00
Kirill Andreev 7931f66b87 Refactor Jakes loss model for random variable changes 2012-08-24 10:50:35 -07:00
Tom Henderson 48f5d9e6d1 Add documentation about tests 2012-08-24 09:24:44 -07:00
Mitch Watrous 5c7db3ff21 Add a constant rate setting function to the on-off helper 2012-08-23 16:00:17 -07:00
Mitch Watrous f72d62f95a Fix compilation errors in openflow-switch.cc 2012-08-23 10:52:15 -07:00
Marco Miozzo 6b7e493d45 Update TraceFadingLossModel for circular windowing in fading traces 2012-08-23 13:44:41 +02:00
Mitch Watrous a0b446c67c Clean up a couple comments 2012-08-21 10:45:45 -07:00
Mitch Watrous 837bdfe3c5 Replace more instances of RandomVariable with RandomVariableStream 2012-08-20 19:08:45 -07:00
Mitch Watrous c59a170d9f Replace various instances of RandomVariable with RandomVariableStream 2012-08-20 14:25:35 -07:00
Peter D. Barnes, Jr. 3032a78de3 Document preferred usage of NS_LOG_FUNCTION() and
NS_LOG_FUNCTION_NOARGS()

--HG--
extra : transplant_source : o%216%B1%00%EF%DF%29D%A8y%85%E9%5E%F0%3E%8E%E0%7D%90
2012-08-20 11:54:03 -07:00
Marco Miozzo 78f79fb65e Bug-fix in TraceFadingLossModel: windows offset update 2012-08-20 13:44:34 +02:00
Tom Henderson 8ad5daa0f5 rescan bindings 2012-08-17 16:03:51 -07:00
Tom Henderson ebb9273048 Make InternetStackHelper::AssignStreams instead take a node container argument 2012-08-17 13:43:00 -07:00
Tom Henderson 79a8817482 Update mesh model, tests and reference traces for new random variable usage 2012-08-17 13:31:40 -07:00
Tom Henderson 542581085a Update AODV tests and reference traces for new random variable usage 2012-08-17 07:00:24 -07:00
Tom Henderson f64bb59b2f fix bug on previous commit 2012-08-17 06:19:59 -07:00
Tom Henderson 7e31c9b7e8 Update OLSR tests and reference traces for new random variable usage 2012-08-17 06:00:53 -07:00
Tom Henderson f19d9ab556 update error-model-test-suite 2012-08-16 20:58:12 -07:00
Mitch Watrous 4b6d562c14 Replace src/lte usage of RandomVariable with RandomVariableStream 2012-08-16 18:06:36 -07:00
Mitch Watrous 753aac3ff4 Replace src/network usage of RandomVariable with RandomVariableStream 2012-08-16 09:13:36 -07:00
Mitch Watrous 3370bd2438 Replace src/buildings and src/propagation usage of RandomVariable with RandomVariableStream 2012-08-15 18:08:46 -07:00
Mitch Watrous 1f4e8487a5 Replace src/mobility usage of RandomVariable with RandomVariableStream (Patch Set 2) 2012-08-15 15:33:02 -07:00
Mitch Watrous 72a2c06604 Replace src/mobility usage of RandomVariable with RandomVariableStream (Patch Set 1) 2012-08-15 14:28:33 -07:00
Mitch Watrous b8a6fa098d Replace src/wimax usage of RandomVariable with RandomVariableStream 2012-08-14 14:11:29 -07:00
Mitch Watrous 10e4f3d999 Replace src/wifi usage of RandomVariable with RandomVariableStream 2012-08-14 13:52:17 -07:00
Mitch Watrous 334d9bd0e6 Replace src/uan usage of RandomVariable with RandomVariableStream 2012-08-14 13:12:00 -07:00
Mitch Watrous 89c4a0817b Replace src/olsr usage of RandomVariable with RandomVariableStream 2012-08-14 12:10:58 -07:00
Mitch Watrous 8164ff3414 Replace src/netanim usage of RandomVariable with RandomVariableStream 2012-08-14 11:29:57 -07:00
Mitch Watrous a07739229d Replace src/internet usage of RandomVariable with RandomVariableStream 2012-08-14 10:35:43 -07:00
Mitch Watrous 94ff30eeb1 Replace src/dsr usage of RandomVariable with RandomVariableStream 2012-08-14 09:57:49 -07:00
Mitch Watrous cd7d3ddf59 Replace src/dsdv usage of RandomVariable with RandomVariableStream 2012-08-14 09:37:08 -07:00
Mitch Watrous be0091a41c Replace src/csma usage of RandomVariable with RandomVariableStream 2012-08-14 09:12:05 -07:00
Peter D. Barnes, Jr. 83bdec77d9 Move attribute, config, trace docs to class description.
--HG--
extra : rebase_source : f84736bb401dfe94da2fd0e3e1e61884fc10a671
2012-08-13 16:56:18 -07:00
Peter D. Barnes, Jr. 44b353c5f7 Fix tag detection
--HG--
extra : rebase_source : 839fc5f5bcb07ee2dd1901d78b2522131ddf0c7a
2012-08-13 15:59:14 -07:00
Peter D. Barnes, Jr. 6f2486de60 Id tutorial-pt-br base version
--HG--
extra : rebase_source : b5fb797ba39bdcd153830035b4221f973149a718
2012-08-13 14:34:36 -07:00
Peter D. Barnes, Jr. 294ffd4484 Ignore generated image files.
--HG--
extra : rebase_source : 17f012e7e035b54e72e3a8d2eded23ffb3f11583
2012-08-13 10:27:06 -07:00
Peter D. Barnes, Jr. ae29e75745 (minor) fix documentation
--HG--
extra : rebase_source : e2643666b27cb79db7b618ac2f0dcb1a69e012e3
2012-08-13 10:26:58 -07:00
Peter D. Barnes, Jr. 7acbc23ef8 Use relative links for public urls
--HG--
extra : rebase_source : f01115c0b975eb384a38798d1cabf4fdda39dfff
2012-08-13 10:23:14 -07:00
Peter D. Barnes, Jr. cea6f4eae2 Fix Sphinx warnings
--HG--
extra : rebase_source : 7e24e687ce1f9b45d7712ba018e5f4276ca1ebd5
2012-08-10 12:00:42 -07:00
Peter D. Barnes, Jr. 2f04a912c1 Log script errors, fix bogus copy
--HG--
extra : rebase_source : a9c94179834dbfdf113f1c3d337cb9367aeb7922
2012-08-08 14:04:05 -07:00
Mitch Watrous 014b6de66f Replace src/application usage of RandomVariable with RandomVariableStream 2012-08-13 16:08:13 -07:00
Mitch Watrous 64da5501bb eplace src/application usage of RandomVariable with RandomVariableStream 2012-08-13 10:46:09 -07:00
Peter D. Barnes, Jr. 256a5ab766 Remove temp files after building pdf docs 2012-08-08 13:17:14 -07:00
Peter D. Barnes, Jr. 20e98779c0 Call get_version.sh early, add option, env for public urls. 2012-08-08 12:52:30 -07:00
Peter D. Barnes, Jr. 535cf66706 Automated merge with file:///Users/barnes26/Code/netsim/ns3/repos/docs 2012-08-08 12:41:56 -07:00
Peter D. Barnes, Jr. f1560f18fd Remove temp files after building pdf docs 2012-08-08 12:40:37 -07:00
Vedran Miletić 970314e9f9 Fix logging in Ipv4L3Protocol::AddInterface and Ipv4L3Protocol::Receive. 2012-08-08 17:00:29 +02:00
Tom Henderson a60e56f3d4 clarify RouteOutput() header usage 2012-08-04 09:40:51 -07:00
Tom Henderson 47ae583037 remove stale reference 2012-08-04 09:29:48 -07:00
Peter D. Barnes, Jr. b89cf0a97e Automated merge with file:///Users/barnes26/Code/netsim/ns3/repos/ns-3-dev 2012-08-02 12:03:26 -07:00
Peter D. Barnes, Jr. 594383dbd3 Reverse dirty repo logic, better testing options, ignore doxygen.warnings.log. 2012-08-02 11:58:35 -07:00
John Abraham 2a9246aca0 NetAnim: Support End-point Ipv4 address on link display 2012-08-01 17:30:39 -07:00
Tom Henderson 14a62d02a7 bug 1386: assert if PositionAllocator not provided to RandomWaypointMobilityModel 2012-08-01 13:19:33 -07:00
Peter D. Barnes, Jr. 83de5af56b Detect doc builds for public site, ignore ns3_version.js auto-generated file. 2012-08-01 12:36:50 -07:00
Peter D. Barnes, Jr. 396e660418 Still fixing broken links 2012-07-31 22:56:09 -07:00
Peter D. Barnes, Jr. dea51fdd30 Generate ns3_version.js from waf --doxygen 2012-07-31 22:09:43 -07:00
Peter D. Barnes, Jr. 322d73be50 Automated merge with file:///Users/barnes26/Code/netsim/ns3/repos/ns-3-dev 2012-07-31 20:20:03 -07:00
Peter D. Barnes, Jr. db787f66ee Fix broken links 2012-07-31 20:11:10 -07:00
John Abraham 41f6dfdfbe [Bug 1478] New: Support run-time changes to node visibility, color, and description 2012-07-31 20:00:52 -07:00
Peter D. Barnes, Jr. 94a6aa6ce7 Fix Sphinx warnings 2012-07-31 17:31:49 -07:00
Nicola Baldo 58854e49fa added assert for correct scheduling of LteUePhy::SubframeIndication 2012-07-31 12:57:55 +02:00
Nicola Baldo e1c07db9a2 subframe indication now triggered independently by LteUePhy 2012-07-29 20:32:28 +02:00
mmiozzo 379fbb21c7 Fix bugs in merging lena-pem on test headers files 2012-07-27 12:54:37 +02:00
Marco Miozzo 36c66dab53 Remove test headers files according Bug 1439 2012-07-25 11:27:52 +02:00
Nicola Baldo 84a9327aa9 lena-dual-stripe: changed cmd line values to global values 2012-07-24 11:40:14 +02:00
Nicola Baldo 47a4b78927 updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage 2012-07-23 19:06:32 +02:00
Nicola Baldo 3ecbd431f9 removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels 2012-07-23 18:57:37 +02:00
mmiozzo 3e0fdcda99 Merge with lena-pem changeset 8812:eab4c6514af0 (Ctrl and Ref Signaling) 2012-07-19 13:02:41 +02:00
Nicola Baldo c7643cf50f added guards to lte-radio-bearer-info.h 2012-07-18 00:35:39 -04:00
mmiozzo 92f085c07d Update test suite lte-phy-error-model with a CI of 99.9 percent 2012-07-11 16:19:21 +02:00
mmiozzo@cttc.es a73b0a4226 merge with ns3-dev changeset: 8880:f458933f9a9f 2012-07-11 16:13:57 +02:00
Marco Miozzo 2025568c98 Add missing files lte-vendor-specific-parameters.h-cc 2012-07-11 13:03:05 +02:00
Marco Miozzo 242a0d1b58 Update LENA documentation with Ctrl and Ref signaling part 2012-07-11 13:01:37 +02:00
Tom Henderson 502852a67b rescan bindings 2012-07-10 23:08:50 -07:00
Tom Henderson 0fcbfbe38b olsr trace reference data changed (due to UniformVariable in Hello jitter) 2012-07-10 22:34:32 -07:00
Tom Henderson 87ad3830f5 update CHANGES.html and RELEASE_NOTES for random variable merge 2012-07-10 22:24:37 -07:00
Tom Henderson 24fe59cfbb helper to use config paths to assign streams 2012-07-10 21:52:31 -07:00
Tom Henderson 50f298b400 update manual documentation on random variables 2012-07-10 21:52:04 -07:00
Mitch Watrous 8cd6c25962 update wscript 2012-07-10 21:51:44 -07:00
Mitch Watrous d5a2afddb0 examples for RandomVariableStream implementations 2012-07-10 21:51:08 -07:00
Mitch Watrous b6d1afd1a4 test suite for RandomVariableStream implementations 2012-07-10 21:48:32 -07:00
Mitch Watrous a482fe425d Port remaining RandomVariable implementations to RandomVariableStream 2012-07-10 21:47:16 -07:00
Mathieu Lacage f36fa545a6 initial patch to fix rng variability 2012-07-10 21:31:47 -07:00
Tom Henderson 612a08373c remove erroneous doxygen 2012-07-09 06:53:14 -07:00
Marco Miozzo 758db9e80e Add testcase for DL control channels (PCFICH+PDCCH) to lte-phy-error-model test suite 2012-07-06 13:08:22 +02:00
Marco Miozzo c92f0d4ef2 Add PCFICH-PDCCD Error model based on 3GPP R4-081920 2012-07-05 16:42:48 +02:00
Marco Miozzo ec0a3e97a3 Update SRS-CQI management in RR and PF Schedulers 2012-07-04 12:22:21 +02:00
Nicola Baldo 6a9d3c3775 fixed error with ulinfonew.m_ulReception when two LCs are created and only second one is used 2012-07-02 11:43:45 +02:00
Nicola Baldo 005105dba2 fixed bug with multiple LCs in UL BSR 2012-07-02 11:34:21 +02:00
Marco Miozzo 1ea941a255 Update code after internal review 2012-06-29 11:51:22 +02:00
Marco Miozzo ef6cc4a65b Update MIMO on Ctrl signaling for having the same behavior of data 2012-06-29 11:01:30 +02:00
Marco Miozzo c517bf47f0 Add SRS based UL-CQI and update RR and PF schedulers for managing them 2012-06-28 17:30:43 +02:00
Marco Miozzo b8e7dff8c0 Polish code according to codereview 2012-06-26 16:35:04 +02:00
Nicola Baldo 8d0cf0776c added lena-dual-stripe --homeUesHomeEnbRatio=2 to examples-to-run.py 2012-06-26 14:07:07 +02:00
Nicola Baldo dbbed882fe fixed bug: lena-dual-stripe crashes with --homeUesHomeEnbRatio=2 2012-06-26 13:46:47 +02:00
John Abraham 55d5a5b453 NetAnim: Remove obsolete netanim-config.h 2012-06-25 11:52:17 -07:00
Marco Miozzo 50d0743753 Add fading trace command line parameter (fadingTrace) in lena-dual-stripe and correspondent test 2012-06-25 17:23:38 +02:00
Marco Miozzo ed5a456de3 Add missing files of LteControlMessage 2012-06-25 15:23:00 +02:00
Marco Miozzo 9c5fa96fb4 Add SRS signaling 2012-06-25 13:41:13 +02:00
Tom Henderson bda125fd86 update documentation 2012-06-22 15:16:14 -07:00
Nicola Baldo 42b662fd58 fixed typo in doxygen of WifiPhyListener 2012-06-21 11:09:35 +02:00
Peter D. Barnes, Jr. 0e858f92ed Fix easy doxygen warnings 2012-06-20 06:50:50 -07:00
Marco Miozzo 3b09edc3e2 Update Fading module for iter-cell interference and encaspulate the channels realization within the module itself 2012-06-20 12:31:20 +02:00
Nicola Baldo a0c7d6ea8d merge 2012-06-19 20:19:00 +02:00
Nicola Baldo d3bb3718d0 refined command line parameters in lena-simple-epc example 2012-06-19 19:46:20 +02:00
John Abraham 80663034e3 NetAnim: Clean up 2012-06-18 06:35:32 -07:00
Andrea Sacco 90d5128cf1 Added UAN Animation example and modified netanim/examples/wscript to include it 2012-06-18 11:32:58 +02:00
Andrea Sacco e074bdd6f3 Modified NetAnim and UAN Phy to trace transmission events 2012-06-18 10:22:59 +02:00
Andrea Sacco 3fcb3c137d UAN module: Added Trace source accessors for TX/RX begin/end/drop events 2012-06-18 10:18:58 +02:00
Marco Miozzo 64d9ce9d8c Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs) 2012-06-15 16:49:51 +02:00
John Abraham e0918edc18 NetAnim: Add tentative Uan Phy Gen callback 2012-06-15 06:59:19 -07:00
Nicola Baldo 8707b44da8 merge 2012-06-15 13:23:51 +02:00
Nicola Baldo 8b0c038a18 merge 2012-06-15 10:57:22 +02:00
Peter D. Barnes, Jr. 325391b2c1 Bugfix
--HG--
extra : transplant_source : %3C%F0%E0%28%10%28%1A%5Dz%5B%BC%E4%15%7B%2C%CE%B5%7F%FD-
2012-06-13 18:45:58 -07:00
Peter D. Barnes, Jr. 187c0545c1 Rewrite html menu links for single/multi-page html views.
--HG--
extra : transplant_source : %AD%04%AE%1D%84%87e%D4%B0%97%22%1Eq%F9%EC%F0%26F%26%3C
2012-07-31 15:54:49 -07:00
Peter D. Barnes, Jr. 58ee410b57 Menu bar in doc web pages; build html, singlehtml, pdf; automatic version string in docs; fix singlehtml title.
--HG--
extra : transplant_source : %85%1C%83%0Aj%3B%9C8%0A%E8%96p%0Do%0B%A5%AB%25%9A_
2012-07-31 11:18:23 -07:00
Peter D. Barnes, Jr. 4b8be66974 Remove extraneous configurations
--HG--
extra : transplant_source : %F2%9Dq%14%8B%CFNmK5%07%D2%7C%90%0E%3AuB2.
2012-07-30 17:27:24 -07:00
Peter D. Barnes, Jr. c676335377 Use common static html for Doxygen and Sphinx header bar
--HG--
extra : transplant_source : %40%B4%EF%E9%E6%DF%E1%06%F7%CD%1F0%B7%AE%DFr%7D%3F%98%00
2012-07-30 17:26:43 -07:00
Peter D. Barnes, Jr. e7c0afe5e5 Fix Sphinx language code for tutorial-pt-br
--HG--
extra : transplant_source : %EC%9D%0973D%17%A8Ih%99%5D%B58%E9H%B9%93%8B%5D
2012-07-30 17:24:46 -07:00
Peter D. Barnes, Jr. 8b28540d92 Add Sphinx doc built timestamp, logo to pdf docs.
--HG--
extra : transplant_source : %24Pg%EA%FC%29%BE%B1%C0%F3O%FD%40%21L%0A%1F%FA%A3%F0
2012-07-30 17:16:26 -07:00
Peter D. Barnes, Jr. 6c211e7e5c Build singlehtml, rewrite html header links with version-dependent paths
--HG--
extra : transplant_source : %8E1%C7%0Fd%5BC%03%AEE%2A%00%12%CA%28%23%CF%B6%90%A5
2012-07-30 15:15:52 -07:00
Peter D. Barnes, Jr. a20a9caabe Fix sphinx wiki and bugzilla static links
--HG--
extra : transplant_source : %09%151%BCf%05%BD%B15S%09%FA%EF1T%A4.BuO
2012-07-30 15:14:30 -07:00
Peter D. Barnes, Jr. 7d8f7dd996 Repo version, add missing script
--HG--
extra : transplant_source : %B7%ABma%F0%A5x%1D%E3%CE%FAI-%2A%F5%09%8Aj%F1%9C
2012-07-18 15:45:50 -07:00
Peter D. Barnes, Jr. 106c576196 Repo version
--HG--
extra : transplant_source : %92%DAA%BAjdTj%10%B0D%C1%14%11%15j%B9%9E%18%FD
2012-07-18 15:39:09 -07:00
Peter D. Barnes, Jr. 849a90f971 Menu bar
--HG--
extra : transplant_source : %DE%F4%24f%91%60%0B0I%E5%99%04%3F%BC%17%2Bc%D6%7B%2A
2012-07-18 13:39:20 -07:00
John Abraham 77380392cf NetAnim: Add nodeupdate XML tag 2012-07-29 21:07:16 -07:00
John Abraham 64e82a023d NetAnim: linkFound variable set but unused 2012-07-29 06:27:08 -07:00
John Abraham 81cb56e46a NetAnim: Add link update XML tag 2012-07-28 21:06:14 -07:00
John Abraham dfb40dc4cb merge 2012-07-28 15:18:14 -07:00
John Abraham 9dc8ecb9a0 NetAnim: Change SetLinkDescription defaults 2012-07-28 15:17:18 -07:00
Tom Henderson f53ab9af93 update software organization figure for manual 2012-07-27 11:59:16 -07:00
John Abraham a18362e172 NetAnim: Support for link description 2012-07-27 10:29:53 -07:00
Lalith Suresh a1691e1b69 Rescan click module python bindings 2012-07-27 14:28:45 +02:00
Peter D. Barnes, Jr. fa82eaff5c Missing images for new docs header 2012-07-26 13:31:15 -07:00
watrous eaff2fa44f Rescanned internet module bindings on ns-regression 2012-07-26 13:08:00 -07:00
Lalith Suresh c2b6158832 Remove stale doxygen from Ipv4L3ClickProtocol and Ipv4L3Protocol 2012-07-26 16:08:23 +02:00
Lalith Suresh 445ee176cd Update RELEASE_NOTES 2012-07-26 15:56:55 +02:00
Lalith Suresh db3b60236f Bug 1477: Click doesn't work with raw sockets 2012-07-26 15:54:30 +02:00
Mitch Watrous b75cfdb282 Update release notes 2012-07-25 12:05:58 -07:00
Mitch Watrous ebef75d829 Bug 1476: TestCase::GetName () should not be private 2012-07-24 17:11:01 -07:00
Mitch Watrous a910b44885 Bug 1475: test.py --list should sort the output 2012-07-23 17:45:28 -07:00
Mirko Banchi 9059a313c5 BlockAckCache: fix wrong formula for update of winEnd index (thanks Ghada Badawy). 2012-07-23 18:49:59 +02:00
Peter D. Barnes, Jr. f4fd6cb251 Parametrize layout.html 2012-06-20 09:55:01 -07:00
Peter D. Barnes, Jr. b7f55c4113 Remove old implementation 2012-06-19 16:18:50 -07:00
Peter D. Barnes, Jr. 4bd5fec04f Script to summarize doxygen.warnings.log 2012-07-20 17:07:28 -07:00
Peter D. Barnes, Jr. 2676e25b9c Move mesh image file to mesh/doc
--HG--
rename : doc/MeshArchitecture.png => src/mesh/doc/MeshArchitecture.png
2012-07-20 16:52:21 -07:00
Peter D. Barnes, Jr. 0663c95245 Fix doxygen error. 2012-06-15 14:02:33 -07:00
Peter D. Barnes, Jr. ccef6ed845 Make Doxygen and Sphinx use common resources.
--HG--
rename : doc/ns3_footer.html => doc/ns3_html_theme/ns3_doxy_footer.html
rename : doc/ns3_header.html => doc/ns3_html_theme/ns3_doxy_header.html
rename : doc/ns3_sphinx_theme/static/default.css_t => doc/ns3_html_theme/static/default.css_t
rename : doc/doxygen.css => doc/ns3_html_theme/static/doxygen.css
rename : doc/ns3_sphinx_theme/static/sidebar.js => doc/ns3_html_theme/static/sidebar.js
2012-07-20 16:49:45 -07:00
Peter D. Barnes, Jr. 2f3a4f31e2 Tweak ns3 Sphinx theme, add favicon 2012-06-14 15:40:46 -07:00
Peter D. Barnes, Jr. 3709c6e261 Update to doxygen 1.8.1.1 2012-07-20 16:35:16 -07:00
Peter D. Barnes, Jr. c3b5e54573 Don't generate Latex output from Doxygen 2012-07-20 16:26:22 -07:00
Peter D. Barnes, Jr. 9e21481b8d Ignore tutorial-pt-br/build 2012-06-14 09:42:42 -07:00
Peter D. Barnes, Jr. de95c9b10f Make doxygen header match Sphinx header 2012-06-13 18:56:18 -07:00
Peter D. Barnes, Jr. bdf540e8a7 Sphinx doc bug fixes 2012-06-13 18:53:59 -07:00
Peter D. Barnes, Jr. c61ed36fbc Update Sphinx docs to use ns-3 theme 2012-06-13 18:53:20 -07:00
Peter D. Barnes, Jr. 483bddbd77 ns-3 theme for Sphinx docs 2012-06-13 18:52:04 -07:00
Peter D. Barnes, Jr. ac452a8808 Add waf options to build the Sphinx docs, all docs 2012-06-13 18:46:38 -07:00
Tom Henderson d9f7e14c5a fix stale documentation 2012-06-11 21:30:04 -07:00
Nicola Baldo b301836c07 added references to LTE simulation scenarios 2012-06-08 18:39:30 +02:00
Nicola Baldo 976d97b4ee clarifications in the LTE PHY error model test doc 2012-06-08 18:19:57 +02:00
Nicola Baldo ab6feba375 merge 2012-06-08 11:12:00 +02:00
Marco Miozzo e7c25f9c3c Update Design Doc of PF scheduler with RBG instead of RB 2012-06-07 12:19:22 +02:00
Marco Miozzo 13674a7bda Bug-fix PF scheduler DoSchedDlTriggerReq achievableRate evaluated per RB instead oof RBG 2012-06-07 11:06:00 +02:00
Tom Henderson 521bc21456 update release notes for ns-3.14.1 2012-06-06 23:33:58 -07:00
Tom Henderson 92244ae188 remove explicit visualizer dependency from examples 2012-06-06 22:07:56 -07:00
Gustavo J. A. M. Carneiro 03f1934de7 Automatically add the visualizer module to programs running with waf --run --vis 2012-06-06 18:42:13 +01:00
Gustavo J. A. M. Carneiro d071049665 Bug 1410 - Assert in DefaultSimulatorImpl breaks Visualizer module 2012-06-06 18:41:58 +01:00
Marco Miozzo 19af32a6e3 Bug-fix: remove redundant queueing of UL-DCI in LteEnbPhy::StartSubFrame 2012-06-06 11:53:53 +02:00
Tom Henderson be602d0271 start new release notes for future releases 2012-06-05 22:46:39 -07:00
Tom Henderson cb8a465692 Added tag ns-3.14 for changeset ae540de68a25 2012-06-05 17:01:14 -07:00
Tom Henderson 3306567d57 add queue documentation 2012-06-05 16:29:04 -07:00
Tom Henderson 2d6ad0b37f formatting DSR documentation 2012-06-05 16:28:00 -07:00
Tom Henderson eeb22f032e update release steps again 2012-06-05 12:12:49 -07:00
Tom Henderson ef64362351 update release steps 2012-06-05 11:52:01 -07:00
Tom Henderson 55b1e38d9b Finalize release notes for ns-3.14 2012-06-05 11:24:59 -07:00
Tom Henderson 4c0a1cc3c1 update CHANGES.html for ns-3.14 2012-06-05 11:24:54 -07:00
Tom Henderson 6ee8f5b891 update AUTHORS 2012-06-05 11:22:58 -07:00
Tom Henderson 83dd97c451 two small tutorial typos 2012-06-04 07:21:57 -07:00
Tom Henderson 18947ae628 extend the sample documentation outline 2012-06-04 07:21:37 -07:00
Tom Henderson f8b97d44a6 Do not overwrite transport protocol downtarget callback in NotifyNewAggregate() 2012-06-01 17:10:36 -07:00
Tom Henderson a9b9e503b9 update logging on the dsr example 2012-06-01 17:09:56 -07:00
Tom Henderson 2e6e133380 update dsr example dependencies 2012-06-01 14:57:36 -07:00
Tom Henderson 002252d0e4 update LTE device names 2012-06-01 11:39:48 -07:00
Tom Henderson 06c6a5275b add bindings for virtual-net-device 2012-06-01 09:41:07 -07:00
Marco Miozzo ae5a8f9c88 Merge with lena-dev changeset: 8798:9df898a16370 2012-05-24 12:00:57 +02:00
Marco Miozzo 5c672f786b First draft of Ctrl and Ref Signaling Doc 2012-05-24 10:56:33 +02:00
Peter D. Barnes, Jr. e30e6d6a47 Protect ascii art picture of Buffer layout. 2012-05-10 09:31:35 -07:00
Peter D. Barnes, Jr. e772a5f06c Enhanced doxygen docs: nsnam colors, ns-3 logo, extract everything, internals, source files, scan .c .cc .h .py files. Update to doxygen 1.7.5.1 config file 2012-07-20 16:18:53 -07:00
John Abraham 10d39194f9 bug 1308: Nix-vector; do not process packets to self 2012-07-19 13:01:30 -07:00
John Abraham 183eca1dd8 NetAnim: Modify wireless example for color 2012-07-19 10:07:08 -07:00
John Abraham 7868286d55 NetAnim: Change default RGB to red 2012-07-19 09:41:20 -07:00
John Abraham 774d69fbc4 NetAnim: Add RGB support for Nodes 2012-07-18 21:52:36 -07:00
Gustavo J. A. M. Carneiro 34694d32ae Fix possible deadlock when 'waf --apiscan' finishes 2012-07-12 17:39:58 +01:00
Alex Afanasyev 70c96e69ee (flow monitor) Bug 1471 - Default constructor was not doing what it suppose to do 2012-07-12 16:31:42 +01:00
Gustavo J. A. M. Carneiro b0a0d1924f Bug 1445 - When build with "-d release", don't suffix "-release" 2012-07-12 12:35:31 +01:00
Tom Henderson 2c27db0bdf rescan bindings 2012-07-11 21:07:41 -07:00
Mitch Watrous 66f29d7ee6 Bug 1464 - ConfigStore Save + Load => Could not set default value for ns3::UdpSocketImpl::IcmpCallback 2012-07-11 10:26:41 -07:00
Brian Swenson 5228ad81d7 Added example showing how to setup environmental variables for MPI 2012-07-11 11:01:23 -04:00
Marco Miozzo dd1879c2e0 Update Ul and Dl RlcBufferInfo methods of RR and PF scheduler for considering the minimum RLC overhead when decrementing queues 2011-12-23 11:06:19 +01:00
956 changed files with 95507 additions and 17034 deletions

No files matched your search

+1 -2
View File
@@ -45,5 +45,4 @@ massif.*
\#[^\#/]+\#$
.lock-wscript
.lock-wafbuild
*~
\#*\#
+8 -7
View File
@@ -20,15 +20,15 @@
\.pcap$
\.mob$
\.routes$
^doc/manual/build
^doc/tutorial/build
^doc/testing/build
^doc/models/build
^doc/doxygen.log$
^doc/doxygen.warnings.log$
^doc/(manual|models|tutorial|tutorial-pt-br)/build
^doc/(manual|models|tutorial|tutorial-pt-br)/figures/.*\.(eps|pdf|png)$
^doc/models/source-temp
^doc/manual/figures/.*eps
^doc/manual/figures/.*pdf
^doc/manual/figures/.*png
^doc/ns3_html_theme/static/ns3_version.js$
^src/.*/doc/build
^src/.*/doc/source/figures/.*\.(eps|pdf)$
^src/.*/doc/.*\.png
^bindings/python/pybindgen/
ms_print.*
massif.*
@@ -36,3 +36,4 @@ massif.*
\.diff$
\.tr$
\#[^\#/]+\#$
syntax: glob
+3
View File
@@ -61,3 +61,6 @@ e48ed3aabca6ad71c8c49e4604c0f83345eda6a8 ns-3.11-RC3
19c9e2b33b4a53f200be80cd49810bdfecf76770 ns-3.12-RC1
167fc2274f53d4d89fdd769e4a7683ad7b6b7157 ns-3.12
9007193fbb8d18b69a1feb6aec16501dcf138b6f ns-3.13
ae540de68a2534213342c5e0b12afb47d7518a90 ns-3.14
26a511d6dbad7284e66de0f3b2ad5bebe6b76405 ns-3.15
49d343e55caec257bb01e400eef6c14522f37e1b ns-3.16
+18 -10
View File
@@ -1,14 +1,15 @@
Alexander Afanasyev <alexander.afanasyev@ucla.edu>
Alexander Afanasyev (alexander.afanasyev@ucla.edu)
Rohit Agarwal (mindprince@gmail.com)
Kirill Andreev (andreev@iitp.ru)
Dean Armstrong (deanarm@gmail.com)
Nicola Baldo (nbaldo@cttc.es)
Mirko Banchi (mk.banchi@gmail.com)
Peter D. Barnes, Jr. (barnes26@llnl.gov)
Ramon Bauza (monbauza@gmail.com)
Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
Raj Bhattacharjea (raj.b@gatech.edu)
Timo Bingmann (timo.bingmann@student.kit.edu)
Julien Boite <juboite@gmail.com>
Julien Boite (juboite@gmail.com)
Elena Borovkova (borokovaes@iitp.ru)
Pavel Boyko (boyko@iitp.ru)
Dan Broyles (muxman@sbcglobal.net)
@@ -22,22 +23,26 @@ Andrey Churin (aachurin@gmail.com)
Salva Climent (jocliba@gmail.com)
Luis Cortes (cortes@gatech.edu)
Luca Costantino (luca.costantino@gmail.com)
Alexander D'souza (moijes12@gmail.com)
Craig Dowell (craigdo@ee.washington.edu)
Denis Fakhriev (fakhriev@iitp.ru)
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
Juliana Freitag Borin (juliana.freitag@gmail.com)
Eric Gamess (egamess@gmail.com)
Thomas Geithner (thomas.geithner@dai-labor.de)
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
Charline Taibi Guguen (charline.guguen@gmail.com)
Tom Goff (tgoff@tgoff.net)
David Gross (gdavid.devel@gmail.com)
Maja Grubišić (maja.grubisic@live.com)
Charline Taibi Guguen (charline.guguen@gmail.com)
Daniel Halperin (daniel@halper.in)
Bruno Haick (bghaick@hotmail.com)
Frank Helbert (frank@ime.usp.br)
Tom Henderson (tomhend@u.washington.edu)
Blake Hurd (naimorai@gmail.com)
ishan <ishan.chhabra@gmail.com>
ishan (ishan.chhabra@gmail.com)
Mohamed Amine Ismail (amine.ismail@inria.fr, iamine@udcast.com)
Atishay Jain <atishayjain25@gmail.com>
Atishay Jain (atishayjain25@gmail.com)
Sascha Alexander Jopen (jopen@informatik.uni-bonn.de)
Sam Jansen (sam.jansen@gmail.com)
Liu Jian (liujatp@gmail.com)
@@ -46,6 +51,7 @@ Flavio Kobuta (flaviokubota@gmail.com)
Aleksey Kovalenko (kovalenko@iitp.ru)
Mathieu Lacage (mathieu.lacage@inria.fr)
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
Daniel Lertpratchya (nikkipui@gmail.com)
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
Keith Ma (keith.nwsuaf@gmail.com)
Federico Maguolo (maguolof@dei.unipd.it)
@@ -66,11 +72,11 @@ Duy Nguyen (duy@soe.ucsc.edu)
Tommaso Pecorella (tommaso.pecorella@unifi.it)
Vikas Pushkar (vikaskupushkar@gmail.com)
Josh Pelkey (jpelkey@gatech.edu)
Colin Perkins <csp@csperkins.org>
Colin Perkins (csp@csperkins.org)
Giuseppe Piro (g.piro@poliba.it)
Yana Podkosova (yanapdk@rambler.ru)
Guangyu Pei (guangyu.pei@boeing.com)
Andrea Ranieri <andreran@uno.it>
Andrea Ranieri (andreran@uno.it)
Bruno Ranieri (Yrrsinn@googlemail.com)
Ken Renard (kenneth.renard@arl.army.mil)
Manuel Requena (mrequena@cttc.es)
@@ -83,11 +89,12 @@ Florian Schmidt (Florian.Schmidt@cs.rwth-aachen.de)
Guillaume Seguin (guillaume.seguin@inria.fr)
Kulin Shah (m.kulin@gmail.com)
Phillip Sitbon (phillip.sitbon@gmail.com)
Anirudh Sivaraman <sk.anirudh@gmail.com>
Anirudh Sivaraman (sk.anirudh@gmail.com)
Ewgenij Starostin (estar@cs.tu-berlin.de)
YunQiang Su <wzssyqa@gmail.com>
YunQiang Su (wzssyqa@gmail.com)
Brian Swenson (bswenson3@gatech.edu)
Lalith Suresh (suresh.lalith@gmail.com)
Marcos Talau <talau@users.sourceforge.net>
Marcos Talau (talau@users.sourceforge.net)
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
Hajime Tazaki (tazaki@sfc.wide.ad.jp)
Wilson Thong (wilsonwk@ee.cityu.edu.hk)
@@ -103,3 +110,4 @@ Mitch Watrous (watrous@u.washington.edu)
Florian Westphal (fw@strlen.de)
He Wu (mdzz@u.washington.edu)
Yoshihiko Yazawa (yoshiyaz@gmail.com)
Dizhi Zhou (dizhi.zhou@gmail.com)
+106 -1
View File
@@ -23,6 +23,13 @@ the impact of these changes on users by documenting these changes in a
single place (this file), and not by providing a temporary or permanent
backward-compatibility software layer. </p>
<p>
A related file is the RELEASE_NOTES file in the top level directory.
This file complements RELEASE_NOTES by focusing on API and behavioral
changes that users upgrading from one release to the next may encounter.
RELEASE_NOTES attempts to comprehensively list all of the changes
that were made. There is generally some overlap in the information
contained in RELEASE_NOTES and this file. </p>
<p>
The goal is that users who encounter a problem when trying to use older
code with newer code should be able to consult this file to find
guidance as to how to fix the problem. For instance, if a method name
@@ -44,7 +51,105 @@ 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.13 to ns-3-dev</h1>
<h1>Changes from ns-3.16 to ns-3.17</h1>
<h2>New API:</h2>
<ul>
<li></li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li></li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li></li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li></li>
</ul>
<hr>
<h1>Changes from ns-3.15 to ns-3.16</h1>
<h2>New API:</h2>
<ul>
<li>In the Socket class, the following functions were added:
<ul>
<li>(Set/Get)IpTos - sets IP Type of Service field in the IP headers.</li>
<li>(Set/Is)IpRecvTos - tells the socket to pass information about IP ToS up the stack (by adding SocketIpTosTag to the packet).</li>
<li>(Set/Get)IpTtl - sets IP Time to live field in the IP headers.</li>
<li>(Set/Is)RecvIpTtl - tells the socket to pass information about IP TTL up the stack (by adding SocketIpTtlTag to the packet).</li>
<li>(Set/Is)Ipv6Tclass - sets Traffic Class field in the IPv6 headers.</li>
<li>(Set/Is)Ipv6RecvTclass - tells the socket to pass information about IPv6 TCLASS up the stack (by adding SocketIpv6TclassTag to the packet).</li>
<li>(Set/Get)Ipv6HopLimit - sets Hop Limit field in the IPv6 headers.</li>
<li>(Set/Is)Ipv6RecvHopLimit - tells the socket to pass information about IPv6 HOPLIMIT up the stack (by adding SocketIpv6HoplimitTag to the packet).</li>
</ul>
A user can call these functions to set/get the corresponding socket option. See examples/socket/socket-options-ipv4.cc and examples/socket/socket-options-ipv6.cc for examples.
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li>In the MobilityHelper class, the functions EnableAscii () and EnableAsciiAll () were changed to use output stream wrappers rather than standard C++ ostreams. The purpose of this change was to make them behave analogously to other helpers in ns-3 that generate ascii traces. Now, the file stream that is open in MobilityHelper is closed nicely upon asserts and program exits.</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li>It's now possible to use distcc when building ns-3. See tutorial for details.</li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li>Sending a packet through Ipv4RawSocket now supports checksum in the Ipv4Header. It is still not possible to manually put in arbitrary checksum as the checksum is automatically calculated at Ipv4L3Protocol. The user has to enable checksum globally for this to work. Simply calling Ipv4Header::EnableChecksum() for a single Ipv4Header will not work.</li>
<li>Now MultiModelSpectrumChannel allows a SpectrumPhy instance to change SpectrumModel at runtime by issuing a call to MultiModelSpectrumChannel::AddRx (). Previously, MultiModelSpectrumChannel required each SpectrumPhy instance to stick with the same SpectrumModel for the whole simulation.
</li>
</ul>
<hr>
<h1>Changes from ns-3.14 to ns-3.15</h1>
<h2>New API:</h2>
<ul>
<li>A RandomVariableStreamHelper has been introduced to assist with
using the Config subsystem path names to assign fixed stream numbers
to RandomVariableStream objects.</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li>Derived classes of RandomVariable (i.e. the random variable
implementations) have been ported to a new RandomVariableStream base class.
<li>For a given distribution DistributionVariable (such as UniformVariable),
the new class name is DistributionRandomVariable (such as
UniformRandomVariable). </li>
<li>The new implementations are also derived from class ns3::Object and
are handled using the ns-3 smart pointer (Ptr) class. </li>
<li>The new variable classes also have a new attributed called "Stream"
which allows them to be assigned to a fix stream index when assigned
to the underlying pseudo-random stream of numbers.</li>
</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li></li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li>Programs using random variables or models that include random variables
may exhibit changed output for a given run number or seed, due to a possible
change in the order in which random variables are assigned to underlying
pseudo-random sequences. Consult the manual for more information regarding
this.</li>
</ul>
<hr>
<h1>Changes from ns-3.13 to ns-3.14</h1>
<h2>New API:</h2>
<ul>
+6
View File
@@ -1,3 +1,9 @@
Note:
This is a custom and unsupported fork of NS-3 simulator (http://www.nsnam.org/).
**The code in this repository is frequently rebased on top of the latest ns-3-dev branch**
The Network Simulator, Version 3
--------------------------------
+181 -11
View File
@@ -9,36 +9,204 @@ http://www.nsnam.org including tutorials: http://www.nsnam.org/tutorials.html
Consult the file CHANGES.html for more detailed information about changed
API and behavior across ns-3 releases.
Release 3-dev
=============
Availability
------------
This release is not yet available.
Supported platforms
-------------------
To be determined
New user-visible features
-------------------------
Bugs fixed
----------
Known issues
------------
In general, known issues are tracked on the project tracker available
at http://www.nsnam.org/bugzilla/
Release 3.16
============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.16.tar.bz2
Supported platforms
-------------------
- Fedora Core 17 (32/64 bit) with g++-4.7.0
- Fedora Core 15 (64 bit) with g++-4.6.3
- Ubuntu 12.10 (32/64 bit) with g++-4.6.3
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- OS X Mountain Lion 10.8.3 with g++-4.2.1
- FreeBSD 8.2 (32 bit) with g++-4.2.1
- Cygwin 1.7.9-1 with g++-4.5.3
New user-visible features
-------------------------
- Support several new LTE MAC schedulers developed in GSoC 2012 project.
Those schedulers include FD-MT, TD-MT, TTA, FD-BET, TD-BET, FD-TBFQ,
TD-TBFQ, PSS. Here, FD and TD mean frequency domain and time domain
respectively.
- It's now possible to use distcc when building ns-3 by using
$ CXX='distcc g++' ./waf configure
$ ./waf build
- Support topology generation with the (external) BRITE topology generation
tool
Bugs fixed
----------
- bug 555 - DCF immediate access
- bug 976 - wifi-wired-bridging regression test fails because of
rounding errors in mobility model
- bug 1055: Wrong UAN's Thorp absorption loss model formula
- bug 1284 - ./test.py performance tests do not exist
- bug 1324 - ns3tcp-cwnd-test-suite.cc test failing
- bug 1340 - ns3tcp-loss-suite.cc tests failing
- bug 1342 - ns3tcp-cwnd-test-suite.cc tests failing
- bug 1345 - ns-3 builds with clang compiler >= 3.0
- bug 1359 - TCP cannot receive ICMP
- bug 1361 - Set TOS from Application level (sockets)
- bug 1463 - ./test.py --example should automatically detect the path
- bug 1479 - When the Ipv4RawSocket "IpHeaderInclude" Attribute set true,
Ip Checksum error
- bug 1485 - Setting global properties in config file (raw text) does
not have any effect
- bug 1493 - test.py --list should show the test type default tip
- bug 1493 - test.py --list should show the test type
- bug 1494 - test.py --constrain doesn't work
- bug 1495 - test.py claims test passed when no test was run
- bug 1506: TCP data segment piggybacking acknowledgment
- bug 1509 - RttEstimator returns invalid value in presence of errors
- bug 1516 - GtkConfigStore does not show read-only attributes
- bug 1520 - Config paths not fully documented (partial fix)
- bug 1524 - Fragmentation Threshold equals to Packet Size at MAC Layer
(Data + IP + UDP) crash the reception
- bug 1525 - Linker error with mpi on Mac 10.8
- bug 1526: Wrong calculation of pathloss within
UanPropModelThorp::GetPathLossDb
- bug 1527 - Ipv4RawSocket's BindToNetDevice not working
- bug 1528 - BindToNetDevice not working for IPv6 sockets
- bug 1531 - Crash when using NS_LOG in destructors of static objects
- bug 1532 - unimplemented LTE Scheduler methods
Known issues
------------
In general, known issues are tracked on the project tracker available
at http://www.nsnam.org/bugzilla/
Release 3.15
============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.15.tar.bz2
Supported platforms
-------------------
- Fedora Core 17 (32/64 bit) with g++-4.7.0
- Fedora Core 15 (64 bit) with g++-4.6.3
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- OS X Mountain Lion 10.7.4 with g++-4.2.1
- OS X Snow Leopard 10.6.8 with g++-4.2.1
- FreeBSD 8.2 (32 bit) with g++-4.2.1
- Cygwin 1.7.9-1 with g++-4.5.3
New user-visible features
-------------------------
- A new random variable base class called 'RandomVariableStream', has been
introduced. This base class derives from ns3::Object, unlike the current
'RandomVariable' class which is a special type of object in the ns-3
system to date. By making this class derive from ns3::Object, it can be
handled with the Ptr class, can carry attributes, and can have its parameters
and initial state saved in the config-store subsystem. A new attribute
called "Stream" has been introduced for this class, to allow users to
better control the assignment of underlying pseudo-random sequences to
the RandomVariableStream objects (bug 101).
Bugs fixed
----------
- bug 101 - random variable initialization
- bug 1256 - Unnecessary SND.NXT advance, missing ACK for Out of Order segments
- bug 1308 - Nix-vector; do not process packets to self
- bug 1386 - assert if PositionAllocator not provided to
RandomWaypointMobilityModel
- bug 1399 - TCP not backing off retransmissions properly
- bug 1441 - IPv4 header length handling
- bug 1464 - ConfigStore Save + Load => Could not set default value
for ns3::UdpSocketImpl::IcmpCallback
- bug 1470 - define default parameter for constructor in .h file
- bug 1473 - GetQueue/SetQueue missing from Csma python bindings
- bug 1475 - "test.py --list" should sort the output
- bug 1476 - TestCase::GetName () should not be private
- bug 1477 - Click doesn't work with raw sockets
- bug 1481 - Openflow example doesn't run
- bug 1486 - Segfaults in nix-vector-routing with bridges
- bug 1489 - Jakes Log component is missing
- fixed bug with multiple LCs in UL BSR
- fixed bug with lena-dual-stripe crashes with --homeUesHomeEnbRatio=2
Known issues
------------
In general, known issues are tracked on the project tracker available
at http://www.nsnam.org/bugzilla/
Release 3.14.1
==============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.14.1.tar.bz2
Bugs fixed
----------
This hotfix release contains a fix for the PyViz visualizer and makes it
easier to add PyViz support to examples; otherwise it is the same as the
ns-3.14 release.
Release 3.14
============
Availability
------------
This release not yet available.
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.14.tar.bz2
Supported platforms
-------------------
ns-3.14 has been tested on the following platforms. Not all features are
available on all platforms; check the Installation page on the project wiki.
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- Fedora Core 17 (32/64 bit) with g++-4.7.0
- Fedora Core 16 (32/64 bit) with g++-4.6.3
- Fedora Core 15 (64 bit) with g++-4.6.3
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
- Ubuntu 11.10 (32 bit) with g++-4.6.1
- OS X Lion with g++-4.2.1
- OS X Snow Leopard with g++-4.2.1
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- OS X Lion 10.7.4 with g++-4.2.1
- OS X Snow Leopard 10.6.8 with g++-4.2.1
- FreeBSD 8.2 (32 bit) with g++-4.2.1
- Cygwin 1.7.9-1 with g++-4.5.3
New user-visible features
-------------------------
- Transport protocol implementations (TCP, UDP) have been refactored to
support also IPv6 connections. Dual-stacked IPv6 sockets are implemented.
An IPv6 socket can accept an IPv4 connection, returning the senders
An IPv6 socket can accept an IPv4 connection, returning the sender's
address as an IPv4-mapped address (IPV6_V6ONLY socket option is not
implemented).
- The LTE code from the LENA project has been merged, bringin in a
- The LTE code from the LENA project has been merged, bringing in a
significant redesign of the LTE module as well as many new features.
- An antenna module is now included, which includes different
radiation pattern models. See the corresponding new section of the
@@ -50,7 +218,7 @@ New user-visible features
- The Dynamic Source Routing (DSR) MANET routing protocol for IPv4 was added.
- A Random Early Detection (RED) queue model has been added.
- Ipv6RoutingHelper is now in-line with Ipv4RoutingHelper concerning the RT
print functions. Various minor changes made in Ipv6RoutingProtocol and
print functions. Various minor changes were made in Ipv6RoutingProtocol and
derived classes to make this possible.
- New "SendIcmpv6Redirect" attribute (and getter/setter functions) to
Ipv6L3Protocol. The behavior is similar to Linux's conf "send_redirects",
@@ -58,12 +226,12 @@ New user-visible features
- Longer and more descriptive names are used for error units in RateErrorModel
class and queue mode in Queue class. Attributes in those classes are also
changed for consistency. See API documentation for details.
- The netanim animator is now included with the release.
- The netanim animator is now bundled with the release.
Bugs fixed
----------
- bug 631 - RealtimeSimulatorImpl does not handle Ctrl-C with python bindings
- bug 603 - Simulator::Next is useless
- bug 631 - RealtimeSimulatorImpl does not handle Ctrl-C with python bindings
- bug 962 - list of paths to reach objects contains bogus entries
- bug 1000 - Make RealtimeSimulatorImpl last until stop
- bug 1053 - Need better error diagnostics in ns2-mobility-trace example
@@ -103,10 +271,12 @@ Bugs fixed
- bug 1393 - IPv6 Routing Helper RT Print functions
- bug 1395 - AODV DeferredRouteOutputTag missing constructor
- bug 1396 - ARP with hardware addresses longer than 6 bytes
- bug 1399 - TCP not backing off retransmissions properly
- bug 1404 - Bound user input in tutorial third.cc program
- bug 1406 - waf exits with maximum recursion depth exceeded
- bug 1415 - examples-to-run.py doesn't work with command line arguments
- bug 1420 - bug 1420: no python bindings for csma-layout
- bug 1420 - no python bindings for csma-layout
- bug 1441 - IPv4 header length handling
Known issues
------------
-1
View File
@@ -409,7 +409,6 @@ class python_scan_task_collector(Task.TaskBase):
# can't cope with it, so we have to force the user to restart
# WAF)
self.bld.producer.stop = 1
self.bld.producer.free_task_pool()
return 0
+448 -157
View File
File diff suppressed because it is too large. Load diff
+133
View File
@@ -0,0 +1,133 @@
#!/bin/bash
# Process doxygen.warnings.log to generate sorted list of top offenders
# Flag to skip running doxygen
skipdoxy=${1:-""}
DIR=`dirname $0`
ROOT=`hg root`
# Final resting place for the log file
log=$DIR/doxygen.warnings.log
# First, we have to modify doxygen.conf to generate all the warnings
# (We also suppress dot graphs, so shorten the run time.)
if [ "$skipdoxy" == "" ]; then
conf=$DIR/doxygen.conf
sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT |^WARNINGS /s/YES/no/' $conf
rm -f $conf.bak
echo -n "Rebuilding doxygen docs with full errors..."
(cd $ROOT && ./waf --doxygen >/dev/null 2>&1)
status=$?
hg revert $conf
if [ "$status" = "0" ]; then
echo "Done."
else
echo "FAILED."
exit 1
fi
mv $DIR/doxygen.log $log
else
echo "Skipping doxygen run, using existing log file $log"
fi
# Analyze the log
# List of module directories (e.g, "src/core/model")
undocmods=$( \
grep "^$ROOT" "$log" | \
cut -d ':' -f 1 | \
sed "s|$ROOT||g" | \
cut -d '/' -f 2-4 | \
sort | \
uniq -c | \
sort -nr \
)
# Number of directories
modcount=$( \
echo "$undocmods" | \
wc -l | \
sed 's/^[ \t]*//;s/[ \t]*$//' \
)
# For a function with multiple undocumented parameters,
# Doxygen prints the additional parameters on separate lines,
# so they don't show up in the totals above.
# Rather than work too hard to get the exact number,
# we just list the total here.
addlparam=$( \
grep -v "^$ROOT" $log | \
grep -v "not generated, too many nodes" | \
grep "^ parameter '" $log | \
wc -l | \
sed 's/^[ \t]*//;s/[ \t]*$//' \
)
# Total number of warnings
warncount=$(echo "$undocmods" | \
awk '{total += $1}; END {print total}' )
warncount=$((warncount + addlparam))
# List of files appearing in the log
undocfiles=$( \
grep "^$ROOT" "$log" | \
cut -d ':' -f 1 | \
sed "s|$ROOT||g" | \
cut -d '/' -f 2- | \
sort | \
uniq -c | \
sort -k 2 \
)
# Total number of files
filecount=$( \
echo "$undocfiles" | \
wc -l | \
sed 's/^[ \t]*//;s/[ \t]*$//' \
)
# Now we're ready to summarize the log
echo
echo "Report of Doxygen warnings"
echo "----------------------------------------"
echo
echo "(All counts are lower bounds.)"
echo
echo "Warnings by module/directory:"
echo
echo "Count Directory"
echo "----- ----------------------------------"
echo "$undocmods"
echo " $addlparam additional undocumented parameters."
echo "----------------------------------------"
printf "%6d total warnings\n" $warncount
printf "%6d directories with warnings\n" $modcount
echo
echo
echo "Warnings by file"
echo
echo "Count File"
echo "----- ----------------------------------"
echo "$undocfiles"
echo "----------------------------------------"
printf "%6d files with warnings\n" $filecount
echo
echo
echo "Doxygen Warnings Summary"
echo "----------------------------------------"
printf "%6d directories\n" $modcount
printf "%6d files\n" $filecount
printf "%6d warnings\n" $warncount
+3 -1
View File
@@ -31,7 +31,9 @@ IMAGES_TO_CLEAN = $(IMAGES_PNG_CONVERTED) $(IMAGES_PDF) $(IMAGES_EPS)
%.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 TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
%.pdf : %.eps;
$(EPSTOPDF) $< -o=$@
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
# You can set these variables from the command line.
Binary file not shown.
+4 -2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
TMPDIR=/tmp
TMPFILE=`mktemp`
echo "\documentclass{book}
@@ -8,5 +10,5 @@ echo "\documentclass{book}
\includepdf[width=${1},fitpaper]{${2}}
\end{document}" >${TMPFILE}.tex
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
cp ${TMPFILE}.pdf ${3}
cp ${TMPFILE}.pdf ${2}
rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
+14 -7
View File
@@ -856,18 +856,25 @@ presentation.
To use this feature, one must install libgtk and libgtk-dev; an example
Ubuntu installation command is:::
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
To check whether it is configured or not, check the output of the step:::
./waf configure --enable-examples --enable-tests
---- Summary of optional NS-3 features:
Threading Primitives : enabled
Real Time Simulator : enabled
GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found)
./waf configure --enable-examples --enable-tests
---- Summary of optional NS-3 features:
Python Bindings : enabled
Python API Scanning Support : enabled
NS-3 Click Integration : enabled
GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found)
In the above example, it was not enabled, so it cannot be used until a suitable
version is installed and ./waf configure --enable-examples --enable-tests; ./waf is rerun.
version is installed and::
./waf configure --enable-examples --enable-tests
./waf
is rerun.
Usage is almost the same as the non-GTK-based version, but there
are no ConfigStore attributes involved:::
+330
View File
@@ -253,3 +253,333 @@ Here is an example of the usage::
SpecificFunctor<A, int> sf(&a, &A::Hello);
sf(5);
}
.. note:: The previous code is not real ns-3 code. It is simplistic example
code used only to illustrate the concepts involved and to help you understand
the system more. Do not expect to find this code anywhere in the ns-3 tree.
Notice that there are two variables defined in the class above. The m_p
variable is the object pointer and m_pmi is the variable containing the
address of the function to execute.
Notice that when ``operator()`` is called, it in turn calls the method provided
with the object pointer using the C++ PMI syntax.
To use this, one could then declare some model code that takes a generic functor
as a parameter::
void LibraryFunction (Functor functor);
The code that will talk to the model would build a specific functor and pass it to ``LibraryFunction``::
MyClass myClass;
SpecificFunctor<MyClass, int> functor (&myclass, MyClass::MyMethod);
When ``LibraryFunction`` is done, it executes the callback using the
``operator()`` on the generic functor it was passed, and in this particular
case, provides the integer argument::
void
LibraryFunction (Functor functor)
{
// Execute the library function
functor(1234);
}
Notice that ``LibraryFunction`` is completely decoupled from the specific
type of the client. The connection is made through the Functor polymorphism.
The Callback API in |ns3| implements object-oriented callbacks using
the functor mechanism. This callback API, being based on C++ templates, is
type-safe; that is, it performs static type checks to enforce proper signature
compatibility between callers and callees. It is therefore more type-safe to
use than traditional function pointers, but the syntax may look imposing at
first. This section is designed to walk you through the Callback system so
that you can be comfortable using it in |ns3|.
Using the Callback API
**********************
The Callback API is fairly minimal, providing only two services:
1. callback type declaration: a way to declare a type of callback
with a given signature, and,
2. callback instantiation: a way to instantiate a
template-generated forwarding callback which can forward any calls
to another C++ class member method or C++ function.
This is best observed via walking through an example, based on
``samples/main-callback.cc``.
Using the Callback API with static functions
++++++++++++++++++++++++++++++++++++++++++++
Consider a function::
static double
CbOne (double a, double b)
{
std::cout << "invoke cbOne a=" << a << ", b=" << b << std::endl;
return a;
}
Consider also the following main program snippet::
int main (int argc, char *argv[])
{
// return type: double
// first arg type: double
// second arg type: double
Callback<double, double, double> one;
}
This is an example of a C-style callback -- one which does not include or need
a ``this`` pointer. The function template ``Callback`` is essentially the
declaration of the variable containing the pointer-to-function. In the example
above, we explicitly showed a pointer to a function that returned an integer and
took a single integer as a parameter, The ``Callback`` template function is
a generic version of that -- it is used to declare the type of a callback.
.. note:: Readers unfamiliar with C++ templates may consult `<http://www.cplusplus.com/doc/tutorial/templates/>`_.
The ``Callback`` template requires one mandatory argument (the return type
of the function to be assigned to this callback) and up to five optional
arguments, which each specify the type of the arguments (if your particular
callback function has more than five arguments, then this can be handled
by extending the callback implementation).
So in the above example, we have a declared a callback named "one" that will
eventually hold a function pointer. The signature of the function that it will
hold must return double and must support two double arguments. If one tries
to pass a function whose signature does not match the declared callback,
a compilation error will occur. Also, if one tries to assign to a callback
an incompatible one, compilation will succeed but a run-time
NS_FATAL_ERROR will be raised. The sample program
``src/core/examples/main-callback.cc`` demonstrates both of these error cases
at the end of the ``main()`` program.
Now, we need to tie together this callback instance and the actual target function
(CbOne). Notice above that CbOne has the same function signature types as the
callback-- this is important. We can pass in any such properly-typed function
to this callback. Let's look at this more closely::
static double CbOne (double a, double b) {}
^ ^ ^
| ---| ------|
| | |
Callback<double, double, double> one;
You can only bind a function to a callback if they have the matching signature.
The first template argument is the return type, and the additional template
arguments are the types of the arguments of the function signature.
Now, let's bind our callback "one" to the function that matches its signature::
// build callback instance which points to cbOne function
one = MakeCallback (&CbOne);
This call to ``MakeCallback`` is, in essence, creating one of the specialized
functors mentioned above. The variable declared using the ``Callback``
template function is going to be playing the part of the generic functor. The
assignment ``one = MakeCallback (&CbOne)`` is the cast that converts the
specialized functor known to the callee to a generic functor known to the caller.
Then, later in the program, if the callback is needed, it can be used as follows::
NS_ASSERT (!one.IsNull ());
// invoke cbOne function through callback instance
double retOne;
retOne = one (10.0, 20.0);
The check for ``IsNull()`` ensures that the callback is not null -- that there
is a function to call behind this callback. Then, ``one()`` executes the
generic ``operator()`` which is really overloaded with a specific implementation
of ``operator()`` and returns the same result as if ``CbOne()`` had been
called directly.
Using the Callback API with member functions
++++++++++++++++++++++++++++++++++++++++++++
Generally, you will not be calling static functions but instead public member
functions of an object. In this case, an extra argument is needed to the
MakeCallback function, to tell the system on which object the function should be
invoked. Consider this example, also from main-callback.cc::
class MyCb {
public:
int CbTwo (double a) {
std::cout << "invoke cbTwo a=" << a << std::endl;
return -5;
}
};
int main ()
{
...
// return type: int
// first arg type: double
Callback<int, double> two;
MyCb cb;
// build callback instance which points to MyCb::cbTwo
two = MakeCallback (&MyCb::CbTwo, &cb);
...
}
Here, we pass an additional object pointer to the ``MakeCallback<>`` function.
Recall from the background section above that ``Operator()`` will use the pointer to
member syntax when it executes on an object::
virtual int operator() (ARG arg)
{
(*m_p.*m_pmi)(arg);
}
And so we needed to provide the two variables (``m_p`` and ``m_pmi``) when
we made the specific functor. The line::
two = MakeCallback (&MyCb::CbTwo, &cb);
does precisely that. In this case, when ``two ()`` is invoked::
int result = two (1.0);
will result in a call tothe ``CbTwo`` member function (method) on the object
pointed to by ``&cb``.
Building Null Callbacks
+++++++++++++++++++++++
It is possible for callbacks to be null; hence it may be wise to
check before using them. There is a special construct for a null
callback, which is preferable to simply passing "0" as an argument;
it is the ``MakeNullCallback<>`` construct::
two = MakeNullCallback<int, double> ();
NS_ASSERT (two.IsNull ());
Invoking a null callback is just like invoking a null function pointer: it will
crash at runtime.
Bound Callbacks
***************
A very useful extension to the functor concept is that of a Bound Callback.
Previously it was mentioned that closures were originally function calls
packaged up for later execution. Notice that in all of the Callback
descriptions above, there is no way to package up any parameters for use
later -- when the ``Callback`` is called via ``operator()``. All of
the parameters are provided by the calling function.
What if it is desired to allow the client function (the one that provides the
callback) to provide some of the parameters? `Alexandrescu <http://erdani.com/book/main.html>`_ calls the process of
allowing a client to specify one of the parameters *"binding"*. One of the
parameters of ``operator()`` has been bound (fixed) by the client.
Some of our pcap tracing code provides a nice example of this. There is a
function that needs to be called whenever a packet is received. This function
calls an object that actually writes the packet to disk in the pcap file
format. The signature of one of these functions will be::
static void DefaultSink (Ptr<PcapFileWrapper> file, Ptr<const Packet> p);
The static keyword means this is a static function which does not need a
``this`` pointer, so it will be using C-style callbacks. We don't want the
calling code to have to know about anything but the Packet. What we want in
the calling code is just a call that looks like::
m_promiscSnifferTrace (m_currentPkt);
What we want to do is to *bind* the ``Ptr<PcapFileWriter> file`` to the
specific callback implementation when it is created and arrange for the
``operator()`` of the Callback to provide that parameter for free.
We provide the ``MakeBoundCallback`` template function for that purpose. It
takes the same parameters as the ``MakeCallback`` template function but also
takes the parameters to be bound. In the case of the example above::
MakeBoundCallback (&DefaultSink, file);
will create a specific callback implementation that knows to add in the extra
bound arguments. Conceptually, it extends the specific functor described above
with one or more bound arguments::
template <typename T, typename ARG, typename BOUND_ARG>
class SpecificFunctor : public Functor
{
public:
SpecificFunctor(T* p, int (T::*_pmi)(ARG arg), BOUND_ARG boundArg)
{
m_p = p;
m_pmi = pmi;
m_boundArg = boundArg;
}
virtual int operator() (ARG arg)
{
(*m_p.*m_pmi)(m_boundArg, arg);
}
private:
void (T::*m_pmi)(ARG arg);
T* m_p;
BOUND_ARG m_boundArg;
};
You can see that when the specific functor is created, the bound argument is saved
in the functor / callback object itself. When the ``operator()`` is invoked with
the single parameter, as in::
m_promiscSnifferTrace (m_currentPkt);
the implementation of ``operator()`` adds the bound parameter into the actual
function call::
(*m_p.*m_pmi)(m_boundArg, arg);
Traced Callbacks
****************
*Placeholder subsection*
Callback locations in ns-3
**************************
Where are callbacks frequently used in |ns3|? Here are some of the
more visible ones to typical users:
* Socket API
* Layer-2/Layer-3 API
* Tracing subsystem
* API between IP and routing subsystems
Implementation details
**********************
The code snippets above are simplistic and only designed to illustrate the mechanism
itself. The actual Callback code is quite complicated and very template-intense and
a deep understanding of the code is not required. If interested, expert users may
find the following useful.
The code was originally written based on the techniques described in
`<http://www.codeproject.com/cpp/TTLFunction.asp>`_.
It was subsequently rewritten to follow the architecture outlined in
`Modern C++ Design, Generic Programming and Design Patterns Applied, Alexandrescu, chapter 5, Generalized Functors <http://www.moderncppdesign.com/book/main.html>`_.
This code uses:
* default template parameters to saves users from having to
specify empty parameters when the number of parameters
is smaller than the maximum supported number
* the pimpl idiom: the Callback class is passed around by
value and delegates the crux of the work to its pimpl pointer.
* two pimpl implementations which derive from CallbackImpl
FunctorCallbackImpl can be used with any functor-type
while MemPtrCallbackImpl can be used with pointers to
member functions.
* a reference list implementation to implement the Callback's
value semantics.
This code most notably departs from the Alexandrescu implementation in that it
does not use type lists to specify and pass around the types of the callback
arguments. Of course, it also does not use copy-destruction semantics and
relies on a reference list rather than autoPtr to hold the pointer.
+5 -5
View File
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'ns3_html_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -99,11 +99,11 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['../..']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = 'Manual'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
@@ -124,7 +124,7 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%b %d, %Y %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -184,7 +184,7 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
latex_logo = '../../ns3_html_theme/static/ns-3.png'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
+199
View File
@@ -0,0 +1,199 @@
.. include:: replace.txt
.. heading hierarchy:
------------- Chapter
************* Section (#.#)
============= Subsection (#.#.#)
############# Paragraph (no number)
Events and Simulator
--------------------
|ns3| is a discrete-event network simulator. Conceptually, the simulator
keeps track of a number of events that are scheduled to execute at a
specified simulation time. The job of the simulator is to execute the
events in sequential time order. Once the completion of an event occurs,
the simulator will move to the next event (or will exit if there are no
more events in the event queue). If, for example, an event scheduled
for simulation time "100 seconds" is executed, and the next event is not
scheduled until "200 seconds", the simulator will immediately jump from
100 seconds to 200 seconds (of simulation time) to execute the next event.
This is what is meant by "discrete-event" simulator.
To make this all happen, the simulator needs a few things:
1) a simulator object that can access an event queue where events are
stored and that can manage the execution of events
2) a scheduler responsible for inserting and removing events from the queue
3) a way to represent simulation time
4) the events themselves
This chapter of the manual describes these fundamental objects
(simulator, scheduler, time, event) and how they are used.
Event
*****
*To be completed*
Simulator
*********
The Simulator class is the public entry point to access event scheduling
facilities. Once a couple of events have been scheduled to start the
simulation, the user can start to execute them by entering the simulator
main loop (call Simulator::Run). Once the main loop starts running, it
will sequentially execute all scheduled events in order from oldest to
most recent until there are either no more events left in the event
queue or Simulator::Stop has been called.
To schedule events for execution by the simulator main loop, the
Simulator class provides the Simulator::Schedule* family of functions.
1) Handling event handlers with different signatures
These functions are declared and implemented as C++ templates to handle
automatically the wide variety of C++ event handler signatures used in
the wild. For example, to schedule an event to execute 10 seconds in the
future, and invoke a C++ method or function with specific arguments, you
might write this:
::
void handler (int arg0, int arg1)
{
std::cout << "handler called with argument arg0=" << arg0 << " and
arg1=" << arg1 << std::endl;
}
Simulator::Schedule(Seconds(10), &handler, 10, 5);
Which will output:
::
handler called with argument arg0=10 and arg1=5
Of course, these C++ templates can also handle transparently member
methods on C++ objects:
*To be completed: member method example*
Notes:
* the ns-3 Schedule methods recognize automatically functions and
methods only if they take less than 5 arguments. If you need them to
support more arguments, please, file a bug report.
* Readers familiar with the term 'fully-bound functors' will recognize
the Simulator::Schedule methods as a way to automatically construct such
objects.
2) Common scheduling operations
The Simulator API was designed to make it really simple to schedule most
events. It provides three variants to do so (ordered from most commonly
used to least commonly used):
* Schedule methods which allow you to schedule an event in the future
by providing the delay between the current simulation time and the
expiration date of the target event.
* ScheduleNow methods which allow you to schedule an event for the
current simulation time: they will execute _after_ the current event is
finished executing but _before_ the simulation time is changed for the
next event.
* ScheduleDestroy methods which allow you to hook in the shutdown
process of the Simulator to cleanup simulation resources: every
'destroy' event is executed when the user calls the Simulator::Destroy
method.
3) Maintaining the simulation context
There are two basic ways to schedule events, with and without *context*.
What does this mean?
::
Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj);
vs.
::
Simulator::ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj);
Readers who invest time and effort in developing or using a non-trivial
simulation model will know the value of the ns-3 logging framework to
debug simple and complex simulations alike. One of the important
features that is provided by this logging framework is the automatic
display of the network node id associated with the 'currently' running
event.
The node id of the currently executing network node is in fact tracked
by the Simulator class. It can be accessed with the
Simulator::GetContext method which returns the 'context' (a 32-bit
integer) associated and stored in the currently-executing event. In some
rare cases, when an event is not associated with a specific network
node, its 'context' is set to 0xffffffff.
To associate a context to each event, the Schedule, and ScheduleNow
methods automatically reuse the context of the currently-executing event
as the context of the event scheduled for execution later.
In some cases, most notably when simulating the transmission of a packet
from a node to another, this behavior is undesirable since the expected
context of the reception event is that of the receiving node, not the
sending node. To avoid this problem, the Simulator class provides a
specific schedule method: ScheduleWithContext which allows one to
provide explicitly the node id of the receiving node associated with
the receive event.
*XXX: code example*
In some very rare cases, developers might need to modify or understand
how the context (node id) of the first event is set to that of its
associated node. This is accomplished by the NodeList class: whenever a
new node is created, the NodeList class uses ScheduleWithContext to
schedule a 'start' event for this node. The 'start' event thus executes
with a context set to that of the node id and can use the normal variety
of Schedule methods. It invokes the Node::Start method which propagates
the 'start' event by calling the DoStart method for each object
associated with the node. The DoStart method overridden in some of these
objects (most notably in the Application base class) will schedule some
events (most notably Application::StartApplication) which will in turn
scheduling traffic generation events which will in turn schedule
network-level events.
Notes:
* Users need to be careful to propagate DoStart methods across objects
by calling Start explicitely on their member objects
* The context id associated with each ScheduleWithContext method has
other uses beyond logging: it is used by an experimental branch of ns-3
to perform parallel simulation on multicore systems using
multithreading.
The Simulator::* functions do not know what the context is: they
merely make sure that whatever context you specify with
ScheduleWithContext is available when the corresponding event executes
with ::GetContext.
It is up to the models implemented on top of Simulator::* to interpret
the context value. In ns-3, the network models interpret the context
as the node id of the node which generated an event. This is why it is
important to call ScheduleWithContext in ns3::Channel subclasses
because we are generating an event from node i to node j and we want
to make sure that the event which will run on node j has the right
context.
Time
****
*To be completed*
Scheduler
*********
*To be completed*
+88 -6
View File
@@ -11,10 +11,11 @@ be asked to contribute test code. Models that you contribute will be
used for many years by other people, who probably have no idea upon
first glance whether the model is correct. The test code that you
write for your model will help to avoid future regressions in
the output and will aid future users in understanding the validity
the output and will aid future users in understanding the verification
and bounds of applicability of your models.
There are many ways to test that a model is valid. In this chapter,
There are many ways to verify the correctness of a model's implementation.
In this section,
we hope to cover some common cases that can be used as a guide to
writing new tests.
@@ -31,15 +32,96 @@ TestSuite), these things need to be decided up front:
separately in src/test/ directory). You will have to edit the wscript
file in that directory to compile your new code, if it is a new file.
See the file ``src/template/test/sample-test-suite.cc`` and corresponding
wscript file in that directory for a simple example, and see the directories
under ``src/test`` for more complicated examples.
A program called ``src/create-module.py`` is a good starting point.
This program can be invoked such as ``create-module.py router`` for
a hypothetical new module called ``router``. Once you do this, you
will see a ``router`` directory, and a ``test/router-test-suite.cc``
test suite. This file can be a starting point for your initial test.
This is a working test suite, although the actual tests performed are
trivial. Copy it over to your module's test directory, and do a global
substitution of "Router" in that file for something pertaining to
the model that you want to test. You can also edit things such as a
more descriptive test case name.
*The rest of this chapter remains to be written*
You also need to add a block into your wscript to get this test to
compile:
::
module_test.source = [
'test/router-test-suite.cc',
]
Before you actually start making this do useful things, it may help
to try to run the skeleton. Make sure that ns-3 has been configured with
the "--enable-tests" option. Let's assume that your new test suite
is called "router" such as here:
::
RouterTestSuite::RouterTestSuite ()
: TestSuite ("router", UNIT)
Try this command:
::
./test.py -s router
Output such as below should be produced:
::
PASS: TestSuite router
1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)
See src/lte/test/test-lte-antenna.cc for a worked example.
Test macros
***********
There are a number of macros available for checking test program
output with expected output. These macros are defined in
``src/core/model/test.h``.
The main set of macros that are used include the following:
::
NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
NS_TEST_ASSERT_MSG_LT(actual, limit, msg)
NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
The first argument ``actual`` is the value under test, the second value
``limit`` is the expected value (or the value to test against), and the
last argument ``msg`` is the error message to print out if the test fails.
The first four macros above test for equality, inequality, less than, or
greater than, respectively. The fifth macro above tests for equality,
but within a certain tolerance. This variant is useful when testing
floating point numbers for equality against a limit, where you want to
avoid a test failure due to rounding errors.
Finally, there are variants of the above where the keyword ``ASSERT``
is replaced by ``EXPECT``. These variants are designed specially for
use in methods (especially callbacks) returning void. Reserve their
use for callbacks that you use in your test programs; otherwise,
use the ``ASSERT`` variants.
How to add an example program to the test suite
***********************************************
One can "smoke test" that examples compile and run successfully
to completion (without memory leaks) using the ``examples-to-run.py``
script located in your module's test directory. Briefly, by including
an instance of this file in your test directory, you can cause the
test runner to execute the examples listed. It is usually best to make
sure that you select examples that have reasonably short run times so as
to not bog down the tests. See the example in ``src/lte/test/``
directory.
Testing for boolean outcomes
****************************
+1
View File
@@ -18,6 +18,7 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
organization
random-variables
events
callbacks
object-model
attributes
+153 -2
View File
@@ -1,7 +1,158 @@
.. include:: replace.txt
.. heading hierarchy:
------------- Chapter
************* Section (#.#)
============= Subsection (#.#.#)
############# Paragraph (no number)
Logging
-------
*This chapter not yet written. For now, the ns-3 tutorial contains logging
information.*
The |ns3| logging facility can be used to monitor or debug the progress
of simulation programs. Logging output can be enabled by program statements
in your ``main()`` program or by the use of the ``NS_LOG`` environment variable.
Logging statements are not compiled into optimized builds of |ns3|. To use
logging, one must build the (default) debug build of |ns3|.
The project makes no guarantee about whether logging output will remain
the same over time. Users are cautioned against building simulation output
frameworks on top of logging code, as the output and the way the output
is enabled may change over time.
Logging overview
****************
|ns3| logging statements are typically used to log various program
execution events, such as the occurrence of simulation events or the
use of a particular function.
For example, this code snippet is from ``Ipv4L3Protocol::IsDestinationAddress()``:
::
if (address == iaddr.GetBroadcast ())
{
NS_LOG_LOGIC ("For me (interface broadcast address)");
return true;
}
If logging has been enabled for the ``Ipv4L3Protocol`` component at a level
of ``LOGIC`` or above (see below about logging levels), the statement
will be printed out; otherwise, it will be suppressed.
Logging levels
==============
The following levels are defined; each level will enable the levels above
it, with the ``ALL`` level being most verbose:
#. ``LOG_NONE``: the default, no logging
#. ``LOG_ERROR``: serious error messages only
#. ``LOG_WARN``: warning messages
#. ``LOG_DEBUG``: for use in debugging
#. ``LOG_FUNCTION``: function tracing
#. ``LOG_LOGIC``: control flow tracing within functions
#. ``LOG_ALL``: print everything
A special logging level will cause logging output to unconditionally
appear on ``std::clog``, regardless of whether the user has explicitly enabled
logging.
This macro, ``NS_LOG_UNCOND()``, can be used like a kind of ``printf()`` in
your code. An example can be found in ``scratch/scratch-simulator.cc``:
::
NS_LOG_UNCOND ("Scratch Simulator");
Logging prefixes
================
This section still needs documentation; bug 1496 is open on this:
::
$ NS_LOG="*=all|prefix_all" ./waf --run scratch-simulator
Scratch Simulator
ScratchSimulator:main(): [ERROR] error message
ScratchSimulator:main(): [WARN] warn message
ScratchSimulator:main(): [DEBUG] debug message
ScratchSimulator:main(): [INFO] info message
ScratchSimulator:main(function)
ScratchSimulator:main(): [LOGIC] logic message
Enabling logging output
=======================
There are two ways that users typically control logging output. The
first is by setting an ``NS_LOG`` environment variable; e.g.:
::
NS_LOG="*" ./waf --run first
will run the first tutorial program with all logging output. This can
be made more granular by selecting individual components:
::
NS_LOG="Ipv4L3Protocol" ./waf --run first
The second way to enable this is to use explicit statements in your
program, such as in the first tutorial program:
::
int
main (int argc, char *argv[])
{
LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);
...
Some helpers have special methods to enable the logging of all components
in a module (across different compilation units, but logically grouped
together such as the |ns3| wifi code:
::
WifiHelper wifiHelper;
wifiHelper.EnableLogComponents ();
How to add logging to your code
*******************************
To add logging to your code, please follow the below steps:
1) Put ``NS_LOG_COMPONENT_DEFINE`` macro outside 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
such as follows:
::
NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
namespace ns3 {
...
The macro was carefully written to permit inclusion either within or
outside of namespace ``ns3``, and usage will vary across the codebase, but
the original intent was to register this *outside* of namespace ``ns3``.
2) Add logging statements to your functions and function bodies.
There are a couple of guidelines on this:
* Do *not* add function logging in operators or explicit copy constructors,
since these will cause infinite recursion and stack overflow.
* Use the ``NS_LOG_FUNCTION_NOARGS()`` variant for static methods *only*. When
a non-static member function has no arguments, it should be logged by
``NS_LOG_FUNCTION (this)`` macro.
* Make sure that you test that your logging changes do not break the code;
running some example programs with all log components turned on (e.g.
``NS_LOG="*"``) is one way to test this.
+1 -10
View File
@@ -174,7 +174,7 @@ sort, it makes sense to put it into the ``src/`` directory somewhere,
particularly for ease of integrating with the build system.
In the case of the error model, it is very related to the packet class, so it
makes sense to implement this in the ``src/network/model`` directory where |ns3|
makes sense to implement this in the ``src/network/`` module where |ns3|
packets are implemented.
waf and wscript
@@ -394,15 +394,6 @@ test program 1
Object Framework
++++++++++++++++
::
static const ClassId cid;
const InterfaceId ErrorModel::iid =
MakeInterfaceId ("ErrorModel", Object::iid);
const ClassId ErrorModel::cid =
MakeClassId<ErrorModel> ("ErrorModel", ErrorModel::iid);
Adding-a-sample-script
**********************
+103 -55
View File
@@ -12,7 +12,7 @@ Quick Overview
**************
|ns3| random numbers are provided via instances of
:cpp:class:`ns3::RandomVariable`.
:cpp:class:`ns3::RandomVariableStream`.
* by default, |ns3| simulations use a fixed seed; if there is any randomness in
the simulation, each run of the program will yield identical results unless
@@ -21,13 +21,18 @@ Quick Overview
* in *ns-3.3* and earlier, |ns3| simulations used a random seed by default; this
marks a change in policy starting with *ns-3.4*.
* in *ns-3.14* and earlier, |ns3| simulations used a different wrapper class
called :cpp:class:`ns3::RandomVariable`. As of *ns-3.15*, this class has been
replaced by :cpp:class:`ns3::RandomVariableStream`; the underlying pseudo-random
number generator has not changed.
* to obtain randomness across multiple simulation runs, you must either set the
seed differently or set the run number differently. To set a seed, call
:cpp:func:`ns3::SeedManager::SetSeed` at the beginning of the program; to set
a run number with the same seed, call :cpp:func:`ns3::SeedManager::SetRun` at
:cpp:func:`ns3::RngSeedManager::SetSeed` at the beginning of the program; to set
a run number with the same seed, call :cpp:func:`ns3::RngSeedManager::SetRun` at
the beginning of the program; see :ref:`seeding-and-independent-replications`.
* each RandomVariable used in |ns3| has a virtual random number generator
* each RandomVariableStream used in |ns3| has a virtual random number generator
associated with it; all random variables use either a fixed or random seed
based on the use of the global seed (previous bullet);
@@ -82,14 +87,14 @@ period (*i.e.*, the number of random numbers before overlap) of
:math:`7.6x10^{22}`. The period of the entire generator is :math:`3.1x10^{57}`.
Class :cpp:class:`ns3::RandomVariable` is the public interface to this
underlying random number generator. When users create new ``RandomVariables``
(such as :cpp:class:`ns3::UniformVariable`,
:cpp:class:`ns3::ExponentialVariable`, etc.), they create an object that uses
Class :cpp:class:`ns3::RandomVariableStream` is the public interface to this
underlying random number generator. When users create new random variables
(such as :cpp:class:`ns3::UniformRandomVariable`,
:cpp:class:`ns3::ExponentialRandomVariable`, etc.), they create an object that uses
one of the distinct, independent streams of the random number generator.
Therefore, each object of type :cpp:class:`ns3::RandomVariable` has,
Therefore, each object of type :cpp:class:`ns3::RandomVariableStream` has,
conceptually, its own "virtual" RNG. Furthermore, each
:cpp:class:`ns3::RandomVariable` can be configured to use one of the set of
:cpp:class:`ns3::RandomVariableStream` can be configured to use one of the set of
substreams drawn from the main stream.
An alternate implementation would be to allow each RandomVariable to have its
@@ -115,15 +120,15 @@ so as to compute statistics on a large number of independent runs. The user can
either change the global seed and rerun the simulation, or can advance the
substream state of the RNG, which is referred to as incrementing the run number.
A class :cpp:class:`ns3::SeedManager` provides an API to control the seeding and
A class :cpp:class:`ns3::RngSeedManager` provides an API to control the seeding and
run number behavior. This seeding and substream state setting must be called
before any random variables are created; e.g::
SeedManager::SetSeed (3); // Changes seed from default of 1 to 3
SeedManager::SetRun (7); // Changes run number from default of 1 to 7
RngSeedManager::SetSeed (3); // Changes seed from default of 1 to 3
RngSeedManager::SetRun (7); // Changes run number from default of 1 to 7
// Now, create random variables
UniformVariable x(0,10);
ExponentialVariable y(2902);
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
Ptr<ExponentialRandomVariable> y = CreateObject<ExponentialRandomVarlable> ();
...
Which is better, setting a new seed or advancing the substream state? There is
@@ -154,16 +159,16 @@ or, if you are running programs directly outside of waf::
The above command-line variants make it easy to run lots of different
runs from a shell script by just passing a different RngRun index.
Class RandomVariable
********************
Class RandomVariableStream
**************************
All random variables should derive from class :cpp:class:`RandomVariable`. This
base class provides a few static methods for globally configuring the behavior
base class provides a few methods for globally configuring the behavior
of the random number generator. Derived classes provide API for drawing random
variates from the particular distribution being supported.
Each RandomVariable created in the simulation is given a generator that is a new
RNGStream from the underlying PRNG. Used in this manner, the L'Ecuyer
Each RandomVariableStream created in the simulation is given a generator that is a
new RNGStream from the underlying PRNG. Used in this manner, the L'Ecuyer
implementation allows for a maximum of :math:`1.8x10^19` random variables. Each
random variable in a single replication can produce up to :math:`7.6x10^22`
random numbers before overlapping.
@@ -171,7 +176,7 @@ random numbers before overlapping.
Base class public API
*********************
Below are excerpted a few public methods of class :cpp:class:`RandomVariable`
Below are excerpted a few public methods of class :cpp:class:`RandomVariableStream`
that access the next value in the substream.::
/**
@@ -181,7 +186,7 @@ that access the next value in the substream.::
double GetValue (void) const;
/**
* \brief Returns a random integer integer from the underlying distribution
* \brief Returns a random integer from the underlying distribution
* \return Integer cast of ::GetValue()
*/
uint32_t GetInteger (void) const;
@@ -193,36 +198,33 @@ Types of RandomVariables
************************
The following types of random variables are provided, and are documented in the
|ns3| Doxygen or by reading ``src/core/model/random-variable.h``. Users can also
create their own custom random variables by deriving from class
:cpp:class:`RandomVariable`.
|ns3| Doxygen or by reading ``src/core/model/random-variable-stream.h``. Users
can also create their own custom random variables by deriving from class
:cpp:class:`RandomVariableStream`.
* class :cpp:class:`UniformVariable`
* class :cpp:class:`ConstantVariable`
* class :cpp:class:`SequentialVariable`
* class :cpp:class:`ExponentialVariable`
* class :cpp:class:`ParetoVariable`
* class :cpp:class:`WeibullVariable`
* class :cpp:class:`NormalVariable`
* class :cpp:class:`EmpiricalVariable`
* class :cpp:class:`IntEmpiricalVariable`
* class :cpp:class:`DeterministicVariable`
* class :cpp:class:`LogNormalVariable`
* class :cpp:class:`TriangularVariable`
* class :cpp:class:`GammaVariable`
* class :cpp:class:`ErlangVariable`
* class :cpp:class:`ZipfVariable`
* class :cpp:class:`UniformRandomVariable`
* class :cpp:class:`ConstantRandomVariable`
* class :cpp:class:`SequentialRandomVariable`
* class :cpp:class:`ExponentialRandomVariable`
* class :cpp:class:`ParetoRandomVariable`
* class :cpp:class:`WeibullRandomVariable`
* class :cpp:class:`NormalRandomVariable`
* class :cpp:class:`LogNormalRandomVariable`
* class :cpp:class:`GammaRandomVariable`
* class :cpp:class:`ErlangRandomVariable`
* class :cpp:class:`TriangularRandomVariable`
* class :cpp:class:`ZipfRandomVariable`
* class :cpp:class:`ZetaRandomVariable`
* class :cpp:class:`DeterministicRandomVariable`
* class :cpp:class:`EmpiricalRandomVariable`
Semantics of RandomVariable objects
***********************************
Semantics of RandomVariableStream objects
*****************************************
RandomVariable objects have value semantics. This means that they can be passed
by value to functions. The can also be passed by reference to const.
RandomVariables do not derive from :cpp:class:`ns3::Object` and we do not use
smart pointers to manage them; they are either allocated on the stack or else
users explicitly manage any heap-allocated RandomVariables.
RandomVariableStream objects derive from :cpp:class:`ns3::Object` and are
handled by smart pointers.
RandomVariable objects can also be used in |ns3| attributes, which means
RandomVariableStream instances can also be used in |ns3| attributes, which means
that values can be set for them through the |ns3| attribute system.
An example is in the propagation models for WifiNetDevice:::
@@ -234,15 +236,15 @@ An example is in the propagation models for WifiNetDevice:::
.AddConstructor<RandomPropagationDelayModel> ()
.AddAttribute ("Variable",
"The random variable which generates random delays (s).",
RandomVariableValue (UniformVariable (0.0, 1.0)),
MakeRandomVariableAccessor (&RandomPropagationDelayModel::m_variable),
MakeRandomVariableChecker ())
StringValue ("ns3::UniformRandomVariable"),
MakePointerAccessor (&RandomPropagationDelayModel::m_variable),
MakePointerChecker<RandomVariableStream> ())
;
return tid;
}
Here, the |ns3| user can change the default random variable for this
delay model (which is a UniformVariable ranging from 0 to 1) through
delay model (which is a UniformRandomVariable ranging from 0 to 1) through
the attribute system.
Using other PRNG
@@ -252,10 +254,56 @@ There is presently no support for substituting a different underlying
random number generator (e.g., the GNU Scientific Library or the Akaroa
package). Patches are welcome.
More advanced usage
*******************
Setting the stream number
*************************
*To be completed.*
The underlying MRG32k3a generator provides 2^64 independent streams.
In ns-3, these are assigned sequentially starting from the first stream as
new RandomVariableStream instances make their first call to GetValue().
As a result of how these RandomVariableStream objects are assigned to
underlying streams, the assignment is sensitive to perturbations of
the simulation configuration. The consequence is that if any aspect of the
simulation configuration is changed, the mapping of RandomVariables to
streams may (or may not) change.
As a concrete example, a user running a comparative study between routing
protocols may find that the act of changing one routing protocol for another
will notice that the underlying mobility pattern also changed.
Starting with ns-3.15, some control has been provided to users to allow
users to optionally fix the assignment of selected RandomVariableStream
objects to underlying streams. This is the ``Stream`` attribute, part
of the base class RandomVariableStream.
By partitioning the existing sequence of streams from before:
::
<-------------------------------------------------------------------------->
stream 0 stream (2^64 - 1)
into two equal-sized sets:
::
<--------------------------------------------------------------------------->
^ ^^ ^
| || |
stream 0 stream (2^63 - 1) stream 2^63 stream (2^64 - 1)
<- automatically assigned -----><-------- assigned by user----------->
The first 2^63 streams continue to be automatically assigned, while
the last 2^63 are given stream indices starting with zero up to
2^63-1.
The assignment of streams to a fixed stream number is optional; instances
of RandomVariableStream that do not have a stream value assigned will
be assigned the next one from the pool of automatic streams.
To fix a RandomVariableStream to a particular underlying stream, assign
its ``Stream`` attribute to a non-negative integer (the default value
of -1 means that a value will be automatically allocated).
Publishing your results
***********************
+92 -43
View File
@@ -115,7 +115,8 @@ if you run ``test.py --help`` you should see a command summary like:
-c KIND, --constrain=KIND
constrain the test-runner by kind of test
-e EXAMPLE, --example=EXAMPLE
specify a single example to run (with relative path)
specify a single example to run (no relative path is
needed)
-g, --grind run the test suites and examples using valgrind
-k, --kinds print the kinds of tests available
-l, --list print the list of known tests
@@ -165,6 +166,12 @@ to be specified. Running the command
./test.py --suite=ns3-wifi-propagation-loss-models
or equivalently
::
./test.py -s ns3-wifi-propagation-loss-models
results in that single test suite being run.
::
@@ -279,12 +286,12 @@ Any of these listed suites can be selected to be run by itself using the
Similarly to test suites, one can run a single C++ example program
using the ``--example`` option. Note that the relative path for the
example must be included and that the executables built for C++
examples do not have extensions. Entering
example does not need to be included and that the executables built
for C++ examples do not have extensions. Entering
::
./test.py --example=examples/udp/udp-echo
./test.py --example=udp-echo
results in that single example being run.
@@ -297,7 +304,7 @@ You can specify the directory where ns-3 was built using the
::
./test.py --buildpath=/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug --example=examples/wireless/wifi-simple-adhoc
./test.py --buildpath=/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug --example=wifi-simple-adhoc
One can run a single Python example program using the ``--pyexample``
option. Note that the relative path for the example must be included
@@ -457,10 +464,31 @@ Performance tests are those which exercise a particular part of the system
and determine if the tests have executed to completion in a reasonable time.
Running Tests
+++++++++++++
*************
Tests are typically run using the high level ``test.py`` program. To get a list of the available command-line options, run ``test.py --help``
The test program ``test.py`` will run both tests and those examples that
have been added to the list to check. The difference between tests
and examples is as follows. Tests generally check that specific simulation
output or events conforms to expected behavior. In contrast, the output
of examples is not checked, and the test program merely checks the exit
status of the example program to make sure that it runs without error.
Briefly, to run all tests, first one must configure tests during configuration
stage, and also (optionally) examples if examples are to be checked:
::
./waf --configure --enable-examples --enable-tests
Then, build ns-3, and after it is built, just run ``test.py``. ``test.py -h``
will show a number of configuration options that modify the behavior
of test.py.
The program ``test.py`` invokes, for C++ tests and examples, a lower-level
C++ program called ``test-runner`` to actually run the tests. As discussed
below, this ``test-runner`` can be a helpful way to debug tests.
Debugging Tests
***************
@@ -541,7 +569,10 @@ directory tree looking for a directory file with files named ``VERSION`` and
``LICENSE.`` If it finds one, it assumes that must be the basedir and provides
it for you.
Similarly, many test suites need to write temporary files (such as pcap files)
Test output
+++++++++++
Many test suites need to write temporary files (such as pcap files)
in the process of running the tests. The tests then need a temporary directory
to write to. The Python test utility (test.py) will provide a temporary file
automatically, but if run stand-alone this temporary directory must be provided.
@@ -563,6 +594,20 @@ The time is provided as a hint so that you can relatively easily reconstruct
what directory was used if you need to go back and look at the files that were
placed in that directory.
Another class of output is test output like pcap traces that are generated
to compare to reference output. The test program will typically delete
these after the test suites all run. To disable the deletion of test
output, run ``test.py`` with the "retain" option:
::
./test.py -r
and test output can be found in the ``testpy-output/`` directory.
Reporting of test failures
++++++++++++++++++++++++++
When you run a test suite using the test-runner it will run the test quietly
by default. The only indication that you will get that the test passed is
the *absence* of a message from ``waf`` saying that the program
@@ -621,6 +666,41 @@ also not a complete XML file since test suites are designed to have their
output appended to a master XML status file as described in the ``test.py``
section.
Debugging test suite failures
+++++++++++++++++++++++++++++
To debug test crashes, such as::
CRASH: TestSuite ns3-wifi-interference
You can access the underlying test-runner program via gdb as follows, and
then pass the "--basedir=`pwd`" argument to run (you can also pass other
arguments as needed, but basedir is the minimum needed)::
./waf --command-template="gdb %s" --run "test-runner"
Waf: Entering directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
Waf: Leaving directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
'build' finished successfully (0.380s)
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
L cense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) r --basedir=`pwd`
Starting program: <..>/build/debug/utils/test-runner --basedir=`pwd`
[Thread debugging using libthread_db enabled]
assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0"
...
Here is another example of how to use valgrind to debug a memory problem
such as::
VALGR: TestSuite devices-mesh-dot11s-regression
./waf --command-template="valgrind %s --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner
Class TestRunner
****************
@@ -706,7 +786,7 @@ case a name and override the ``DoRun`` method to run the test.
}
Utilities
+++++++++
*********
There are a number of utilities of various kinds that are also part of the
testing framework. Examples include a generalized pcap file useful for
@@ -714,37 +794,6 @@ storing test vectors; a generic container useful for transient storage of
test vectors during test execution; and tools for generating presentations
based on validation and verification testing results.
Debugging test suite failures
+++++++++++++++++++++++++++++
To debug test crashes, such as::
CRASH: TestSuite ns3-wifi-interference
You can access the underlying test-runner program via gdb as follows, and
then pass the "--basedir=`pwd`" argument to run (you can also pass other
arguments as needed, but basedir is the minimum needed)::
./waf --command-template="gdb %s" --run "test-runner"
Waf: Entering directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
Waf: Leaving directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
'build' finished successfully (0.380s)
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
L cense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) r --basedir=`pwd`
Starting program: <..>/build/debug/utils/test-runner --basedir=`pwd`
[Thread debugging using libthread_db enabled]
assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0"
...
Here is another example of how to use valgrind to debug a memory problem
such as::
VALGR: TestSuite devices-mesh-dot11s-regression
./waf --command-template="valgrind %s --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner
These utilities are not documented here, but for example, please see
how the TCP tests found in ``src/test/ns3tcp/`` use pcap files and reference
output.
+8 -8
View File
@@ -26,7 +26,7 @@ output, as in, ::
int main ()
{
...
std::cout << ``The value of x is `` << x << std::endl;
std::cout << "The value of x is " << x << std::endl;
...
}
@@ -109,11 +109,11 @@ The Simplest Example
It will be useful to go walk a quick example just to reinforce what we've
said.::
#include ``ns3/object.h''
#include ``ns3/uinteger.h''
#include ``ns3/traced-value.h''
#include ``ns3/trace-source-accessor.h''
#include "ns3/object.h"
#include "ns3/uinteger.h"
#include "ns3/traced-value.h""
#include "ns3/trace-source-accessor.h"
#include <iostream>
@@ -167,7 +167,7 @@ callback process.::
void
IntTrace (Int oldValue, Int newValue)
{
std::cout << ``Traced `` << oldValue << `` to `` << newValue << std::endl;
std::cout << "Traced " << oldValue << " to " << newValue << std::endl;
}
This is the definition of the trace sink. It corresponds directly to a callback
@@ -199,7 +199,7 @@ context for now since it is not important yet.
Finally, the line,::
myObject->m_myInt = 1234;
myObject->m_myInt = 1234;
should be interpreted as an invocation of ``operator=`` on the member variable
``m_myInt`` with the integer :math:`1234` passed as a parameter. It turns out
+27 -22
View File
@@ -24,6 +24,7 @@ SOURCES = \
$(SRC)/aodv/doc/aodv.rst \
$(SRC)/applications/doc/applications.rst \
$(SRC)/bridge/doc/bridge.rst \
$(SRC)/brite/doc/brite.rst \
$(SRC)/buildings/doc/source/buildings.rst \
$(SRC)/buildings/doc/source/buildings-design.rst \
$(SRC)/buildings/doc/source/buildings-user.rst \
@@ -49,6 +50,7 @@ SOURCES = \
$(SRC)/network/doc/packets.rst \
$(SRC)/network/doc/sockets-api.rst \
$(SRC)/network/doc/simple.rst \
$(SRC)/network/doc/queue.rst \
$(SRC)/internet/doc/internet-stack.rst \
$(SRC)/internet/doc/ipv4.rst \
$(SRC)/internet/doc/ipv6.rst \
@@ -87,20 +89,19 @@ SOURCEFIGS = \
$(SRC)/wifi/doc/WifiArchitecture.dia \
$(SRC)/wifi/doc/snir.dia \
$(SRC)/wimax/doc/WimaxArchitecture.dia \
$(SRC)/lte/doc/source/figures/ff-mac-saps.dia \
$(SRC)/lte/doc/source/figures/ff-example.dia \
$(SRC)/lte/doc/source/figures/lte-enb-architecture.dia \
$(SRC)/lte/doc/source/figures/lte-ue-architecture.dia \
$(SRC)/lte/doc/source/figures/epc-profiling-scenario.dia \
$(SRC)/lte/doc/source/figures/eutran-profiling-scenario.dia \
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
$(SRC)/lte/doc/source/figures/epc-topology.dia \
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
$(SRC)/lte/doc/source/figures/epc-data-flow-ul.dia \
$(SRC)/lte/doc/source/figures/epc-profiling-scenario.dia \
$(SRC)/lte/doc/source/figures/epc-topology.dia \
$(SRC)/lte/doc/source/figures/eutran-profiling-scenario.dia \
$(SRC)/lte/doc/source/figures/ff-example.dia \
$(SRC)/lte/doc/source/figures/ff-mac-saps.dia \
$(SRC)/lte/doc/source/figures/lte-arch-data-rrc-pdcp-rlc.dia \
$(SRC)/lte/doc/source/figures/lte-enb-architecture.dia \
$(SRC)/lte/doc/source/figures/lte-epc-e2e-data-protocol-stack.dia \
$(SRC)/lte/doc/source/figures/MCS_2_test.eps \
$(SRC)/lte/doc/source/figures/MCS_12_test.eps \
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
$(SRC)/lte/doc/source/figures/lte-ue-architecture.dia \
$(SRC)/lte/doc/source/figures/lte-subframe-structure.dia \
$(SRC)/lte/doc/source/figures/lena-dual-stripe.eps \
$(SRC)/lte/doc/source/figures/lte-mcs-index.eps \
$(SRC)/lte/doc/source/figures/lenaThrTestCase1.eps \
@@ -151,6 +152,8 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/helpers.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
$(SRC)/lte/doc/source/figures/lte-phy-interference.seqdiag \
$(SRC)/lte/doc/source/figures/helpers.seqdiag \
$(SRC)/uan/doc/auvmobility-classes.dia \
$(SRC)/stats/doc/Stat-framework-arch.png \
$(SRC)/stats/doc/Wifi-default.png \
@@ -194,20 +197,19 @@ IMAGES_EPS = \
$(FIGURES)/WifiArchitecture.eps \
$(FIGURES)/snir.eps \
$(FIGURES)/WimaxArchitecture.eps \
$(FIGURES)/ff-mac-saps.eps \
$(FIGURES)/ff-example.eps \
$(FIGURES)/lte-enb-architecture.eps \
$(FIGURES)/lte-ue-architecture.eps \
$(FIGURES)/epc-profiling-scenario.eps \
$(FIGURES)/eutran-profiling-scenario.eps \
$(FIGURES)/lte-interference-test-scenario.eps \
$(FIGURES)/epc-topology.eps \
$(FIGURES)/epc-data-flow-dl.eps \
$(FIGURES)/epc-data-flow-ul.eps \
$(FIGURES)/epc-profiling-scenario.eps \
$(FIGURES)/epc-topology.eps \
$(FIGURES)/eutran-profiling-scenario.eps \
$(FIGURES)/ff-example.eps \
$(FIGURES)/ff-mac-saps.eps \
$(FIGURES)/lte-arch-data-rrc-pdcp-rlc.eps \
$(FIGURES)/lte-enb-architecture.eps \
$(FIGURES)/lte-epc-e2e-data-protocol-stack.eps \
$(FIGURES)/MCS_2_test.eps \
$(FIGURES)/MCS_12_test.eps \
$(FIGURES)/lte-interference-test-scenario.eps \
$(FIGURES)/lte-ue-architecture.eps \
$(FIGURES)/lte-subframe-structure.eps \
$(FIGURES)/lena-dual-stripe.eps \
$(FIGURES)/lte-mcs-index.eps \
$(FIGURES)/lenaThrTestCase1.eps \
@@ -224,7 +226,7 @@ IMAGES_EPS = \
$(FIGURES)/lte-rlc-data-retx-dl.eps \
$(FIGURES)/lte-rlc-data-txon-ul.eps \
$(FIGURES)/lte-rlc-data-retx-ul.eps \
$(FIGURES)/auvmobility-classes.eps \
$(FIGURES)/auvmobility-classes.eps \
# rescale pdf figures as necessary
$(FIGURES)/testbed.pdf_width = 5in
@@ -250,6 +252,7 @@ $(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm
$(FIGURES)/lte-phy-interference.pdf_width = 12cm
$(FIGURES)/lte-subframe-structure.pdf_width = 2in
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
@@ -260,7 +263,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
%.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 TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
# You can set these variables from the command line.
SPHINXOPTS =
+4 -2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
TMPDIR=/tmp
TMPFILE=`mktemp`
echo "\documentclass{book}
@@ -8,5 +10,5 @@ echo "\documentclass{book}
\includepdf[width=${1},fitpaper]{${2}}
\end{document}" >${TMPFILE}.tex
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
cp ${TMPFILE}.pdf ${3}
cp ${TMPFILE}.pdf ${2}
rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
+6 -6
View File
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'ns3_html_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -99,14 +99,14 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['../..']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = 'Model Library'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
html_short_title = 'Models'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
@@ -124,7 +124,7 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%b %d, %Y %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -184,7 +184,7 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
latex_logo = '../../ns3_html_theme/static/ns-3.png'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
+1 -1
View File
@@ -22,6 +22,7 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
aodv
applications
bridge
brite
buildings
click
csma
@@ -40,7 +41,6 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
openflow-switch
point-to-point
propagation
simple
statistics
topology
uan
+1
View File
@@ -7,3 +7,4 @@ Network Module
network-overview
sockets-api
simple
queue
+85
View File
@@ -0,0 +1,85 @@
.. ns3-theme documentation master file, created by
sphinx-quickstart on Fri Jun 15 12:53:37 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
The files in this directory customize the Doxygen and Sphinx
layout and rendering to give a common look.
Design
------
The basic color scheme is taken from the ns3 homepage, http://www.nsnam.org/
Since Sphinx provides more flexible layout and configuration control,
the Doxygen layout and images are used as the basis.
The top bar design is derived from Doxygen's default when a logo,
project name and description are given in the Doxygen configuration file.
The files ``layout.html`` and ``ns3_doxy_header.html`` should kept in sync.
Sphinx Files
------------
``layout.html`` (:ref:`static filename <sphinx-static-filenames>`)
Augments the default page layout, including the top bar.
``theme.conf`` (:ref:`static filename <sphinx-static-filenames>`)
Configuration parameters for ``layout.html`` and ``default.css_t``.
``static/bc_s.png``
Angle bracket in Sphinx relbar, taken from the Doxygen html output.
``static/default.css_t`` (:ref:`static filename <sphinx-static-filenames>`)
Default Sphinx CSS template, copied from the default theme.
``static/nav_f.png``
Background image for headings, taken from the Doxygen html output.
``static/sidebar.js`` (:ref:`static filename <sphinx-static-filenames>`)
Sidebar script, copied from the default theme.
``static/tab_b.png``
Background image for the Sphinx relbar, taken from the Doxygen html output.
.. _sphinx-static-filenames:
.. note:: **Static Filenames**
Sphinx uses hard-coded file names (and the ``static`` directory name).
The files referenced above can't be renamed.
Doxygen Files
-------------
``ns3_doxy_footer.html``
Defines the page footer.
``ns3_doxy_header.html``
Defines the page header, including the top bar.
``static/doxygen.css``
Default Doxygen CSS file, obtained by the ``doxygen -w html ...``
command.
Shared Files
------------
``README.rst``
This file, not used by Doxygen or Sphinx.
``static/bar-top.png``
Background image for the top bar, resized from the ns-3 homepage.
``static/favicon.ico``
Browser location bar favicon, referenced in ``layout.html`` and
``ns3_doxy_header.html``, taken from the ns-3 homepage.
``static/ns-3-inverted-notext-small.png``
Logo used in the top bar, taken from the ns-3 media kit.
``static/ns3_stylesheet.css``
Style customizations for both Doxygen and Sphinx.
+214
View File
@@ -0,0 +1,214 @@
#!/bin/bash
# Get the current repo name and version
# to format urls appropriately via Javascript
# variables for inclusion in html files.
# Use cases:
# 1. Hosted on nsnam.org, tagged release.
# 2. Hosted on nsnam.org, ns-3-dev.
# 3. User repo, modified from a tagged release (or ns-3-dev).
# 4. User repo, at a release tag.
# 5. User repo, at a private tag.
# 6. Private web host, at a tag (or ns-3-dev, or local mod).
#
# For case 1 and 2, we want the links to point to the nsnam.org
# publicly hosted pages. For all other cases, we want to point
# to the built pages in the repo itself.
#
# For robustness, we attempt to identify cases 1 & 2
# automatically. (There is also an explicit switch '-p'
# to force us into the public case.)
#
# The approach to identify cases 1 & 2 is to test:
# a. We're on nsnam.org (actually, nsnam.ece.gatech.edu), and
# b. We're in the tmp build directory, /tmp/daily-nsnam/
# (This is the directory used by the update-* scripts
# run by cron jobs.)
#
# If both a and b are true, we're building for public urls.
# (The newer update-docs script (through waf) sets
# NS3_WWW_URLS=public explicitly.)
#
# The repo version is either a tag name or a commit (short) id.
#
# If we're building for nsnam.org, and at a tag, we use just
# the tag as the repo name/version string, e.g. 'ns-3.14'.
# Otherwise, we're building for ns-3-dev, and we use, e.g,
# 'ns-3-dev @ fd0f27a10eff'.
#
# If we're *not* building for nsnam.org, we use the repo
# directory name as the repo name. (This will typically be
# a name meaningful to the user doing the build, perhaps a
# shorthand for the feature they are working on.) For
# example, this script was developed in a repo named
# 'docs'. We always use the repo version, resulting
# in document version strings like 'docs @ ns-3.15' or
# 'docs @ fd0f27a10eff'
#
me=`basename $0`
function say
{
echo "$me: $*"
}
function usage
{
cat <<-EOF
Usage: $me [-p] normal versioning
$me [-n] [-d] [-t] test options
-p build public urls, NS3_WWW_URLS=public is an alternative
Testing options:
-n pretend we are on nsnam.org
-d pretend we are in the automated build directory
-t pretend we are at a repo tag
EOF
exit 1
}
# script arguments
say
public=0
nsnam=0
daily=0
tag=0
while getopts :pndth option ; do
case $option in
(p) public=1 ;;
(n) nsnam=1 ;;
(d) daily=1 ;;
(t) tag=1 ;;
(h) usage ;;
(:) say "Missing argument to -$OPTARG" ; usage ;;
(\?) say "Invalid option: -$OPTARG" ; usage ;;
esac
done
# Hostname, fully qualified, e.g. nsnam.ece.gatech.edu
HOST=`hostname`
NSNAM="nsnam.ece.gatech.edu"
# Build directory
DAILY="^/tmp/daily-nsnam/"
if [ $nsnam -eq 1 ]; then
HOST=$NSNAM
say "-n forcing HOST = $HOST"
fi
if [ $daily -eq 1 ] ; then
OLDPWD=$PWD
PWD=/tmp/daily-nsnam/foo
say "-d forcing PWD = $PWD"
fi
if [ $tag -eq 1 ]; then
version="ns-3.14"
say "-t forcing tagged version = $version"
fi
if ((nsnam + daily + tag > 0)) ; then
say
fi
if [[ ($public == 1) || \
("${NS3_WWW_URLS:-}" == "public") || \
( ($HOST == $NSNAM) && ($PWD =~ $DAILY) ) ]] ; then
PUBLIC=1
say "building public docs for nsnam.org"
else
PUBLIC=0
say "building private docs"
fi
if [ $daily -eq 1 ]; then
PWD=$OLDPWD
fi
# Destination javascript file
outf="doc/ns3_html_theme/static/ns3_version.js"
# Distance from last tag
# Zero distance means we're at the tag
distance=`hg log -r tip --template '{latesttagdistance}'`
if [ $distance -eq 1 ]; then
version=`hg log -r tip --template '{latesttag}'`
say "at tag $version"
elif [ $tag -eq 1 ]; then
distance=1
# version previously set
vers_href=
else
version=`hg log -r tip --template '{node|short}'`
# Check for uncommitted changes
hg summary | grep -q 'commit: (clean)'
if [ ! $? ] ; then
say "beyond latest tag, last commit: $version, dirty"
dirty="(+)"
else
say "beyond latest tag, last commit: $version, clean"
dirty=
fi
fi
if [ $PUBLIC -eq 1 ]; then
echo "// ns3_version.js: automatically generated" > $outf
echo "// public urls" >> $outf
# Generate URL relative to server root
echo "var ns3_host = \"/\";" >> $outf
if [ $distance -eq 1 ]; then
# Like "http://www.nsnam.org/ns-3-14"
vers_href="http://www.nsnam.org/ns-3-${version#ns-3.}"
vers_href="<a href=\\\"$vers_href\\\">$version$dirty</a>"
echo "var ns3_version = \"Release $vers_href\";" >> $outf
echo "var ns3_release = \"docs/release/${version#ns-}/\";" >> $outf
else
# Like "http://code.nsnam.org/ns-3-dev/rev/<hash>"
vers_href="http://code.nsnam.org/ns-3-dev/rev/$version"
version="<a href=\\\"$vers_href\\\">$version$dirty</a>"
echo "var ns3_version = \"ns-3-dev @ $version\";" >> $outf
echo "var ns3_release = \"docs/\";" >> $outf
fi
echo "var ns3_local = \"\";" >> $outf
echo "var ns3_doxy = \"doxygen/\";" >> $outf
else
repo=`basename $PWD`
echo "// ns3_version.js: automatically generated" > $outf
echo "// private urls" >> $outf
echo "var ns3_host = \"file://$PWD/\";" > $outf
echo "var ns3_version = \"$repo @ $version$dirty\";" >> $outf
echo "var ns3_release = \"doc/\";" >> $outf
echo "var ns3_local = \"build/\";" >> $outf
echo "var ns3_doxy = \"html/\";" >> $outf
fi
# Copy to html directories
# This seems not always done automatically
# by Sphinx when rebuilding
cd doc 2>&1 >/dev/null
for d in {manual,models,tutorial{,-pt-br}}/build/{single,}html/_static/ ; do
# expect the copy to fail if the destination dir
# hasn't been created by a prior doc build
cp ns3_html_theme/static/ns3_version.js $d
done
cd - 2>&1 >/dev/null
# Show what was done
say
say "outf = $outf:"
cat -n $outf
say Done.
+121
View File
@@ -0,0 +1,121 @@
{#
ns-3/layout.html
~~~~~~~~~~~~~~~~~~~
Sphinx layout template for ns-3.
:copyright: Copyright 2012 by ns-3, see AUTHORS.
:license: GPL, see LICENSE for details.
#}
{% extends "basic/layout.html" %}
{% set reldelim1 = '<span class="navelem">&nbsp;</span>' %}
{# set reldelim1 = ' @' #}
{%- block extrahead %}
{%- if theme_customstylesheet %}
<link rel="stylesheet" type="text/css"
href="{{ pathto('_static/'+theme_customstylesheet, 1) }}" />
{%- endif %}
{%- if theme_favicon %}
<link rel="icon" type="image/ico"
href="{{ pathto('_static/'+theme_favicon, 1) }}" />
{%- endif %}
<script type="text/javascript" src="_static/drop-down-menu.js"></script>
<script type="text/javascript" src="_static/ns3_version.js"></script>
<script type="text/javascript">var ns3_builder="{{builder}}";</script>
<script type="text/javascript" src="_static/ns3_links.js"></script>
{% endblock %}
{% block header %}
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo">
<a id="ns3_home1"
href="http://www.nsnam.org/">
<img alt="ns-3 Logo"
src="{{ pathto('_static/' + theme_logo, 1)}}"/>
</a>
</td>
<td id="projecttext">
<div id="projectbrief">A Discrete-Event Network Simulator</div>
<span id="projectnumber"><script type="text/javascript">document.write(ns3_version)</script></span>
</td>
<td id="ns3-menu">
<div class="menu">
<ul >
<li><a id="ns3_home2"
href="http://www.nsnam.org/"
>&nbsp;&nbsp;Home</a>
</li>
<li><span
onmouseover="mopen('mTuts')"
onmouseout="mclosetime()"
>Tutorials &nbsp;&#x25BC;</span>
<div id="mTuts"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a id="ns3_tut"
href="/docs/tutorial/html/index.html"
>English</a><br/>
<a id="ns3_ptbr"
href="/docs/tutorial-pt-br/html/index.html"
>Portuguese</a><br/>
</li>
<li><span
onmouseover="mopen('mDocs')"
onmouseout="mclosetime()"
>Docs &nbsp;&nbsp;&nbsp;&#x25BC;</span>
<div id="mDocs"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a id="ns3_wiki"
href="http://www.nsnam.org/wiki"
>Wiki</a><br/>
<a id="ns3_man"
href="/docs/manual/html/index.html"
>Manual</a><br/>
<a id="ns3_mod"
href="/docs/models/html/index.html"
>Models</a><br/>
</li>
<li><span
onmouseover="mopen('mDev')"
onmouseout="mclosetime()"
>Develop &#x25BC;</span>
<div id="mDev"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a id="ns3_api"
href="/docs/doxygen/html/index.html"
>API</a><br/>
<a id="ns3_bugs"
href="http://www.nsnam.org/bugzilla/">Bugs</a>
</li>
</ul>
</div>
</td>
<td id="projectsection">
<span style="margin-right:10px">{{ shorttitle }}</span>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">ns3_write_links()</script>
</div>
{% endblock %}
{% block rootrellink %}
<li class="navelem"><a href="{{ theme_homepage }}">{{ theme_projectname }}</a><span class="navelem">&nbsp;</span></li>
{{ super() }}
{% endblock %}
{% if theme_collapsiblesidebar|tobool %}
{% set script_files = script_files + ['_static/sidebar.js'] %}
{% endif %}
+20
View File
@@ -0,0 +1,20 @@
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
+105
View File
@@ -0,0 +1,105 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=9"></meta>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"></link>
<script type="text/javascript" src="$relpath$jquery.js"></script>
<script type="text/javascript" src="$relpath$dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"></link>
<link href="$relpath$ns3_stylesheet.css" rel="stylesheet" type="text/css"></link>
<link href="$relpath$favicon.ico" rel="shortcut icon" type="image/ico"></link>
<script type="text/javascript" src="$relpath$drop-down-menu.js"></script>
<script type="text/javascript" src="$relpath$ns3_version.js"></script>
<script type="text/javascript" src="$relpath$ns3_links.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo">
<a id="ns3_home1"
href="http://www.nsnam.org/">
<img alt="ns-3 Logo"
src="$relpath$$projectlogo"/>
</a>
</td>
<td id="projecttext">
<div id="projectbrief">A Discrete-Event Network Simulator</div>
<span id="projectnumber"><script type="text/javascript">document.write(ns3_version)</script></span>
</td>
<td id="ns3-menu">
<div class="menu">
<ul >
<li><a id="ns3_home2"
href="http://www.nsnam.org/"
>&nbsp;&nbsp;Home</a>
</li>
<li><span
onmouseover="mopen('mTuts')"
onmouseout="mclosetime()"
>Tutorials &nbsp;&#x25BC;</span>
<div id="mTuts"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a id="ns3_tut"
href="/docs/tutorial/html/index.html"
>English</a><br/>
<a id="ns3_ptbr"
href="/docs/tutorial-pt-br/html/index.html"
>Portuguese</a><br/>
</li>
<li><span
onmouseover="mopen('mDocs')"
onmouseout="mclosetime()"
>Docs &nbsp;&nbsp;&nbsp;&#x25BC;</span>
<div id="mDocs"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a id="ns3_wiki"
href="http://www.nsnam.org/wiki"
>Wiki</a><br/>
<a id="ns3_man"
href="/docs/manual/html/index.html"
>Manual</a><br/>
<a id="ns3_mod"
href="/docs/models/html/index.html"
>Models</a><br/>
</li>
<li><span
onmouseover="mopen('mDev')"
onmouseout="mclosetime()"
>Develop &#x25BC;</span>
<div id="mDev"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a id="ns3_api"
href="/docs/doxygen/index.html"
>API</a><br/>
<a id="ns3_bugs"
href="http://www.nsnam.org/bugzilla/">Bugs</a>
</li>
</ul>
</div>
</td>
<td id="projectsection">
<span style="margin-right:10px">API</span>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">ns3_write_links()</script>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

+310
View File
@@ -0,0 +1,310 @@
/*
* default.css_t
* ~~~~~~~~~~~~~
*
* Sphinx stylesheet -- default theme.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: {{ theme_bodyfont }};
font-size: 100%;
background-color: {{ theme_footerbgcolor }};
color: #000;
margin: 0;
padding: 0;
}
div.document {
background-color: {{ theme_sidebarbgcolor }};
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 {{ theme_sidebarwidth|toint }}px;
}
div.body {
background-color: {{ theme_bgcolor }};
color: {{ theme_textcolor }};
padding: 0 20px 30px 20px;
}
{%- if theme_rightsidebar|tobool %}
div.bodywrapper {
margin: 0 {{ theme_sidebarwidth|toint }}px 0 0;
}
{%- endif %}
div.footer {
color: {{ theme_footertextcolor }};
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: {{ theme_footertextcolor }};
text-decoration: underline;
}
div.related {
background-color: {{ theme_relbarbgcolor }};
line-height: 30px;
color: {{ theme_relbartextcolor }};
}
div.related a {
color: {{ theme_relbarlinkcolor }};
}
div.sphinxsidebar {
{%- if theme_stickysidebar|tobool %}
top: 30px;
bottom: 0;
margin: 0;
position: fixed;
overflow: auto;
height: auto;
{%- endif %}
{%- if theme_rightsidebar|tobool %}
float: right;
{%- if theme_stickysidebar|tobool %}
right: 0;
{%- endif %}
{%- endif %}
}
{%- if theme_stickysidebar|tobool %}
/* this is nice, but it it leads to hidden headings when jumping
to an anchor */
/*
div.related {
position: fixed;
}
div.documentwrapper {
margin-top: 30px;
}
*/
{%- endif %}
div.sphinxsidebar h3 {
font-family: {{ theme_headfont }};
color: {{ theme_sidebartextcolor }};
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h3 a {
color: {{ theme_sidebartextcolor }};
}
div.sphinxsidebar h4 {
font-family: {{ theme_headfont }};
color: {{ theme_sidebartextcolor }};
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: {{ theme_sidebartextcolor }};
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: {{ theme_sidebartextcolor }};
}
div.sphinxsidebar a {
color: {{ theme_sidebarlinkcolor }};
}
div.sphinxsidebar input {
border: 1px solid {{ theme_sidebarlinkcolor }};
font-family: sans-serif;
font-size: 1em;
}
{% if theme_collapsiblesidebar|tobool %}
/* for collapsible sidebar */
div#sidebarbutton {
background-color: {{ theme_sidebarbtncolor }};
}
{% endif %}
/* -- hyperlink styles ------------------------------------------------------ */
a {
color: {{ theme_linkcolor }};
text-decoration: none;
}
a:visited {
color: {{ theme_visitedlinkcolor }};
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
{% if theme_externalrefs|tobool %}
a.external {
text-decoration: none;
border-bottom: 1px dashed {{ theme_linkcolor }};
}
a.external:hover {
text-decoration: none;
border-bottom: none;
}
a.external:visited {
text-decoration: none;
border-bottom: 1px dashed {{ theme_visitedlinkcolor }};
}
{% endif %}
/* -- body styles ----------------------------------------------------------- */
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: {{ theme_headfont }};
background-color: {{ theme_headbgcolor }};
font-weight: normal;
color: {{ theme_headtextcolor }};
border-bottom: 1px solid #ccc;
margin: 20px -20px 10px -20px;
padding: 3px 0 3px 10px;
}
div.body h1 { margin-top: 0; font-size: 200%; }
div.body h2 { font-size: 160%; }
div.body h3 { font-size: 140%; }
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: {{ theme_headlinkcolor }};
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
}
a.headerlink:hover {
background-color: {{ theme_headlinkcolor }};
color: white;
}
div.body p, div.body dd, div.body li {
text-align: justify;
line-height: 130%;
}
div.admonition p.admonition-title + p {
display: inline;
}
div.admonition p {
margin-bottom: 5px;
}
div.admonition pre {
margin-bottom: 5px;
}
div.admonition ul, div.admonition ol {
margin-bottom: 5px;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre {
padding: 5px;
background-color: {{ theme_codebgcolor }};
color: {{ theme_codetextcolor }};
line-height: 120%;
border: 1px solid #ac9;
border-left: none;
border-right: none;
}
tt {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 0.95em;
}
th {
background-color: #ede;
}
.warning tt {
background: #efc2c2;
}
.note tt {
background: #d6d6d6;
}
.viewcode-back {
font-family: {{ theme_bodyfont }};
}
div.viewcode-block:target {
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,45 @@
// Copyright 2006-2007 javascript-array.com
// http://javascript-array.com/scripts/simple_drop_down_menu/
var timeout = 250;
var closetimer = 0;
var ddmenuitem = 0;
// open hidden layer
function mopen(id)
{
// cancel close timer
mcancelclosetime();
// close old layer
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
// get new layer and show it
ddmenuitem = document.getElementById(id);
ddmenuitem.style.visibility = 'visible';
}
// close showed layer
function mclose()
{
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}
// go close timer
function mclosetime()
{
closetimer = window.setTimeout(mclose, timeout);
}
// cancel close timer
function mcancelclosetime()
{
if(closetimer)
{
window.clearTimeout(closetimer);
closetimer = null;
}
}
// close layer when click-out
document.onclick = mclose;
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+58
View File
@@ -0,0 +1,58 @@
// nsnam.org links, independent of version
var ns3_site = "http://www.nsnam.org/";
var ns3_home = ns3_site + "";
var ns3_wiki = ns3_site + "wiki";
var ns3_bugs = ns3_site + "bugzilla";
// Links that depend on version:
// Defined in ns3_version.js:
// ns3_host = "//" file://$PWD
// ns3_version = "3.14" "3.14
// = "ns-3-dev @ 12345abcde "repo @ 12345abcde
// ns3_release = "docs/release/3.14/" "repo/"
// ns3_local = "" "build/"
//
// This lets us build several kinds of links:
// http://www.nsnam.org/docs/manual/html/index.html
// http://www.nsnam.org/docs/release/3.14/manual/html/index.html
// file:///.../doc/manual/build/html/index.html
//
// with the appropriate version string.
var ns3_index = "index.html";
var ns3_rel = ns3_host + ns3_release;
var ns3_api = ns3_rel + ns3_doxy + ns3_index;
// The Sphinx layout template defines
// var ns3_builder = "html", or "singlehtml"
// so we can condition the links on single/multi-page view.
if (typeof ns3_builder != 'undefined') {
if (ns3_builder == "singlehtml") {
ns3_index = ns3_local + "singlehtml/" + ns3_index;
} else {
ns3_index = ns3_local + "html/" + ns3_index;
}
}
else {
ns3_index = ns3_local + "html/" + ns3_index;
}
var ns3_man = ns3_rel + "manual/" + ns3_index;
var ns3_mod = ns3_rel + "models/" + ns3_index;
var ns3_tut = ns3_rel + "tutorial/" + ns3_index;
var ns3_ptbr = ns3_rel + "tutorial-pt-br/" + ns3_index;
function ns3_write_links() {
document.getElementById("ns3_home1").href = ns3_home;
document.getElementById("ns3_home2").href = ns3_home;
document.getElementById("ns3_wiki" ).href = ns3_wiki;
document.getElementById("ns3_bugs" ).href = ns3_bugs;
document.getElementById("ns3_api" ).href = ns3_api;
document.getElementById("ns3_man" ).href = ns3_man;
document.getElementById("ns3_mod" ).href = ns3_mod;
document.getElementById("ns3_tut" ).href = ns3_tut;
document.getElementById("ns3_ptbr" ).href = ns3_ptbr;
}
@@ -0,0 +1,210 @@
/* ns-3 changes to the default CSS from Doxygen and Sphinx */
body,
table,
div,
p,
dl {
color: black;
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 12px;
}
a {
color: #91A501;
font-weight: bold;
}
/* Sphinx headings */
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
background-image: url('nav_f.png');
}
/* Doxygen side bar */
#nav-tree {
font-size: 12px;
}
#nav-tree a {
font-weight: normal;
}
/* Sphinx nav links bar (relbar) */
div.related {
background-image:url('tab_b.png')
}
div.related h3 {
display: none;
}
div.related a {
color: #91A501;
font-size: 14px;
font-weight: bold;
}
div.related li {
background-image: url('bc_s.png');
background-position: 100% 40%;
background-repeat: no-repeat;
padding-left: 10px;
padding-right: 15px;
}
div.related li.right {
background-image: none;
padding-left: 0px;
padding-right: 0px;
}
/* Sphinx side bar */
div.sphinxsidebar {
font-size: 12px;
}
div.sphinxsidebar a {
font-weight: normal;
}
/* Title bar elements */
#titlearea {
background-image:url('bar-top.png');
background-repeat:repeat;
border-bottom: 1px solid #5B5B5B;
color: white;
}
#projectlogo {
color: white;
margin: 10px;
text-align: center;
vertical-align: middle;
width: 220px;
}
#projecttext {
align: left;
font-color:white;
padding-left: 2em;
width: 250px;
}
#projectbrief {
color: white;
font: 120% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectnumber {
color: white;
font: 100% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectsection {
color: white;
font: 24pt Aldo, Tahoma, Arial,sans-serif;
margin-right: 10px;
margin: 10px;
text-align: right;
vertical-align: middle;
}
/*
ns-3 Main-menu, based on WordPress site
Drop down menu based on Simple Javascript Drop-Down Menu v2.0
http://javascript-array.com/scripts/simple_drop_down_menu/
*/
#ns3-menu .menu {
background-image: url('menu-bgr-400.png');
/* background-origin: padding-box; */
/* background-position: -10px 0; */
background-repeat: no-repeat;
display: table-cell;
float:left;
height: 40px;
margin: 0px 0px 0px 0px;
overflow: hidden;
padding:0px 0px 0px 0px;
vertical-align: middle;
width: 450px;
}
#ns3-menu .menu ul {
/* float:left; */
height: 40;
list-style:none;
margin:0px 0px 0px -2px;
/* overflow:hidden; */
padding:0px 0px 0px 0px;
z-index: 30;
}
#ns3-menu .menu ul li {
background-image: url('ver.png');
background-origin: padding-box;
background-position: 0 11px;
background-repeat: no-repeat;
color:#ffffff;
float:left;
font-family: Aldo, Tahoma, Arial, sans-serif;
font-size: 14px;
/* height:40px; */
margin:0px 0px 0px 0px;
/* overflow:hidden; */
padding:11px 13px 0px 12px;
text-transform:uppercase;
}
#ns3-menu .menu ul li a {
color:#ffffff;
/* cursor: pointer; */
display:block;
float:left;
font-weight: normal; /* default anchors are bold */
text-decoration:none; /* default anchors are underlined */
}
#ns3-menu .menu ul li a:hover {
color:#cadc48;
text-decoration:none; /* don't add underline on hover */
}
#ns3-menu .menu div {
background: #94A901;
background-size: 100%; 100%
color:#ffffff;
position: absolute;
visibility: hidden;
}
#ns3-menu .menu div a {
position: relative;
display: block;
float: left;
font-family: Aldo, Tahoma, Arial, sans-serif;
font-size: 14px;
margin: 0;
padding: 5px 10px;
text-align: left;
width: auto;
white-space: nowrap;
}
#ns3-menu .menu div a:hover {
color:#cadc48;
text-decoration:none; /* don't add underline on hover */
}
+151
View File
@@ -0,0 +1,151 @@
/*
* sidebar.js
* ~~~~~~~~~~
*
* This script makes the Sphinx sidebar collapsible.
*
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
* used to collapse and expand the sidebar.
*
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
* and the width of the sidebar and the margin-left of the document
* are decreased. When the sidebar is expanded the opposite happens.
* This script saves a per-browser/per-session cookie used to
* remember the position of the sidebar among the pages.
* Once the browser is closed the cookie is deleted and the position
* reset to the default (expanded).
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
$(function() {
// global elements used by the functions.
// the 'sidebarbutton' element is defined as global after its
// creation, in the add_sidebar_button function
var bodywrapper = $('.bodywrapper');
var sidebar = $('.sphinxsidebar');
var sidebarwrapper = $('.sphinxsidebarwrapper');
// for some reason, the document has no sidebar; do not run into errors
if (!sidebar.length) return;
// original margin-left of the bodywrapper and width of the sidebar
// with the sidebar expanded
var bw_margin_expanded = bodywrapper.css('margin-left');
var ssb_width_expanded = sidebar.width();
// margin-left of the bodywrapper and width of the sidebar
// with the sidebar collapsed
var bw_margin_collapsed = '.8em';
var ssb_width_collapsed = '.8em';
// colors used by the current theme
var dark_color = $('.related').css('background-color');
var light_color = $('.document').css('background-color');
function sidebar_is_collapsed() {
return sidebarwrapper.is(':not(:visible)');
}
function toggle_sidebar() {
if (sidebar_is_collapsed())
expand_sidebar();
else
collapse_sidebar();
}
function collapse_sidebar() {
sidebarwrapper.hide();
sidebar.css('width', ssb_width_collapsed);
bodywrapper.css('margin-left', bw_margin_collapsed);
sidebarbutton.css({
'margin-left': '0',
'height': bodywrapper.height()
});
sidebarbutton.find('span').text('»');
sidebarbutton.attr('title', _('Expand sidebar'));
document.cookie = 'sidebar=collapsed';
}
function expand_sidebar() {
bodywrapper.css('margin-left', bw_margin_expanded);
sidebar.css('width', ssb_width_expanded);
sidebarwrapper.show();
sidebarbutton.css({
'margin-left': ssb_width_expanded-12,
'height': bodywrapper.height()
});
sidebarbutton.find('span').text('«');
sidebarbutton.attr('title', _('Collapse sidebar'));
document.cookie = 'sidebar=expanded';
}
function add_sidebar_button() {
sidebarwrapper.css({
'float': 'left',
'margin-right': '0',
'width': ssb_width_expanded - 28
});
// create the button
sidebar.append(
'<div id="sidebarbutton"><span>&laquo;</span></div>'
);
var sidebarbutton = $('#sidebarbutton');
light_color = sidebarbutton.css('background-color');
// find the height of the viewport to center the '<<' in the page
var viewport_height;
if (window.innerHeight)
viewport_height = window.innerHeight;
else
viewport_height = $(window).height();
sidebarbutton.find('span').css({
'display': 'block',
'margin-top': (viewport_height - sidebar.position().top - 20) / 2
});
sidebarbutton.click(toggle_sidebar);
sidebarbutton.attr('title', _('Collapse sidebar'));
sidebarbutton.css({
'color': '#FFFFFF',
'border-left': '1px solid ' + dark_color,
'font-size': '1.2em',
'cursor': 'pointer',
'height': bodywrapper.height(),
'padding-top': '1px',
'margin-left': ssb_width_expanded - 12
});
sidebarbutton.hover(
function () {
$(this).css('background-color', dark_color);
},
function () {
$(this).css('background-color', light_color);
}
);
}
function set_position_from_cookie() {
if (!document.cookie)
return;
var items = document.cookie.split(';');
for(var k=0; k<items.length; k++) {
var key_val = items[k].split('=');
var key = key_val[0];
if (key == 'sidebar') {
var value = key_val[1];
if ((value == 'collapsed') && (!sidebar_is_collapsed()))
collapse_sidebar();
else if ((value == 'expanded') && (sidebar_is_collapsed()))
expand_sidebar();
}
}
}
add_sidebar_button();
var sidebarbutton = $('#sidebarbutton');
set_position_from_cookie();
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

+50
View File
@@ -0,0 +1,50 @@
[theme]
inherit = basic
stylesheet = default.css
pygments_style = sphinx
[options]
projectname = ns-3
homepage =
customstylesheet = ns3_stylesheet.css
logo = ns-3-inverted-notext-small.png
logoalt = ns-3 Logo
last_updated_fmt = '%%b %%d, %%Y'
favicon = favicon.ico
docstitle = Documentation
rightsidebar = false
stickysidebar = false
collapsiblesidebar = false
externalrefs = false
bgcolor = white
textcolor = black
linkcolor = #91A501
visitedlinkcolor = #91A501
headbgcolor = #E3E3E3
headtextcolor = #373737
headlinkcolor = #91A501
relbarbgcolor = #D5D5D5
relbarlinkcolor = #373737
relbartextcolor = #373737
sidebarbgcolor = #FAFAFA
sidebartextcolor = #373737
sidebarlinkcolor = #91A501
sidebarbtncolor = #D5D5D5
footerbgcolor = #D5D5D5
footertextcolor = #364D7C
codebgcolor = ##FBFCFD
codetextcolor = black
bodyfont = 'Lucida Grande', Verdana, Geneva, Arial, sans-serif
headfont = 'Lucida Grande', Verdana, Geneva, Arial, sans-serif
+92 -78
View File
@@ -1,93 +1,89 @@
Steps in doing an ns-3 release
ns-3-dev preparation
--------------------
We typically post release candidates for testing at the following URL:
https://www.nsnam.org/release/ns-allinone-3.X.rcX.tar.bz2
1. check out a clean ns-3-dev somewhere using ns-3-allinone (you will need it)
- hg clone http://code.nsnam.org/ns-3-allinone
- ./download.py
- ./build.py --enable-examples --enable-tests
- try building static, optimized, and debug versions
This overview covers the following release stages:
1) new feature additions and bug fixing
2) preparing release candidates for testing
3) making the actual release
4) maintaining the release
1) new feature additions and bug fixing
---------------------------------------
During the software development phase, it is important for the release
manager to try to maintain the following files with updated information:
- AUTHORS
- RELEASE_NOTES
- CHANGES.html
otherwise, this becomes painful to edit (and things are forgotten)
when the release is imminent.
2) preparing release candidates for testing
-------------------------------------------
This step presumes that you have a reasonably solid ns-3-dev that you
and/or the buildbots have been testing
- building static, optimized, and debug versions
- try Python visualizer (not tested by buildbots)
-- ./waf --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py --vis
- cd ns-3-dev
- ensure that tests pass (./test.py -g) and make sure that the buildbots
are reporting greens based on the tip of the repository
2. prepare the source files
- revise and check in AUTHORS, if needed
- revise and check in RELEASE_NOTES. Make sure to edit the Availability
section if this is a final release.
- DO NOT change VERSION at this time
are reporting blue based on the tip of the repository
- revise and check in AUTHORS, RELEASE_NOTES, and CHANGES.html
- required versions for related libraries (nsc, netanim, pybindgen)
are correct
- confirm that Doxygen builds cleanly (./waf doxygen),
and check in any necessary changes. Currently, doxygen does not build
cleanly, we need to fix this over time.
- confirm all documents build: './waf docs' and check outputs
At this point, the ns-3-dev should be ready, except for changing the
name of this repo from "3-dev" to the numbered release. That will come
in subsequent steps.
ns-allinone-3.X.tar.bz2 dry run
-------------------------------
This phase is optional to dry-run a tarball before tagging. You may skip
to the next phase if you are ready to just make the release or release
candidate.
1. check out a clean ns-3-allinone again
- change into the allinone directory
Check out a clean ns-3-dev somewhere using ns-3-allinone
- hg clone http://code.nsnam.org/ns-3-allinone
- ./download.py
- cd ns-3-dev
- change VERSION to the appropriate string, either "3.X" (for a release) or
"3.X.RC1" Do not commit this VERSION change to ns-3-dev. It is used
by dist.py script to name the directory properly.
- cd into allinone directory and type "./dist.py"; you should see something
like this:
- edit VERSION such as "ns-3.14.rc1" (DO NOT commit this change to ns-3-dev)
- cd ..
- ./dist.py
NS-3 version: '3.12'
Adding ns-3-dev as ns-allinone-3.12/ns-3.12
Adding pybindgen as ns-allinone-3.12/pybindgen-0.15.0.795
Adding nsc as ns-allinone-3.12/nsc-0.5.2
Adding the build script files
This should yield a compressed tarfile, such as: ns-allinone-3.14.rc1.tar.bz2
Test this, and when satisfied, upload it to
www.nsnam.org:/var/www/html/releases/ (with apache:apache file ownership)
This will create an ns-allinone-3.X.tar.bz2 tarball
Announce it to ns-developers as:
https://www.nsnam.org/release/ns-allinone-3.14.rc1.tar.bz2
2. test tarball on release platforms
- optimized, debug, and static builds
- ./test.py -g
- make latexpdf in the doc/manual, doc/models, and doc/tutorial directories
- ./waf --doxygen
Iterate the above as needed during the release testing phase.
Note, in the past we have added mercurial tags to ns-3-dev to denote
release candidates, but lately we have not been bothering with this.
If you would like to tag a release candidate, follow these steps
-- hg tag "ns-3.X.rcX" (for the appropriate version numbers)
-- hg push ssh://code@code.nsnam.org/repos/ns-3-dev
3) making the release
---------------------
Follow similar steps for creating the release candidate tarballs, except
we will work off of a release repository.
At this point, you are ready for final packaging and repository/site work
tagging ns-3-dev and creating ns-3.X repositories
-------------------------------------------------
The steps here involve tagging ns-3-dev, copying over ns-3-dev to ns-3.X
on code.nsnam.org, cloning it locally, making changes from "3-dev" to "3.X"
in various places, and checking in those changes to the new ns-3.X repository.
We'll refer to the release number as "X" or "x" below. The steps here
involve tagging ns-3-dev, copying over ns-3-dev to ns-3.X on code.nsnam.org,
cloning it locally, making changes from "3-dev" to "3.X" in various places,
and checking in those changes to the new ns-3.X repository.
1. once you are happy with the tarball, tag ns-3-dev
1. once you are happy with the most recent release candidate tarball and
do not plan to further touch ns-3-dev, tag ns-3-dev
- cd into ns-3-dev
- if release candidate
-- hg tag "ns-3.x-RCy"
-- hg push ssh://code@code.nsnam.org//home/code/repos/ns-3-dev
- else if final release
-- hg tag "ns-3.x"
-- hg push ssh://code@code.nsnam.org//home/code/repos/ns-3-dev
2. copy the tagged ns-3-dev and place it on the repository
- ssh code.nsnam.org; sudo bash; su code;
- if release candidate
-- cp -r /home/code/repos/ns-3-dev /home/code/repos/ns-3.x-RCy
-- cd /home/code/repos/ns-3.x-RCy/.hg and edit the hgrc appropriately:
[paths]
default = /home/code/repos/ns-3.x-RCy
[web]
description = ns-3.x-RCy release
name = ns-3.x-RCy
contact = <ns-developers@isi.edu>
- else if final release
-- cp -r /home/code/repos/ns-3-dev /home/code/repos/ns-3.x
-- cd /home/code/repos/ns-3.x/.hg and edit the hgrc appropriately:
[paths]
@@ -97,21 +93,20 @@ in various places, and checking in those changes to the new ns-3.X repository.
name = ns-3.x
contact = <ns-developers@isi.edu>
3. If this is a final release (not RC)
- move (mv) ns-3.x RCs in /home/code/archived-repos
3. check out a clean version of the new release (ns-3.x)
to a scratch directory on your local machine
- hg clone http://code.nsnam.org/ns-3.x
4. check out a clean version of the new release (ns-3.x) or (ns-3.x-RCy)
to your local machine
- hg clone http://code.nsnam.org/ns-3.x or (-RCy)
5. Update the VERSION for this new release
5. Update the VERSION for this new release, in the ns-3.x directory (i.e.
NOT in ns-3-dev)
- change the string 3-dev in the VERSION file to the real version
(e.g. 3.7 or 3.7-RC1) This must agree with the version name you chose in the clone.
(e.g. 3.14) This must agree with the version name you chose in the clone.
- change the version and release string for the documentation in
doc/manual/source, doc/tutorial/source, and doc/models/source conf.py files
doc/manual/source, doc/tutorial/source, doc/tutorial-pt/source,
and doc/models/source conf.py files
This should hopefully be updated in the future to simply pull from the
VERSION file.
- hg commit -m "update VERSION to ns-3.x" or (-RCy), you get the point
- hg commit -m "update VERSION to ns-3.x"
- hg push ssh://code@code.nsnam.org//home/code/repos/ns-3.x
creating the distribution tarball
@@ -145,9 +140,7 @@ preparing the documentation
1. If final release, build release documentation
- sudo bash; su nsnam; cd /home/nsnam/bin
./update-doxygen-release ns-3.x
./update-manual-release ns-3.x
./update-tutorial-release ns-3.x
./update-docs -r http://code.nsnam.org/ns-3.x -R
2. Check if these new files are available on the website
@@ -171,7 +164,7 @@ Documentation)
4. The main page http://www.nsnam.org should point to
ns-3.x in the "Download" and "Documentation" boxes
5. Create blog entry to announce release
5. Create a blog entry to announce release
ns-3 wiki edits
---------------
@@ -198,3 +191,24 @@ Announcing
2. announce to ns-developers and ns-3-users, with summary of release notes
4) maintaining the release
--------------------------
First, create skeletal sections in CHANGES.html and RELEASE_NOTES to
start collecting inputs for the ns-3.(x+1) release.
The project may decide to make incremental, bug-fix releases from
time to time, with a minor version number (e.g. ns-3.7.1). To do
this, changesets may be cherry-picked from ns-3-dev and added to
ns-3.x repository. Do not move over changesets that pertain to
adding new features, but documentation fixes and bug fixes are good
changesets to make available in a minor release. The same steps
above for making a release are generally followed, although one
does not need to create a separate repository, but instead just tags
the existing ns-3-dev and ns-3.x repositories with a "ns-3.x.1" type
of tag.
Also, on the main website, make sure that "latest release" points to
the right page. See how it was handled for ns-3.12 (which made
a minor release): https://www.nsnam.org/ns-3.12/
+7 -7
View File
@@ -56,7 +56,7 @@ release = 'ns-3-dev'
# The language for content autogenerated by . Refer to babel documentation
# for a list of supported languages.
language = 'pt-br'
language = 'pt_BR'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
@@ -93,7 +93,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'ns3_html_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -101,11 +101,11 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['../..']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = 'Rastreamento'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
@@ -126,7 +126,7 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%b %d, %Y %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -180,13 +180,13 @@ htmlhelp_basename = 'ns-3doc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'ns-3-tutorial.tex', u'ns-3 Tutorial',
('index', 'ns-3-tutorial.tex', u'ns-3 Rastreamento',
u'ns-3 project', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
latex_logo = '../../ns3_html_theme/static/ns-3.png'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
+1 -1
View File
@@ -18,7 +18,7 @@ ns-3 Tutorial
This is the *ns-3 Tutorial*. Primary documentation for the ns-3 project is
available in five forms:
Este é o *Tutorial do ns-3* baseado no *ns-3 Tutorial* (inglês). A documentação para o projeto ns-3 esta disponível da seguinte forma:
Este é o *Tutorial do ns-3* baseado no *ns-3 Tutorial* (inglês), versão 3.14. A documentação para o projeto ns-3 esta disponível da seguinte forma:
..
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentation of the public APIs of the simulator
+1 -1
View File
@@ -57,7 +57,7 @@ Alguns pontos importantes para se observar:
project will continue to maintain ns-2 while |ns3| is being built,
and will study transition and integration mechanisms.
* O |ns3| não é uma extensão do `ns-2 <http://www.isi.edu/nsnam/ns>`_; O |ns3| é um simulador novo. Ambos são escritos em C++, mas o |ns3| é totalmente novo e não suporta as APIs da versão anterior. Algumas funcionalidades do ns-2 já foram portadas para o |ns3|. O projeto continuará mantendo o ns-2 enquanto o |ns3| estiver em fase de desenvolvimento e formas de integração e transição estão em estudo.
* O |ns3| não é uma extensão do ns-2; O |ns3| é um simulador novo. Ambos são escritos em C++, mas o |ns3| é totalmente novo e não suporta as APIs da versão anterior. Algumas funcionalidades do ns-2 já foram portadas para o |ns3|. O projeto continuará mantendo o ns-2 enquanto o |ns3| estiver em fase de desenvolvimento e formas de integração e transição estão em estudo.
..
* |ns3| is open-source, and the project strives to maintain an
+12 -2
View File
@@ -148,7 +148,7 @@ do |ns3|, al
there is no log message for the no ack case. You could simply add one,
changing the code from:
Vamos analisar um exemplo, adicionando mais informações de registro ao `socket` TCP do arquivo ``tcp-socket-base.cc``, para isto vamos acrescentando uma nova mensagem de registro na implementação. Observe que em ``TcpSocketBase::ReceivedAck()`` não existem mensagem de registro para casos sem o *ACK*, então vamos adicionar uma da seguinte forma:
Vamos analisar um exemplo, adicionando mais informações de registro ao `socket` TCP do arquivo ``tcp-socket-base.cc``, para isto vamos acrescentando uma nova mensagem de registro na implementação. Observe que em ``TcpSocketBase::ReceivedAck()`` não existem mensagem de registro para casos sem o ACK, então vamos adicionar uma da seguinte forma:
::
@@ -2491,7 +2491,17 @@ no in
interesting behaviors of the congestion window.
Nas próximas linhas, temos um código com algumas informações novas. Se nós rastrearmos uma conexão que comporta-se perfeitamente, terminamos com um janela de congestionamento que aumenta monoliticamente. Para observarmos um comportamento interessante, introduzimos erros que causarão perda de pacotes, duplicação de `ACK`s e assim, introduz comportamentos mais interessantes a janela de congestionamento.
Nas próximas linhas, temos um código com algumas informações novas. Se nós
rastrearmos uma conexão que comporta-se perfeitamente, terminamos com um
janela de congestionamento que aumenta monoliticamente. Para observarmos um
comportamento interessante, introduzimos erros que causarão perda de pacotes,
duplicação de ACK's e assim, introduz comportamentos mais interessantes a
janela de congestionamento.
..
+2 -2
View File
@@ -267,7 +267,7 @@ leftmost point-to-point node seen in the topology illustration.
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (p2pNodes.Get (0));
@@ -1124,7 +1124,7 @@ the server on the CSMA network. We have also seen similar operations before.
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps =
+2 -2
View File
@@ -313,7 +313,7 @@ section, so go ahead and expand that documentation node. Now, expand the
``Debugging`` book and then select the ``Logging`` page.
You should now be looking at the Doxygen documentation for the Logging module.
In the list of ``#define``s at the top of the page you will see the entry
In the list of ``#define``'s at the top of the page you will see the entry
for ``NS_LOG_COMPONENT_DEFINE``. Before jumping in, it would probably be
good to look for the "Detailed Description" of the logging module to get a
feel for the overall operation. You can either scroll down or select the
@@ -636,7 +636,7 @@ that is managed by an ``UdpEchoClientHelper``.
UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (nodes.Get (0));
+1 -1
View File
@@ -24,7 +24,7 @@ who want to learn more are encouraged to read the following additional
documentation:
* The |ns3| manual
* The |ns3| model library documentatio
* The |ns3| model library documentation
* The |ns3| Doxygen (API documentation)
* The |ns3| wiki
+5 -5
View File
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'ns3_html_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -99,11 +99,11 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['../..']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = 'Tutorial'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
@@ -124,7 +124,7 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%b %d, %Y %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -184,7 +184,7 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
latex_logo = '../../ns3_html_theme/static/ns-3.png'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
+42 -3
View File
@@ -9,7 +9,7 @@ Downloading ns-3
The |ns3| system as a whole is a fairly complex system and has a
number of dependencies on other components. Along with the systems you will
most likely deal with every day (the GNU toolchain, Mercurial, you programmer
most likely deal with every day (the GNU toolchain, Mercurial, a text
editor) you will need to ensure that a number of additional libraries are
present on your system before proceeding. |ns3| provides a wiki
for your reading pleasure that includes pages with many useful hints and tips.
@@ -53,6 +53,7 @@ that approach, you can get a copy of ``ns-3-allinone`` by typing the
following into your Linux shell (assuming you have installed Mercurial):
::
cd
mkdir repos
cd repos
@@ -220,7 +221,7 @@ have to pick a release, download it and decompress it.
As mentioned above, one practice is to create a directory called ``repos``
in one's home directory under which one can keep local Mercurial repositories.
One could also keep a ``tarballs`` directory. *Hint: the tutorial
will assume you downloaded into a ``repos`` directory, so remember the
will assume you downloaded into a* ``repos`` *directory, so remember the
placekeeper.* If you adopt the ``tarballs`` directory approach, you can
get a copy of a release by typing the following into your Linux shell
(substitute the appropriate version numbers, of course):
@@ -298,6 +299,22 @@ following magic words:
topology-read uan virtual-net-device
visualizer wifi wimax
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3.13/build'
'build' finished successfully (2m30.586s)
You may also see something like:
::
Modules not built (see ns-3 tutorial for explanation):
click openflow visualizer
This just means that some ns-3 modules that have dependencies on
outside libraries may not have been built, or that the configuration
specifically asked not to build them. It does not mean that the
simulator did not build successfully or that it will provide wrong
results for the modules listed as being built.
Once the project has built, you can stop working with the
``ns-3-allinone`` scripts. You got what you needed from them and will now
interact directly with Waf and we do it in the |ns3| directory,
@@ -454,6 +471,28 @@ the ``-o`` option to configure; e.g.
This allows users to work with multiple builds rather than always
overwriting the last build.
In the examples above, waf uses GCC C++ compiler, command ``g++``, for
building ns-3. However, it's possible to change C++ compiler used by waf.
Say one wants to use Clang C++ compiler, command ``clang++``; it's done by
::
CXX="clang++" ./waf configure
./waf build
One can also set up waf to do distributed compilation with ``distcc`` in
a similar way:
::
CXX="distcc g++" ./waf configure
./waf build
More info on distcc and distributed compilation can be found on it's
`project page
<http://code.google.com/p/distcc/>`_
under Documentation section.
Testing ns-3
************
@@ -541,7 +580,7 @@ produces the following output.
*What do I do if I don't see the output?*
If you don't see ``waf`` messages indicating that the build was
If you see ``waf`` messages indicating that the build was
completed successfully, but do not see the "Hello Simulator" output,
chances are that you have switched your build mode to "optimized" in
the "Building with Waf" section, but have missed the change back to
+7 -12
View File
@@ -85,7 +85,7 @@ potentially be useful to other people as a patch to the existing core.
Let's pick a random example. If you wanted to add more logging to the
|ns3| TCP socket (``tcp-socket-base.cc``) you could just add a new
message down in the implementation. Notice that in TcpSocketBase::ReceivedAck()
there is no log message for the no ack case. You could simply add one,
there is no log message for the no ACK case. You could simply add one,
changing the code from:
::
@@ -1298,7 +1298,7 @@ when the ``main`` function of your script is running, but before
executing the simulation, ``Simulator::Run`` will return control back to
the ``main`` function. When this happens, the script enters what can be
called "Teardown Time," which is when the structures and objects created
during setup and taken apart and released.
during setup are taken apart and released.
Perhaps the most common mistake made in trying to use the tracing system is
assuming that entities constructed dynamically during simulation time are
@@ -1816,17 +1816,12 @@ to introduce errors into a ``Channel`` at a given *rate*.
::
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
"ErrorRate", DoubleValue (0.00001));
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
em->SetAttribute ("ErrorRate", DoubleValue (0.00001));
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
The above code instantiates a ``RateErrorModel`` Object. Rather than
using the two-step process of instantiating it and then setting Attributes,
we use the convenience function ``CreateObjectWithAttributes`` which
allows us to do both at the same time. We set the "RanVar"
``Attribute`` to a random variable that generates a uniform distribution
from 0 to 1. We also set the "ErrorRate" ``Attribute``.
The above code instantiates a ``RateErrorModel`` Object, and
we set the "ErrorRate" ``Attribute`` to the desired value.
We then set the resulting instantiated ``RateErrorModel`` as the error
model used by the point-to-point ``NetDevice``. This will give us some
retransmissions and make our plot a little more interesting.
@@ -2347,7 +2342,7 @@ must implement a single virtual method inherited from this class.
The signature of this method reflects the device-centric view of the situation
at this level. All of the public methods inherited from class
2``PcapUserHelperForDevice`` reduce to calling this single device-dependent
``PcapUserHelperForDevice`` reduce to calling this single device-dependent
implementation method. For example, the lowest level pcap method,
::
+29 -13
View File
@@ -37,18 +37,32 @@ easily get a quick message out of your scripts or models.
There are currently seven levels of log messages of increasing verbosity
defined in the system.
* NS_LOG_ERROR --- Log error messages;
* NS_LOG_WARN --- Log warning messages;
* NS_LOG_DEBUG --- Log relatively rare, ad-hoc debugging messages;
* NS_LOG_INFO --- Log informational messages about program progress;
* NS_LOG_FUNCTION --- Log a message describing each function called;
* NS_LOG_LOGIC -- Log messages describing logical flow within a function;
* NS_LOG_ALL --- Log everything.
* LOG_ERROR --- Log error messages (associated macro: NS_LOG_ERROR);
* LOG_WARN --- Log warning messages (associated macro: NS_LOG_WARN);
* LOG_DEBUG --- Log relatively rare, ad-hoc debugging messages
(associated macro: NS_LOG_DEBUG);
* LOG_INFO --- Log informational messages about program progress
(associated macro: NS_LOG_INFO);
* LOG_FUNCTION --- Log a message describing each function called
(two associated macros: NS_LOG_FUNCTION, used for member functions,
and NS_LOG_FUNCTION_NOARGS, used for static functions);
* LOG_LOGIC -- Log messages describing logical flow within a function
(associated macro: NS_LOG_LOGIC);
* LOG_ALL --- Log everything mentioned above (no associated macro).
We also provide an unconditional logging level that is always displayed,
For each LOG_TYPE there is also LOG_LEVEL_TYPE that, if used, enables
logging of all the levels above it in addition to it's level. (As a
consequence of this, LOG_ERROR and LOG_LEVEL_ERROR and also LOG_ALL
and LOG_LEVEL_ALL are functionally equivalent.) For example,
enabling LOG_INFO will only enable messages provided by NS_LOG_INFO macro,
while enabling LOG_LEVEL_INFO will also enable messages provided by
NS_LOG_DEBUG, NS_LOG_WARN and NS_LOG_ERROR macros.
We also provide an unconditional logging macro that is always displayed,
irrespective of logging levels or component selection.
* NS_LOG_UNCOND -- Log the associated message unconditionally.
* NS_LOG_UNCOND -- Log the associated message unconditionally (no associated
log level).
Each level can be requested singly or cumulatively; and logging can be set
up using a shell environment variable (NS_LOG) or by logging system function
@@ -143,10 +157,12 @@ system will pick up the change and you should see the following output:
The additional debug information provided by the application is from
the NS_LOG_FUNCTION level. This shows every time a function in the application
is called during script execution. Note that there are no requirements in the
|ns3| system that models must support any particular logging
functionality. The decision regarding how much information is logged
is left to the individual model developer. In the case of the echo
is called during script execution. Generally, use of (at least)
NS_LOG_FUNCTION(this) in member functions is preferred. Use
NS_LOG_FUNCTION_NOARGS() only in static functions. Note, however, that there
are no requirements in the |ns3| system that models must support any particular
logging functionality. The decision regarding how much information is logged
is left to the individual model developer. In the case of the echo
applications, a good deal of log output is available.
You can now see a log of the function calls that were made to the application.
+3 -5
View File
@@ -116,9 +116,7 @@ main (int argc, char *argv[])
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (i3i2.GetAddress (1), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate ("448kb/s"));
ApplicationContainer apps = onoff.Install (c.Get (0));
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
@@ -149,8 +147,8 @@ main (int argc, char *argv[])
//
// Create an ErrorModel based on the implementation (constructor)
// specified by the default classId
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> ("RanVar", RandomVariableValue (UniformVariable (0.0, 1.0)),
"ErrorRate", DoubleValue (0.001));
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
em->SetAttribute ("ErrorRate", DoubleValue (0.001));
d3d2.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
// Now, let's use the ListErrorModel and explicitly force a loss
+5 -4
View File
@@ -243,15 +243,16 @@ int main (int argc, char *argv[])
// same time. This rn is added to AppStartTime to have the sources
// start at different time, however they will still send at the same rate.
UniformVariable x (0,1);
double rn = x.GetValue ();
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
x->SetAttribute ("Min", DoubleValue (0));
x->SetAttribute ("Max", DoubleValue (1));
double rn = x->GetValue ();
Ptr<Node> n = nodes.Get (j);
Ptr<Ipv4> ipv4 = n->GetObject<Ipv4> ();
Ipv4InterfaceAddress ipv4_int_addr = ipv4->GetAddress (1, 0);
Ipv4Address ip_addr = ipv4_int_addr.GetLocal ();
OnOffHelper onoff ("ns3::UdpSocketFactory", InetSocketAddress (ip_addr, port)); // traffic flows from node[i] to node[j]
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate (AppPacketRate));
ApplicationContainer apps = onoff.Install (nodes.Get (i)); // traffic sources are installed on all nodes
apps.Start (Seconds (AppStartTime + rn));
apps.Stop (Seconds (AppStopTime));
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
-6
View File
@@ -1,6 +0,0 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('ns2-mobility-trace', ['internet', 'mobility', 'wifi', 'mesh', 'applications'])
obj.source = 'ns2-mobility-trace.cc'
+3 -5
View File
@@ -151,9 +151,7 @@ main (int argc, char *argv[])
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff ("ns3::UdpSocketFactory",
InetSocketAddress (i5i6.GetAddress (1), port));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", StringValue ("2kbps"));
onoff.SetConstantRate (DataRate ("2kbps"));
onoff.SetAttribute ("PacketSize", UintegerValue (50));
ApplicationContainer apps = onoff.Install (c.Get (1));
@@ -164,8 +162,8 @@ main (int argc, char *argv[])
// 210 bytes at a rate of 448 Kb/s
OnOffHelper onoff2 ("ns3::UdpSocketFactory",
InetSocketAddress (i1i6.GetAddress (1), port));
onoff2.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff2.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff2.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onoff2.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
onoff2.SetAttribute ("DataRate", StringValue ("2kbps"));
onoff2.SetAttribute ("PacketSize", UintegerValue (50));
+1 -3
View File
@@ -136,9 +136,7 @@ main (int argc, char *argv[])
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (ifInAddrC.GetLocal (), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
onoff.SetConstantRate (DataRate (6000));
ApplicationContainer apps = onoff.Install (nA);
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
+1 -3
View File
@@ -107,9 +107,7 @@ main (int argc, char *argv[])
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (ifInAddrC.GetLocal (), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
onoff.SetConstantRate (DataRate (6000));
ApplicationContainer apps = onoff.Install (nA);
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
+31 -22
View File
@@ -122,22 +122,24 @@ RoutingExperiment::RoutingExperiment ()
std::string
PrintReceivedPacket (Ptr<Socket> socket, Ptr<Packet> packet)
{
Ptr<const SocketAddressTag> tag = packet->PeekPacketTag<SocketAddressTag> ();
SocketAddressTag tag;
bool found;
found = packet->PeekPacketTag (tag);
std::ostringstream oss;
oss << Simulator::Now ().GetSeconds () << " " << socket->GetNode ()->GetId ();
if (tag != 0)
{
InetSocketAddress addr = InetSocketAddress::ConvertFrom (tag->GetAddress ());
if (found)
{
InetSocketAddress addr = InetSocketAddress::ConvertFrom (tag.GetAddress ());
oss << " received one packet from " << addr.GetIpv4 ();
}
else
{
oss << " received one packet!";
}
return oss.str ();
}
else
{
oss << " received one packet!";
}
return oss.str ();
}
void
RoutingExperiment::ReceivePacket (Ptr<Socket> socket)
@@ -148,7 +150,7 @@ RoutingExperiment::ReceivePacket (Ptr<Socket> socket)
bytesTotal += packet->GetSize ();
packetsReceived += 1;
NS_LOG_UNCOND (PrintReceivedPacket (socket, packet));
}
}
}
void
@@ -268,19 +270,27 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
NetDeviceContainer adhocDevices = wifi.Install (wifiPhy, wifiMac, adhocNodes);
MobilityHelper mobilityAdhoc;
int64_t streamIndex = 0; // used to get consistent mobility across scenarios
ObjectFactory pos;
pos.SetTypeId ("ns3::RandomRectanglePositionAllocator");
pos.Set ("X", RandomVariableValue (UniformVariable (0.0, 300.0)));
pos.Set ("Y", RandomVariableValue (UniformVariable (0.0, 1500.0)));
pos.Set ("X", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=300.0]"));
pos.Set ("Y", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=1500.0]"));
Ptr<PositionAllocator> taPositionAlloc = pos.Create ()->GetObject<PositionAllocator> ();
streamIndex += taPositionAlloc->AssignStreams (streamIndex);
std::stringstream ssSpeed;
ssSpeed << "ns3::UniformRandomVariable[Min=0.0|Max=" << nodeSpeed << "]";
std::stringstream ssPause;
ssPause << "ns3::ConstantRandomVariable[Constant=" << nodePause << "]";
mobilityAdhoc.SetMobilityModel ("ns3::RandomWaypointMobilityModel",
"Speed", RandomVariableValue (UniformVariable (0.0, nodeSpeed)),
"Pause", RandomVariableValue (ConstantVariable (nodePause)),
"Speed", StringValue (ssSpeed.str ()),
"Pause", StringValue (ssPause.str ()),
"PositionAllocator", PointerValue (taPositionAlloc));
mobilityAdhoc.SetPositionAllocator (taPositionAlloc);
mobilityAdhoc.Install (adhocNodes);
streamIndex += mobilityAdhoc.AssignStreams (adhocNodes, streamIndex);
AodvHelper aodv;
OlsrHelper olsr;
@@ -330,8 +340,8 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
adhocInterfaces = addressAdhoc.Assign (adhocDevices);
OnOffHelper onoff1 ("ns3::UdpSocketFactory",Address ());
onoff1.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff1.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff1.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"));
onoff1.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
for (int i = 0; i <= nSinks - 1; i++)
{
@@ -340,9 +350,9 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
AddressValue remoteAddress (InetSocketAddress (adhocInterfaces.GetAddress (i), port));
onoff1.SetAttribute ("Remote", remoteAddress);
UniformVariable var;
Ptr<UniformRandomVariable> var = CreateObject<UniformRandomVariable> ();
ApplicationContainer temp = onoff1.Install (adhocNodes.Get (i + nSinks));
temp.Start (Seconds (var.GetValue (100.0,101.0)));
temp.Start (Seconds (var->GetValue (100.0,101.0)));
temp.Stop (Seconds (TotalTime));
}
@@ -368,9 +378,8 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
//AsciiTraceHelper ascii;
//Ptr<OutputStreamWrapper> osw = ascii.CreateFileStream ( (tr_name + ".tr").c_str());
//wifiPhy.EnableAsciiAll (osw);
std::ofstream os;
os.open ((tr_name + ".mob").c_str ());
MobilityHelper::EnableAsciiAll (os);
AsciiTraceHelper ascii;
MobilityHelper::EnableAsciiAll (ascii.CreateFileStream (tr_name + ".mob"));
//Ptr<FlowMonitor> flowmon;
//FlowMonitorHelper flowmonHelper;
+1 -3
View File
@@ -113,9 +113,7 @@ main (int argc, char *argv[])
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff ("ns3::UdpSocketFactory",
InetSocketAddress (i5i6.GetAddress (1), port));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", StringValue ("300bps"));
onoff.SetConstantRate (DataRate ("300bps"));
onoff.SetAttribute ("PacketSize", UintegerValue (50));
ApplicationContainer apps = onoff.Install (c.Get (0));
+1 -2
View File
@@ -140,8 +140,7 @@ main (int argc, char *argv[])
// Create a flow from n3 to n1, starting at time 1.1 seconds
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (i1i2.GetAddress (0), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate ("300b/s"));
ApplicationContainer apps = onoff.Install (c.Get (3));
apps.Start (Seconds (1.1));
+1 -2
View File
@@ -120,8 +120,7 @@ main (int argc, char *argv[])
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (i3i2.GetAddress (0), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate ("448kb/s"));
ApplicationContainer apps = onoff.Install (c.Get (0));
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
+1 -3
View File
@@ -112,9 +112,7 @@ main (int argc, char *argv[])
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (ifInAddrC.GetLocal (), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
onoff.SetConstantRate (DataRate (6000));
ApplicationContainer apps = onoff.Install (nA);
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
+158
View File
@@ -0,0 +1,158 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Network topology
//
// n0 n1
// | |
// =================
// LAN
//
// - UDP flows from n0 to n1
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("SocketOptionsIpv4");
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_INFO ("Received one packet!");
Ptr<Packet> packet = socket->Recv ();
SocketIpTosTag tosTag;
if (packet->RemovePacketTag (tosTag))
{
NS_LOG_INFO (" TOS = " << (uint32_t)tosTag.GetTos ());
}
SocketIpTtlTag ttlTag;
if (packet->RemovePacketTag (ttlTag))
{
NS_LOG_INFO (" TTL = " << (uint32_t)ttlTag.GetTtl ());
}
}
static void SendPacket (Ptr<Socket> socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &SendPacket,
socket, pktSize,pktCount - 1, pktInterval);
}
else
{
socket->Close ();
}
}
int
main (int argc, char *argv[])
{
//
// Allow the user to override any of the defaults and the above Bind() at
// run-time, via command-line arguments
//
uint32_t packetSize = 1024;
uint32_t packetCount = 10;
double packetInterval = 1.0;
//Socket options for IPv4, currently TOS, TTL, RECVTOS, and RECVTTL
uint32_t ipTos = 0;
bool ipRecvTos = true;
uint32_t ipTtl = 0;
bool ipRecvTtl = true;
CommandLine cmd;
cmd.AddValue ("PacketSize", "Packet size in bytes", packetSize);
cmd.AddValue ("PacketCount", "Number of packets to send", packetCount);
cmd.AddValue ("Interval", "Interval between packets", packetInterval);
cmd.AddValue ("IP_TOS", "IP_TOS", ipTos);
cmd.AddValue ("IP_RECVTOS", "IP_RECVTOS", ipRecvTos);
cmd.AddValue ("IP_TTL", "IP_TTL", ipTtl);
cmd.AddValue ("IP_RECVTTL", "IP_RECVTTL", ipRecvTtl);
cmd.Parse (argc, argv);
NS_LOG_INFO ("Create nodes.");
NodeContainer n;
n.Create (2);
InternetStackHelper internet;
internet.Install (n);
Address serverAddress;
NS_LOG_INFO ("Create channels.");
CsmaHelper csma;
csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
csma.SetDeviceAttribute ("Mtu", UintegerValue (1400));
NetDeviceContainer d = csma.Install (n);
NS_LOG_INFO ("Assign IP Addresses.");
Ipv4AddressHelper ipv4;
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (d);
serverAddress = Address(i.GetAddress (1));
NS_LOG_INFO ("Create sockets.");
//Receiver socket on n1
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (n.Get (1), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 4477);
recvSink->SetIpRecvTos (ipRecvTos);
recvSink->SetIpRecvTtl (ipRecvTtl);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
//Sender socket on n0
Ptr<Socket> source = Socket::CreateSocket (n.Get (0), tid);
InetSocketAddress remote = InetSocketAddress (i.GetAddress (1), 4477);
//Set socket options, it is also possible to set the options after the socket has been created/connected.
if (ipTos > 0)
{
source->SetIpTos (ipTos);
}
if (ipTtl > 0)
{
source->SetIpTtl (ipTtl);
}
source->Connect (remote);
AsciiTraceHelper ascii;
csma.EnableAsciiAll (ascii.CreateFileStream ("socket-options-ipv4.tr"));
csma.EnablePcapAll ("socket-options-ipv4", false);
//Schedule SendPacket
Time interPacketInterval = Seconds (packetInterval);
Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
Seconds (1.0), &SendPacket,
source, packetSize, packetCount, interPacketInterval);
NS_LOG_INFO ("Run Simulation.");
Simulator::Run ();
Simulator::Destroy ();
NS_LOG_INFO ("Done.");
}
+157
View File
@@ -0,0 +1,157 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Network topology
//
// n0 n1
// | |
// =================
// LAN
//
// - UDP flows from n0 to n1
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("SocketOptionsIpv6");
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_INFO ("Received one packet!");
Ptr<Packet> packet = socket->Recv ();
SocketIpv6TclassTag tclassTag;
if (packet->RemovePacketTag (tclassTag))
{
NS_LOG_INFO (" TCLASS = " << (uint32_t)tclassTag.GetTclass ());
}
SocketIpv6HopLimitTag hoplimitTag;
if (packet->RemovePacketTag (hoplimitTag))
{
NS_LOG_INFO (" HOPLIMIT = " << (uint32_t)hoplimitTag.GetHopLimit ());
}
}
static void SendPacket (Ptr<Socket> socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &SendPacket,
socket, pktSize,pktCount - 1, pktInterval);
}
else
{
socket->Close ();
}
}
int
main (int argc, char *argv[])
{
//
// Allow the user to override any of the defaults and the above Bind() at
// run-time, via command-line arguments
//
uint32_t packetSize = 1024;
uint32_t packetCount = 10;
double packetInterval = 1.0;
//Socket options for IPv6, currently TCLASS, HOPLIMIT, RECVTCLASS, and RECVHOPLIMIT
uint32_t ipv6Tclass = 0;
bool ipv6RecvTclass = true;
uint32_t ipv6Hoplimit = 0;
bool ipv6RecvHoplimit = true;
CommandLine cmd;
cmd.AddValue ("PacketSize", "Packet size in bytes", packetSize);
cmd.AddValue ("PacketCount", "Number of packets to send", packetCount);
cmd.AddValue ("Interval", "Interval between packets", packetInterval);
cmd.AddValue ("IPV6_TCLASS", "IPV6_TCLASS", ipv6Tclass);
cmd.AddValue ("IPV6_RECVTCLASS", "IPV6_RECVTCLASS", ipv6RecvTclass);
cmd.AddValue ("IPV6_HOPLIMIT", "IPV6_HOPLIMIT", ipv6Hoplimit);
cmd.AddValue ("IPV6_RECVHOPLIMIT", "IPV6_RECVHOPLIMIT", ipv6RecvHoplimit);
cmd.Parse (argc, argv);
NS_LOG_INFO ("Create nodes.");
NodeContainer n;
n.Create (2);
InternetStackHelper internet;
internet.Install (n);
Address serverAddress;
NS_LOG_INFO ("Create channels.");
CsmaHelper csma;
csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
csma.SetDeviceAttribute ("Mtu", UintegerValue (1400));
NetDeviceContainer d = csma.Install (n);
NS_LOG_INFO ("Assign IP Addresses.");
Ipv6AddressHelper ipv6;
ipv6.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64));
Ipv6InterfaceContainer i6 = ipv6.Assign (d);
serverAddress = Address(i6.GetAddress (1,1));
NS_LOG_INFO ("Create sockets.");
//Receiver socket on n1
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (n.Get (1), tid);
Inet6SocketAddress local = Inet6SocketAddress (Ipv6Address::GetAny (), 4477);
recvSink->SetIpv6RecvTclass (ipv6RecvTclass);
recvSink->SetIpv6RecvHopLimit (ipv6RecvHoplimit);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
//Sender socket on n0
Ptr<Socket> source = Socket::CreateSocket (n.Get (0), tid);
Inet6SocketAddress remote = Inet6SocketAddress (i6.GetAddress (1,1), 4477);
//Set socket options, it is also possible to set the options after the socket has been created/connected.
if (ipv6Tclass != 0)
{
source->SetIpv6Tclass (ipv6Tclass);
}
if (ipv6Hoplimit > 0)
{
source->SetIpv6HopLimit (ipv6Hoplimit);
}
source->Connect (remote);
AsciiTraceHelper ascii;
csma.EnableAsciiAll (ascii.CreateFileStream ("socket-options-ipv6.tr"));
csma.EnablePcapAll ("socket-options-ipv6", false);
//Schedule SendPacket
Time interPacketInterval = Seconds (packetInterval);
Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
Seconds (1.0), &SendPacket,
source, packetSize, packetCount, interPacketInterval);
NS_LOG_INFO ("Run Simulation.");
Simulator::Run ();
Simulator::Destroy ();
NS_LOG_INFO ("Done.");
}
+6
View File
@@ -6,3 +6,9 @@ def build(bld):
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-bound-tcp-static-routing.cc'
obj = bld.create_ns3_program('socket-options-ipv4', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-options-ipv4.cc'
obj = bld.create_ns3_program('socket-options-ipv6', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-options-ipv6.cc'
+5 -4
View File
@@ -62,9 +62,9 @@ Sender::GetTypeId (void)
MakeUintegerAccessor (&Sender::m_numPkts),
MakeUintegerChecker<uint32_t>(1))
.AddAttribute ("Interval", "Delay between transmissions.",
RandomVariableValue (ConstantVariable (0.5)),
MakeRandomVariableAccessor (&Sender::m_interval),
MakeRandomVariableChecker ())
StringValue ("ns3::ConstantRandomVariable[Constant=0.5]"),
MakePointerAccessor (&Sender::m_interval),
MakePointerChecker <RandomVariableStream>())
.AddTraceSource ("Tx", "A new packet is created and is sent",
MakeTraceSourceAccessor (&Sender::m_txTrace))
;
@@ -75,6 +75,7 @@ Sender::GetTypeId (void)
Sender::Sender()
{
NS_LOG_FUNCTION_NOARGS ();
m_interval = CreateObject<ConstantRandomVariable> ();
m_socket = 0;
}
@@ -139,7 +140,7 @@ void Sender::SendPacket ()
m_txTrace (packet);
if (++m_count < m_numPkts) {
m_sendEvent = Simulator::Schedule (Seconds (m_interval.GetValue ()),
m_sendEvent = Simulator::Schedule (Seconds (m_interval->GetValue ()),
&Sender::SendPacket, this);
}
+1 -1
View File
@@ -53,7 +53,7 @@ private:
uint32_t m_pktSize;
Ipv4Address m_destAddr;
uint32_t m_destPort;
RandomVariable m_interval;
Ptr<ConstantRandomVariable> m_interval;
uint32_t m_numPkts;
Ptr<Socket> m_socket;
+2 -2
View File
@@ -88,8 +88,8 @@ main (int argc, char *argv[])
// Create OnOff applications to send TCP to the hub, one on each spoke node.
//
OnOffHelper onOffHelper ("ns3::TcpSocketFactory", Address ());
onOffHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onOffHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
ApplicationContainer spokeApps;
+4 -5
View File
@@ -101,11 +101,10 @@ int main (int argc, char *argv[])
Ipv4InterfaceContainer ipv4Interfaces = ipv4.Assign (p2pInterfaces);
DoubleValue rate (errRate);
RandomVariableValue u01 (UniformVariable (0.0, 1.0));
Ptr<RateErrorModel> em1 =
CreateObjectWithAttributes<RateErrorModel> ("RanVar", u01, "ErrorRate", rate);
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate);
Ptr<RateErrorModel> em2 =
CreateObjectWithAttributes<RateErrorModel> ("RanVar", u01, "ErrorRate", rate);
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate);
// This enables the specified errRate on both link endpoints.
p2pInterfaces.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em1));
@@ -125,8 +124,8 @@ int main (int argc, char *argv[])
{
Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (i), servPort));
OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
clientHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
clientHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
ApplicationContainer clientApp = clientHelper.Install (n.Get (j));
clientApp.Start (Seconds (1.0 + i));
clientApp.Stop (Seconds (runtime + 1.0 + i));
+2 -2
View File
@@ -126,9 +126,9 @@ int main (int argc, char *argv[])
Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (j), servPort));
OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
clientHelper.SetAttribute
("OnTime", RandomVariableValue (ConstantVariable (1)));
("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
clientHelper.SetAttribute
("OffTime", RandomVariableValue (ConstantVariable (0)));
("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
ApplicationContainer clientApp = clientHelper.Install (n.Get (i));
clientApp.Start (Seconds (j)); /* delay startup depending on node number */
clientApp.Stop (Seconds (j + runtime));
+3 -4
View File
@@ -136,10 +136,9 @@ main (int argc, char *argv[])
// Create the OnOff applications to send TCP to the server
OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ());
clientHelper.SetAttribute
("OnTime", RandomVariableValue (ConstantVariable (1)));
clientHelper.SetAttribute
("OffTime", RandomVariableValue (ConstantVariable (0)));
clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
//normally wouldn't need a loop here but the server IP address is different
//on each p2p subnet
ApplicationContainer clientApps;
+1 -1
View File
@@ -2,7 +2,7 @@
def build(bld):
obj = bld.create_ns3_program('tcp-large-transfer',
['visualizer', 'point-to-point', 'applications', 'internet'])
['point-to-point', 'applications', 'internet'])
obj.source = 'tcp-large-transfer.cc'
obj = bld.create_ns3_program('tcp-nsc-lfn',
+2 -3
View File
@@ -185,9 +185,8 @@ main (int argc, char *argv[])
NetDeviceContainer devices;
devices = pointToPoint.Install (nodes);
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
"ErrorRate", DoubleValue (0.00001));
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
em->SetAttribute ("ErrorRate", DoubleValue (0.00001));
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
InternetStackHelper stack;
+1 -1
View File
@@ -97,7 +97,7 @@ main (int argc, char *argv[])
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (p2pNodes.Get (0));
+2 -3
View File
@@ -187,9 +187,8 @@ main (int argc, char *argv[])
NetDeviceContainer devices;
devices = pointToPoint.Install (nodes);
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
"ErrorRate", DoubleValue (0.00001));
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
em->SetAttribute ("ErrorRate", DoubleValue (0.00001));
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
InternetStackHelper stack;
+1 -1
View File
@@ -157,7 +157,7 @@ main (int argc, char *argv[])
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps =
+6 -6
View File
@@ -192,8 +192,8 @@ main (int argc, char *argv[])
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
"Bounds", RectangleValue (Rectangle (0, 20, 0, 20)),
"Speed", RandomVariableValue (ConstantVariable (2)),
"Pause", RandomVariableValue (ConstantVariable (0.2)));
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=2]"),
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"));
mobility.Install (backbone);
///////////////////////////////////////////////////////////////////////////
@@ -318,8 +318,8 @@ main (int argc, char *argv[])
mobility.SetPositionAllocator (subnetAlloc);
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
"Bounds", RectangleValue (Rectangle (-10, 10, -10, 10)),
"Speed", RandomVariableValue (ConstantVariable (3)),
"Pause", RandomVariableValue (ConstantVariable (0.4)));
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=3]"),
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"));
mobility.Install (infra);
}
///////////////////////////////////////////////////////////////////////////
@@ -363,8 +363,8 @@ main (int argc, char *argv[])
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (remoteAddr, port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate ("10kb/s"));
ApplicationContainer apps = onoff.Install (appSource);
apps.Start (Seconds (3.0));
apps.Stop (Seconds (20.0));
+5 -6
View File
@@ -160,8 +160,8 @@ def main(argv):
mobility.SetPositionAllocator(positionAlloc)
mobility.SetMobilityModel("ns3::RandomDirection2dMobilityModel",
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(0, 1000, 0, 1000)),
"Speed", ns.core.RandomVariableValue(ns.core.ConstantVariable(2000)),
"Pause", ns.core.RandomVariableValue(ns.core.ConstantVariable(0.2)))
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=2000]"),
"Pause", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"))
mobility.Install(backbone)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
@@ -277,8 +277,8 @@ def main(argv):
mobility.SetPositionAllocator(subnetAlloc)
mobility.SetMobilityModel("ns3::RandomDirection2dMobilityModel",
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(-25, 25, -25, 25)),
"Speed", ns.core.RandomVariableValue(ns.core.ConstantVariable(30)),
"Pause", ns.core.RandomVariableValue(ns.core.ConstantVariable(0.4)))
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=30]"),
"Pause", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"))
mobility.Install(infra)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
@@ -301,8 +301,7 @@ def main(argv):
onoff = ns.applications.OnOffHelper("ns3::UdpSocketFactory",
ns.network.Address(ns.network.InetSocketAddress(remoteAddr, port)))
onoff.SetAttribute("OnTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(1)))
onoff.SetAttribute("OffTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(0)))
onoff.SetConstantRate (ns.network.DataRate ("10kb/s"))
apps = onoff.Install(ns.network.NodeContainer(appSource))
apps.Start(ns.core.Seconds(3.0))
apps.Stop(ns.core.Seconds(20.0))
+21 -15
View File
@@ -53,7 +53,7 @@
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/tools-module.h"
#include "ns3/random-variable.h"
#include "ns3/random-variable-stream.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/flow-monitor-helper.h"
@@ -253,12 +253,16 @@ void
Experiment::SelectSrcDest (NodeContainer c)
{
uint32_t totalNodes = c.GetN ();
UniformVariable uvSrc (0, totalNodes/2 -1);
UniformVariable uvDest (totalNodes/2, totalNodes);
Ptr<UniformRandomVariable> uvSrc = CreateObject<UniformRandomVariable> ();
uvSrc->SetAttribute ("Min", DoubleValue (0));
uvSrc->SetAttribute ("Max", DoubleValue (totalNodes/2 -1));
Ptr<UniformRandomVariable> uvDest = CreateObject<UniformRandomVariable> ();
uvDest->SetAttribute ("Min", DoubleValue (totalNodes/2));
uvDest->SetAttribute ("Max", DoubleValue (totalNodes));
for (uint32_t i=0; i < totalNodes/3; i++)
{
ApplicationSetup (c.Get (uvSrc.RandomVariable::GetInteger ()), c.Get (uvDest.RandomVariable::GetInteger ()), 0, totalTime);
ApplicationSetup (c.Get (uvSrc->GetInteger ()), c.Get (uvDest->GetInteger ()), 0, totalTime);
}
}
@@ -272,22 +276,26 @@ void
Experiment::SendMultiDestinations (Ptr<Node> sender, NodeContainer c)
{
// UniformVariable params: (Xrange, Yrange)
UniformVariable uv (0, c.GetN ());
// UniformRandomVariable params: (Xrange, Yrange)
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable> ();
uv->SetAttribute ("Min", DoubleValue (0));
uv->SetAttribute ("Max", DoubleValue (c.GetN ()));
// ExponentialVariable params: (mean, upperbound)
ExponentialVariable ev (expMean, totalTime);
// ExponentialRandomVariable params: (mean, upperbound)
Ptr<ExponentialRandomVariable> ev = CreateObject<ExponentialRandomVariable> ();
ev->SetAttribute ("Mean", DoubleValue (expMean));
ev->SetAttribute ("Bound", DoubleValue (totalTime));
double start=0.0, stop=totalTime;
uint32_t destIndex;
for (uint32_t i=0; i < c.GetN (); i++)
{
stop = start + ev.GetValue ();
stop = start + ev->GetValue ();
NS_LOG_DEBUG ("Start=" << start << " Stop=" << stop);
do {
destIndex = (uint32_t) uv.GetValue ();
destIndex = (uint32_t) uv->GetValue ();
} while ( (c.Get (destIndex))->GetId () == sender->GetId ());
ApplicationSetup (sender, c.Get (destIndex), start, stop);
@@ -347,9 +355,7 @@ Experiment::ApplicationSetup (Ptr<Node> client, Ptr<Node> server, double start,
// Equipping the source node with OnOff Application used for sending
OnOffHelper onoff ("ns3::UdpSocketFactory", Address (InetSocketAddress (Ipv4Address ("10.0.0.1"), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (60000000)));
onoff.SetConstantRate (DataRate (60000000));
onoff.SetAttribute ("PacketSize", UintegerValue (packetSize));
onoff.SetAttribute ("Remote", AddressValue (InetSocketAddress (ipv4AddrServer, port)));
@@ -420,8 +426,8 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
//Rectangle (xMin, xMax, yMin, yMax)
mobil.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
"Bounds", RectangleValue (Rectangle (0, 500, 0, 500)),
"Speed", RandomVariableValue (ConstantVariable (10)),
"Pause", RandomVariableValue (ConstantVariable (0.2)));
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=10]"),
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"));
}
mobil.Install (c);
+1 -3
View File
@@ -143,9 +143,7 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
socket.SetProtocol (1);
OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (250)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (60000000)));
onoff.SetConstantRate (DataRate (60000000));
onoff.SetAttribute ("PacketSize", UintegerValue (2000));
ApplicationContainer apps = onoff.Install (c.Get (0));
+1 -2
View File
@@ -170,8 +170,7 @@ int main (int argc, char *argv[])
socket.SetProtocol (1);
OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (42)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate ("500kb/s"));
ApplicationContainer apps = onoff.Install (stas.Get (0));
apps.Start (Seconds (0.5));
+1 -2
View File
@@ -150,8 +150,7 @@ def main(argv):
socket.SetProtocol(1)
onoff = ns.applications.OnOffHelper("ns3::PacketSocketFactory", ns.network.Address(socket))
onoff.SetAttribute("OnTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(42)))
onoff.SetAttribute("OffTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(0)))
onoff.SetConstantRate (ns.network.DataRate ("500kb/s"))
apps = onoff.Install(ns.network.NodeContainer(stas.Get(0)))
apps.Start(ns.core.Seconds(0.5))
+2 -2
View File
@@ -121,8 +121,8 @@ int main (int argc, char const* argv[])
DataRate dataRate ("1Mb/s");
OnOffHelper onOff ("ns3::UdpSocketFactory", Address (InetSocketAddress (apIf.GetAddress (0), port)));
onOff.SetAttribute ("DataRate", DataRateValue (dataRate));
onOff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (0.01)));
onOff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (8)));
onOff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.01]"));
onOff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=8]"));
onOff.SetAttribute ("PacketSize", UintegerValue (50));
ApplicationContainer staApps = onOff.Install (sta);
+2 -2
View File
@@ -100,8 +100,8 @@ void experiment (bool enableCtsRts)
uint16_t cbrPort = 12345;
OnOffHelper onOffHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address ("10.0.0.2"), cbrPort));
onOffHelper.SetAttribute ("PacketSize", UintegerValue (200));
onOffHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onOffHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
// flow 1: node 0 -> node 1
onOffHelper.SetAttribute ("DataRate", StringValue ("3000000bps"));
+4 -6
View File
@@ -143,7 +143,7 @@ int main (int argc, char *argv[])
mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
"Mode", StringValue ("Time"),
"Time", StringValue ("2s"),
"Speed", StringValue ("Constant:1.0"),
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"),
"Bounds", RectangleValue (Rectangle (wifiX, wifiX+5.0,0.0, (nStas+1)*5.0)));
mobility.Install (sta);
wifiMac.SetType ("ns3::StaWifiMac",
@@ -180,8 +180,7 @@ int main (int argc, char *argv[])
}
OnOffHelper onoff = OnOffHelper (protocol, dest);
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetConstantRate (DataRate ("500kb/s"));
ApplicationContainer apps = onoff.Install (staNodes[0].Get (0));
apps.Start (Seconds (0.5));
apps.Stop (Seconds (3.0));
@@ -191,9 +190,8 @@ int main (int argc, char *argv[])
if (writeMobility)
{
std::ofstream os;
os.open ("wifi-wired-bridging.mob");
MobilityHelper::EnableAsciiAll (os);
AsciiTraceHelper ascii;
MobilityHelper::EnableAsciiAll (ascii.CreateFileStream ("wifi-wired-bridging.mob"));
}
Simulator::Stop (Seconds (5.0));
+7 -7
View File
@@ -8,16 +8,16 @@ def build(bld):
bld.register_ns3_script('mixed-wireless.py', ['core', 'mobility', 'wifi', 'applications', 'point-to-point',
'internet', 'csma', 'olsr'])
obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'tools', 'visualizer'])
obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'tools'])
obj.source = 'wifi-adhoc.cc'
obj = bld.create_ns3_program('wifi-clear-channel-cmu', ['internet', 'mobility', 'wifi', 'tools'])
obj.source = 'wifi-clear-channel-cmu.cc'
obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools', 'visualizer'])
obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools'])
obj.source = 'wifi-ap.cc'
bld.register_ns3_script('wifi-ap.py', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools', 'visualizer'])
bld.register_ns3_script('wifi-ap.py', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools'])
obj = bld.create_ns3_program('wifi-wired-bridging', ['internet', 'mobility', 'wifi', 'csma', 'bridge', 'applications'])
obj.source = 'wifi-wired-bridging.cc'
@@ -28,16 +28,16 @@ def build(bld):
obj = bld.create_ns3_program('multirate', ['internet', 'mobility', 'wifi', 'tools', 'flow-monitor', 'olsr', 'applications', 'point-to-point'])
obj.source = 'multirate.cc'
obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'tools', 'visualizer'])
obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'tools'])
obj.source = 'wifi-simple-adhoc.cc'
obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point', 'visualizer'])
obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point'])
obj.source = 'wifi-simple-adhoc-grid.cc'
obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi','config-store', 'visualizer'])
obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi','config-store'])
obj.source = 'wifi-simple-infra.cc'
obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools', 'visualizer'])
obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools'])
obj.source = 'wifi-simple-interference.cc'
obj = bld.create_ns3_program('wifi-blockack', ['internet', 'mobility', 'wifi', 'applications'])
+6 -2
View File
@@ -23,7 +23,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
%.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 TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png}
GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf}
@@ -31,7 +33,9 @@ GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf}
GRAPHS = $(GRAPHS_EPS) $(GRAPHS_PNG) $(GRAPHS_PDF)
%.png : %.eps; $(CONVERT) $< $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
# You can set these variables from the command line.
SPHINXOPTS =
+4 -2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
TMPDIR=/tmp
TMPFILE=`mktemp`
echo "\documentclass{book}
@@ -8,5 +10,5 @@ echo "\documentclass{book}
\includepdf[width=${1},fitpaper]{${2}}
\end{document}" >${TMPFILE}.tex
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
cp ${TMPFILE}.pdf ${3}
cp ${TMPFILE}.pdf ${2}
rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
Loaded 100 of 956 files, more files were not shown because too many files have changed in this diff. Show more