Compare commits

..

1397 Commits

Author SHA1 Message Date
Klaus a3e26a68f4 Edit Makefile to include examples. 2016-12-04 12:47:55 -07:00
Klaus 937c3c388c Added new version of Codel Queue that uses congestion marks. 2016-12-03 18:20:21 -07:00
Klaus a64d062b49 Changed Makefile for optimiized compilation. 2016-12-01 12:48:02 -07:00
Alexander Afanasyev 2c66f4c020 core: Additional code for ability to generate subset of documentation by utils/print-introspected-doxygen 2015-08-25 11:08:20 -07:00
Alexander Afanasyev 4da74c6430 build: Fix waf-tools/boost.py
The defined logic sets STLIBPATH_BOOST variable even if static boost
libraries have not been requested.  Having this variable set,
potentially prefers linking to pre-installed libns3-dev... libraries,
instead of the compiled libraries.
2015-08-21 00:51:12 -07:00
Alexander Afanasyev cb9702a556 build: Removing 'subst' feature that is defined in waf (waflib/TaskGen.py) 2015-08-20 20:19:46 -07:00
Alexander Afanasyev d2e78ccb33 bindings: Automatically try to generate pybindgen version if it is not available 2015-08-20 17:06:04 -07:00
Alexander Afanasyev 1cdf54260b build: Add compiler flag checking 2015-08-20 17:05:56 -07:00
Alexander Afanasyev a22fb1ba66 core: Give ability to generate subset of documentation by utils/print-introspected-doxygen 2015-08-20 17:05:56 -07:00
Alexander Afanasyev 5e112ceba3 bindings: Version update and ndnSIM-related updates
- Now requiring a customized version of pybindgen (necessary for ndnSIM
  bindings)
- Fixed ndnSIM FIB/CS/PIT visualizer plugins to work with ndnSIM-v2 codebase
2015-08-20 17:05:55 -07:00
Alexander Afanasyev 55025b4713 build: Extend .pc file generation to include export_includes option 2015-08-20 17:05:55 -07:00
Alexander Afanasyev 8200d73066 build: Build script improvements 2015-08-20 17:05:55 -07:00
Spyridon Mastorakis 7ce4e68e5e build: Force to compile using C++11
Starting this commit, NS-3/ndnSIM requires gcc >= 4.7 or clang >= 3.5
2015-08-20 17:05:55 -07:00
Alexander Afanasyev f4014037e8 build: Disable -Werror flags 2015-08-20 17:05:55 -07:00
Alexander Afanasyev 4b404bb9bb topology-read: Rescan bindings 2015-08-20 17:05:55 -07:00
Alexander Afanasyev 0ac1381146 topology-read: Making default constructor for TopologyReader::Link public.
This is necessary for some STL containers operations.
2015-08-20 17:05:55 -07:00
Alexander Afanasyev dd25de7e36 topology-read: TopologyReader and derivatives are no longer Objects
To allow smart pointers, TopologyReader is just inherited from
SimpleRefCount<TopologyReader> class
2015-08-20 17:05:55 -07:00
Alexander Afanasyev 2d976ae200 topology-read: Several extensions of TopologyReader 2015-08-20 17:05:55 -07:00
Alexander Afanasyev cb4770b9d2 bindings+network: Packet API extension, allowing creating of packet from string (for python bindings) 2015-08-20 17:05:55 -07:00
Alexander Afanasyev 8ab3d4ecc4 bindings+network: Adding STL-like iterator wrappers (begin(), end(), size()) for NodeContainer class 2015-08-20 17:05:55 -07:00
Alexander Afanasyev e1fd51ee82 visualizer+ndnSIM: Adding ability to visualize items of the content store in real time 2015-08-20 17:05:54 -07:00
Alexander Afanasyev 86e477e13b visualizer+ndnSIM: Adding plugin to display ndnSIM PIT status 2015-08-20 17:05:54 -07:00
Alexander Afanasyev a0c8acfa66 visualizer+ndnSIM: Adding plugin to display a ndnSIM FIB state 2015-08-20 17:05:54 -07:00
Alexander Afanasyev 15c018ff25 visualizer: Modifying the way visualizer is installed
Using ant_glob instead of explicitly listing the installed files
2015-08-20 17:05:54 -07:00
Alexander Afanasyev 4193a68e34 visualizer: Adding ability to assign position to mobility model is env{NS_VIS_ASSIGN} is set to any value 2015-08-20 17:05:54 -07:00
Alexander Afanasyev f0773a150e visualizer: output node ID 2015-08-20 17:05:54 -07:00
Alexander Afanasyev 0c20bbf621 visualizer: Making a periodic topology rescan 2015-08-20 17:05:54 -07:00
Alexander Afanasyev 117d21b1dd visualizer+mobility+bindings: A specialized version of GetObject (GetMobilityModel) in MobilityModel
This method is now used by the visualizer to obtain mobility interface.

This trick is necessary on some platforms in order to use mobility models that
are not explicitly exported (or is impossible to export) to python.
2015-08-20 16:48:39 -07:00
Alexander Afanasyev ef9e955e6c fd-net-device: Add missing include for strerror 2015-08-20 14:40:42 -07:00
Alexander Afanasyev 174704abba point-to-point: Extending helper interface to support setting individual queue parameters 2015-08-20 14:40:42 -07:00
Alexander Afanasyev efabb7dcaa point-to-point-layout: Respect absolute values of specified boundaries
Before the change, the values specified in SetBoundaryBox were used only
to calculate relative positions of grid nodes.
2015-08-20 14:40:41 -07:00
Ilya Moiseenko dec52190b7 point-to-point: Add support of NDN protocol
- Add support of PPP->Ethernet and Ethernet->PPP frame type conversion
  for NDN protocol
- Adding support for NDN payload in PppHeader::Print method
2015-08-20 14:40:41 -07:00
Alexander Afanasyev 718d156554 Adding .gitignore and disclaimer note in README 2015-08-20 14:40:41 -07:00
Peter D. Barnes, Jr. ebd742ba2d Refactor test name character restrictions 2015-08-18 16:17:36 -07:00
Peter D. Barnes, Jr. be83597fd4 Flush pcap files in debug builds. 2015-08-18 15:19:32 -07:00
Peter D. Barnes, Jr. 111035d3fa Fix response vector file path construction. 2015-08-18 15:15:04 -07:00
Tom Henderson bfb95b39dd fix maybe-uninitialized warning 2015-08-17 15:31:27 -07:00
Tom Henderson 1c7a870d29 update RELEASE_NOTES 2015-08-17 14:52:57 -07:00
Tom Henderson 5ebab00295 rescan mesh bindings 2015-08-17 14:43:08 -07:00
Tom Henderson 65b2e8d837 bug 1482: avoid newlines in mesh header Print() methods; implement additional Print() methods; additional cleanup of header-related code 2015-08-17 14:31:07 -07:00
Tom Henderson 7e6ca121d6 bug 1482: split PeerLinkFrameStart header into different header types, avoiding the need to set the header type before deserializing 2015-08-17 14:29:51 -07:00
Tom Henderson 134aadf85e move definition of Wifi information element IDs from mesh to wifi module; implement more fully the WifiInformationElementVector header class 2015-08-17 14:29:32 -07:00
Tom Henderson 34b3521638 update test vectors for mesh header changes from bug 1901 patches 2015-08-17 14:02:17 -07:00
Tom Henderson a9196fc0c6 bug 1901: set MeshControlPresent flag in the QoS Control field 2015-08-17 13:45:08 -07:00
Tom Henderson a7cb5fb195 bug 1901: set mesh frames to type QOSDATA 2015-08-17 13:44:25 -07:00
Sébastien Deronne fee54949b1 update RELEASE_NOTES 2015-08-15 19:30:10 +02:00
Vedran Miletić 3a690bd071 Detect gccxml using CastXML wrapper in waf configure 2015-08-15 17:14:51 +02:00
Sébastien Deronne 56dbc49aa3 Add utest for Bug 730 2015-08-15 13:15:03 +02:00
Sébastien Deronne bc4d797dbf Bug 730 [wifi] - Enabling fragmentation at run-time breaks simulation (patch from Christian Facchini) 2015-08-15 13:14:14 +02:00
Tom Henderson 95ffc4d89b rescan bindings 2015-08-14 08:00:38 -07:00
Tom Henderson c67535dc7a fix typo 2015-08-13 19:53:56 -07:00
Peter D. Barnes, Jr. de61c2f689 GetDevice() should be const. 2015-08-13 12:10:01 -07:00
Peter D. Barnes, Jr. d81c292aba Remove obsolete struct, never invoked. 2015-07-29 12:44:41 -07:00
Tom Henderson 6db467ef95 update test documentation 2015-08-13 11:08:56 -07:00
Tom Henderson 2704990f20 fix mesh doxygen 2015-08-13 10:24:42 -07:00
Tom Henderson 04a0f64427 fix typo 2015-08-13 09:20:55 -07:00
Tom Henderson 686844f601 add missing author 2015-08-13 09:19:58 -07:00
Sébastien Deronne 1723645d4e rescan bindings 2015-08-09 21:17:18 +02:00
Sébastien Deronne c66070b52c cleanup 2015-08-09 20:50:54 +02:00
Sébastien Deronne 3f1a93b68b [network] Rebuild python bindings 2015-08-09 20:29:17 +02:00
Alexander Krotov 292979e742 Removed GetCurrentStartOffset and GetCurrentEndOffset 2015-07-26 19:44:31 +03:00
Alexander Krotov 7fb26bfe59 Make ByteTagList offsets relative to packet start 2015-07-26 19:44:32 +03:00
Alexander Krotov 19488ad7aa Factor ByteTagList::Adjust out of ByteTagList::AddAt{Start,End} 2015-08-08 23:33:55 +03:00
Alexander Krotov 0afb4dcc80 Optimize ByteTagList adjustment 2015-08-08 23:13:40 +03:00
Alexander Krotov a32da6615b Byte tags benchmark 2015-08-08 18:21:45 +03:00
Alexander Krotov 57fa7f7b9b Use CommandLine to parse arguments in Packet benchmark 2015-08-08 21:45:16 +03:00
Mathieu Lacage 2e0d44a130 make minimum number of iterations 1 to avoid changing command-line behavior 2015-08-07 02:50:14 -04:00
Alexander Krotov 35f4c249d4 Optimize ByteTagList by tracking byte tags boundaries
This patch restores performance to the level nearly equal to that before
recent bugfixing, as was checked by running utils/bench-packets.
2015-07-26 19:44:33 +03:00
Mathieu Lacage a623762bd9 merge 2015-08-07 02:47:25 -04:00
Tom Henderson 8509f28877 rescan network bindings 2015-08-06 11:15:42 -07:00
Mathieu Lacage 6c4f5c7c79 run the benchmark over multiple iterations to minimize variance 2015-08-06 05:15:51 -04:00
Alexander Krotov ded303057a When data is written with WriteU64, it should be tested with ReadU64,
not ReadLsbtohU64.
2015-08-02 20:44:01 +03:00
Alexander Krotov b62cf68711 Make Buffer::CreateFullCopy private 2015-08-02 19:26:37 +03:00
Alexander Krotov 01983101a6 Fragmentation and concatenation benchmark 2015-08-02 19:26:35 +03:00
Alexander Krotov 6250c61bcf Optimize Buffer::Iterator::CheckNoZero 2015-07-26 19:44:29 +03:00
Mathieu Lacage fd74ac7616 remove un-needed return value 2015-08-05 15:20:10 -04:00
Mathieu Lacage 3ae948f663 ByteTagList::AddAtEnd/AddAtStart must be called unconditionally to ensure that newly-added bytes are not tagged when 1. Packet::AddByteTag, 2. Packet::RemoveHeader, 3. Packet.AddHEader 2015-08-05 15:11:19 -04:00
Alexander Krotov b0577a2eac Add "unfixable" ByteTagList test case
This test case creates empty packet, removes last 50 bytes and
adds them back.

As packet is empty initially, no bytes are marked dirty.  Therefore,
Buffer::AddAtEnd returns false, indicating that added bytes were not used
before.  However, it does not know if they were tagged with byte tags.

This bug is not so easy to fix as Buffer does not have enough information
to return true in Buffer::AddAtEnd when it should.
2015-07-26 19:44:31 +03:00
Alexander Krotov 8f515dcc03 Add failing PaddingAtEnd test case 2015-07-26 19:44:30 +03:00
Alexander Krotov def03785bf Add ByteTagList tests, 3 out of 4 failing 2015-07-26 19:44:29 +03:00
Alina Quereilhac 47d54736d4 bug 2119: Fixing memory leaks in FdNetDevice test with DefaultSimulatorImpl due to non-executed events when simulation ends 2015-08-04 22:45:54 +02:00
Sébastien Deronne 8c21bdae76 add missing mac-tx-middle.h in wifi wscript 2015-08-01 19:48:14 +02:00
Tom Henderson dabdc5f45b remove debugging statement introduced in changeset 11540:29d2c2f5c2cf 2015-07-31 12:58:40 -07:00
Peter D. Barnes, Jr. f7311ec17a Build profile macros 2015-07-28 16:33:35 -07:00
Sébastien Deronne 62eb723a6b fix incorrect NAV duration (reported by Xiaowen Wang) 2015-07-28 19:55:54 +02:00
Alexander Krotov e5697f0c2c Remove ByteTagList::IsDirty{Start,End}
These functions are only used once and do not save time.  Both functions
iterate over the whole list just to prevent iterating over the whole list
if they return false. As traversing the list is required in any case,
these functions can be removed.
2015-07-26 19:44:06 +03:00
Tommaso Pecorella 9b2f73e9ae Bug 2148 - Ipv6Interface::SetUp doesn't re-create the Link-Local addresses 2015-07-24 08:59:57 +02:00
Gustavo Carneiro 1ad026d2bd Update to get pybindgen from github, with new version scheme 2015-07-26 14:01:43 +01:00
Tommaso Pecorella 871b92f377 [Doxygen] update sixlowpan in/out params 2015-07-25 23:55:40 +02:00
Tommaso Pecorella fd1bda1bb9 [Doxygen] update topology-read in/out params 2015-07-25 20:17:45 +02:00
Peter D. Barnes, Jr. e1a48462bc [Doxygen] Label arguments as in,out. Sentence capitalization. 2015-07-24 12:45:22 -07:00
Peter D. Barnes, Jr. 91a1e78dca Revert df256d84a7fa. 2015-07-24 11:49:59 -07:00
Peter D. Barnes, Jr. 0e5781ee97 [Sphinx] Fix mesh manual bugs. 2015-07-24 11:49:29 -07:00
Sébastien Deronne 885bb7e1cd Bug 2156 [wifi] - Duplicate packets when using two level aggregation 2015-07-23 21:55:17 +02:00
Peter D. Barnes, Jr. 62f72a7048 [Doxygen] Fix dirty repo detection. 2015-07-22 17:10:15 -07:00
Peter D. Barnes, Jr. 9e71fc449f [Doxygen] Template parameter deduction. 2015-07-22 17:09:55 -07:00
Peter D. Barnes, Jr. aa14800121 Add NonCopyable, refactor Singleton. 2015-07-21 16:21:49 -07:00
Peter D. Barnes, Jr. d5be610a4d [Doxygen] Remaining in core 2015-07-21 16:20:17 -07:00
Peter D. Barnes, Jr. 4d180f672c Clarify that Time arguments to Schedule are all delays wrt Now. 2015-07-21 12:20:12 -07:00
Peter D. Barnes, Jr. 69dd251a0f [Doxygen] Better documentation for NS_DEPRECATED 2015-07-10 18:13:14 -07:00
Peter D. Barnes, Jr. 39c2b005a4 Remove file-local uncalled and unimplemented functions. 2015-07-08 17:36:16 -07:00
Peter D. Barnes, Jr. 715841d0b3 Fix spelling 2015-07-06 14:43:38 -07:00
Sébastien Deronne cce40e5148 update RELEASE_NOTES 2015-07-22 23:19:22 +02:00
Matias Richart c971b0de7d Bug 2154 [wifi] - Incorrect power calculation in wifi power adaptation examples 2015-07-22 23:16:53 +02:00
Matias Richart cb8b2a5ad1 Bug 2153 [wifi] - Incorrect power limits in wifi power control algorithms 2015-07-22 23:14:47 +02:00
Christopher Hepner 773bee35ac improve mesh model library documentation (based on original documentation text from Kirill Andreev) 2015-07-22 08:53:01 -07:00
Tom Henderson 31211f8dc2 add more documentation structure for mesh module 2015-07-22 08:47:43 -07:00
Tom Henderson bc89ea5288 fix task name in wscript 2015-07-22 08:42:18 -07:00
Matthieu Coudron 368aa197c4 Simplify ns3tcp test code used for pcap writing 2015-07-22 01:13:59 +02:00
Matthieu Coudron 2f63edb779 Add SinkWithHeader to PcapHelper 2015-07-22 01:13:06 +02:00
Alina Quereilhac 559d337432 revert changeset 4be177372dc4 (Bug 2119) due to test 'dummy-network' now crashing for OS X 2015-07-20 10:27:31 +02:00
Alina Quereilhac 1b432fecac Bug 2119 - valgrind leaks intermittently reported for fd-net-device dummy-network - Required SimulatorImplementationType to be set to ns3::RealtimeSimulatorImpl 2015-07-15 16:52:16 +02:00
Tom Henderson c75d2fb8f5 update CHANGES.html and RELEASE_NOTES 2015-07-13 20:32:31 -07:00
Tom Henderson 34cde13d3f rescan internet bindings 2015-07-13 19:18:49 -07:00
Natale Patriciello 66f58aab5a Documented TCP states, moved enum inside TcpSocket 2015-07-13 17:58:06 -07:00
Natale Patriciello 7f8dc7e404 Window() is now managed inside TcpSocketBase 2015-07-13 17:57:09 -07:00
Natale Patriciello f228c5c17b Initialize cWnd and ssTh in TcpSocketBase 2015-07-13 17:56:15 -07:00
Natale Patriciello 43051b28c0 Moved cWnd and ssThresh inside TcpSocketBase
These two trace sources are now managed in TcpSocketBase.
2015-07-13 10:02:55 -07:00
Natale Patriciello 5c99689061 TCP flags are now printed using string instead of numbers
This patch improves readability when TCP flags are involved.
2015-07-13 08:26:43 -07:00
Natale Patriciello 8f11338195 TcpHeader can be printed in NS_LOG messages
Implemented the operator << to an output stream.
2015-07-13 08:23:40 -07:00
Natale Patriciello c489647301 DoForwardUp behavior unified for IPv4 and IPv6
The commit unifies the behavior of DoForwardUp for both IPv4 and IPv6
(previously tagged as duplicated code) by changing the input parameters: from an
{IPv4,IPv6}Header to a couple of address (sender and receiver). Thanks to the
Send() method of TcpL4Protocol which takes in input two Addresses, the behavior
of the method could be unified as in the commit title.
2015-07-13 08:06:38 -07:00
Natale Patriciello d3f916a917 Addressed comment in CodeReview
SendPacket made private except the one which takes general Address. Some minor
correction on doxygen comments.
2015-07-13 08:05:07 -07:00
Natale Patriciello 3dc863a005 Checked style on TcpL4Protocol 2015-07-13 08:03:44 -07:00
Natale Patriciello b97b0de553 Const correctness enforced 2015-07-13 08:02:58 -07:00
Natale Patriciello fdcf89dd53 Duplicated code removed from Receive in TcpL4Protocol
When TcpL4Protocol receive a packet, the methods which handle the management
of the packet itself (for both IPv4 and IPv6) shares a lot of code. Differencies
are only in the endpoint searching; the other operations have been merged in two
protected methods, which are called by the Receive methods.
2015-07-13 07:53:58 -07:00
Natale Patriciello ec3ff0953b Bug 2132: If no endpoints are found for the incoming packet, the TcpL4Protocol sends an RST packet. However it was not well-formatted (missing right source, destination and ports). 2015-07-13 07:50:47 -07:00
Natale Patriciello b4e765c5b6 Documentation improvements on TcpL4Protocol 2015-07-13 07:48:39 -07:00
Natale Patriciello 5c66f6fa1f Unused header removed to enable a faster compile process. 2015-07-08 06:58:31 -07:00
Natale Patriciello dcdbc179fb Thanks to previous commits, now TcpSocketBases uses only public methods on TcpL4Protocol and the friend relation could be removed. 2015-07-08 06:50:00 -07:00
Natale Patriciello f612ebca1c Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol. 2015-07-08 06:48:40 -07:00
Natale Patriciello 93ce0ad194 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol. 2015-07-08 06:46:54 -07:00
Tom Henderson 1606c90844 fix noeol in wscript 2015-07-12 07:45:13 -07:00
Sébastien Deronne 173514d457 fix, improve and extend HT capabilities information element 2015-07-11 19:02:02 +02:00
Sébastien Deronne 4ad1a2c90e [wave] Rebuild python bindings 2015-07-11 12:24:01 +02:00
Sébastien Deronne ac797fccec [mesh] Rebuild python bindings 2015-07-11 12:17:55 +02:00
Sébastien Deronne 198428de10 rebuild bindings 2015-07-11 11:38:29 +02:00
Sébastien Deronne 425490bc54 rename snrDb to signalNoiseDbm 2015-07-11 11:14:24 +02:00
Sébastien Deronne ce9e786d23 improve readibility of snr values 2015-07-11 00:59:27 +02:00
Peter D. Barnes, Jr. 0ec7a3b9d4 Remove extraneous blank lines from build chatter. 2015-07-09 15:13:34 -07:00
Peter D. Barnes, Jr. e43b4acbde Restore section label required for cross-linking. 2015-07-09 11:35:37 -07:00
Sébastien Deronne 051d5b1aa1 fix Supported MCS Set field in HT capabilities 2015-07-10 11:50:54 +02:00
Tommaso Pecorella 3d53962700 Bug 1941 - [energy] Remove unnecessary dependency involving energy module 2015-07-03 18:11:05 +02:00
Tommaso Pecorella b332bce32f Bug 1941 - [wave] Remove unnecessary dependency on Application module 2015-07-08 10:03:53 +02:00
Tommaso Pecorella 270691c72d Bug 1941 - [mesh] Remove unnecessary dependency on Application module 2015-07-09 23:52:12 +02:00
Tommaso Pecorella 435859a64b Bug 1941 - [aodv] Remove unnecessary dependency on Application module 2015-07-03 18:12:25 +02:00
Tommaso Pecorella 3c4d250b4b Bug 1941 - [olsr] Remove unnecessary dependency on Application module 2015-07-03 18:11:59 +02:00
Tommaso Pecorella 1ffa01e505 [wifi] Rebuild python bindings 2015-07-09 22:46:36 +02:00
Sébastien Deronne b7e891ccfa rename snrDbm to snrDb 2015-07-09 18:20:34 +02:00
Sébastien Deronne a096ecca2f update RELEASE_NOTES 2015-07-08 23:52:26 +02:00
Sébastien Deronne 0d5fc14442 add support for HT MCS and A-MPDU in radiotap headers 2015-07-08 23:44:17 +02:00
Tommaso Pecorella 84452d7d9e Waf - setup optimization and debug info for clang 2015-07-08 00:09:46 +02:00
Vedran Miletić f1a1922cc0 Silence Clang 3.6+ -Wno-potentially-evaluated-expression warning
Clang 3.6+ warns about "expression with side effects will be evaluated
despite being used as an operand to 'typeid'" if Ptr<> is used as an
argument to typeid(). This changes the code to use raw pointers
instead of Ptr<>.
2015-07-07 22:06:08 +02:00
Vedran Miletić a944617f27 Use proper environment when checking for supported compiler flags 2015-07-07 22:01:23 +02:00
Vedran Miletić 6cb06ce560 Handle the case where scratch or examples directory is missing 2015-07-07 13:37:52 +02:00
Vedran Miletić 46297abcda Remove unused EXAMPLE_DIRECTORIES environment variable 2015-07-07 13:32:26 +02:00
Vedran Miletić 9f10edb665 Update waf to 1.8.12 2015-07-07 12:18:59 +02:00
Sébastien Deronne 7567960935 fix HT capabilities printing in PCAP files 2015-07-02 21:11:24 +02:00
Tom Henderson 412cf215b9 bump pybindgen version 2015-07-02 12:29:48 -07:00
Tommaso Pecorella d8c14885b2 Bug 2124 - UdpSocketImpl::ShutdownRecv doesn't stop the Ipv[4,6]EndPointDemux 2015-07-02 18:21:44 +02:00
Sébastien Deronne 9e70317df6 remove file execution bit on wifi source files 2015-06-14 22:30:44 +02:00
Nicola Baldo cf45881bcc fixed Bug 2143 - maybe-uninitialized warning 2015-06-30 18:31:43 +02:00
Peter D. Barnes, Jr. 30c95658e9 Fix doxygen command after update to waf 1.8 in r11458, 126b15bc1efc 2015-06-28 20:24:41 -07:00
Peter D. Barnes, Jr. dfd965e6f8 Revert unintentional change of third.cc trace file names, and remove execute bits.
These were introduced in 11418:4d6051f4166f.

Reported by Tom Henderson
2015-06-26 11:43:48 -07:00
Tom Henderson 0e03b5828f enable wifi module documentation to be built standalone 2015-06-24 21:48:29 -07:00
Tom Henderson 5a76830b73 bug 2127: Scheduler benchmark utility works correctly in first run only (patch due to Philipp Andelfinger) 2015-06-24 21:39:59 -07:00
Tom Henderson dc3667a937 bug 2125: subclasses must chain up to their base class NotifyNewAggregate() method (patch due to nlmills) 2015-06-24 21:36:15 -07:00
Mohit P. Tahiliani d8ee7fffa4 add second.py and third.py Python examples 2015-06-24 19:40:03 -07:00
Mohit P. Tahiliani 6433205b6c fix command-line argument handling in mixed-wireless.py example 2015-06-24 18:46:01 -07:00
Sébastien Deronne 340437104d fix issue with the delay parameter in test-interference-helper 2015-06-24 18:54:29 +02:00
Vedran Miletić 4146d77eaf Fix printing of gccxml version (Waf 1.8 API change) 2015-06-23 14:40:12 +02:00
Vedran Miletić 2006e41baa Fix Python bindings wscript and waf-tools for Waf 1.8 2015-06-23 14:34:53 +02:00
Matthieu Coudron 5506d60922 Update Waf to 1.8.11
Changes:
* run_c_code() is replaced by check()
* nice_path() got removed, and is replaced by bldpath()
* check_compilation_flag() is updated to work with 1.8 API
2015-06-23 14:32:41 +02:00
Sébastien Deronne 8cfb0bf43f rescan bindings 2015-06-14 20:53:47 +02:00
Sébastien Deronne 246166d593 add test script for InterferenceHelper 2015-06-22 19:00:34 +02:00
Sébastien Deronne 46b7c2ac8a fix some more issues in wifi-phy-test 2015-06-22 19:00:03 +02:00
Sébastien Deronne 660756646a rebuild pcap traces 2015-06-22 18:45:52 +02:00
Sébastien Deronne cd0f4ad075 Bug 2108 [wifi] - Erroneous implementation in InterferenceHelper 2015-06-22 18:45:49 +02:00
Tom Henderson 9ca914b2b3 Bug 1249 [wifi] - doxygen comments on device-level SetMobility () 2015-06-22 18:28:40 +02:00
Sébastien Deronne 34ca3a8c0b cleanup wifi module 2015-06-21 00:23:45 +02:00
Tom Henderson 2c13d2dbe8 fix dead link 2015-06-16 13:13:06 -07:00
Sébastien Deronne 65f248403a cleanup wifi-remote-station-manager 2015-06-15 20:05:15 +02:00
Nicola Baldo 560af5e3d8 fixed function logs in radio-berarer-stats-connector 2015-06-15 18:06:54 +02:00
Sébastien Deronne e6d5b2752d cleanup yans-wifi-channel, yans-error-rate-model and nist-error-rate-model 2015-06-14 23:05:49 +02:00
Sébastien Deronne b19606dc73 rescan bindings 2015-06-14 20:29:08 +02:00
Sébastien Deronne 9080f150a6 cleanup yans-wifi-phy 2015-06-14 20:15:37 +02:00
Sébastien Deronne 40d10240cf rescan bindings 2015-06-14 18:21:46 +02:00
Sébastien Deronne ecbd57326b cleanup wifi-phy 2015-06-14 17:33:42 +02:00
Sébastien Deronne 569f1c2dce cleanup wifi-mac-header 2015-06-14 10:53:08 +02:00
Sébastien Deronne 3109031c35 cleanup mac-low.cc 2015-06-12 20:58:01 +02:00
Sébastien Deronne 90806e1f2a fix issues with wifi-phy-test 2015-06-12 20:14:31 +02:00
Tommaso Pecorella d74e9fdf30 Enh. 2130 - Allow SimpleChannel to simulate hidden terminals. 2015-06-11 19:07:25 +02:00
Tommaso Pecorella c5f127c193 Bug 1929 - TcpL4Protocol::Send must indicate the source address to routing (if known) 2015-06-11 17:30:07 +02:00
Tommaso Pecorella cbe83c6f5a Bug 2138 - SimpleNetDevice could send overlapped packets. 2015-06-11 11:40:53 +02:00
Tom Henderson 8df0d04bbb add missing copyrights 2015-06-10 07:52:23 -07:00
Tommaso Pecorella ba17f6168e Bug 1929 - TcpL4Protocol::Send must indicate the source address to routing (if known) 2015-06-09 23:36:57 +02:00
Tommaso Pecorella f47b9bce81 Bug 2135 - TCP doesn't honor the socket's output interface 2015-06-09 23:41:06 +02:00
Peter D. Barnes, Jr. d67ced0392 Fix parents, group names, and missing constructors in GetTypeId definitions. 2015-06-09 12:59:59 -07:00
Peter D. Barnes, Jr. 1420606fc6 Convert to unix line endings. 2015-06-08 16:38:30 -07:00
Peter D. Barnes, Jr. a2e0ed145a Missing mode lines. 2015-06-08 16:37:40 -07:00
Peter D. Barnes, Jr. d85ad22554 Condition examples/realtime/realtime-udp-echo.cc on ENABLE_REAL_TIME 2015-06-08 12:24:46 -07:00
Tom Henderson ab88e121ca fix attribute accessor for DropTailQueue Mode attribute (reported by Chip Webb) 2015-06-08 13:46:18 -07:00
Sébastien Deronne 0ac6727a82 update RELEASE_NOTES 2015-06-07 16:43:55 +02:00
Junling Bu c16fb42027 Bug 2136 [wifi] - The usage of tid in wifi and wave module shall be if (tid > 7) rather than if (tid >= 7) 2015-06-07 16:42:28 +02:00
Sébastien Deronne 8bd7f62305 rescan bindings 2015-06-06 18:21:26 +02:00
Sébastien Deronne ef49c036ec 802.11n short guard interval indication in radiotap header 2015-06-06 18:02:37 +02:00
Sébastien Deronne af65a032f1 update RELEASE_NOTES 2015-06-05 23:53:18 +02:00
Junling Bu 823d1b1642 Bug 1736 [wifi] - default dot11EDCATableMSDULifetime 2015-06-05 23:49:09 +02:00
Tommaso Pecorella 5a7a4fff83 Bug 2126 - LrWpanNetDevice silently accepts no mobility on the node 2015-05-28 10:22:59 +02:00
Sébastien Deronne 5dcc405843 postfix for commit 11384:935dc1cc08a4 2015-05-27 21:55:56 +02:00
Sébastien Deronne cc2d4e4c12 trigger fatal error when adding a HT rate in BSSBasicRateSet 2015-05-27 13:07:48 +02:00
Peter D. Barnes, Jr. e9c14c2b54 Bring tutorial third.cc and mpi third-distributed.cc into alignment. 2015-05-18 21:14:10 -07:00
Peter D. Barnes, Jr. 9ad27ed6ec Clarify test messages. 2015-03-06 16:44:54 -08:00
Peter D. Barnes, Jr. c16d0b97ac Correct misspelled class names: TimeIntputOutputTestCase, TimesWithSignsTestCase 2015-02-20 14:23:09 -08:00
Peter D. Barnes, Jr. 69e4cc6139 Attribute test vectors assume ns Time resolution.
Since these are tests of Attributes per se, not Time, forcing the
resolution should not hide other issues with Attributes.
2015-02-20 14:20:35 -08:00
Peter D. Barnes, Jr. 5545a7f224 Remove extraneous ' ' around :: 2015-02-04 13:40:57 -08:00
Peter D. Barnes, Jr. 9f88bd50f0 On mismatch PcapFile::Diff reports packet number. 2015-02-04 12:35:17 -08:00
Peter D. Barnes, Jr. eb4138894f test.py list formatting 2015-02-04 12:34:24 -08:00
Tommaso Pecorella 9c250b48c9 [Doxygen] Internet module fixes (again) 2015-05-24 15:45:54 +02:00
Tommaso Pecorella 13deae792b [Doxygen] tap-bridge module fixes 2015-05-24 15:37:37 +02:00
Tommaso Pecorella dabc95ee4d [Doxygen] bridge module fixes 2015-05-24 14:02:16 +02:00
Tommaso Pecorella e1b0f8c2f1 [Doxygen] point-to-point-layout model fixes 2015-05-24 10:35:53 +02:00
Tommaso Pecorella f5147ff55e [Doxygen] fd-net-device module fixes 2015-05-24 09:58:19 +02:00
Tommaso Pecorella 06835eb89d [Doxygen] csma module 2015-05-24 09:06:42 +02:00
Tommaso Pecorella 7033e74a3f [Doxygen] Internet module fixes 2015-05-24 00:06:35 +02:00
Tommaso Pecorella 0ddd5c62b7 [Doxygen] csma-layout module fixes 2015-05-24 00:58:38 +02:00
Tommaso Pecorella 23f15b7afc [Doxygen] stats module fixes 2015-05-24 00:29:15 +02:00
Tommaso Pecorella 3436e5f599 [Doxygen] mobility model fixes 2015-05-24 00:26:42 +02:00
Tommaso Pecorella 8628634ffa [Doxygen] Application module fixes 2015-05-24 00:12:27 +02:00
Tommaso Pecorella 59b9e08aa2 [RipNg] clarify the socket binding addresses 2015-05-22 17:07:46 +02:00
Nicola Baldo d9b4528ca1 removed duplicate costly instruction in lte-spectrum-phy.cc 2015-05-22 13:06:06 +02:00
Sébastien Deronne 72e8f65b8a remove tracing information about aggregate queue flushing when aggregate queue is empty 2015-05-17 12:50:59 +02:00
Tom Henderson 98bf5861f3 update RELEASE_NOTES and CHANGES.html for next release 2015-05-13 12:02:14 -07:00
Tom Henderson cc0ac11580 update tutorial package version numbers 2015-05-13 11:12:28 -07:00
Tom Henderson d216402e96 Added tag ns-3.23 for changeset 8ea92bc090cd 2015-05-13 10:48:19 -07:00
Tom Henderson 097bbd8859 update RELEASE_NOTES for release 2015-05-13 10:48:03 -07:00
Tom Henderson c2e3f10058 update AUTHORS 2015-05-07 10:09:27 -07:00
Tom Henderson 64c6e1e1ad add more wifi model clarifications 2015-05-07 10:02:48 -07:00
Tom Henderson 557c77fd8f update CHANGES.html 2015-05-07 10:00:15 -07:00
Tom Henderson 6a91f578fa update RELEASE_NOTES 2015-05-06 22:01:20 -07:00
Tom Henderson 3bbda53949 rescan bindings 2015-05-06 17:33:08 -07:00
Tom Henderson 5b0071da70 clear valgrind warnings for aggregation test 2015-05-06 14:23:50 -07:00
Sébastien Deronne b38935c93f Bug 2004 [wifi] - Wrong timeout calculation for 802.11n in WifiMac 2015-05-06 23:14:06 +02:00
Sébastien Deronne e04641af04 update RELEASE_NOTES 2015-05-06 22:07:40 +02:00
Sébastien Deronne 6976fb3247 rescan bindings 2015-05-06 22:06:26 +02:00
Sébastien Deronne a195154331 Bug 2097 [wifi] - ACKs should be sent using legacy rates and preambles in 802.11n 2015-05-06 21:59:49 +02:00
Sébastien Deronne 5a7d7b1684 fix warning about decimal constant 2015-05-06 15:12:29 +02:00
Tom Henderson 92d33e8c9e rescan bindings 2015-05-05 21:29:58 -07:00
Tom Henderson 295d85e52f fix Doxygen copy/paste error (reported by whimsyduke) 2015-05-05 19:55:13 -07:00
Tom Henderson 1d91a535e0 SetGroupName for uan module 2015-05-05 19:48:25 -07:00
Tom Henderson da6dbe6141 SetGroupName for tap-bridge module 2015-05-05 19:36:20 -07:00
Tom Henderson 94d1b71324 SetGroupName for stats module 2015-05-05 19:35:31 -07:00
Tom Henderson c292a5853c SetGroupName for openflow module 2015-05-05 19:15:46 -07:00
Tom Henderson b1a22bb343 SetGroupName for olsr module 2015-05-05 19:14:17 -07:00
Tom Henderson 0970b68bc9 SetGroupName for mpi module 2015-05-05 19:10:44 -07:00
Tom Henderson 00676af822 SetGroupName for nix-vector-routing module 2015-05-05 19:10:27 -07:00
Tom Henderson d9af1797dc SetGroupName for mesh module 2015-05-05 19:07:17 -07:00
Tom Henderson 3720eeeef9 SetGroupName for dsr module 2015-05-05 18:42:46 -07:00
Tom Henderson 27d57e4107 SetGroupName for fd-net-device module 2015-05-05 18:42:31 -07:00
Tom Henderson 35f4f02b9d SetGroupName for dsdv module 2015-05-05 15:41:55 -07:00
Tommaso Pecorella d06cf0a82e Bug 2110 - vanet-routing-compare with no routing still sending RREQ 2015-05-05 10:24:48 +02:00
Tom Henderson f2a7e5c36c add documentation link 2015-05-05 15:20:57 -07:00
Tom Henderson 3b2d0fa8ec update traces 2015-05-05 15:19:03 -07:00
Christopher Hepner e31acccefc make 802.11s model more compliant to the IEEE802.11s-2012 standard 2015-05-05 15:10:55 -07:00
Tom Henderson 964748e197 rescan internet bindings 2015-05-05 13:58:03 -07:00
Tom Henderson 8f0c89ea5f postfix commit 11358:9a04bd20a224 and add test case (was raising error: default initialization of an object of const type on some systems) 2015-05-05 13:27:01 -07:00
Tom Henderson 46584b732f rescan bindings 2015-05-04 23:25:28 -07:00
Tom Henderson 2e4b36c82e bug 2058: TCP window update can shrink the Left Edge of the window which is a bug (patch based on earlier contribution from Evgeny Evstropov) 2015-05-04 22:39:00 -07:00
Tom Henderson db17672017 restore declarations to fix the build 2015-05-04 22:31:24 -07:00
Tom Henderson bfacdf5413 fix warning about signed/unsigned comparison 2015-05-04 22:30:02 -07:00
Tommaso Pecorella 90784f5eef Bug 2067 - TCP performances drop when Advertised Window is larger than Sender Buffer size 2015-05-04 12:32:47 -07:00
Matthieu Coudron 02d5a5ef6b Adds a function to convert TCP flags into a string 2015-05-04 12:31:32 -07:00
Peter D. Barnes, Jr. b34e8c4a0c Doxygen config, deprecated, realtime, unused 2015-05-04 17:57:59 -07:00
Peter D. Barnes, Jr. 0f2f1a7055 Doxygen files. 2015-05-04 17:55:16 -07:00
Sébastien Deronne 5ce6f9786a add example to reproduce a hidden nodes scenario in 802.11n networks with A-MPDU enabled 2015-05-05 00:42:26 +02:00
Sébastien Deronne 4d899db6d2 Update wifi documentation for two-level aggregation 2015-05-05 00:32:07 +02:00
Sébastien Deronne d0ec938b42 Bug 2075 [wifi] - A-MPDU using RTS/CTS behaves wrongly when MaxSsrc is reached 2015-05-05 00:29:40 +02:00
Sébastien Deronne 60b507ccdf add two-level aggregation 2015-05-04 23:55:32 +02:00
Sébastien Deronne 21bdddfaf0 update traces for bug 2066 fix 2015-05-03 17:34:44 +02:00
Sébastien Deronne 6359554d59 Update RELEASE_NOTES 2015-05-03 16:20:01 +02:00
Sébastien Deronne 2cdc197553 rescan bindings 2015-05-03 16:16:03 +02:00
Sébastien Deronne 9656e972a2 Bug 2066 [wifi] - A-MPDU reception should check for successful preamble 2015-05-03 16:06:01 +02:00
Tommaso Pecorella 3da098f018 Update RELEASE_NOTES 2015-05-02 22:21:58 +02:00
Tommaso Pecorella 4e5366f09f Bug 2008 - [lr-wpan] crash if ending rx while status change is in progress 2015-05-02 22:17:35 +02:00
Tommaso Pecorella ed20015f6d Bug 2034 - [lr-wpan] CSMA-CA BackoffPeriod is too short 2015-05-02 22:00:28 +02:00
Esteban Municio 656edfa6d0 Bug 2095 - [wimax] Wrong values in default-traces.h for 16 QAM 3/4 2015-05-02 21:51:06 +02:00
Tommaso Pecorella 6a865108ab [sphinx] Propagation module improvements 2015-05-02 20:55:49 +02:00
Tommaso Pecorella 44ecc463dc update testing section in manual 2015-05-01 06:49:12 -07:00
Cristiano Tapparello c044954bb4 Added the LiIonEnergySource helper and RV Battery model bug fixes (Bug 1216) 2015-04-30 18:02:42 -04:00
Nicola Baldo bf5ba0c085 get rid of LteTestSinrChunkProcessor 2015-04-27 13:27:02 +02:00
Nicola Baldo 3349e79085 fix compiler error on gcc-4.4 2015-04-24 16:53:51 +02:00
Nicola Baldo 65d00d330b fixed node id logging in LTE 2015-04-23 13:33:58 +02:00
Tommaso Pecorella e0165db56c Bug 2103 - Ipv[4,6]RoutingHelper::PrintRoutingTableAll[At,Every] hangs if a node doesn't have IP 2015-04-19 21:39:32 +02:00
John Abraham dda924a53a NetAnim: move AnimRxInfo into AnimPacketInfo, obsolete lbRx for broadcast 2015-04-18 09:20:09 -07:00
Tom Henderson ba148aad49 bug 2100: avoid use of uint type 2015-04-18 08:29:05 -07:00
Tom Henderson f195c26440 avoid compiler warning of assuming signed overflow does not occur when reducing constant in comparison 2015-04-18 08:15:59 -07:00
Sébastien Deronne db4eb7bbf2 rescan bindings 2015-04-17 19:59:28 +02:00
Ghada Badawy f0395aeec0 remove unused payloadMode argument in WifiPhy::GetPlcpHtSigHeaderDuration 2015-04-17 19:58:53 +02:00
Tom Henderson c28ea66957 SetGroupName for virtual-net-device module 2015-04-16 21:30:18 -07:00
Tom Henderson 16a35c6e49 SetGroupName for wave module 2015-04-16 21:29:05 -07:00
Tom Henderson e10195a6ec SetGroupName for TvSpectrumTransmitter 2015-04-16 21:10:21 -07:00
Tom Henderson 7e773082ae SetGroupName for config-store module 2015-04-16 21:02:03 -07:00
Tom Henderson 15b8c704a9 SetGroupName for click module 2015-04-16 20:58:18 -07:00
Tom Henderson 240f1f7891 SetGroupName for buildings module 2015-04-16 10:05:09 -07:00
Nicola Baldo 0cccb3d7ac updated RELEASE_NOTES 2015-04-16 18:07:23 +02:00
Nicola Baldo 2c1627a2f1 kill dead code 2015-04-16 18:06:31 +02:00
Nicola Baldo 95eb0e7adf merge 2015-04-16 17:49:29 +02:00
Nicola Baldo e3e8613a07 merge 2015-04-16 12:54:24 +02:00
Nicola Baldo 9fcf2037b0 fixed some RLC tests that were crashing 2015-04-14 16:02:03 +02:00
Nicola Baldo 1df9c273b8 specialized lte-rlc-am-e2e test cases into bulk and continuous SDU arrival 2015-04-14 12:05:09 +02:00
Benjamin Cizdziel a4b5738b44 remove ChannelNumber attribute from TvSpectrumTransmitter 2015-04-13 14:21:27 -07:00
Benjamin Cizdziel 5b023387a4 add missing figures 2015-04-13 13:19:33 -07:00
Tom Henderson 3cadd60395 fix documentation formatting errors 2015-04-13 13:19:01 -07:00
Nicola Baldo a352d731a2 fixed SequenceNumber10 modulo operations for operator++ 2015-04-13 14:40:23 +02:00
Nicola Baldo 1714d7a450 revised lte-rlc-am-e2e test 2015-04-13 14:39:12 +02:00
Nicola Baldo e1931bbd3a fixed logging context in LteTest entities 2015-04-13 14:38:23 +02:00
Nicola Baldo 0e06d19022 LteRlcAm: fixed VT(s) handling, added attributes for timers 2015-04-13 14:37:25 +02:00
Tom Henderson 089ae3ba9e bug 2094: adjust floating point comparison epsilon based on inputs 2015-04-12 21:44:41 -07:00
Nicola Baldo ed8b9eedfa workaround for bug 2091 (modified version of Luciano's patch) 2015-04-10 12:53:52 +02:00
Tommaso Pecorella 36f51b8607 Bug 2093 - MultiModelSpectrumChannel::GetDevice only works for 0-th index 2015-04-09 22:01:13 +02:00
Tom Henderson 0596d0d97b fix an enum declaration 2015-04-09 08:16:05 -07:00
Tom Henderson c1b59f5fbc silence unused variable warning 2015-04-09 07:25:24 -07:00
Tom Henderson d861f430ad update RELEASE_NOTES, CHANGES.html, and AUTHORS 2015-04-08 21:34:49 -07:00
Tom Henderson c9f32caa50 update bindings 2015-04-08 20:16:57 -07:00
Benjamin Cizdziel 7e795e2891 TvSpectrumTransmitter classes to create television transmitter(s) that transmit PSD spectrums customized by attributes such as modulation type, power, antenna type, channel frequency, etc. 2015-04-08 19:45:39 -07:00
Benjamin Cizdziel 6c8d39f935 GeographicPositions class for coordinate conversion 2015-04-08 19:42:20 -07:00
Tommaso Pecorella 034b9777cd (rip-ng) Don't route a packet from/to a LinkLocal address 2015-04-08 18:18:49 +02:00
Tommaso Pecorella 6b3f645a55 Bug 2090 - (rip-ng) Routes may be added twice on interface activation 2015-04-08 18:14:28 +02:00
Tommaso Pecorella 79e72f03fa [aodv] Clean empty sections from manual 2015-04-06 12:12:29 +02:00
Tom Henderson 4ae98b0b1e Fix use of WafError in exceptions in waf-tools/boost.py 2015-04-05 14:35:43 +02:00
Mohit Goyal 278855b4c1 SetGroupName for wimax module 2015-04-04 08:22:44 -07:00
Rubén Martínez 2c53e2289a bug 2082: Empirical RV fails if the value provided in the CDF member function is negative 2015-04-03 16:36:13 -07:00
Tom Henderson 8613522840 bug 2087: Waf fails to build ns-3 if the path contains accented characters 2015-04-03 15:13:32 -07:00
Vedran Miletić d4e9a7968e Print correct output directory 2015-04-03 22:19:21 +02:00
Vedran Miletić 203a80dd73 Handle broken versions of Clang better
Clang packages in Debian are sometimes broken. In that case, compiler fails
with "fatal error: 'bits/c++config.h' file not found". We should detect that
better. This patch updates boost.py to latest waf version which works, and also
handles empty apsican variable.
2015-04-03 22:18:44 +02:00
Mohit Goyal 5b1e6bd728 SetGroupName for lte module 2015-04-03 13:01:08 -07:00
Tom Henderson 9cb3e2b28c rescan bindings 2015-04-03 12:28:40 -07:00
Nicola Baldo 651ef94645 refactoring of the LteSpectrumPhy state machine 2015-04-01 19:10:20 +02:00
Nicola Baldo 76c94fb285 kill some dead code 2015-04-01 16:50:16 +02:00
Nicola Baldo 3ea8979c01 removed LteSpectrumPhy's LtePhyRxDataEndErrorCallback 2015-04-01 15:47:34 +02:00
Nicola Baldo f2705e06cf split LteSpectrumPhy::EndTx event into Data, DlCtrl, UlSrs 2015-04-01 15:38:12 +02:00
Tommaso Pecorella 15e79488cd SetGroupName for propagation module 2015-03-29 16:53:11 +02:00
Tommaso Pecorella d6975fd00e SetGroupName for netanim module 2015-03-29 16:48:39 +02:00
Tommaso Pecorella adb81dc26d SetGroupName for visualizer module 2015-03-29 16:46:05 +02:00
Tommaso Pecorella 4096553768 SetGroupName for lr-wpan module 2015-03-29 16:43:22 +02:00
Tommaso Pecorella b2b25df074 SetGroupName for spectrum module 2015-03-29 16:22:52 +02:00
Tommaso Pecorella c00c55f933 SetGroupName for mobility module 2015-03-29 16:23:12 +02:00
Tommaso Pecorella c4765573f9 SetGroupName for energy module 2015-03-29 16:12:50 +02:00
Tommaso Pecorella 9377247c1f SetGroupName for csma module 2015-03-29 16:08:40 +02:00
Tommaso Pecorella d503c92234 SetGroupName for flow-monitor module 2015-03-29 11:30:06 +02:00
Tommaso Pecorella cce8378466 SetGroupName for internet module 2015-03-29 11:14:34 +02:00
Tommaso Pecorella 5a78f132f2 SetGroupName for sixlowpan module 2015-03-27 22:24:25 +01:00
Tommaso Pecorella 7890ab6c2f SetGroupName for topology-read module 2015-03-27 22:13:56 +01:00
Tom Henderson a1b74e3271 update traces for bug 1982 fix 2015-03-27 13:24:29 -07:00
Tom Henderson 9984e96d5a update RELEASE_NOTES 2015-03-27 12:45:33 -07:00
Tom Henderson aed74121a3 fix some additional random variable stream values for an AODV test 2015-03-26 10:26:14 -07:00
Tom Henderson d99dc82675 defer random variable usage until test run time 2015-03-19 20:13:06 -07:00
Tom Henderson f58bbe717c avoid creating test random variable until run time 2015-03-19 20:11:26 -07:00
Tom Henderson 8b5ec4b5ec bug 1982: mesh uses random variables before seeds can be set 2015-03-19 20:04:25 -07:00
Tom Henderson 47fe0d4747 bug 1982: AODV uses random variables before seeds can be set 2015-03-19 20:03:57 -07:00
Tom Henderson 368e8fcbf6 update manual for SetGroupName 2015-03-27 11:58:58 -07:00
Tom Henderson 44d377e425 additional coverage of group name usage in the tutorial 2015-03-27 11:52:48 -07:00
Tom Henderson 1d86e7edca SetGroupName for point-to-point module 2015-03-27 11:52:25 -07:00
Tom Henderson 6641331242 SetGroupName for core module 2015-03-27 11:40:08 -07:00
Tom Henderson 3eebe47911 SetGroupName for wifi module 2015-03-27 11:28:59 -07:00
Tom Henderson 447e418d6c update tutorial documentation for SetGroupName 2015-03-27 10:03:43 -07:00
Mohit Goyal 4772204a59 SetGroupName for antenna module 2015-03-27 09:14:34 -07:00
Mohit Goyal 7639d04f17 SetGroupName for bridge module 2015-03-27 09:12:25 -07:00
Mohit Goyal b7142a8384 SetGroupName for aodv module 2015-03-27 08:19:31 -07:00
Mohit Goyal c68cfb15ed SetGroupName for applications module 2015-03-27 07:17:37 -07:00
Tom Henderson d8494dfb97 add missing namespace qualifier 2015-03-27 07:12:37 -07:00
Mohit Goyal 811962d3e0 SetGroupName for network module 2015-03-27 07:03:58 -07:00
Tommaso Pecorella a25dbffd6f Bug 2083 - BridgeNetDevice may send corrupted packets 2015-03-25 16:55:18 +01:00
Sébastien Deronne 61c6d8227f Update RELEASE-NOTES 2015-03-19 21:13:16 +01:00
Sébastien Deronne 08e3414452 Bug 2079: mcs variable in ht-wifi-network example is confusing 2015-03-19 21:07:13 +01:00
Alina Quereilhac 70af4a402c remove redundant GetObject from tap-fd-net-device-helper.cc 2015-03-19 15:20:46 +01:00
Alina Quereilhac 47fdaa9927 add example fd2fd-onoff.cc from the fd-net-device module to unit tests using UDP as default mode 2015-03-19 15:13:07 +01:00
Tommaso Pecorella 78758da486 Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params 2015-03-15 09:14:50 +01:00
Tommaso Pecorella d2b290924d Bug 2076 - TCP MinRTO Attribute is not actually used 2015-03-15 08:41:59 +01:00
Tommaso Pecorella b04062ce08 Bug 2077 - Icmpv6L4Protocol::HandleDestinationUnreachable must check the packet size, not its serialized size 2015-03-14 18:45:02 +01:00
Vedran Miletić 7967235960 Fix building with clang 3.5 (abs->std::abs, unused vars) 2015-03-11 16:50:35 +01:00
Vedran Miletić 3edd12c191 Fix building with GCC 5 and subsequently clean up sgi-hashmap.h 2015-03-05 15:50:18 +01:00
Natale Patriciello b27422fb2f Bug 2070 - Wrong report of Packets and Bytes stored in CoDeL 2015-03-01 12:08:36 +01:00
Tommaso Pecorella 0630f6dee9 Bug 1974 - CalculateTxTime should return a Time, not a double 2015-02-28 18:20:46 +01:00
Tommaso Pecorella 17e5e203b3 Bug 2073 - NDisc cache entries update timer might be stuck in a loop 2015-02-28 15:16:47 +01:00
John Abraham ac61b6229a [Bug 2065] New: Segfault on probable user error 2015-02-27 07:48:34 -08:00
Tom Henderson 2eb6010bb0 clean up wimax module test program includes and wscript 2015-02-25 06:47:21 -08:00
Tom Henderson 2aa44ad287 enable logging in a TCP test suite 2015-02-24 14:04:15 -08:00
Tom Henderson 55a43bb5bc fix tutorial typos (found by Renan) 2015-02-23 12:31:31 -08:00
Tom Henderson 0e1d8c6f17 add comments and logging around changeset c97ef876d98c 2015-02-23 12:25:34 -08:00
Alina Quereilhac 03154fb21f bug 2063: FdNetDevice::SendFrom() Assert does not take into account the size of the headers. (fix due Rubén Martínez and Tom Henderson) 2015-02-17 03:38:14 +01:00
John Abraham 107b274009 Restore link properties for Ipv4 address and mac address 2015-02-06 18:14:38 -08:00
Tom Henderson f1336f4f21 fix typos (found by Keith Briggs) 2015-02-06 06:50:48 -08:00
Tom Henderson ea8ccecfde update RELEASE_NOTES and CHANGES.html for post-ns-3.22 2015-02-05 16:39:39 -08:00
Tom Henderson 845511f9ae Added tag ns-3.22 for changeset 103f62fc7d58 2015-02-05 15:04:55 -08:00
Tom Henderson 77423c2a20 small edits on previous commit 2015-02-05 13:02:44 -08:00
Tom Henderson 2b005b32ca tutorial updates for ns-3.22 2015-02-05 11:54:48 -08:00
Tom Henderson 0be6196946 update RELEASE_NOTES and CHANGES.html 2015-02-03 16:27:01 -08:00
Peter D. Barnes, Jr. a7af33f1fb Add nix-vector lazy flush to RELEASE_NOTES and CHANGES.html 2015-02-03 14:36:43 -08:00
Peter D. Barnes, Jr. a3a68eeb55 Additions to RELEASE_NOTES 2015-02-03 13:48:07 -08:00
Tom Henderson d6e9171e07 updates to RELEASE_NOTES and CHANGES.html 2015-02-02 21:06:56 -08:00
Tom Henderson c0fc91bce1 update AUTHORS 2015-02-02 16:18:19 -08:00
Tom Henderson 9bddf4b972 rescan bindings 2015-02-01 22:21:11 -08:00
Tom Henderson e75db59186 rescan lr-wpan bindings 2015-02-01 21:39:21 -08:00
Tommaso Pecorella a90b921903 bug 1774: compute signal power around channel, not across whole band 2015-02-01 21:08:32 -08:00
Tommaso Pecorella a25be3e3d5 bug 1774: fix LrWpanHelper to enable MultiModelSpectrumChannel and add a default PropagationDelayModel 2015-02-01 21:01:25 -08:00
Tom Henderson 47789200d4 specify unsigned integer literal (fix compiler warning) 2015-02-01 08:17:09 -08:00
Tommaso Pecorella bce2be09a8 bug 1734: TcpSocketBase produces spurious delayed ACKs (fix due to Lawrence Stewart) 2015-02-01 07:13:56 -08:00
Sébastien Deronne 20fa8f04a3 fix Doxygen typos 2015-02-01 07:10:20 -08:00
Matias Richart c4d93c7490 hook PARF and APARF wifi examples to test.py 2015-02-01 07:09:35 -08:00
Sébastien Deronne fc96da1266 wifi example to demonstrate how to set non-standard timing attributes 2015-01-31 17:42:11 -08:00
Sébastien Deronne 7cf8a0b73a split wifi example simple-wifi-frame-aggregation.cc into two examples, one for MSDU aggregation and one for MPDU aggregation 2015-01-31 17:41:12 -08:00
Sébastien Deronne cc86ee0dac improve ht-wifi-network example 2015-01-31 17:36:14 -08:00
Sébastien Deronne ad6c64aec9 correct a minor bug when A-MPDU is used at legacy rates; code cleanup 2015-01-31 17:30:30 -08:00
Tommaso Pecorella 68c826b445 Bug 2055 - TxBuffer and RxBuffer traces don't work 2015-01-31 15:45:36 -08:00
Tommaso Pecorella f91739ec9a fix Doxygen typo 2015-01-31 15:42:19 -08:00
Steve Zabele 4ea974bb7f Bug 2053 - In tcp-socket-base.cc, NotifyDataSent incorrectly called with retransmits 2015-01-31 13:20:37 +01:00
Tom Henderson ffa4909b25 bug 2044: Buffer::Iterator::ReadNtohU16() and ReadNtohU32() not implemented correctly 2015-01-30 16:27:50 -08:00
Tom Henderson 2be7d2e686 Doxygen corrections for class Buffer 2015-01-30 16:06:55 -08:00
Tommaso Pecorella 2ab35569ae Bug 1405 - RttEstimator improvements 2015-01-30 22:29:30 +01:00
Sébastien Deronne 7b3b202b10 bug 2046: set Block Ack timeout when SetStandard is called 2015-01-30 11:52:16 -08:00
Tom Henderson e42b3baae0 fix possibly uninitialized variable warning 2015-01-30 11:34:38 -08:00
Steve Smith 26fda68e9c Null performance enhancement 2015-01-30 15:04:08 -05:00
Tommaso Pecorella 5cd540a9f8 Update RELEASE-NOTES 2015-01-30 08:12:06 +01:00
Peter D. Barnes, Jr. 576769caf1 bug 2043: print-introspected-doxygen crashes when some modules are disabled 2015-01-29 19:03:22 -08:00
Sébastien Deronne 641362c6b5 bug 1801: Setting Wi-Fi timing parameters through WifiMac attributes (documentation fix) 2015-01-29 19:01:38 -08:00
Peter D. Barnes, Jr. 60e7012077 bug 2002: Hardcoded include paths cause breakage 2015-01-29 19:00:01 -08:00
Tom Henderson 73f5b282c8 fix memcmp return type; print offending test case upon failure 2015-01-29 17:18:51 -08:00
Tom Henderson abda6e30dd fix small typo 2015-01-29 17:05:48 -08:00
Peter D. Barnes, Jr. 80c0d68e5d include the core module declared in doc/modules 2015-01-29 15:07:07 -08:00
Nicola Baldo 0ff09f4b1f updated RELEASE_NOTES 2015-01-29 16:37:08 +01:00
Nicola Baldo 1306851023 fixed Bug 2049 - CQI feedback should always use the same calculation method 2015-01-29 16:35:33 +01:00
Nicola Baldo 6e96735487 fixed Bug 2042 - src/lte/model/a3-rsrp-handover-algorithm.cc:137:79: error: overflow in implicit constant conversion 2015-01-29 11:36:56 +01:00
Tommaso Pecorella 99e1e3a121 [Clang] Remove unused variable 2015-01-28 22:57:30 +01:00
Tom Henderson eb0275013f rescan wifi bindings 2015-01-28 10:29:28 -08:00
Ghada Badawy 3eaf58a12b add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis) 2015-01-28 10:11:32 -08:00
Tom Henderson aa848ad33a rescan lte bindings 2015-01-28 06:34:11 -08:00
Nicola Baldo 1a4da81c69 merge 2015-01-28 12:18:20 +01:00
Tom Henderson b4707275ab fix -Werror=strict-overflow issue in example program 2015-01-27 21:52:50 -08:00
Tom Henderson ced1f9d8f9 convert ChannelCoordinationListener to a reference counted object to fix memory issues 2015-01-27 21:47:30 -08:00
Tommaso Pecorella 7a1e463097 Bug 2047 - Ipv6EndPointDemux::Lookup may crash 2015-01-27 21:53:05 +01:00
Tom Henderson 13b111e4b2 add missing module dependencies 2015-01-26 22:53:31 -08:00
Tom Henderson e6ca702ea6 rescan bindings 2015-01-26 17:14:36 -08:00
Tom Henderson e9f8133bc9 minor changes to enable Python bindings 2015-01-26 17:14:25 -08:00
Junling Bu f566c68220 IEEE 1609.4 MAC extension 2015-01-26 15:21:14 -08:00
Scott Carpenter 3e74003142 add BSM application and vanet-routing-compare example 2015-01-26 15:20:09 -08:00
Junling Bu a31a3245f2 patch to support IEEE 1609.4 MAC extension in wave module 2015-01-26 15:17:35 -08:00
Tommaso Pecorella d2379471c7 Bug 2037 - HT capabilities may print bogus chars 2015-01-26 23:21:27 +01:00
Tommaso Pecorella 176f9722ea Clarify radvd log output 2015-01-25 06:58:42 +01:00
Tommaso Pecorella 733c4ece17 TCP comparison example enhancements 2015-01-26 09:14:26 +01:00
Matias Richart 024fa2e09f add rate adaptation example to demonstrate Minstrel operation 2015-01-25 12:02:18 -08:00
Matias Richart d4d29990c8 bug 1726: avoid segmentation fault when logging; code cleanup 2015-01-25 12:01:21 -08:00
Matias Richart 7e4542f5c0 add PARF and APARF WiFi rate controls 2015-01-25 11:21:46 -08:00
Tommaso Pecorella f651927bc8 Simplify Radvd examples - remove unnecessary calls 2015-01-24 23:16:24 +01:00
Tommaso Pecorella 2099979b4e Bug 2045 - Missing NS_OBJECT_ENSURE_REGISTERED in TcpTxBuffer and TcpRxBuffer 2015-01-24 11:55:59 +01:00
Peter D. Barnes, Jr. ec924126b2 [Doxygen] Remove extraneous 'n' introduced by doxygen update in r11143 fd2cfa7dd551 2015-01-23 22:33:30 -08:00
Tom Henderson 6b1895ba57 enablePcap argument was disabled 2015-01-23 14:38:05 -08:00
Tom Henderson 7aaed33421 add timestamps and window scale options 2015-01-23 14:37:17 -08:00
Tom Henderson 3d3123d490 error check program input 2015-01-23 11:31:51 -08:00
Tom Henderson 7ab8bbe5db rng seed should be uint32_t 2015-01-23 11:26:16 -08:00
Tommaso Pecorella 3e8ccda80e Cleanup aodv test dependency on mesh module 2015-01-23 08:09:53 +01:00
Tom Henderson 3a4b604ea3 aodv test depends on mesh module 2015-01-22 07:06:29 -08:00
Peter D. Barnes, Jr. 6dac3ff450 [Doxygen] Update doxygen.conf to doxygen-1.8.9.1 2015-01-20 15:14:03 -08:00
Peter D. Barnes, Jr. a62f4ca624 [Doxygen] Protect ns-3 comments in doxygen.conf 2015-01-20 13:50:26 -08:00
Peter D. Barnes, Jr. 40eb448c95 [Doxygen] Remove extraneous docs for derivatives of AttributeValue. 2015-01-16 12:12:46 -08:00
Peter D. Barnes, Jr. 2e45a2ffd9 [Doxygen] Various in src/core 2015-01-16 11:55:23 -08:00
Luis Pacheco 32827de86a Bug 2038 - Stop method does not stop next wave in WaveformGenerator 2015-01-17 09:01:26 +01:00
Peter D. Barnes, Jr. 5a5407f654 Restore virtual function declarations. 2015-01-16 11:45:44 -08:00
Peter D. Barnes, Jr. 94ce1f5cd9 [Doxygen] Hash functions 2015-01-08 18:35:52 -08:00
Peter D. Barnes, Jr. 90cf5b60a2 [Doxygen] Files implementing attributes. 2015-01-07 15:43:53 -08:00
Peter D. Barnes, Jr. 26fde12a8c [Doxygen] Fatal and abort 2015-01-07 15:41:00 -08:00
gauravsathe 067e28d8bc addressed code review comments 2014-12-23 16:17:53 +05:30
Peter D. Barnes, Jr. f1f6465277 [Doxygen] Logging 2014-12-19 14:20:27 -08:00
Peter D. Barnes, Jr. 41c2e48906 [Doxygen] Singleton and SimulationSingleton 2014-12-19 13:28:03 -08:00
Peter D. Barnes, Jr. 2d51379aa9 [Doxygen] Callbacks 2014-12-19 13:07:07 -08:00
Peter D. Barnes, Jr. 7e2079057b [Doxygen] Various in src/core 2014-12-18 15:12:35 -08:00
Peter D. Barnes, Jr. 708bb9de05 doxygen.warnings.report.sh: add -i option to skip build, print-introspected-doxygen
Also

- Reorganize the usage message, since the options list has gotten
quite long.

- Standardize internal variables with underscores between words (very
un-ns-3 like, but really this whole thing should be in python in wscript).
2014-12-17 12:17:11 -08:00
Peter D. Barnes, Jr. c69d60dba5 [Doxygen] Tracing. 2014-12-10 16:30:51 -08:00
Tom Henderson f3c11d2676 do not delete ns-2 trace files when test data is retained 2015-01-15 10:04:13 -08:00
Tom Henderson 05ae5cd63b update RELEASE_NOTES 2015-01-14 14:20:43 -08:00
Tom Henderson 63c9018c81 bug 1770: mesh test and example crash for 32-bit optimized builds 2015-01-14 14:19:57 -08:00
Tom Henderson 4f10ff3ee6 fix tap-bridge module dependency 2015-01-08 18:16:55 -08:00
Tom Henderson f1a32c6a7c remove integer to double conversion leading to scheduling differences in optimized builds; remove dead code 2015-01-08 18:13:27 -08:00
Tommaso Pecorella 58af432dab [Tutorial] clarify that there is no mytest, and output an error if no test is to be run. 2015-01-06 16:51:29 +01:00
Tommaso Pecorella 911cb8512a [Tutorial] fix missing "s" from argument template 2015-01-05 19:43:49 +01:00
Tom Henderson 9ec51410d2 update RELEASE_NOTES 2015-01-04 10:17:20 -08:00
Tom Henderson 6e064c60de rescan wifi bindings 2015-01-04 10:13:44 -08:00
Sébastien Deronne c0090f77b3 remove unnecessary Time to double conversions in wifi models 2015-01-04 10:13:34 -08:00
Sébastien Deronne 03bb3c4a82 remove unused payload mode argument 2015-01-04 09:43:20 -08:00
Peter D. Barnes, Jr. 8de4b6ed1e [Doxygen] Clean up references to non-POD TracedValueCallbacks 2014-12-12 14:48:13 -08:00
Tom Henderson 8198c25bf0 fix URL 2014-12-20 20:34:36 -08:00
Tom Henderson 7ea01038c3 bug 2030: provide default values for WifiTxVector 2014-12-19 18:28:40 -08:00
Tom Henderson e1108928f1 rescan bindings 2014-12-19 16:22:49 -08:00
Nicola Baldo 6d8611cb32 updated RELEASE_NOTES 2014-12-19 17:10:25 +01:00
Nicola Baldo 6609007746 fixed Bug 1996 - RSRQ calculation: misleading variable names 2014-12-19 16:49:23 +01:00
Piotr Gawlowicz 95eae84b3f Bug 2029 - new CQI generation approach fix 2014-12-19 16:18:35 +01:00
Piotr Gawlowicz 433d2b3a70 Bug 1986 FIX 2014-12-19 16:16:27 +01:00
Nicola Baldo c3509f31ee LTE radio-link failure documentation fix 2014-12-19 11:41:18 +01:00
Vedran Miletić e5024de5b3 Fix compilation with GCC 4.2.1 on FreeBSD 9
Thanks to Domagoj Stolfa <shrinkd@gmail.com> for his aid in debugging this.
2014-12-18 18:44:14 +01:00
Vedran Miletić dba84a150e Fix building with Clang 3.5 2014-12-17 16:21:13 +01:00
Tom Henderson 2549938ad7 fix script problem with symbolic links 2014-12-16 12:45:04 -08:00
Piotr Gawlowicz a9e442320b figures redrawn 2014-12-16 12:43:23 -08:00
Tom Henderson 60e8768b83 Doxygen warnings for mobility/helper and mobility/model directories 2014-12-15 21:47:59 -08:00
Piotr Gawlowicz 16460c0a7b Doxygen warnings for lte/helper directory 2014-12-15 21:41:21 -08:00
Sébastien Deronne 9fef12b955 bug 1969: Support short guard interval durations in 802.11n 2014-12-12 11:58:51 -08:00
Sébastien Deronne ac56317859 bug 2027: Calculation of HT training symbol duration does not accurately follow 802.11n standard 2014-12-12 11:38:39 -08:00
Sébastien Deronne 18f8464a00 bug 2026: 802.11n Ness parameter badly set for data frames 2014-12-12 11:17:34 -08:00
Tom Henderson d74ec5df40 LTE documentation fix for disabling error models 2014-12-12 08:58:30 -08:00
Peter D. Barnes, Jr. f71a5e0b5c [Doxygen] Timer, TimerImpl and Watchdog. 2014-12-09 14:37:02 -08:00
Peter D. Barnes, Jr. 345c8a94ac [Doxygen] OS functions: filesystem, threading, wall clock. 2014-12-09 13:17:49 -08:00
Peter D. Barnes, Jr. 846fd6a6d9 [Doxygen] Objects 2014-12-07 22:08:04 -08:00
Peter D. Barnes, Jr. 2b7fafe698 [Doxygen] Events. 2014-12-07 20:53:37 -08:00
Peter D. Barnes, Jr. 63040fc74e [Doxygen] Smart pointers 2014-12-07 18:30:55 -08:00
Peter D. Barnes, Jr. a5c748e8ab [Doxygen] CommandLine 2014-12-07 18:27:56 -08:00
Nicola Baldo ec697908bb merge 2014-11-28 17:10:09 +01:00
Nicola Baldo ef6bffdb7c merge 2014-11-28 16:56:26 +01:00
Gaurav Sathe 07a422bf86 added release bearer functionality 2014-11-27 16:01:05 +01:00
Tom Henderson 9878843ed3 update tutorial section on bake environment variables 2014-11-26 16:03:44 -08:00
Ben Newton 3f609f8e31 correct a Doxygen returns comment 2014-11-26 15:15:34 -08:00
Sébastien Deronne 6930a5263f remove unused parameter from Doxygen 2014-11-26 15:11:52 -08:00
Ben Newton 3395e180e1 Bug 2013: pygccxml versions > 1.0.0 prepend a 'v' to version number 2014-11-26 14:59:32 -08:00
Tom Henderson f140db6a63 update Doxygen version required 2014-11-26 14:56:17 -08:00
Peter D. Barnes, Jr. a790246c4b [Doxygen] specialized data types 2014-11-17 15:51:36 -08:00
Peter D. Barnes, Jr. c1b266efad Standardize EventId arguments as id.
This facilitates reuse of doxygen docs.
2014-11-17 15:49:59 -08:00
Natale Patriciello 37ed3b545b ToString method to Packet 2014-11-14 15:27:37 -08:00
Tom Henderson d4f2adc449 add wscript support for wifi-sleep.cc example 2014-11-24 06:29:58 -08:00
Tom Henderson d6edb8dcbd record Doxygen aggregation info for additional classes 2014-11-20 13:42:09 -08:00
Tom Henderson 9489036c50 fix typo 2014-11-20 13:41:38 -08:00
Tom Henderson 3ca7f202b4 register energy container classes 2014-11-20 13:39:32 -08:00
Tom Henderson 8855ecbf5b bug 1583: fix ./waf configure --enable-gcov 2014-11-20 10:50:30 -08:00
Tom Henderson c961293eed WifiRemoteStation needs virtual destructor for subclassing 2014-11-20 09:39:23 -08:00
Sébastien Deronne 497cb5cd28 fix misspelled attribute and doxygen in YansWifiPhy 2014-11-19 14:05:36 -08:00
Tom Henderson 5601229646 add logging to WifiRemoteStationManager 2014-11-19 13:22:52 -08:00
Nuno Cardoso 92fc236e1c Bug 2021: Missing const qualifier in TopologyReader::Link::Attributes{Begin,End}() 2014-11-19 00:38:17 +01:00
Tommaso Pecorella 8434fca41f Bug 2016 - Radvd do not consider the SendAdvert option and don't reply to RS 2014-11-19 00:13:58 +01:00
Tommaso Pecorella 891e8de991 Remove spurious cout logs from Icmpv6L4Protocol 2014-11-13 23:34:10 +01:00
Peter D. Barnes, Jr. cd94f509c3 [Sphinx] Minor corrections, fix errors in energy.rst 2014-11-12 12:08:53 -08:00
Peter D. Barnes, Jr. 8de030d7fb New TracedCallback function signatures. 2014-12-04 22:33:11 -08:00
Peter D. Barnes, Jr. d32f30ed8a [Sphinx] Update the Tracing chapter in the Tutorial. 2014-12-04 10:03:07 -08:00
Peter D. Barnes, Jr. dc2307c5ae Deprecate AddTraceSource without callback signature. 2014-12-04 10:02:36 -08:00
Peter D. Barnes, Jr. 692bf472e6 TracedCallback function signatures, the rest. 2014-12-04 10:02:01 -08:00
Tom Henderson 2babf9f21e rescan wifi bindings 2014-11-12 10:40:02 -08:00
Daniel Lertpratchya 7f08ea7bb0 bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and Matías Richart) 2014-11-12 10:28:29 -08:00
Tom Henderson c0ab716d67 fix brite wscript, which broke due to waf-1.7.16 upgrade 2014-11-10 12:27:57 -08:00
Ben Newton 28da60a47c bug 1995: avoid multiple definitions of PI 2014-11-07 15:00:14 -08:00
Tom Henderson 9f00ef58da remove unnecessary include 2014-11-07 11:52:19 -08:00
Tom Henderson 8baac9e338 add comment about history of ns3/math.h 2014-11-07 11:51:49 -08:00
Sébastien Deronne fea8fe1b78 bug 1906: 802.11n PHY configuration should be different for 2.4GHz and 5GHz devices 2014-11-07 09:24:11 -08:00
Tom Henderson 48b150cbf3 some additional TcpNewReno logging details 2014-11-04 16:29:22 -08:00
Tom Henderson 42879179bd update tutorial sixth.cc program output 2014-11-04 16:26:52 -08:00
Tom Henderson 048d77d474 update tutorial fifth.cc program output 2014-11-04 16:22:42 -08:00
Tom Henderson 6e5e36c1c2 update tutorial third.cc program output 2014-11-04 11:46:16 -08:00
Tom Henderson e4d8f11e55 update tutorial second.cc program output 2014-11-04 11:36:43 -08:00
Tom Henderson f2f1683a60 add coverage of ./waf install to tutorial 2014-11-04 10:54:48 -08:00
Tom Henderson 2491fc7833 bug 1326: document the -- operator to build.py 2014-11-04 09:30:54 -08:00
Peter D. Barnes, Jr. 1e1a1edbdc [Doxygen] various in src/core 2014-11-03 12:40:24 -08:00
Peter D. Barnes, Jr. ee641c723b [Doxygen] Remove inappropriate uses of @internal 2014-11-03 12:33:13 -08:00
Pedro Silva c9cdd11ceb bug 1791: improve TCP endpoint deallocation code 2014-10-31 13:36:46 -07:00
Tom Henderson c568af328f update CHANGES.html and RELEASE_NOTES 2014-10-29 18:16:16 -07:00
Tom Henderson 96be4f282b rescan wifi bindings 2014-10-29 17:21:55 -07:00
Sébastien Deronne e013980b83 bug 1971: 802.11n at 2.4 GHz should include a signal extension duration 2014-10-29 13:46:45 -07:00
Pedro Silva 8fa5f0e741 bug 1791: TCP Endpoint never deallocates when closing 2014-10-29 10:12:53 -07:00
Tom Henderson 57bba404ab regenerate selected pcap traces due to change in default propagation speed in ConstantSpeedPropagationDelayModel (bug 2011) 2014-10-29 07:30:29 -07:00
Nicola Baldo fe56ee1741 fixed Bug 2011 - speed of light constant 2014-10-28 11:48:13 +01:00
Tom Henderson 033973ca72 upgrade waf to waf-1.7.16 2014-10-22 10:04:58 -07:00
Peter D. Barnes, Jr. cccfc167dd [Doxygen] Attribute implementations. 2014-10-21 16:14:35 -07:00
Peter D. Barnes, Jr. 9d326c107d [Doxygen] Attribute implementation. 2014-10-21 12:21:13 -07:00
Peter D. Barnes, Jr. 8903ab265e Streamline progress and error reporting, show full log on errors. 2014-10-17 12:50:15 -07:00
Sébastien Deronne cf5b6ec37f bug 1970: Missing NotifyAckTimeoutStartNow in MacLow::StartDataTxTimers 2014-10-16 13:26:10 -07:00
Sébastien Deronne e4848b2055 bug 1968: missing supported 802.11n HT rates in the WifiPhy contructor 2014-10-16 12:29:17 -07:00
Peter D. Barnes, Jr. 81f6d0c1c9 Sort and pretty-print result lists of SKIPped, FAILed, CRASHed and VALGR tests from ./test.py 2014-10-15 11:29:30 -07:00
Tom Henderson 3ad3ffaa2d fix some pylint complaints about first.py 2014-10-15 07:38:06 -07:00
Tom Henderson c3c3d4e98f rescan stats bindings 2014-10-15 07:34:36 -07:00
Tom Henderson 203c408a67 add TimeProbe class to data collection framework 2014-10-15 07:06:11 -07:00
Tom Henderson 5b64122a3e bug 1997: fix PlotProbe() documentation and usage for GnuplotHelper and FileHelper 2014-10-15 07:00:24 -07:00
Tom Henderson 98b82e35a7 update CHANGES.html 2014-10-14 13:29:05 -07:00
Tom Henderson 0674674ad0 remove execute permissions on source files 2014-10-14 12:56:57 -07:00
Tom Henderson 31d2a3aad7 rescan bindings 2014-10-14 11:36:00 -07:00
Tom Henderson be2a37427c replace deprecated API 2014-10-14 11:21:47 -07:00
Tom Henderson 5d2310d3d8 removed unused includes 2014-10-14 10:02:08 -07:00
Tom Henderson 37bab66bfe remove deprecated Packet::PeekData() 2014-10-14 09:36:10 -07:00
Tom Henderson cd7311b76c remove deprecated code in internet module 2014-10-14 08:15:46 -07:00
Tom Henderson a532ec20b1 remove deprecated test methods 2014-10-14 07:37:10 -07:00
Tom Henderson c41ba4e79a rescan bindings 2014-10-13 21:25:21 -07:00
Tom Henderson 411020b4c9 update regression packet traces to account for random variable stream assignment changes 2014-10-13 16:12:13 -07:00
Tom Henderson 41b83c9851 remove deprecated RandomVariable class 2014-10-13 16:09:59 -07:00
Tom Henderson 52ba1be9f9 fix some additional sources of randomness in mesh tests 2014-10-13 15:45:32 -07:00
Tom Henderson 9f3b3bf4d2 improve some mesh module logging 2014-10-13 15:18:49 -07:00
Tom Henderson 244f1cc32d fix log component name 2014-10-13 13:36:11 -07:00
Tommaso Pecorella cee4e4ac5e Print RT/NC should be static functions 2014-10-12 16:03:16 +02:00
Tommaso Pecorella da653eed57 Bug 1957 - UdpSocketImpl is stuck after a Close() 2014-10-12 15:51:05 +02:00
Nicola Baldo f0a030b94b fixed typo in changeset 95cf4d40ee01 2014-10-09 17:39:14 +02:00
Nicola Baldo 455db9e086 fixed units in description of RandomWalk2dMobilityModel::Direction 2014-10-09 15:41:34 +02:00
Tommaso Pecorella 013d328e7d [PyBindings] rescan core module 2014-10-09 12:40:54 +02:00
Tommaso Pecorella b703ac7f27 Fix missing header 2014-10-09 12:40:49 +02:00
Peter D. Barnes, Jr. d767aaddd2 [Doxygen] Fix configuration errors; suppress mains. 2014-10-08 21:05:10 -07:00
Peter D. Barnes, Jr. dd7996b57d Set default TypeId size. 2014-10-08 21:04:32 -07:00
Peter D. Barnes, Jr. 3f92b8e1c5 [Doxygen] Remove more trivial and/or misused groupings 2014-10-08 20:59:31 -07:00
Peter D. Barnes, Jr. 6254c4b242 [Doxygen] Remove trivial and/or misused groupings 2014-10-08 20:58:33 -07:00
Peter D. Barnes, Jr. 2aebf37542 Sphinx] Reduce build chatter 2014-10-08 17:48:38 -07:00
Peter D. Barnes, Jr. 9e5633feff [Sphinx] fix error 2014-10-08 17:47:34 -07:00
Peter D. Barnes, Jr. 792c339edc [Doxygen] Include the size of registered types in the long description for the class. 2014-10-08 13:52:14 -07:00
Peter D. Barnes, Jr. 06777c4102 Missing NS_OBJECT_ENSURE_REGISTERED 2014-10-08 13:51:06 -07:00
Peter D. Barnes, Jr. bdad6336fe [Doxygen] Remove emu/examples 2014-10-08 12:02:05 -07:00
Tommaso Pecorella fcda743c44 [Doxygen] network module 2014-10-07 21:37:00 +02:00
Peter D. Barnes, Jr. 9346f805f2 Generate doxygen list of all LogComponents 2014-10-06 17:24:00 -07:00
Peter D. Barnes, Jr. b2dc58dcb9 Use StringValue instead of PointerValue (CreateObject... in AddAttribute calls 2014-10-06 17:22:59 -07:00
Peter D. Barnes, Jr. 6313928fbc [doxygen] print-introspected-doxygen.cc 2014-10-05 20:42:52 -07:00
Peter D. Barnes, Jr. a4d68196e7 Refactor print-introspected-doxygen.cc 2014-10-05 17:58:48 -07:00
Peter D. Barnes, Jr. 132655443b Patches to doxygen.warnings.report.sh:
Don't assume we're in a repo.
Only count unique warnings.
2014-10-03 16:01:49 -07:00
Peter D. Barnes, Jr. c10b5622a0 [Doxygen] Minor fix-ups 2014-10-08 11:59:31 -07:00
Tom Henderson d471d382ac rescan bindings 2014-10-07 12:19:52 -07:00
Tommaso Pecorella 899626019f [Doxygen] minor fixes 2014-10-03 23:51:58 +02:00
Tommaso Pecorella bd3ba18da4 [Doxygen] LTE Asn1Header 2014-10-06 22:36:50 -07:00
Tommaso Pecorella a49957015e [Doxygen] propagation module fixes 2014-10-03 22:41:44 +02:00
Tommaso Pecorella 4943ed3c70 [Doxygen] internet module fixes 2014-10-03 17:10:26 +02:00
Natale Patriciello d9b1ff4d71 Point-to-point documentation patch 2014-10-06 16:48:51 -07:00
Tom Henderson 1ba5df7bc3 add doxygen 2014-10-06 16:32:44 -07:00
Budiarto Herman 6603ec2fb3 LTE doxygen additions 2014-10-06 16:05:46 -07:00
Tiago Cerqueira cedd6d624b Doxygen for mobility module 2014-10-06 16:00:06 -07:00
Tom Henderson 0bb6e095b3 bug 1343 (documentation): emu-udp-echo-client/server.cc missing, but referenced in HOWTOs 2014-10-06 14:52:08 -07:00
Tom Henderson 94cd3d8542 remove deprecated emu module 2014-10-06 14:50:49 -07:00
Tom Henderson d00ccf814c add missing GPLs 2014-10-06 10:24:56 -07:00
Peter D. Barnes, Jr. 4cb9c7b916 TracedCallback function signatures, the simple ones.
These are TracedCallback function signatures for traces sources
using a single argument.
2014-10-03 02:24:42 -07:00
Tom Henderson 4cd32401ec clarify how to properly create random variable objects 2014-12-04 12:14:46 -08:00
Sébastien Deronne 0976e2d58a fix typos in wifi module 2014-12-03 14:47:28 -08:00
Nicola Baldo a47df0d6a3 clarified PRACH Config Index assumption in LTE docs 2014-12-04 12:49:50 +01:00
Nicola Baldo 4e9c93545f added LTE troubleshooting and debugging tips 2014-12-04 12:24:38 +01:00
Peter D. Barnes, Jr. 5b9e3507b7 [Bug 2022] Spurious characters in config paths
On Nov 24, 2014, at 12:48 PM, Tom Henderson <tomh@tomh.org> wrote:
> On 11/24/2014 12:39 PM, Peter Barnes wrote:
>> I see the '%' being use in two places, beginning at line 1156 in
>> StaticInformation::DoGather ()
>>
>> Mitch used the % to escape the class names so doxygen wouldn't
>> create links.  I'm not sure why the links are bad.  Is the config
>> path token with '::' sometimes not the same as a class name?
>> Then doxygen would be looking for a non-existent class and
>> complaining, so suppressing might be good.
>>
>> Looks like I might have added the surrounding '"' in r10977.
>> Could this be the problem?
>
> Not sure.  Let me know if you don't get to this before you
> disappear for a while, and I'll pick it up if so.

Removing the quotes fixes the problem.

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

So my recommendation is to remove the temporaryCharacter
formatting string completely.
2014-12-03 15:27:46 -08:00
Sébastien Deronne 8bdfaee6e9 bug 1758: Missing Yans and Nist error rate models for 5/6 code rate of 802.11n HT 2014-11-29 10:13:25 -08:00
Sébastien Deronne 81b4f79c43 bug 2020: Erroneous MCS field in 802.11n PCAP files 2014-11-29 09:57:24 -08:00
Peter D. Barnes, Jr. cc56e83767 TracedValue callback function signatures. 2014-10-02 21:17:48 -07:00
Peter D. Barnes, Jr. 24144c56f9 Implementation for documenting TracedValue and TracedCallback signatures. 2014-10-02 21:05:15 -07:00
Peter D. Barnes, Jr. 179361f956 Reflow tutorial page 2014-09-25 14:11:46 -07:00
Peter D. Barnes, Jr. fd0426c762 Replace erroneous "using namespace ns3" with namespace ns3. 2014-10-02 21:07:20 -07:00
Tom Henderson c9f4bc4e68 bug 1551 postfix: enable logging for functions outside namespace ns3 2014-10-01 20:50:46 -07:00
Gustavo Carneiro 504c41fa1b Pull new pybindgen version to fix the build, again. 2014-09-29 22:07:14 +01:00
Gustavo Carneiro 853105d4bd Use pybindgen revno 885 to pull container ref bug fix 2014-09-28 17:21:26 +01:00
Gustavo Carneiro 285124fa83 I meant to bump pybindgen version up, not down. Use latest PBG version. 2014-09-28 16:56:37 +01:00
Gustavo Carneiro a8b9cb97c2 Python: rescan bindings 2014-09-28 12:41:46 +01:00
Gustavo Carneiro d880a29e2d Python bindings: fix generation of callback wrappers with the newest pybindgen 2014-09-28 12:39:26 +01:00
Peter D. Barnes, Jr. bfdb6ef10a [Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace? 2014-09-26 15:51:00 -07:00
Peter D. Barnes, Jr. 3611bd11a5 [Bug 1551] NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace? 2014-09-26 12:44:13 -07:00
Peter D. Barnes, Jr. b489a74147 Verbose option to doxygen.warnings.report.sh: includes doxygen build chatter. 2014-09-26 12:25:13 -07:00
Tommaso Pecorella 5d52c03318 Bug 652 - no public API for IPv4 neighbor table - Print functions 2014-09-20 23:53:22 +02:00
Tommaso Pecorella 78985e5d68 Avoid forward declaration if not needed - silence Eclipse warning 2014-09-19 22:08:58 +02:00
Tommaso Pecorella 4231c89fee Example ht-wifi-network contains old random variable syntax 2014-09-19 22:07:09 +02:00
Tommaso Pecorella e6a48c0188 Bug 1983 - FlowMonitor returns containers copies instead of references 2014-09-19 21:25:48 +02:00
Tommaso Pecorella 234e84dc35 Bug 1991 - PcapFileWrapper::CaptureSize attribute (snaplen) has no effect. 2014-09-19 21:23:55 +02:00
Tom Henderson c0168538ae revert accidental commit of debugging code in changeset 55f1b7dc037e 2014-09-19 12:07:15 -07:00
Tom Henderson 29c216b93f update CHANGES.html for new release version 2014-09-19 12:01:58 -07:00
Tom Henderson aa9be76b3f update RELEASE_NOTES for new release version 2014-09-19 11:47:30 -07:00
Tom Henderson add76409e0 Added tag ns-3.21 for changeset fa4be182ef17 2014-09-17 18:52:01 -07:00
Tom Henderson c994aa10d8 rescan remaining bindings 2014-09-15 20:51:08 -07:00
Tom Henderson 47e3b01c82 silence uninitialized variable warning for unused member 2014-09-15 20:50:43 -07:00
Tom Henderson 55501d239e conditional include of fd-net-device for lte module 2014-09-15 20:49:38 -07:00
Peter D. Barnes, Jr. fdfece661a Bug 1972: documentation to clarify the behavior with repeated argument 2014-09-15 14:35:11 -07:00
Tom Henderson 9f77006419 remove outdated reference to statistics chapter 2014-09-15 13:01:31 -07:00
Tom Henderson 52567ff22b fix formatting for CoDel chapter 2014-09-15 13:00:23 -07:00
Tommaso Pecorella d01fcfd9ab update tutorial to describe Simulator::Stop 2014-09-15 11:29:15 -07:00
Tommaso Pecorella 9b1f7c5b4b Bug 1911 - AODV can not work on nodes with more than one NetDevice 2014-09-13 19:23:39 +02:00
Tom Henderson 4ea5aa6f01 update AUTHORS 2014-09-13 09:00:41 -07:00
Tom Henderson 8e781d4d16 update CHANGES.html 2014-09-13 08:50:02 -07:00
Tom Henderson 1bfd17915d update RELEASE_NOTES 2014-09-13 08:47:05 -07:00
Sébastien Deronne a39ea72650 update WiFi documentation 2014-09-12 20:48:46 -07:00
Tom Henderson 1d0b7ff106 temporarily disable two tests failing for OS X 2014-09-12 20:27:47 -07:00
Tom Henderson 9cfe687e4a prevent TcpHeader::Deserialize() from asserting; fix a few small bugs in option code 2014-09-12 18:29:47 -07:00
Tom Henderson 45b1b3daa1 silence compiler warning 2014-09-12 18:19:47 -07:00
Tom Henderson 4394d1d4ba clarify Header::Deserialize documentation 2014-09-12 17:49:06 -07:00
Alexander Afanasyev 5b1096a52a Bug 1673: Config::Set/Connect does not search for attributes in parent classes 2014-09-12 17:34:43 -07:00
Tom Henderson 161c703a1f test case for config path attribute search on parent classes (bug 1673) 2014-09-12 17:42:12 -07:00
Tom Henderson 6674f95bc1 equation formatting for latex 2014-09-12 14:07:32 -07:00
Tommaso Pecorella 066e14f83f Bug 1824 - aodv fixes 2014-09-12 22:51:20 +02:00
Tom Henderson 3d1daf7c5a chapter included multiple times in manual 2014-09-12 13:36:01 -07:00
Peter D. Barnes, Jr. 070e2da241 Bug 1964: GetInteger overflow 2014-09-12 13:03:06 -07:00
Tom Henderson 3048ebcced regression test for bug 1964 2014-09-12 12:55:00 -07:00
Tommaso Pecorella 077579b060 Bug 1824 - L4 protocol sockets should support BindToNetDevice over IPv6 2014-09-12 20:47:17 +02:00
Tom Henderson 2cafbd6dbd repair wscript 2014-09-12 10:18:55 -07:00
Tom Henderson e2f347c513 make openflow-switch peek transport headers based on IPv4 protocol number information 2014-09-11 21:51:29 -07:00
Tom Henderson 884ad61823 adjust ns3tcp-cwnd-test-suite response vector 2014-09-11 20:08:17 -07:00
Tom Henderson 3a872a1d8c update test vector for test ns3-tcp-interoperability 2014-09-11 17:43:37 -07:00
Tom Henderson cc9e4d787b improve printing of window scale option 2014-09-11 17:29:21 -07:00
Tom Henderson 80c9d1e629 update test vectors for test ns3-tcp-loss 2014-09-11 17:22:58 -07:00
Tom Henderson fb59f7982a update test vectors for test ns3-tcp-state 2014-09-11 15:29:42 -07:00
Tom Henderson bc68d4f0e0 new test vectors for devices-mesh-flame-regression 2014-09-11 14:56:06 -07:00
Tom Henderson 9133c72c96 update mesh flame tests to account for wifi random variables 2014-09-11 14:55:42 -07:00
Tom Henderson cbc91604dd new test vectors for devices-mesh-dot11s-regression 2014-09-11 14:20:28 -07:00
Tom Henderson fafad95f72 update mesh tests to account for wifi random variables 2014-09-11 14:06:19 -07:00
Tom Henderson f17bd8c546 Mesh Wifi uses also RegularWifiMac 2014-09-11 13:45:38 -07:00
Tommaso Pecorella 274fcc293a Update RELEASE_NOTES 2014-09-11 22:47:53 +02:00
Kristian A. Hiorth 8d4db65927 Bug 1981 - PyViz shell not compatible with ipython >= 0.11 2014-09-11 20:08:05 +01:00
Tom Henderson f627ad5df2 update regression traces for OLSR 2014-09-11 11:32:09 -07:00
Tom Henderson 9db13b8df4 fix the stream assignment of some additional random variables in OLSR test suite 2014-09-11 11:23:03 -07:00
Tom Henderson 87c3097be5 update AODV regression traces 2014-09-11 10:28:37 -07:00
Tom Henderson bb457316d4 rescan internet bindings 2014-09-10 21:07:04 -07:00
Tom Henderson d4901ad3b0 move unknown TCP option handling with the base class 2014-09-10 17:31:46 -07:00
Tom Henderson bf9893dbf3 add processing for unknown TCP options 2014-09-10 16:58:31 -07:00
Tom Henderson 15333eaf9a calculate send scale factor when sending the SYN-ACK instead of when reading the SYN options 2014-09-10 15:08:30 -07:00
Tom Henderson a80337baab add some logging 2014-09-10 15:06:10 -07:00
Tom Henderson 8443885e88 restore TCP option padding approach that avoids NOPs 2014-09-10 15:05:57 -07:00
Tom Henderson d559ff6c4c remove unsupported option types from enum 2014-09-09 16:15:49 -07:00
Nicola Baldo b38e12c90c cosmetic changes to lte-rlc-am-e2e test suite 2014-09-09 14:53:10 +02:00
Nicola Baldo dd89970f66 fixed RNG stream assignment in lte-rlc-am-e2e test suite 2014-09-09 13:55:35 +02:00
Nicola Baldo ddf4cc5bb2 removed unused member variables in LteRlcAm 2014-09-09 13:06:32 +02:00
Nicola Baldo 6681ddceb8 m_rxonBuffer[seqNumber.GetValue ()] => it->second 2014-09-09 12:12:34 +02:00
Tommaso Pecorella 0950f7f943 TcpOptions Deserialize should return zero if a deserialization error happens 2014-09-09 09:44:37 +02:00
Natale Patriciello b6d33fd296 TCP Options - Valgrind fixes 2014-09-10 19:09:06 +02:00
Daniel Lertpratchya 1857322c43 Bug 1858 - wireless examples not correctly recording packet reception - reported by Scott Carpenter <scarpen_at_ncsu.edu> 2014-09-10 08:27:26 +02:00
Tommaso Pecorella 208fdf2681 Update RELEASE_NOTE 2014-09-10 06:15:01 +02:00
Tommaso Pecorella 65d1ba667b rescan network bindings 2014-09-10 06:09:55 +02:00
Tommaso Pecorella ae9fbb2eaa rescan applications bindings 2014-09-10 05:58:38 +02:00
Tommaso Pecorella b489a41127 Bug 1811 - Basic traffic generator for network module 2014-09-10 06:09:45 +02:00
Tom Henderson 9d2770100d last TCP option should be END, not NOP 2014-09-06 09:40:18 -07:00
Tommaso Pecorella 287bda5b7e Move some tests from src/test to appropriate places 2014-09-06 07:09:08 +02:00
Tommaso Pecorella 98945439e1 Enhancements to SimpleNetDevice and SimpleChannel 2014-09-06 07:08:49 +02:00
Tommaso Pecorella 3ae1348425 Fix clang "errors" about uninitialized variables. 2014-09-06 06:57:27 +02:00
Tom Henderson a0fefe1074 rescan wifi bindings 2014-09-05 18:50:40 -07:00
Tom Henderson 5072f3a3c6 rescan energy bindings 2014-09-05 18:46:15 -07:00
Tom Henderson 68a33cd7ba rescan lte bindings 2014-09-05 18:19:30 -07:00
Tom Henderson f6fc901227 rescan internet bindings 2014-09-05 18:00:05 -07:00
Piotr Gawlowicz 74f0cf7073 GSoC 2014 FFR algorithms - figures 2014-09-05 01:46:10 +02:00
Piotr Gawlowicz a9ef49d196 GSoC 2014 FFR algorithms 2014-09-05 01:12:55 +02:00
Anh Nguyen a64d69ce19 documentation for CoDel queue 2014-09-04 12:33:50 -07:00
Anh Nguyen 07357e4048 examples for CoDel queue 2014-09-04 12:29:36 -07:00
Anh Nguyen 4c20e1b099 test suite for CoDel queue 2014-09-04 12:27:00 -07:00
Anh Nguyen 153479dac9 changes suggested in original code review, and aditional improvements made during 2014 GSoC project 2014-09-04 12:24:07 -07:00
Tom Henderson 16e4f9b004 move CoDel queue model to internet module 2014-09-04 12:18:19 -07:00
Alina Quereilhac e6fc8c2ad2 update fd-tap-ping.cc instructions 2014-06-15 08:54:48 -07:00
Tom Henderson 14ee3219ae update RELEASE_NOTES 2014-06-12 12:36:44 -07:00
Sascha Jopen 5a00199a04 bug 1924 - sensing radius and CCA 2014-06-12 12:35:32 -07:00
Tom Henderson eac8c0a104 update RELEASE_NOTES 2014-06-11 20:27:12 -07:00
Unknown b9b6bacc5f bug 1923: Patch for disabling active probe requests 2014-06-11 20:26:02 -07:00
Tom Henderson ba584e1ac1 update CHANGES.html 2014-06-06 12:43:03 -07:00
Tom Henderson 2a1014565d update release notes 2014-06-06 12:32:41 -07:00
Tom Henderson 620d770f3c add author 2014-06-06 12:01:56 -07:00
Tom Henderson 15a9d1bb55 rescan wifi bindings 2014-06-06 12:00:58 -07:00
Scott Carpenter 131381a91a bug 1922- GetSsid() should not be fatal 2014-06-06 10:49:03 -07:00
Tom Henderson 50cb988c49 bug 1920 - remove DSR attribute that was conflicting with config store 2014-06-06 10:47:21 -07:00
Scott Carpenter f80a00ba88 bug 1919 - Strip trailing semicolons from mobility trace files 2014-06-06 10:18:10 -07:00
Sébastien Deronne b5f51f5366 Bug 1907- Add IsMcsSupported() 2014-06-06 10:15:54 -07:00
Tom Henderson 243e8a0645 bug 1868: restrict the compiler version for Wstrict-overflow=5 until gcc-4.9 issues are addressed 2014-06-06 10:11:35 -07:00
Tom Henderson b6a990f767 describe bug 1770 issue and workaround 2014-06-06 10:10:51 -07:00
Tom Henderson 0c9e87a440 update CHANGES.html for release 2014-05-30 21:39:15 -07:00
Tom Henderson c9051e4101 update AUTHORS list 2014-05-30 21:38:48 -07:00
Tom Henderson c9c31cce11 update RELEASE_NOTES 2014-05-30 17:38:31 -07:00
Tom Henderson 70f3450c5e update bindings 2014-05-30 10:07:22 -07:00
Unknown b9c2b3087c bug 1913: avoid crash in BlockAckManager::GetNextPacket 2014-05-29 23:00:30 -07:00
Tom Henderson 0cc9e25227 update traces for bug 1912 fix 2014-05-29 22:52:23 -07:00
Unknown 17ef04d50b bug 1912: avoid multiple MacTxMiddle instances 2014-05-29 22:51:05 -07:00
Tommaso Pecorella d1171adee8 Clarify doxygen for [Tcp,Udp]Socket ForwardUp functions 2014-05-29 21:37:33 +02:00
Tom Henderson fe5b9e2242 bug 1868: enable -Wstrict-overflow only for newer gcc versions 2014-05-28 23:03:23 -07:00
Tom Henderson f5b4f0961e remove extra newline 2014-05-28 13:10:59 -07:00
Tom Henderson f32803f7b9 bug 1900: adjust an AODV test to provide consistent traces and avoid floating point differences 2014-05-28 13:00:15 -07:00
Dave Taht 6b05c585d1 Add Codel alogithm support
---
 src/network/utils/codel-queue.cc |  482 ++++++++++++++++++++++++++++++++++++++
 src/network/utils/codel-queue.h  |  130 ++++++++++
 2 files changed, 612 insertions(+), 0 deletions(-)
 create mode 100644 src/network/utils/codel-queue.cc
 create mode 100644 src/network/utils/codel-queue.h
2014-05-22 14:42:47 -05:00
Natale Patriciello 07364f0e31 Support for basic TCP options, window scale, and timestamps, based on original code proposal by Adrian S.-W. Tam 2014-09-05 16:57:11 -07:00
Natale Patriciello b4a48d02b2 GT_OR_EQ and LT_OR_EQ macros for testing 2014-09-04 15:17:22 -07:00
Stefano Avallone bd8c6c8a32 add support for a Wifi sleep mode 2014-09-05 16:33:57 -07:00
Cristiano Tapparello d3ff87aeb2 Energy harvester model 2014-09-05 15:38:55 -07:00
Tom Henderson 47d531fb41 support disabling of NSC by command-line argument 2014-09-05 15:25:10 -07:00
Budiarto Herman 81820dd14f Updated fix for Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted 2014-09-04 23:13:41 +03:00
Nicola Baldo c69d0bfe09 fixed Bug 1893 - issue in DoSchedUlTriggerReq with harq 2014-09-03 13:42:12 +02:00
Tommaso Pecorella 07040f354c Improve IPv6 LL multicast interface selection 2014-08-30 18:20:10 +02:00
Tommaso Pecorella 51aa7c22a4 Improve ICMPv6 NS printing 2014-08-30 18:19:25 +02:00
Tommaso Pecorella dda7b43d44 Bug 1967 - LL Multicast is not compressed in the right way in IPHC 2014-08-30 18:25:22 +02:00
Tommaso Pecorella 6d42b5f6c1 lr-wpan: remove dead code and add Doxygen 2014-08-25 19:15:36 +02:00
Tommaso Pecorella 8225948ffd [Doxygen] NetDevice small fix 2014-08-25 09:34:17 +02:00
Tommaso Pecorella be8cd47fc8 [PyBindGen] rescan internet module 2014-08-24 17:29:26 +02:00
Tommaso Pecorella 6ac283a20b [Doxygen] internet module fixes 2014-08-24 17:16:17 +02:00
Tommaso Pecorella 35f32fe073 Bug 1963 - AODV can tag the same packet twice (and raise an assert). 2014-08-23 17:37:24 +02:00
Tommaso Pecorella 62eaf4f7cb [manual] Packet::EnableMetadata doesn't exist anymore 2014-08-23 17:34:17 +02:00
Tom Henderson af37384cff Suppress binding for EmuEpcHelper if EmuFdNetDevice is not enabled 2014-08-19 14:29:52 -07:00
Peter D. Barnes, Jr. 16af384434 [Sphinx] Attributes manual chapter 2014-08-18 17:43:37 -07:00
Peter D. Barnes, Jr. e34b13367b Show default attribute value in command line example - cleanup 2014-08-18 16:00:42 -07:00
Tommaso Pecorella fb985d0860 Show default attibute value in command line example - fix 2014-08-18 23:45:04 +02:00
Peter D. Barnes, Jr. 97f06df836 Show initial values of arguments; show attribute value. 2014-08-18 12:36:07 -07:00
Peter D. Barnes, Jr. 06fe039cd9 Fix misspelled argument name; refactor to use LookupAttributeByName 2014-08-18 12:35:33 -07:00
Vedran Miletić e22f7b5958 Make ordering of member variables in NSC TCP socket implementation header/source consistent 2014-08-18 11:56:15 +02:00
Tommaso Pecorella 27e7935c6c [PyBindGen] Rescan core module 2014-08-15 14:27:15 +02:00
Peter D. Barnes, Jr. b8b676a8d7 CommandLine Attribute shorthand 2014-08-14 12:46:11 -07:00
Peter D. Barnes, Jr. fa19c3d5e3 [doxygen] CommandLine formatting 2014-08-14 12:41:38 -07:00
Peter D. Barnes, Jr. 60505541ec Sort output of the CommandLine::Print functions 2014-08-14 11:31:12 -07:00
Tommaso Pecorella 894e118a3b [PyBindGen] Rescan internet module 2014-08-14 06:34:47 +02:00
Peter D. Barnes, Jr. 49bf6a544f [Doxygen] Fix errors; fix organization of Callback; organize Time. 2014-08-13 17:17:26 -07:00
Tommaso Pecorella 2d79be2427 Improvements to tcp-variants-comparison example 2014-08-13 22:43:18 +02:00
Tommaso Pecorella fbad78fbb4 Bug 1831 - TcpSocket SlowStartThreshold is not a TraceSource 2014-08-13 23:46:16 +02:00
Alina Quereilhac 10269d0a5b Fix for Bug 1961 - planetlab-tap-creator "variable set but not used" 2014-08-06 11:00:06 +02:00
Tommaso Pecorella fe90df6c23 Bug 1960 - Wrong information on index range, about Node::GetDevice 2014-08-03 15:09:19 +02:00
Tom Henderson 9a8bbca8df rescan LTE bindings 2014-08-03 09:55:53 -07:00
Nicola Baldo d762f84977 refined fix for Bug 1762 2014-08-01 14:30:42 +02:00
Budiarto Herman c53882872b fix Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted 2014-07-31 14:00:06 +02:00
Tommaso Pecorella 6af34ad829 Bug 1941 - [cont.] Remove unnecessary dependency on Application module in other modules 2014-07-27 23:02:38 +02:00
Tommaso Pecorella e3729362c9 Avoid checking all Link-Local Multicast cases in IPv6 routing 2014-07-26 13:08:33 +02:00
Lynne Salameh 691b9f892f Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple 2014-07-20 11:29:28 +02:00
Roman Naumann f0d6341ddf Bug 1951 - AODV does not update nexthop for 1-hop nodes 2014-07-20 10:13:02 +02:00
Peter D. Barnes, Jr. f8bb25d058 Enable explicit setting of the maximum look ahead in distributed simulation. 2014-07-17 15:38:07 -07:00
Peter D. Barnes, Jr. e4f944939c NS_LOG_CONDITION to control logging based on file-local state. 2014-07-17 15:34:57 -07:00
Dmitrii Shakshin 005ea81ecf NetAnim: Support for system id associated with nodes 2014-07-10 08:19:06 -07:00
Sascha Alexander Jopen 9fd85ad079 Add const double& operator[] to SpectrumValue 2014-07-08 08:27:21 +02:00
Tom Henderson b3a080b633 enable emu-related files based on waf configuration check results 2014-07-05 09:51:04 -07:00
Sascha Alexander Jopen 4078d90539 Bug 1943 - Waveform generator signal duration calc error 2014-07-04 20:22:47 +02:00
Nicola Baldo 19653b4a77 updated LTE user docs and RELEASE_NOTES for EmuEpcHelper 2014-07-03 16:43:58 +02:00
Nicola Baldo 057f56133b merge 2014-07-03 15:39:00 +02:00
Nicola Baldo fe5ee0c29b merge 2014-07-03 10:48:41 +02:00
Tom Henderson 4af772ceaa print error message when test.py list printing fails 2014-06-30 11:09:35 -07:00
John Abraham 7ec65a1816 NetAnim: Valgrind fixes 2014-06-29 20:19:00 -07:00
John Abraham b397d2775e NetAnim: Cleanup and support for more built-in counters 2014-06-28 09:59:03 -07:00
Tommaso Pecorella 31f05a6594 Bug 1941 - [cont.] Remove unnecessary dependency on Application module in other modules 2014-06-28 12:35:08 +02:00
Tommaso Pecorella d7731afca3 Bug 1941 - [partial] Remove unnecessary dependency on Application module in other modules 2014-06-28 08:31:24 +02:00
Tommaso Pecorella 16671aa50d Bug 1937 - FlowMonitor fails to track multiplexed packets 2014-06-27 22:28:07 +02:00
Tom Henderson aa3a17d3e5 improve point-to-point-net-device.cc logging 2014-06-26 13:15:49 -07:00
mmiozzo 7716182610 Bug-fix: Bug 1935 - Bug in all Uplink Schedulers regarding HARQ retx handling 2014-06-26 13:44:03 +02:00
Tom Henderson a0be1da4b5 update pybindgen version 2014-06-23 09:52:33 -07:00
Tommaso Pecorella 6bde2bde12 Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet 2014-06-18 19:03:10 +02:00
Tommaso Pecorella b7a3cff456 Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing 2014-06-17 23:31:52 +02:00
Roman Naumann 69d284bc83 Credit for Bug 1930 finding and patch. 2014-06-17 22:44:08 +02:00
Tommaso Pecorella 5a3b3d38e3 Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple 2014-06-17 22:40:32 +02:00
Tom Henderson 71d0c0f554 start RELEASE_NOTES and CHANGES.html for next version 2014-06-17 10:59:19 -07:00
Tom Henderson 060d270a04 Added tag ns-3.20 for changeset da0eb48df23f 2014-06-16 21:58:35 -07:00
Tommaso Pecorella e77f033498 Update RELEASE_NOTES 2014-05-21 21:03:33 +02:00
Tommaso Pecorella e74cb7f6cd Bug 1916 - RandomWalk2dMobilityMode default "Bounds" attribute is not a rectangle 2014-05-21 21:01:41 +02:00
Chris Hood 23a3e5f751 Bug 1915 - BRITE channel delay is rounded to an integer 2014-05-19 21:34:20 +02:00
Peter D. Barnes, Jr. 1164685c68 [doxygen] Fix generation of Time docs 2014-05-15 16:09:51 -07:00
Tommaso Pecorella cd8eaad8cb lr-wpan - Add Enqueue and Dequeue ASCII trace 2014-05-08 22:25:56 +02:00
Tom Henderson 23a41e0e22 add netanim capability to mixed-wireless.cc 2014-05-04 18:46:44 -07:00
Tom Henderson 7867d64876 make mobility and visualization more reasonable for example 2014-05-04 18:37:17 -07:00
Tom Henderson ddd060a1cc re-align mixed-wireless C++ and Python example 2014-05-04 17:59:01 -07:00
Alexander Afanasyev 894699eccf bug 1857: detect location of installed boost libraries 2014-05-03 15:56:25 -07:00
Tom Henderson 2661df4606 make waf smarter about finding BRITE automatically 2014-05-03 10:12:46 -07:00
Tommaso Pecorella 6fcc641c25 Update RELEASE_NOTE 2014-05-02 23:52:36 +02:00
Biljana Bojovic c4269df612 Bug 1894 - CqaFfMacScheduler needs an update 2014-05-02 17:06:37 +02:00
Nicola Baldo c612a2b43a added missing bugs in RELEASE_NOTES 2014-05-02 16:48:50 +02:00
Yufei Cheng ea04312f27 Bug 1872 and 1895 - DSR model improvements (credits also to Tomasz Seweryn <tomasz.seweryn7@gmail.com>) 2014-05-02 16:38:06 +02:00
Tommaso Pecorella d9e06f64fa fix RELEASE_NOTES 2014-05-02 08:58:51 +02:00
Tommaso Pecorella 8604dad16c lr-wpan ascii trace fix 2014-05-02 08:47:44 +02:00
Brian Swenson 7dbc7f63e4 Bug1791 patch reverted 2014-05-01 16:49:11 -04:00
Tommaso Pecorella d746b4a9d9 Add sixlowpan example using lr-wpan 2014-05-01 15:18:41 +02:00
Peter D. Barnes, Jr. a43d770825 [Bug 1868] Optimized builds are sensitive to -fstrict-overflow 2014-04-30 21:32:57 -07:00
Peter D. Barnes, Jr. 84d277bfa3 Disambiguate std::pow 2014-04-30 20:54:05 -07:00
Tom Henderson 08a075ef1d fix lr-wpan documentation build 2014-04-30 13:40:07 -07:00
Tom Henderson ff1f9f9c5f append list of skipped/failed/crashed/valgrined tests to end of test.py output 2014-04-30 13:06:17 -07:00
Tom Henderson 2c89f96f00 add lr-wpan bindings 2014-04-30 13:05:31 -07:00
Tom Henderson e0bb22b2f2 disable another copy constructor 2014-04-30 13:01:22 -07:00
Tom Henderson 20e713630a some fixes to enable Python bindings scanning 2014-04-30 12:19:33 -07:00
Sascha Jopen 022360d1f3 Reverted lr-wpan-error-model "fix", the differences were due to randomness problems. 2014-04-27 10:48:18 +02:00
Tom Henderson 2d87ec3973 update AUTHORS 2014-04-26 23:29:46 -07:00
Tom Henderson 57889369b1 Apply utils/check-style.py script on lr-wpan source code again 2014-04-26 23:27:34 -07:00
Tom Henderson 2d90b21794 more verbose test name for lr-wpan-energy-detection 2014-04-26 23:11:44 -07:00
Sascha Jopen fa763e41c5 Added firing of missing MAC TX trace sources.
Fixed error model test case after changes to the interference handling.
More code cleanup and documentation.
2014-04-26 22:23:25 +02:00
Sascha Jopen 1e7427bab1 More documentation for the PHY. 2014-04-26 09:06:00 +02:00
Margherita Filippetti 74081e597a Add number of CSMA retries to sent packet trace 2014-04-25 23:46:03 +02:00
Tom Henderson 45884e4786 assign fixed random variable streams to lr-wpan tests 2014-04-26 22:21:13 -07:00
Tom Henderson 95b22341a9 enable assignment of lr-wpan random variable stream indices 2014-04-26 22:21:03 -07:00
Tom Henderson 7059e4d396 add TestCase type specifier 2014-04-26 14:09:57 -07:00
Tom Henderson d53f68be0c multiple inclusion of lr-wpan-collision-test.cc 2014-04-26 05:44:11 -07:00
Tom Henderson ce1c08f9a7 restore Start/DoStart change to Initialize/DoInitialize to LrWpanNetDevice 2014-04-26 05:33:42 -07:00
Sascha Jopen cc1ff6ac3b First Doxygen documentation batch and code cleanups.
Moved to new random variable streams.
Use Time class where times are calculated.
Use std::min/max provided by standard library instead of own macros.
Always return a 0 FCS value for MAC trailers without FCS calculation.
2014-04-25 19:02:57 +02:00
Sascha Jopen 2eda1ac2e6 Removed sixlowpan example from scratch folder. This should go to the respective module. 2014-04-25 18:58:47 +02:00
Sascha Jopen 6ded61e205 Bug fixes and test for energy detection code. 2014-04-25 12:51:56 +02:00
Sascha Jopen bdbf0fd6e7 Changed default receiver sensitivity value. 2014-04-24 12:47:09 +02:00
Sascha Jopen 42ccc4e1dc Added log components. 2014-04-24 12:46:33 +02:00
Tom Henderson b5f0ebcab2 add lr-wpan documentation links to model library Makefile 2014-04-25 14:50:39 -07:00
Sascha Jopen e49d50c75a Updated documentation. Added debugging code. 2014-04-24 12:45:49 +02:00
Tommaso Pecorella 9c76f9ff43 Add Trace to measure the number of packet retires (for Etx metric) 2014-04-18 23:32:55 +02:00
Sascha Jopen a6316eb5a3 Make ED and CCA interference aware.
Fix a bug in interference handling.
2014-04-16 15:32:59 +02:00
Sascha Jopen c6f406fe8a Added test for ACK ordering. 2014-04-15 15:41:12 +02:00
Sascha Jopen f9fedcc59e Added LQI calculation as the PER of the complete packet scaled to 255.
Removed debugging outputs.
2014-04-15 15:40:39 +02:00
Nicola Baldo 91621686b4 added comment 2014-04-14 17:21:29 +02:00
Tommaso Pecorella c65a263dbd Collision tests, the bug was a shadow 2014-04-08 21:37:23 +02:00
Tommaso Pecorella f6ad02364e Add back debugging code, seems we have a bug in interference handling. 2014-04-08 15:57:59 +02:00
Tommaso Pecorella 1e75a2cb6b Remove logging cout 2014-04-08 15:06:52 +02:00
Tommaso Pecorella 92b2936c5d Tweaks to the collision tests 2014-04-08 14:58:28 +02:00
Tommaso Pecorella d486f26151 Preliminary Collision tests 2014-04-06 23:01:10 +02:00
Sascha Jopen 6c6dcbaf31 Fixed compile errors in examples. 2014-04-06 16:35:15 +02:00
Tommaso Pecorella e0d8349d71 Possible bug fix and sequence number as SequenceNumber8 2014-04-06 12:36:51 +02:00
Tommaso Pecorella 7b51212b96 Bug in receiving a packet. Assert to highlight the problem. 2014-04-06 10:00:58 +02:00
Tommaso Pecorella 65d236b00a Add example script in scratch 2014-04-04 09:50:08 +02:00
Tommaso Pecorella 29e97984bd Tweaks to Rx values 2014-03-27 23:02:43 +01:00
Sascha Jopen 4507193d46 Removed debug output. 2014-03-27 17:25:12 +01:00
Sascha Jopen 62afc9063e First version with interference handling. 2014-03-27 16:56:15 +01:00
Tommaso Pecorella 29f5bd43f3 Align error model test to actual results after bug fixing 2014-03-25 23:21:02 +01:00
Sascha Jopen a32593c948 Relicense lr-wpan-lqi-tag.{cc,h} to GPLv2. 2014-03-25 14:55:27 +01:00
Erwan Livolant 4737871613 Fixed missing FCS calculation for ACKs. 2014-03-20 14:44:10 +01:00
Tommaso Pecorella 74d8c0d6c7 Helper: associate nodes to a PAN 2014-03-16 22:33:50 +01:00
Tommaso Pecorella ff799f5cbd Fix Hel'er's install and add ping6/6LoWPAN example 2014-03-16 20:46:00 +01:00
Tommaso Pecorella 90dc67f344 Set rx sensitivity to -110 dBm (temporary) 2014-03-16 20:45:13 +01:00
Sascha Jopen f4b5e5e4e2 - Fixed error in MAC state machine when sending an ACK and enqueuing a data packet at the same time.
- Fixed error when switching the PHY transceiver while a switch is already in progress.
2014-02-24 12:51:06 +01:00
Tommaso Pecorella 131f31f56a ACK (Sascha Jopen), NetDevice (Tommaso Pecorella and Margherita Filippetti), FCS changes (Erwan Livolant), and clang compliance 2014-02-23 16:24:11 +01:00
Tom Henderson b5d3e81f81 fix LrWpanNetDevice::GetAddress() 2014-04-26 22:42:10 -07:00
Tom Henderson ba22dba981 update lr-wpan wscript format 2014-04-26 22:41:19 -07:00
Nicola Baldo 5084f6a5af minor fix in LTE RRC logging format 2014-01-21 19:57:53 +01:00
Nicola Baldo c162fcb75b other minor fix in LTE user docs 2014-01-21 19:38:34 +01:00
Nicola Baldo b5735684f1 minor fix in LTE user docs 2014-01-21 19:36:55 +01:00
Nicola Baldo b1c73cc5d5 updated LTE standalone docs generation 2014-01-21 15:46:37 +01:00
Nicola Baldo a9c97531cc merge 2014-01-20 11:19:13 +01:00
Daniel Lertpratchya ad4c214b8a Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012 2014-01-19 12:08:50 -05:00
John Abraham 6c81abe28a NetAnim: Update example to track counters for multiple nodes 2014-01-19 05:58:53 -08:00
John Abraham 39d721981d NetAnim: Add ability to skip all packet tracing 2014-01-18 20:03:20 -08:00
Tommaso Pecorella db23930d21 [mq]: Rescan Python bindings 2014-01-16 19:10:18 +01:00
Tommaso Pecorella 2ce9615e73 Bug 1838 - FlowMonitorHelper must not be copied. 2014-01-16 09:46:21 +01:00
Juan C. Granda 123caf7cf3 Bug 1739 - The endpoint is not deallocated for UDP sockets 2014-01-15 23:35:55 +01:00
John Abraham 9ce6ffeb61 NetAnim: Update version to 3.105 2014-01-15 10:12:52 -08:00
John Abraham 1051191967 NetAnim: Switch default to 3.105 2014-01-15 10:12:07 -08:00
Tommaso Pecorella a4f7e7dc47 Bug 1837 - AODV crashes when using multiple interfaces 2014-01-14 21:27:14 +01:00
John Abraham 97494a63ff NetAnim: Battery visualization for 3.105 2014-01-14 06:59:59 -08:00
John Abraham 50dce179c6 NetAnim: Add sample double counters in the example 2014-01-13 09:01:22 -08:00
Nicola Baldo eae942732d clarified SpectrumSignalParameters usage in model docs 2014-01-13 17:10:49 +01:00
John Abraham cc655b5c49 NetAnim: Implement Node Counter 2014-01-13 05:45:54 -08:00
Hajime Tazaki 341fcd0ce8 rescan bindings 2014-01-13 20:45:55 +09:00
Hajime Tazaki 5894f2b28b Bug 1826 - make ns3::Ipv6Interface independent from ns3::IPv6L3protocol
for DCE usage of ipv6 linux stack helper
2014-01-13 19:04:56 +09:00
John Abraham 63445557bc NetAnim: Demo example must use absolute path 2014-01-12 18:43:41 -08:00
Tom Henderson b5108b031d rescan bindings 2014-01-12 15:03:49 -08:00
Tom Henderson 5df093ae50 remove header dependency 2014-01-10 15:08:04 -08:00
John Abraham 2b72b059ae NetAnim: Provide opacity setting for background 2014-01-12 11:25:42 -08:00
John Abraham b24053a707 NetAnim: Add SetBackgroundImage 2014-01-12 10:06:27 -08:00
John Abraham 7885a9a847 NetAnim: Enable transition to 3.105 2014-01-11 07:35:34 -08:00
John Abraham a8caac4db1 NetAnim: Remove obsolete checks for xml format 2014-01-11 06:26:58 -08:00
Peter D. Barnes, Jr. 22fe0b7120 Update RELEASE_NOTES 2014-01-10 17:26:22 -08:00
Peter D. Barnes, Jr. f593f652a1 [Bug 1786] os << int64x64_t prints un-normalized fractional values 2014-01-10 17:24:06 -08:00
Peter D. Barnes, Jr. 472839ca28 Make Time printer ignore stream flags. 2014-01-10 17:22:45 -08:00
Peter D. Barnes, Jr. 27967f1c68 Test failure should show condition, actual value, *and* expected (limit) value. 2014-01-10 17:21:54 -08:00
Peter D. Barnes, Jr. 926f89eea2 Strip NS3_BUILDDIR from Example path. 2014-01-10 17:20:26 -08:00
Vedran Miletić 6acf41814e Move tests outside ns3 namespace 2014-01-02 18:34:30 +01:00
Tommaso Pecorella 7d415cd3ba Bug 1823 - IPv6 fails to work on NOARP NetDevices (revert changeset 9760) 2014-01-01 17:37:32 +01:00
Tommaso Pecorella e22f63ffe4 Bug 1821 - Setting an interface to Down state will cause various asserts in IPv6 2013-12-31 19:48:09 +01:00
Nicola Baldo 58235a7b39 fixed unused variable + doxygen in cqa-ff-mac-scheduler.h 2013-12-24 18:36:25 +01:00
Nicola Baldo fc244dde4d fixed Bug 1730 - no model library documentation for spectrum module 2013-12-24 18:22:02 +01:00
Nicola Baldo eaa124d2bb fixed latexpdf build of LTE docs 2013-12-24 17:35:24 +01:00
Nicola Baldo ff91dd3e26 fixed Bug 1820 - models library doc: make should not rm -rf figures by default 2013-12-24 17:29:54 +01:00
Nicola Baldo c9e7103635 updated RELEASE_NOTES 2013-12-24 15:48:36 +01:00
Nicola Baldo 7689fdc0de updated lte design docs 2013-12-24 15:48:00 +01:00
Nicola Baldo 6ca7bc423e merge 2013-12-24 15:02:58 +01:00
Tom Henderson 80382ac6db start new version RELEASE_NOTES 2013-12-21 12:30:28 -08:00
Tom Henderson b19046c64a Added tag ns-3.19 for changeset 322102df792e 2013-12-20 14:03:54 -08:00
Tom Henderson 460eea1be5 Update RELEASE_NOTES for release 2013-12-20 09:28:31 -08:00
Tommaso Pecorella 216983828c Preserve packet tags upon IPv4 fragmentation 2013-12-19 21:43:02 -08:00
Tom Henderson ebe45e5924 merge heads 2013-12-18 18:49:26 -08:00
Gustavo Carneiro 4b7cf8f4e4 Add a custom typehandler for std::ios::openmode, fixes #1815 2013-12-18 19:29:25 +00:00
Peter D. Barnes, Jr. 1558d08adf [Doxygen] Enable autobrief, as claimed by the manual.
Clarify manual to state that first *sentence* will be used as the
brief documentation.

Thanks to Budiarto Herman <budiarto.herman@magister.fi> for pointing
out the required configuration.
2013-12-18 11:24:36 -08:00
Tommaso Pecorella 762131e218 Update the video sources link for UdpTraceClient in Doxygen (suggested by Kostantinos Katsaros) 2013-12-17 19:42:18 +01:00
Tom Henderson 88fd0f04eb rescan all bindings 2013-12-16 00:06:41 -08:00
Tom Henderson d0391be1b2 add to notes regarding null message parallel scheduler and new time units 2013-12-15 22:58:10 -08:00
Tom Henderson 16deeeaa4f add some more new authors 2013-12-15 22:50:57 -08:00
Tom Henderson 03d493b128 editing in preparation for release 2013-12-15 22:31:15 -08:00
Tom Henderson 1e81e10718 editing in preparation for release 2013-12-15 22:28:30 -08:00
Tommaso Pecorella 08f30e7815 Rescan Internet bindings 2013-12-15 16:26:18 +01:00
Tommaso Pecorella 96a259dec6 Bug 1796 - Ipv6PacketInfoTag is not filled by UdpSocketImpl::ForwardUp6. 2013-12-15 09:26:02 +01:00
Tommaso Pecorella 4668c18e0d [Doxygen] Stats module doxygen warnings 2013-12-15 09:00:57 +01:00
Tommaso Pecorella 82ba393469 Bug 1592 - Parsing bug in FlowMonitor example script (fix suggested by Eric Hein) 2013-12-15 09:02:28 +01:00
Tommaso Pecorella 63ebe3e674 [Doxygen] Clarify Simulator::Run() 2013-12-14 10:13:57 +01:00
Tom Goff 9852907d33 bug 1767: make UDP sockets return error when binding to address already in use 2013-12-13 22:50:35 -08:00
Brian Swenson 69091e3dbe Fix sixlowpan attribute name in sphinx 2013-12-13 23:16:47 +01:00
Brian Swenson f7fc0542e6 Bug 1560 Fixed with vectors 2013-12-13 16:48:08 -05:00
Daniel Lertpratchya ef51173b0f [doxygen] dsr module (fix only trivial warnings) 2013-12-13 10:28:25 -05:00
Nicola Baldo 013f400365 updated RELEASE_NOTES 2013-12-13 11:21:57 +01:00
Budiarto Herman 54947ecb22 updated RELEASE_NOTES and CHANGES.html with GSoC 2013 LTE details 2013-12-13 10:50:45 +01:00
Peter D. Barnes, Jr. d352331827 [sphinx] fix build error 2013-12-12 15:12:52 -08:00
Peter D. Barnes, Jr. 16219843f0 [sphinx] Use :rfc:6284 to create links to RFCs 2013-12-12 15:12:11 -08:00
Peter D. Barnes, Jr. 8ef0956af1 [Bug 1496] Finish the documentation.
Also amended scratch-simulator so printing the list of log
components works as advertised.
2013-12-12 14:42:43 -08:00
Tommaso Pecorella ad1ef6acc0 Bug 1814 - IPv6 Packets with length not multiple of 8 bytes are fragmented incorrectly. 2013-12-12 23:16:28 +01:00
Tommaso Pecorella e7cfaab44d Clarify the effect of Bug 1810 fix 2013-12-12 21:08:27 +01:00
Daniel Lertpratchya d72152fb05 Changed GetTypeID to GetTypeId in dsr-network-queue.* (plus re-scan binding) 2013-12-12 15:31:11 -05:00
Tommaso Pecorella 6c16817c8c Bug 1810 - IP packets can be sent on NetDevices not respecting the minimum MTU requirements 2013-12-12 19:36:16 +01:00
Nicola Baldo bf7c850715 merge 2013-12-12 18:50:20 +01:00
Nicola Baldo e06996f8a4 Bug 1789 - missing test condition for sigma in buildings-shadowing-test 2013-12-12 18:50:12 +01:00
Daniel Lertpratchya 0ff3f5a861 [doxygen] wifi module 2013-12-12 12:04:31 -05:00
Nicola Baldo 3647146e3c remove unneeded include 2013-12-12 17:00:09 +01:00
Nicola Baldo 509541bc27 reverted change 10436 for src/buildings 2013-12-12 16:55:56 +01:00
Tommaso Pecorella 46f613cb48 Further tweaks to 6LoWPAN sphinx 2013-12-12 11:34:28 +01:00
Tommaso Pecorella 1951adcd6c Fix sixlowpan module documentation (thanks Peter) 2013-12-12 09:12:36 +01:00
Peter D. Barnes, Jr. 8ef28580f8 [doxygen] fix errors 2013-12-11 15:20:29 -08:00
Peter D. Barnes, Jr. 3c2f2a51ca Manual chapter on documentation. 2013-12-11 15:18:55 -08:00
Peter D. Barnes, Jr. e852bd8b8f Fix report count by module. 2013-12-11 11:57:48 -08:00
Tommaso Pecorella e06d00b0ec Furher manual clarification of examples/stats/wifi-example-db.sh script use. 2013-12-11 20:05:10 +01:00
Tommaso Pecorella ef975e2309 Make stats example program immune to MacOS's sed 2013-12-11 19:55:09 +01:00
Nicola Baldo 39afbfc8c8 discard duplicate AMD PDU segments 2013-12-11 13:12:52 +01:00
Marco Miozzo 2937461f0d merge 2013-12-11 11:39:32 +01:00
Marco Miozzo 73744f4af1 Big-fix out_of_range in LTE schedulers when HARQ uses all the RBGs for retransmissions 2013-12-11 11:39:13 +01:00
Tommaso Pecorella 61ad9eedb4 Bug 1812 - example/stats wifi program manual is erroneous 2013-12-11 10:04:51 +01:00
Tommaso Pecorella 06beb889b1 Backed out of changeset 10495:e877c029ed3e 2013-12-11 10:03:06 +01:00
Tommaso Pecorella ef9dc2aadc Bug 1812 - example/stats wifi program manual is erroneous 2013-12-11 10:00:06 +01:00
Nicola Baldo eb3a9225fe LteRlcAm: add RBS timer, fix polling for retransmissions 2013-12-10 20:16:50 +01:00
Tommaso Pecorella 9499558186 Pretty-print IPv6 addresses and routing tables 2013-12-10 19:54:12 +01:00
Tommaso Pecorella 865faaa288 Fix Changes.html - 6LoWPAN is a new API 2013-12-10 19:56:16 +01:00
Nicola Baldo 8173067467 new retransmission policy for LteRlcAm 2013-12-10 19:34:38 +01:00
Brett Levasseur dff5e13d77 TS36.322 5.2.2.3 consider the AMD PDU with SN=VT(S) - 1 for retransmission 2013-12-10 18:11:08 +01:00
John Abraham 89c36100ae NetAnim: Update version 2013-12-10 09:01:08 -08:00
Nicola Baldo dbffc3a3ee lte-rlc-am-e2e test now using LteTestMac with AUTOMATIC_MODE 2013-12-10 17:42:30 +01:00
Evgeny Kalishenko 26b060e979 Whitespaces added according to the coding standard after review 2013-12-10 09:12:38 +04:00
Evgeny Kalishenko c612fe086a "Contribution" tags added 2013-12-10 09:12:38 +04:00
Evgeny Kalishenko 5cb5bc407f Battery source added for apNode in Wireless-animation example 2013-12-10 09:12:38 +04:00
Evgeny Kalishenko 4251cddf3d Debug: correct string end in case of battery charge serialization 2013-12-10 09:12:38 +04:00
Evgeny Kalishenko 31b66adf3d Remaining energy tracing test simplification: object factories removed 2013-12-10 09:12:38 +04:00
Evgeny Kalishenko ae1c7e1209 Test for NS-3 netanim module added with remaining energy tracing 2013-12-10 09:12:38 +04:00
Evgeny Kalishenko 6ee55d25a2 Added remaining energy tracing (Task #4593) 2013-12-10 09:12:38 +04:00
Peter D. Barnes, Jr. 2a479f198a Add options to filter by module or regular expression. 2013-12-10 08:02:07 -08:00
Daniel Lertpratchya 198b05a384 [doxygen] wifi module 2013-12-10 10:48:51 -05:00
Tom Henderson d2a821bfa7 add sixlowpan bindings 2013-12-09 09:28:17 -08:00
Tom Henderson bafc4932e7 make copy constructors implicit, for bindings generation 2013-12-09 09:27:55 -08:00
biljkus 1f05126531 Added channel and QoS aware (CQA) scheduler. Added test classes and updated the documentation that describes new scheduler, test class and added reference to the literature. Updated wscript with new scheduler and test class. 2013-12-09 02:38:46 +01:00
Tommaso Pecorella a8305cea49 Fix erroneous use of make_pair in sixlowpan 2013-12-07 14:30:03 +01:00
Tommaso Pecorella f27ed705b5 6LoWPAN module 2013-12-07 08:08:53 +01:00
Peter D. Barnes, Jr. 229afd99d0 Fix bug reported by Daniel Lertpratchya <nikkipui@gmail.com>:
On Dec 6, 2013, at 8:28 AM, Daniel Lertpratchya <nikkipui@gmail.com>
 wrote:
I recently ran the doxygen.warnings.report.sh script and I got the
following error. I tried on a fresh copy of ns-3-dev and Brian
also has the same problem.

'build' finished successfully (1.649s)

Rebuilding doxygen docs with full errors...Done.
mv: missing destination file operand after ‘doc/doxygen.log’
Try 'mv --help' for more information.
No filters.

cat: doc/doxygen.warnings.log: No such file or directory
grep: doc/doxygen.warnings.log: No such file or directory
cat: doc/doxygen.warnings.log: No such file or directory

On Dec 6, 2013, at 10:36 AM, Daniel Lertpratchya <nikkipui@gmail.com>
 wrote:
I think doxygen.warnings.report.sh line 150 should be changed from
$log to $LOG. That seems to fix the problem for me.
2013-12-06 13:37:03 -08:00
Tom Henderson c1c272ccef add applications dependency to src/wave (for the test suite) 2013-12-06 12:53:42 -08:00
Steven Smith f780559565 Null message scheduler 2013-12-06 14:57:33 -05:00
Vedran Miletić df005f262e Introduce additional Time units (Year, Day, Hour, Minute) 2013-12-06 19:42:02 +01:00
Tom Henderson c9d57eae6d fix signed/unsigned integer comparison 2013-12-06 07:43:09 -08:00
Peter D. Barnes, Jr. 0e2e602eb6 Remove .sh and .txt from .hgignore 2013-12-05 14:32:59 -08:00
Tom Henderson ed1bf7577e rescan uan bindings 2013-12-05 07:49:33 -08:00
Peter D. Barnes, Jr. ca69a3255e Tweak sorting of files. 2013-12-04 15:52:48 -08:00
Peter D. Barnes, Jr. 43fb06b64c doxygen.warnings.report.sh new functionality.
You can now point to the standard log file, or specific log file.

You can also filter out test and examples.


Usage: doxygen.warnings.report.sh.mod [-eth] [-f <log-file> | -l | -s]

Run doxygen to generate all errors; report error counts
by module and file.

The default behavior is to modify doxygen.conf temporarily to
report all undocumented elements, and to reduce the run time.
The output of this special run is kept in doc/doxygen.warnings.log.
The -f or -l options use alternate log files.

-e  Filter out warnings from */examples/*
-t  Filter out warnings from */test/*

-f  Skip doxygen run; use existing <log-file>.
-s  Skip doxygen run; use existing warnings log doc/doxygen.warnings.log
-l  Skip doxygen run; use the normal doxygen log doc/doxygen.log
Only the first of -f <log-file>, -s, or -l will have effect.

-h  Print this usage message
2013-12-04 15:37:57 -08:00
Peter D. Barnes, Jr. b6b1371fd1 [doxygen] Uan module 2013-12-04 13:29:04 -08:00
Tommaso Pecorella 1cc097b05a Set correct packet size in IPv4 header after reassembly. 2013-12-04 20:56:33 +01:00
Tommaso Pecorella 1cb6b1dc86 Bug 1802 - FlowMon header deserialization problem with IPv4 fragments 2013-12-02 23:05:14 +01:00
Tom Henderson d0a414b7d5 add virtual destructor 2013-12-03 17:06:35 -08:00
Tom Henderson bb98e9ad55 rescan wifi bindings to remove premature TimeUnits bindings 2013-12-03 17:06:13 -08:00
Tommaso Pecorella 668d3df3e5 Fix ErrorChannel Add 2013-12-03 23:04:39 +01:00
Tommaso Pecorella 9106524e8c Fix ErrorChannel Send 2013-12-03 22:49:51 +01:00
Tom Henderson 6c601767c8 add wave bindings 2013-12-03 13:46:53 -08:00
Tom Henderson 82fb571d05 rescan wifi bindings 2013-12-03 13:07:43 -08:00
Tom Henderson 0de0dbca1d improve numerical sorting, and support for analyzing existing file 2013-12-03 11:11:43 -08:00
Junling Bu 044cba4bbd base implementation of the IEEE 802.11p standard 2013-12-03 11:25:59 -08:00
Vedran Miletić f1f6d27091 Fix doxygen errors in src/network, excluding 'is not documented' missing documentation 2013-12-02 23:02:39 +01:00
Tommaso Pecorella bd6c92c79f Bug 1807 - Multiple bugs in Ipv4L3Protocol::LocalDeliver 2013-12-02 19:36:49 +01:00
Tommaso Pecorella de5acedb80 Removed useless class from Internet tests 2013-11-30 12:38:22 +01:00
Tommaso Pecorella 649862bd07 Fix OnOffApplication (clang errors) 2013-11-29 19:33:49 +01:00
Tom Henderson 24c15324a0 rescan lte bindings 2013-11-29 07:43:48 -08:00
Tommaso Pecorella c60bb0e13c Bug 938 - missing Doxygen in ns-3 (applications model + helper) 2013-11-28 22:26:41 +01:00
Tom Henderson ba992c272d fix outdated reference 2013-11-27 21:24:31 -08:00
Nicola Baldo 89ad730710 merge 2013-11-27 13:31:32 +01:00
Marco Miozzo 905ba123eb merge 2013-11-27 13:14:03 +01:00
Brian Swenson d26723ce24 python bindings fix 2013-11-26 10:21:36 -05:00
Marco Miozzo 6c331e9627 merge 2013-11-26 12:18:53 +01:00
Marco Miozzo 70422516a9 fixed Bug 1803 - Lookup /NodeList/4/DeviceList/0/LteEnbRrc/UeMap/0 got no matches 2013-11-26 12:18:33 +01:00
Nicola Baldo 9dd092a374 updated LTE docs for abstract EpcHelper 2013-11-25 12:44:34 +01:00
Nicola Baldo cc5715fc43 merge 2013-11-25 12:16:19 +01:00
Nicola Baldo 3d75fe5639 LteRlcAm: trigger a STATUS report when T_reordering expires 2013-11-22 20:33:30 +01:00
Tommaso Pecorella 28906f3245 Bug 983 - missing Doxygen in ns-3 (flow-monitor model + helper) 2013-11-21 20:35:28 +01:00
Tommaso Pecorella dd20c79584 Bug 938 - missing Doxygen in ns-3 (internet model + helper) 2013-11-20 20:15:02 +01:00
Vedran Miletić a3e7cb04e6 Remove unused consts to fix building with Clang 3.4 pre-release versions 2013-11-24 23:48:49 +01:00
Tommaso Pecorella 9d0747d32c Bug 1798 - Changing the rate of onOffApplication might stop transmission 2013-11-23 15:05:28 +01:00
Tommaso Pecorella 331a645768 topology-read doxygen fix 2013-11-20 20:12:13 +01:00
Vedran Miletić ad96327325 Fix optimized build with Clang 3.2+ (remove unused variables from tests) 2013-11-21 13:49:39 +01:00
Nicola Baldo 5a1d345b0e merge 2013-11-20 19:31:46 +01:00
Nicola Baldo aa302c54f5 apply optimization of changeset 9898e56e4372 to LteMiErrorModel::GetPcfichPdcchError () 2013-11-20 19:14:12 +01:00
Tom Henderson c05f78550c postfix bug 1776; add missing files 2013-11-19 09:52:27 -08:00
Tom Henderson 71d515c83d update RELEASE_NOTES and CHANGES.html for TapBridge changes 2013-11-19 09:47:40 -08:00
Nicola Baldo 0c7f5ca3d2 merge 2013-11-19 17:16:22 +01:00
Nicola Baldo 4ce28e76f1 kill dead code in spectrum-error-model.h 2013-11-19 16:46:32 +01:00
Nicola Baldo dd7459606e added missing SpectrumErrorModel::GetTypeId () 2013-11-19 16:44:49 +01:00
Piotr Jurkiewicz ad2239fe80 bug 1778: TapBridge linkUp notification patch (modified by Tom Goff) 2013-11-19 06:52:02 -08:00
Piotr Jurkiewicz adb677eddd bug 1777: TapBridge address learning patch (modified by Tom Goff) 2013-11-19 06:50:18 -08:00
Piotr Jurkiewicz a3f979febf bug 1776: improve Csma CRC performance 2013-11-19 06:36:55 -08:00
Peter D. Barnes, Jr. 0f42e4c34c [doxygen] Rename examples classes "A" 2013-11-18 12:39:40 -08:00
Jared Ivey da4b470778 doxygen warnings for stats module 2013-11-18 09:51:24 -08:00
Nicola Baldo 2290a2beef optimize LteMiErrorModel::Mib () 2013-11-18 18:33:01 +01:00
Budiarto Herman 1f27f3f987 doxygen warnings for lte module 2013-11-18 08:56:54 -08:00
Daniel Lertpratchya c56b925dff doxygen warnings for wifi module 2013-11-18 08:55:45 -08:00
Tom Henderson afdb830d5c update comment to align with ns-3.18.1 2013-11-18 08:53:07 -08:00
Tom Henderson 7315243e84 update RELEASE_NOTES and CHANGES.html for new release 2013-11-18 08:37:37 -08:00
Tom Henderson cc8ccb3cc3 update RELEASE_NOTES and CHANGES.html for ns-3.18.1 release 2013-11-18 08:35:19 -08:00
Nicola Baldo 639d8a219f fixed integer constant too large compilation error with gcc 4.3.2 2013-11-18 15:51:51 +01:00
Nicola Baldo 36d7a434dc merge 2013-11-18 13:28:05 +01:00
Nicola Baldo 66d2f1225c EpcHelper: use pure virtual methods 2013-11-18 13:08:17 +01:00
Tom Henderson 763e433c88 update server hostname 2013-11-16 09:38:53 -08:00
Hajime Tazaki 5bea383284 revert (45c8fceae24e) log printing due to the failure in optimized/static build. 2013-11-16 20:10:58 +09:00
Brian Swenson 4c879da5c3 Network Doxygen warnings start 2013-11-15 16:20:58 -05:00
Tommaso Pecorella 32aba6de7d Reintroduce topology-reader private copy constructors 2013-11-15 21:30:47 +01:00
Jared Ivey 6a1e4a9f17 fix a few mpi documentation warnings 2013-11-15 09:49:46 -08:00
Nicola Baldo 42f5949410 merge 2013-11-15 13:59:34 +01:00
Nicola Baldo 11f6f2330f improvements in lena-simple-epc-emu 2013-11-15 13:04:27 +01:00
Nicola Baldo 2b751f4a2e fixed eNB IP addresses in EmuEpcHelper 2013-11-15 13:04:01 +01:00
Nicola Baldo c7ba3a551e fixed Bug 1793 - Various errors by MacOS compiler 2013-11-15 11:20:38 +01:00
Peter D. Barnes, Jr. e2971f7a72 [doxygen] More suppress "warning: Member NS_OBJECT_ENSURE_REGISTERED is not documented" 2013-11-14 17:11:41 -08:00
Peter D. Barnes, Jr. 5a2488e6db [doxygen] Suppress "warning: Member NS_LOG_COMPONENT_DEFINE is not documented" 2013-11-14 16:58:56 -08:00
Peter D. Barnes, Jr. d75ff3559e doxygen] Suppress "warning: Member NS_OBJECT_ENSURE_REGISTERED is not documented" 2013-11-14 16:58:28 -08:00
Peter D. Barnes, Jr. cce3b82113 Remove extra ':'s 2013-11-14 16:57:49 -08:00
Peter D. Barnes, Jr. 1c3e6149ab Models source highlighting 2013-11-14 16:57:21 -08:00
Peter D. Barnes, Jr. 578f3a1f04 Fix doxygen module references 2013-11-14 16:52:11 -08:00
Peter D. Barnes, Jr. b0640f8065 Fix compiler warnings and missing std:: 2013-11-14 15:25:33 -08:00
Tommaso Pecorella 2fa1712985 Doxygen fixes to Topology-read, Ipv6, and tcp-socket 2013-11-14 22:43:53 +01:00
Nicola Baldo 4213b79edd fixed Bug 1794 - clang errors on LTE tests 2013-11-14 19:07:55 +01:00
Peter D. Barnes, Jr. ea4c4c364e Unix line endings 2013-11-14 09:22:14 -08:00
Nicola Baldo fb295e22c9 added EmuEpcHelper 2013-11-14 17:41:18 +01:00
S. Deronne 31652e9763 Bug 1799 - Wrong ERP-OFDM PLCP preamble and header values 2013-11-13 16:49:02 -05:00
Daniel Lertpratchya 3cde3fa84b Update ns-3 wiki URL 2013-11-13 16:06:43 -05:00
Tom Henderson df6271a1da rescan bindings 2013-11-13 09:06:10 -08:00
John Abraham 6da37422ba bug 1792: call basic_ostream constructor 2013-11-12 10:36:14 -08:00
Tom Henderson 4e950036c8 bug 1622: make apiscan Task always run 2013-11-12 10:37:52 -08:00
Nicola Baldo 513740a776 make EpcHelper abstract 2013-11-12 13:03:13 +01:00
John Abraham 52f8515147 NetAnim: Some doxygen related fixes 2013-11-10 16:53:04 -08:00
Nicola Baldo 0c7f6ff413 merged lena-dev with ns-3-dev 2013-11-08 17:26:52 +01:00
Budiarto Herman 9fdf10eb97 merge from ns-3-dev branch to GSoC branch 2013-11-08 12:09:58 +01:00
Nicola Baldo 0b57da4bec fixed Bug 1788 - unused private field warning 2013-11-07 19:20:19 +01:00
Tom Henderson faa1fb3db2 update mpi bindings 2013-11-05 13:53:56 -08:00
Tom Henderson b119930437 update buildings bindings 2013-11-05 13:52:45 -08:00
Tom Henderson d930bb83f4 update lte bindings 2013-11-05 13:50:42 -08:00
Tom Henderson ce9e267057 update wifi bindings 2013-11-05 11:50:52 -08:00
Tom Henderson a644406aad update core bindings 2013-11-05 11:50:25 -08:00
Tom Henderson 0aa9708044 Update RELEASE_NOTES 2013-11-05 07:34:29 -08:00
Tom Henderson 55c4718c70 update AUTHORS 2013-11-05 06:55:27 -08:00
Tom Henderson ec958d44bb bug 1782: remove unused boost header 2013-11-05 06:09:47 -08:00
Nicola Baldo b6565284f7 LteRlcAm: fixed ACK SN setting, added more moduls base updates, restored sending of data from transmitted buffer 2013-11-03 21:00:32 +01:00
Brett Levasseur 8c0ee18262 patch posted at https://groups.google.com/d/msg/ns-3-users/CEfmMX3IRBw/7NcFOd_NJdAJ 2013-11-03 18:29:11 +01:00
Nicola Baldo eda0bbade0 revised RLC AM NACK code after https://groups.google.com/d/msg/ns-3-users/CEfmMX3IRBw/rrmJiBwBGrYJ 2013-10-23 15:21:13 +02:00
Budiarto Herman 3d17935885 Fix to SetCsgId in LteEnbRrc for not updating SIB1 in PHY 2013-10-22 20:36:56 +03:00
Budiarto Herman ab92594cff Replaced SIB1 setter function with SetCsgId 2013-10-22 19:09:26 +03:00
Budiarto Herman c4c297ad85 Converted Q-RxLevMin to attribute of LteEnbRrc 2013-10-22 17:51:04 +03:00
Budiarto Herman cd7f7154b1 Converted CSG ID and CSG indication as attributes to LTE devices 2013-10-22 17:16:16 +03:00
Brett bae86f8e78 fixed update of m_vtA in LteRlcAm::DoReceivePdu https://groups.google.com/d/msg/ns-3-users/CEfmMX3IRBw/lJ0d15gOxW4J 2013-10-22 13:32:39 +02:00
Nicola Baldo 6fbfd3ffd5 LteRlcHeaderTest: added more test case instances and fixed one of the previous 2013-10-21 14:27:50 +02:00
Nicola Baldo b6569d7991 LteRlcHeaderTest: fixed setup, added more test cases 2013-10-21 14:04:43 +02:00
Brett 010b2ac109 fixed LteRlcAmHeader::PushNack, see https://groups.google.com/d/msg/ns-3-users/CEfmMX3IRBw/slGrmtVii7YJ 2013-10-21 13:10:21 +02:00
Budiarto Herman 170467f247 UeMeasure class now inherits from SimpleRefCount 2013-10-17 18:46:50 +03:00
Budiarto Herman 6d96614e35 Moved DoDispose method of handover and ANR classes to protected scope 2013-10-17 17:33:30 +03:00
Budiarto Herman efc6f7e6c8 Correction to copyright notices in some GSoC LTE code 2013-10-17 17:21:14 +03:00
Budiarto Herman 556c5ee911 Added back asserts to EutranMeasurementMapping 2013-10-17 16:47:18 +03:00
Budiarto Herman e57ef0d520 Renamed UE_MEASUREMENTS_DELAY to UE_MEASUREMENT_REPORT_DELAY in LteUeRrc 2013-10-17 16:45:42 +03:00
Nicola Baldo 119acded67 check whether the EPC is used upon adding an X2 interface 2013-10-17 14:24:12 +02:00
Budiarto Herman 4a465e8a9b Additional Doxygen comments for GSoC LTE 2013-10-17 15:16:51 +03:00
Nicola Baldo 5f90f383ce added test lte-rlc-header 2013-10-11 18:23:16 +02:00
Brett 2608c9f98a tentative RLC AM NACK implementation https://groups.google.com/d/msg/ns-3-users/CEfmMX3IRBw/tX1X1yY_tgoJ 2013-10-11 11:35:18 +02:00
Nicola Baldo dcd708c846 RadioBearerTag -> EpsBearerTag where appropriate in LTE docs 2013-10-10 14:39:23 +02:00
Nicola Baldo c67bd2b301 lte-rr-ff-mac-scheduler test: consider that RR scheduler does not handle retx properly 2013-10-08 19:09:36 +02:00
Nicola Baldo 9fc8e11e00 added attribute ns3::LteRlcAm::TxOpportunityForRetxAlwaysBigEnough 2013-10-08 19:07:44 +02:00
Budiarto Herman 7607136792 Removed redundant guards in lte-control-message.h 2013-10-04 10:23:01 +03:00
Budiarto Herman 2a3f610eb9 Added const to some Get functions in LTE module 2013-09-26 13:22:58 +03:00
Budiarto Herman c2317d7c75 Removed unnecessary asserts in EutranMeasurementMapping 2013-09-26 12:28:49 +03:00
Budiarto Herman 04ecaa54cf Added missing NS_LOG_FUNCTION to some LTE module files 2013-09-26 12:21:45 +03:00
Budiarto Herman a435cd4cf5 Fixed missing reference in LTE user documentation 2013-09-25 09:32:47 +03:00
Budiarto Herman 12b08d2185 Removed unused LteHelper::Connect helper function 2013-09-24 21:19:23 +03:00
Budiarto Herman a97e64ba17 Updated some validation on UE measurements 2013-09-23 19:28:12 +03:00
Budiarto Herman 990cf5a7a7 Updated TODO tags to Doxygen format 2013-09-23 17:58:32 +03:00
Budiarto Herman 41d7f8e590 Updated the 'Handover simulation campaign' section of LTE module user documentation with a figure and averaged results over different RngRun 2013-09-22 20:34:55 +03:00
Budiarto Herman 735a0183a7 New section 'Handover simulation campaign' for LTE module user documentation 2013-09-21 13:01:27 +03:00
Budiarto Herman 336f420bc5 Fixed error when a handover is triggered before the previous one is completed 2013-09-20 14:54:09 +03:00
Budiarto Herman be1cd514a5 Minor fixes to tests 2013-09-20 14:47:16 +03:00
Budiarto Herman 1fab1d96bd Fixed RSRQ measurements not working when initial cell selection is enabled 2013-09-19 18:55:49 +03:00
Nicola Baldo b028c9ef84 clarify SINR units in lte-user docs 2013-09-17 18:03:48 +02:00
Nicola Baldo 1e6493c8ee fixed Bug 1763 - Message 3 should be sent using the UL GRANT in the RAR 2013-09-17 18:02:32 +02:00
Budiarto Herman 397689f94e Renamed LTE initial cell selection figure 2013-09-15 22:43:30 +03:00
Budiarto Herman c1d598d496 Simplified lte-cell-selection test suite 2013-09-15 22:25:15 +03:00
Budiarto Herman 70970ce418 Revamped lte-cell-selection test suite with better success probability 2013-09-15 20:54:03 +03:00
Nicola Baldo d60e59b608 fixed bug 1756 - RLC AM Mode State Variable Bug 2013-09-13 15:30:00 +01:00
Budiarto Herman 1d0d1555ad Variable statistics starting time in lte-phy-error-model test suite 2013-09-11 22:51:10 +03:00
Budiarto Herman 6af79bf7df Updated lte-handover-target testing documentation 2013-09-11 14:38:13 +03:00
Budiarto Herman fb55f9a6b3 Revised lte-cell-selection test vector 2013-09-11 13:35:10 +03:00
Nicola Baldo 382fa53396 revised test vector, conditions and scenario of lte-phy-error-model test 2013-09-09 16:03:14 +02:00
Nicola Baldo 47f185eab0 fixed stats parameters in test lte-epc-e2e-data 2013-09-09 16:01:07 +02:00
Budiarto Herman c788e2ff5b Minor fix of variable declaration to lena-dual-stripe 2013-09-07 12:20:22 +03:00
Budiarto Herman ae2fd7e6bd Fix to usage of GetHandoverAlgorithmType function in LteHelper 2013-09-07 12:18:26 +03:00
Budiarto Herman 316ab795a9 Fixed UE measurements from erasing all measId upon update of quantityConfig 2013-09-06 17:34:51 +03:00
Budiarto Herman eb3161e4ac Updated GPL header of GSoC files 2013-09-06 17:32:05 +03:00
Budiarto Herman c16f4fa7c9 Updated the figure of strongest cell handover algorithm 2013-09-06 17:00:23 +03:00
Budiarto Herman e9f60429c1 Rearranged the figure of eNodeB RRC state model 2013-09-06 17:00:08 +03:00
Budiarto Herman b0ce8acbea Fixed timers in the figure of X2 handover procedure 2013-09-06 16:13:45 +03:00
Budiarto Herman 14cf6679c8 Updated LTE module documentation as per comments from GSoC mentors (including renaming legacy handover algorithm to A2-A4-RSRQ handover algorithm) 2013-09-06 15:51:02 +03:00
Budiarto Herman 87fa62c388 Separate file for lte-handover-target test suite 2013-09-05 13:07:29 +03:00
Budiarto Herman 64a768a21e Documentation for lte-handover-target test suite 2013-09-05 11:41:30 +03:00
Budiarto Herman f5131a37c0 Added lte-x2-handover-target test suite 2013-09-04 12:01:31 +03:00
Budiarto Herman 6f6a15457d Merge before push 2013-09-02 09:26:36 +03:00
Budiarto Herman f60d2f14a3 Disabled some logs in LTE module tests 2013-09-01 22:45:00 +03:00
Budiarto Herman 48aabc2171 Fixed a bug where measurement reports with very long time-to-trigger keep repeating after handover 2013-09-01 22:38:34 +03:00
Budiarto Herman d08cdaddde Support for multiple reporting configuration and variable simulation duration in lte-ue-measurements-handover test suite 2013-09-01 21:57:42 +03:00
Budiarto Herman 0ad82ab3b4 Fixed missing UE measurements related action upon handover 2013-09-01 19:28:33 +03:00
Budiarto Herman 6b68862bbd Updated documentation based on the new UE RRC state model 2013-08-30 10:45:24 +03:00
Budiarto Herman 5ee85fd7d0 Added GetHandoverAlgorithmType method to LteHelper 2013-08-29 16:47:31 +03:00
Budiarto Herman bc2465e148 Fixed unused variables in UE measurements test 2013-08-29 15:05:28 +03:00
Budiarto Herman 27a2582c37 Extended UE RRC state model, e.g. with Idle mode cell selection and RRC Connection Re-establishment 2013-08-27 16:47:52 +03:00
Budiarto Herman 611e124f5c Added notes on LTE handover failure 2013-08-26 02:06:49 +03:00
Budiarto Herman 50e72aaad2 Various minor changes to LTE model documentation 2013-08-26 00:32:40 +03:00
Budiarto Herman 8168cfac18 Updated user documentation of handover 2013-08-25 15:27:45 +03:00
Budiarto Herman 1d8322b8e3 No-op handover algorithm in manual handover test suite and example 2013-08-25 15:27:21 +03:00
Budiarto Herman 0389cc8021 Reverted the draft UE RRC state machine diagram 2013-08-25 11:26:00 +03:00
Budiarto Herman d6288badf4 Updated LTE handover documentation 2013-08-24 19:36:40 +03:00
Budiarto Herman e48f3466b1 Fixed argument Cell ID in ReportUeMeasurements trace source 2013-08-23 19:14:58 +03:00
Budiarto Herman e3bc429a38 Attribute to enable/disable ANR 2013-08-23 15:47:32 +03:00
Budiarto Herman 11f8a59286 Fixed broken URL to FemtoForum LTE MAC Scheduler API in LTE module documentation 2013-08-20 11:32:22 +03:00
Budiarto Herman 42935dffca Handover algorithm based on Event A3 and RSRP 2013-08-18 21:03:52 +03:00
Budiarto Herman e83db03597 Additional conversion functions for Hysteresis and A3 Offset 2013-08-18 17:15:58 +03:00
Budiarto Herman 20c79bb05e Removed unused variables and includes in LteEnbRrc 2013-08-12 20:12:57 +03:00
Budiarto Herman 06f653f1b5 Renamed A2RsrqHandoverAlgorithm to A2A4RsrqHandoverAlgorithm 2013-08-12 19:48:33 +03:00
Budiarto Herman 2df5bc99df Renamed BareHandoverAlgorithm to NoOpHandoverAlgorithm 2013-08-12 19:01:47 +03:00
Budiarto Herman d90a395329 Using template for forwarding classes and new names for Handover Management SAP 2013-08-12 17:55:06 +03:00
Budiarto Herman c5db2d45ac Fixed a bug with LTE ANR 2013-08-12 15:25:21 +03:00
Budiarto Herman c5d79310d3 LTE Automatic Neighbour Relation (ANR) function 2013-08-12 11:25:23 +03:00
Budiarto Herman a0dc2bf45b Updated UE RRC state machine diagram to include dependency of SIB1 to MIB 2013-08-12 09:29:23 +03:00
Budiarto Herman 3b1c9d0196 Fixed UE measurements tests because of impact from handover algorithm implementation 2013-08-07 15:36:55 +03:00
Budiarto Herman 7fa99399c8 BareHandoverAlgorithm for LTE to simulate absence of handover algorithm 2013-08-07 15:34:24 +03:00
Budiarto Herman d68107aa9d Handover management SAP interface and A2/RSRQ-based handover algorithm 2013-08-07 11:42:53 +03:00
Budiarto Herman 5a3a2f13d5 Draft update to UE RRC state diagram 2013-08-07 11:17:46 +03:00
Budiarto Herman 72471f5f33 Minor code formatting of lena-dual-stripe 2013-08-05 13:47:41 +03:00
Budiarto Herman 9778d30bb8 Added initial cell selection to EPC-enabled simulations in lena-dual-stripe example 2013-08-05 13:40:55 +03:00
Budiarto Herman 698380bda5 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY 2013-08-02 19:03:01 +03:00
Budiarto Herman 404dd583fa Restrict the CQI generation in UE PHY 2013-08-02 14:39:40 +03:00
Budiarto Herman 7c0d6d1255 Moved LteHelper::Connect functionality into LteHelper::Attach 2013-08-02 14:38:56 +03:00
Budiarto Herman 3ad66df568 Separated RSRP and RSRQ calculation in LteUePhy 2013-07-31 23:28:46 +03:00
Budiarto Herman e46947d777 Renamed some variables in LteUePhy 2013-07-31 21:24:45 +03:00
Budiarto Herman f6cd092201 Renamed some UE measurements variables 2013-07-31 16:07:30 +03:00
Budiarto Herman 45cba68616 Updated documentation for LteHelper::Attach function family 2013-07-31 14:28:06 +03:00
Budiarto Herman 6d4c290170 Renamed LTE measurement mapping function for consistency 2013-07-31 13:50:46 +03:00
Budiarto Herman abe882ea95 Testing documentation for LTE cell selection 2013-07-30 16:41:23 +03:00
Budiarto Herman dfe28a253f Updated the structure of initial cell selection documentation 2013-07-29 18:24:32 +03:00
Budiarto Herman 9100b307dc SIB2 trace source 2013-07-29 18:23:56 +03:00
Budiarto Herman 6db0fffd14 Removed PLMN from LTE cell selection criteria 2013-07-29 11:38:13 +03:00
Budiarto Herman dc3ef42bbd Evaluation of cell selection criteria 2013-07-28 08:28:07 +03:00
Budiarto Herman 697755b1fe Updated UE measurements and initial cell selection documentation 2013-07-28 08:17:35 +03:00
Budiarto Herman b4c068cfbb Fixed lte-x2-handover-measures test suite by increasing the rate of measurement reports 2013-07-24 18:02:08 +03:00
Budiarto Herman 3439967223 Using ObjectFactory in LteHelper for LteUeNetDevice 2013-07-22 20:41:34 +03:00
Budiarto Herman a3eadefe4b Generic (not eNodeB-specific) helper functions Attach and Connect 2013-07-22 12:39:11 +03:00
Budiarto Herman 880a48f0b9 Moved several cell selection functionality from UE PHY to RRC 2013-07-22 11:20:27 +03:00
Budiarto Herman a7327aa9f0 Reverted position of SetChannel in LteHelper InstallDevice functions 2013-07-22 11:19:31 +03:00
Budiarto Herman cdffe69512 Merged an obsolete branch 2013-07-19 14:34:25 +03:00
Budiarto Herman 3294c71024 Reverted changes from parent revision 9974 2013-07-19 14:32:12 +03:00
Budiarto Herman 6592bc8f58 Several fixed to LTE initial cell selection 2013-07-19 14:23:04 +03:00
Budiarto Herman 0b7929d6b4 Few updates to documentation 2013-07-19 12:49:02 +03:00
Budiarto Herman eddab79fdb DL EARFCN attribute for UE 2013-07-17 15:12:01 +03:00
Budiarto Herman c1adaa985d Attempt to initial synchronization, cell search, MIB and SIB1 2013-07-16 09:43:01 +03:00
Budiarto Herman 9f0ba0f883 Attempt to shift MIB closer to Idle mode 2013-07-10 19:17:00 +03:00
Budiarto Herman f25ecbfd4e Updated UE measurements documentation 2013-07-10 14:59:00 +03:00
Budiarto Herman a604e2d91f UE measurements fixes and tests for reportOnLeave and haveMeasResultNeighCells 2013-07-09 21:35:43 +03:00
Budiarto Herman 03b293375a Time-to-trigger implementation and tests for Event A3, A4, and A5 2013-07-09 17:31:04 +03:00
Budiarto Herman 2ffc089b6f UE measurements time-to-trigger tests for Event A1 and A2 2013-07-09 14:55:30 +03:00
Budiarto Herman 5f541bc22f Fixed UE measurements timing issue (when reportInterval > 200 ms, or when time-to-trigger < 200 ms) 2013-07-09 14:53:20 +03:00
Budiarto Herman 7553c905c7 Time-to-trigger implementation and tests for Event A1 2013-07-08 23:11:37 +03:00
Budiarto Herman 4051839d03 Recombined UE measurements tests into one file 2013-07-06 15:14:33 +03:00
Budiarto Herman bd435c4fc7 Refactoring LteUeRrc 2013-07-04 20:46:20 +03:00
Budiarto Herman 9c67c38609 Fixed a bug in UE measurements test 2013-07-04 20:28:30 +03:00
Budiarto Herman 585b1ced9e Removed BuildMeasConfig from .h (already removed from .cc before) 2013-07-04 14:22:42 +03:00
Budiarto Herman aca9b556d5 Reduced UE measurements test execution length 2013-07-03 18:18:59 +03:00
Budiarto Herman 63809ba7b9 Added hysteresis tests to UE measurements test suites 2013-07-03 17:30:10 +03:00
Budiarto Herman 7ae10a085b Clarification comments on LTE SI transmission schedule 2013-07-03 15:40:08 +03:00
Budiarto Herman dd59b7acb3 Additional tests for UE measurements handover test suite 2013-07-03 15:10:08 +03:00
Budiarto Herman a0b74cea40 Split UE measurements tests into multiple test suites (still problem with operator redefinition) 2013-07-03 14:09:58 +03:00
Budiarto Herman 8a8559d63c Changes based on peer review: typos in documentation, conversion functions for Hysteresis and a3-Offset, separated constructor implementation of ReportConfigEutra, and removed dead code in LteUeRrc. 2013-07-02 22:18:03 +03:00
Budiarto Herman dbe5bad5bd Fixed Event A5 bug 2013-07-02 21:34:14 +03:00
Budiarto Herman 7f81232309 Preliminary design and user documentation of LTE initial cell selection 2013-07-02 10:23:16 +03:00
Budiarto Herman 46b47877e5 Preliminary UE measurements handover test case 2013-06-28 12:31:30 +03:00
Budiarto Herman 6f4d7a2990 A few fixes to UE measurements test cases 2013-06-28 10:24:33 +03:00
Budiarto Herman 9ef9da1519 Event A5 implementation and test cases 2013-06-27 13:23:02 +03:00
Budiarto Herman 4e208dae3c Fixed conversion of A3 offset 2013-06-27 10:08:32 +03:00
Budiarto Herman e0d555f72f UE measurements piecewise test case 2 2013-06-26 17:01:46 +03:00
Budiarto Herman 6883144780 Constructor for ReportConfigEutra 2013-06-25 17:54:49 +03:00
Budiarto Herman 0948488e79 Fixed typo 2013-06-25 17:06:16 +03:00
Budiarto Herman b9a1aefc2b UE measurements test case for Event A3 and A4 2013-06-25 14:43:12 +03:00
Budiarto Herman 00e9365a2d Event A3 implementation and general update to event-based triggering criteria 2013-06-25 14:43:07 +03:00
Budiarto Herman 994ed53c08 Removed assumption of Event A2 and A4 in LteEnbRrc upon receiving measurement report 2013-06-25 14:41:32 +03:00
Budiarto Herman e2032bcc90 Fixed missing UE measurements configuration in lena-x2-handover-measures example 2013-06-24 17:51:15 +03:00
Budiarto Herman 561e156ce3 Copied features between handover examples 2013-06-24 17:49:39 +03:00
Budiarto Herman 7ff45b07d0 UE measurements piecewise test case 1 for Event A2 2013-06-24 17:19:42 +03:00
Budiarto Herman 9a5004d4cd Fixed missing UE measurements configuration in lte-x2-handover-measures test suite 2013-06-24 17:16:07 +03:00
Budiarto Herman 209ecc9f3f Minor coding style fixes in handover examples 2013-06-24 17:13:59 +03:00
Budiarto Herman 0ef013fc85 Updated UE measurements documentation 2013-06-24 00:19:06 +03:00
Budiarto Herman 34558334e8 UE measurements piecewise test case 1 for Event A1 2013-06-21 13:56:54 +03:00
Budiarto Herman 8c205db428 Complete report interval implementation (except the SPARE* options) 2013-06-21 13:46:54 +03:00
Budiarto Herman eb12357011 Removed assert statement rejecting configuration of Event A1 2013-06-21 13:41:59 +03:00
Budiarto Herman 11bbca6467 Attributes for configuring layer 3 filtering 2013-06-21 11:01:06 +03:00
Budiarto Herman cde30ab205 Added the original A2 and A4 configuration to UE measurements test case 2013-06-19 17:31:00 +03:00
Budiarto Herman 662f996003 Removed Event A2 and A4 threshold attributes from eNodeB RRC 2013-06-19 17:21:22 +03:00
Budiarto Herman b9eafb57e3 Removed preset UE measurement configuration and made it configurable 2013-06-19 16:56:36 +03:00
Budiarto Herman 3d8b10622a Event A1 implementation 2013-06-19 14:46:09 +03:00
Budiarto Herman 9c99b5e988 Preliminary framework for testing UE measurements in piecewise configuration 2013-06-19 13:55:58 +03:00
Budiarto Herman 176d7dfdb5 Dia file for UE measurement testing documentation 2013-06-13 08:24:35 +03:00
Budiarto Herman 694f70284d Table titles for UE measurement documentation 2013-06-13 07:45:15 +03:00
Budiarto Herman c1fe8b8558 Initial draft of documentation on UE measurements 2013-06-09 23:07:23 +03:00
Tom Henderson a4ac0f8915 update figure reference 2013-03-22 16:16:53 -07:00
Tom Henderson 8d895fc3c3 enable pcap on a lr-wpan example 2012-07-04 21:34:18 -07:00
Tom Henderson e9dc5fbd4c remove comparison that is always true due to limited range of data type 2012-07-04 21:29:55 -07:00
Tom Henderson 8f70c1a43f align with SpectrumPhy antenna model changes for ns-3.14 2012-07-04 21:26:40 -07:00
Gary Pei f74b34aac2 align lr-wpan with ns-3.13 spectrum API changes 2012-03-29 19:31:11 -07:00
Tom Henderson 1acbf3eb64 roll-up of many updates to models, tests, examples 2011-11-16 22:01:06 -08:00
Tom Henderson 9a66307754 Initial lr-wpan checkin 2011-05-29 14:38:53 -07:00
Mitch Watrous d7bd267c7e Bug 1717 - Detect unsettable attributes 2014-04-29 22:38:13 +02:00
Christopher Kosecki a15640d10e Bug 1876 - enable OLSR HNA table access 2014-04-29 20:35:34 +02:00
Tommaso Pecorella b314b544e5 [Python bindings] refresh OLSR module 2014-04-29 10:54:16 +02:00
Tommaso Pecorella 1c8972af9d Bug 1817 - IPv4 Identification field should consider protocol as well. 2014-04-29 10:07:25 +02:00
Tommaso Pecorella ae5d2c7131 Bug 1276 - optimize NistErrorRateModel 2014-04-29 10:01:47 +02:00
Konstantinos Katsaros 058c71d944 Bug 1903 - Namespace usage in olsr-state.cc/h 2014-04-29 09:50:21 +02:00
Tommaso Pecorella c75d24d0d3 RIPng - avoid spaces in ConfigStore names 2014-04-28 22:14:15 +02:00
Tom Henderson f30b671683 clarify some points about the ConfigStore 2014-04-28 10:50:25 -07:00
Tom Henderson 3588837aa6 fix typo 2014-04-28 10:38:37 -07:00
Tomasz Seweryn f7e18f35b4 Bug 1873 - Energy source checked to be aggregated to the node 2014-04-26 23:01:09 +02:00
Tom Henderson af31d858d2 add missing include 2014-04-24 17:38:36 -07:00
John Abraham 16187bdb69 NetAnim: Remove obsolete functionalities 2014-04-23 08:30:00 -07:00
Tommaso Pecorella f7769e0ea0 Update RELEASE_NOTES 2014-04-22 21:42:28 +02:00
Tommaso Pecorella 2834944fc2 Bug1829 2014-04-22 14:43:02 -04:00
Brian Swenson 2f07ece0bb Bug 1850 update tests 2014-04-22 14:16:48 -04:00
Unknown 9d815d019d Bug 1850 2014-04-22 13:58:22 -04:00
Brian Swenson 6fc2de6382 Bug 1791 2014-04-22 11:52:55 -04:00
Tommaso Pecorella aa5b099870 FlowMonitor manual 2014-01-25 13:48:44 +01:00
Tommaso Pecorella ae5bc1b527 Bug 1818: FlowMonitor needs IPv6 support 2014-04-21 11:32:45 +02:00
Peter D. Barnes, Jr. 9193ac9dd7 r10652 inadvertently undid part of these earlier commits:
r10646 src/internet/model/ipv4-l3-protocol.cc
r10636 src/dsr/model/dsr-options.cc
r10636 src/internet/model/icmpv6-header.cc
r10636 src/internet/model/ipv4-header.cc
2014-04-08 14:07:33 -07:00
Tommaso Pecorella 1abd142de9 [Python bindings] rescan core module 2014-04-05 07:53:58 +02:00
Tommaso Pecorella f3a3fb85b1 RIPng implementation 2014-03-17 20:01:49 +01:00
Peter D. Barnes, Jr. 45530120f2 Simplify output of Times in a specific unit; see Time::As () 2014-04-02 18:47:04 -07:00
Andrey Mazo 210aefc777 Bug 1170: Formulate best practices for dealing with unused debug variables.
Fixed clang-3.4 unused function warnings in optimized builds like the following:
"""
../examples/energy/energy-model-example.cc:39:1: error: unused function
'PrintReceivedPacket' [-Werror,-Wunused-function]
PrintReceivedPacket (Address& from)
^
1 error generated.
"""

Implemented "if (false)" trick inside NS_LOG* macros for optimized builds.

"sizeof()" trick might be a little better but it produces the following
warning with clang-3.4:
"""
../examples/energy/energy-model-example.cc:39:1: error: function
'PrintReceivedPacket' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
PrintReceivedPacket (Address& from)
^
1 error generated.
"""


Macros from log.h, that depend on NS3_LOG_ENABLE, were moved to log-macros-enabled.h and log-macros-disabled.h to make log.h smaller.
2014-03-23 19:08:54 +04:00
Scott Carpenter de004b4c7d Bug 1877 - constructor missing for <something>PropagationLossModels 2014-03-29 18:16:59 +01:00
Andrey Mazo afb50f1c25 whitespace fix after 20ce79766233. 2014-03-27 16:31:06 +04:00
Biljana Bojović f625c86e22 Bug 1888 - COST231 propagation loss model: corrections 2014-03-26 23:47:30 +01:00
Eugene Chemeritskiy 7feb0b73c8 Bug 1889 - PointToPointNetDevive: In some cases MacTxDrop trace is not called 2014-03-26 23:39:32 +01:00
Eugene Chemeritskiy a88ee6e269 Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer 2014-03-26 23:20:13 +01:00
Tommaso Pecorella 9b31bc95cb Bug 1891 - UdpSocketImpl::GetSockName doesn't return the IPv6 address 2014-03-26 23:08:28 +01:00
Andrey Mazo 9afed6b932 make various implementation-specific tables static const.
This should prevent possible name collisions, clean up ns3 namespace a little
and allow compiler to place them in a sharable read-only data section.
Also make various global variables static not to pollute ns3 namespace and to
force use of Attribute framework where appropriate.
2014-03-26 14:51:14 +04:00
Andrey Mazo 226c9005c3 hgignore LTE *Stats.txt 2014-03-26 02:35:34 +04:00
Eugene Chemeritskiy edc382137b Bug 1887 - Point-to-point traces should contain PPP headers 2014-03-25 21:46:09 +01:00
Andrey Mazo cb9eeb2af2 NS3_LOG_ENABLE shouldn't be forced.
Moreover, there is no NS_LOG* usage in these files.
2014-03-23 16:56:59 +04:00
Andrey Mazo be090649a2 mark private global variables as static in log.cc 2014-03-23 16:51:32 +04:00
Nicola Baldo cb1f9a0c9f merge 2014-03-21 16:57:41 +01:00
Biljana Bojovic d25133fd5e default value of ns3::RadioEnvironmentMapHelper::NoisePower is in W, not mW 2014-03-21 13:51:41 +01:00
mmiozzo efccb54a60 Add back forgotten rng testsuite (attibution: Peter Barnes noticed it) 2014-03-20 23:37:16 +01:00
mmiozzo c6ccba38d4 Bug-fix LTE UL Schedulers (all): add lacking allocationMap storage with only HARQ retransmissions 2014-03-18 13:17:12 +01:00
Tommaso Pecorella 0a3856e45c [Python Bindings] - rebuild internet and flow-monitor modules 2014-03-17 20:23:44 +01:00
Tommaso Pecorella c04ebb1c5f Bug 1845 - FlowMonitor should discard any broadcast/multicast packet 2014-03-17 19:44:36 +01:00
Tommaso Pecorella 7c6b38c6f4 Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace 2014-03-17 19:43:11 +01:00
Tommaso Pecorella 1ff598b75c Bug 1842 - FlowMonitor SerializeToXml<Something> should be called by the helper 2014-03-17 19:34:43 +01:00
Nicola Baldo 19e595c09f fixed Bug 1885 - WifiSpectrumValue5MhzFactory::CreateRfFilter does not align with the used 5Mhz SpectrumModel 2014-03-17 13:55:12 +01:00
Tommaso Pecorella 03d268196b [Manual] Calrify IPv6 address assignement 2014-03-15 21:44:06 +01:00
Tommaso Pecorella 384eb5a622 Add 6LoWPAN uncompressed IPv6 header support 2014-03-15 19:18:53 +01:00
Tommaso Pecorella d9a09ae2f3 Move SourceAddressSelection to Ipv6L3Protocol 2014-03-15 17:04:02 +01:00
Tommaso Pecorella a2e81e7341 Bug 1883 - IPv6 don't consider the prefix and network when choosing output address 2014-03-15 15:35:58 +01:00
Peter D. Barnes, Jr. fa320437c0 [Bug 1882] update RELEASE_NOTES 2014-03-14 15:33:49 -07:00
Peter D. Barnes, Jr. 72cea610f0 [Bug 1882] int64x64 tests trigger valgrind bug 2014-03-14 15:31:15 -07:00
Gustavo Carneiro 36368b6db9 fixes for Python 2.6 compatibility 2014-03-13 07:53:32 -07:00
Tom Henderson 701d152d37 remove unnecessary forward declaration 2014-03-13 06:37:41 -07:00
Tom Henderson 1b4424dbcc bug 1869: append local build directory before recursing into modules 2014-03-13 06:37:04 -07:00
Tommaso Pecorella 19db0e31cb [Doxygen] network module 2014-03-13 09:29:47 +01:00
Tommaso Pecorella 4517c16fe7 Fix valgrind errors in ipv[4,6]-fragmentation tests 2014-03-11 21:50:41 +01:00
Peter D. Barnes, Jr. cf7605fafc [doxygen] Clarify doxygen.conf PREDEFINED variable. 2014-03-10 12:52:16 -07:00
Peter D. Barnes, Jr. a274c8ea37 [doxygen] Make introspected lists more visible, various other doxy 2014-03-10 10:57:50 -07:00
Peter D. Barnes, Jr. 5469adc1a4 [doxygen] Fix warning 2014-03-05 17:08:10 -08:00
Peter D. Barnes, Jr. cd3da7143d [doxygen] Revert r10410, r10411, r10412 2014-03-05 17:06:59 -08:00
Peter D. Barnes, Jr. 104ff32b23 [doxygen] Stop warnings from NS_LOG_COMPONENT_DEFINE and NS_OBJECT_ENSURE_REGISTERED 2014-03-05 16:55:49 -08:00
Peter D. Barnes, Jr. bfeb265434 [doxygen] Preserve modified doxygen.conf during doxygen.warnings.report.sh run 2014-03-05 16:35:00 -08:00
Peter D. Barnes, Jr. f647edb0e5 [Bug 1856] Remove duplicate definition 2014-03-03 21:49:54 -08:00
Tom Henderson 57ccecc74d additional NSC documentation updates 2014-03-03 13:28:26 -08:00
Tom Henderson 661b5c9144 update NSC documentation 2014-03-03 06:49:11 -08:00
Gustavo Carneiro ff3054b592 Fixes to support Python >= 3.3 in ns3 python bindings 2014-03-02 23:48:27 +00:00
Gustavo Carneiro 60e2a6c117 Require new pybindgen version to handle the new Time type changes (int64_t) 2014-03-02 20:44:58 +00:00
Gustavo Carneiro 89b3183f65 Enable more pybindgen logging 2014-03-02 20:44:20 +00:00
Gustavo Carneiro cb559e2947 Add option to disable scanning for 32-bit bindings on 64-bit platforms 2014-03-02 12:24:39 +00:00
Peter D. Barnes, Jr. 851b2f961c [Bug [Bug 1856] int64x64_t double conversions: update reference data 2014-03-02 01:03:04 -08:00
Peter D. Barnes, Jr. b43ee31622 [Bug 1856] int64x64_t double conversions 2014-03-02 01:02:23 -08:00
Peter D. Barnes, Jr. 3c032987f0 [Bug 1868] Optimized builds are sensitive to -fstrict-overflow 2014-03-02 00:42:05 -08:00
Daniel Lertpratchya 94a4233910 [docs] update wifi.rst and mobility.rst (minor) 2014-02-27 09:45:55 -05:00
Tom Henderson 52da92bf5b add DSR to the list of routing protocols 2014-02-27 06:35:58 -08:00
Tom Henderson 3e16d73f38 add release step for documentation 2014-02-27 06:34:42 -08:00
Brian Swenson 50317fc036 Bug 1859 clang unused variable 2014-02-25 12:27:05 -05:00
Tom Henderson 727fa3f326 bindings rescan (another try) 2014-02-23 13:49:13 -08:00
Tom Henderson 0ba37f72a9 rescan bindings 2014-02-23 11:40:20 -08:00
Tom Henderson 44e6ff72b0 update pybindgen version 2014-02-23 11:40:12 -08:00
Tommaso Pecorella b24df55aa8 [Python Bindings] rescan bindings 2014-02-23 08:45:57 +01:00
Vedran Miletić 8a5d58beda Clean up function logging for non-DCF part of stats module 2014-02-22 22:56:14 +01:00
Peter D. Barnes, Jr. 3ec3b6a878 [Bug 1862] NS_LOG="Time=*|prefix_time" causes stack overflow 2014-02-21 16:27:43 -08:00
Peter D. Barnes, Jr. 22e31f0c68 [Bug 1792] [Bug 1853] Remove inheritance from std::stream in ParameterLogger 2014-02-21 16:25:43 -08:00
Alexander Afanasyev 7daf507a80 Bug 1294 - New PeekU8 () and Read (Buffer::Iterator start, uint32_t size) methods in Buffer::Iterator 2014-02-21 09:12:38 +01:00
Daniel Lertpratchya 1bc5e2265a [propagation] rescan Python binding 2014-02-21 11:50:18 -05:00
Nicola Baldo 9ce5538ff4 fix for Bug 1443 - m_minDistance in FriisPropagationLossModel 2014-02-21 13:43:17 +01:00
Peter D. Barnes, Jr. 28ac4c7f40 [Bug 1653] Extension of CommandLine interface
Restore operator << (std::ostream, CommandLine) erroneously removed
in rev 10155.
2014-02-20 22:00:09 -08:00
Tommaso Pecorella 98ec76d941 IPv[4,6] fragmentation tests include tag tests 2014-02-20 22:41:33 +01:00
Tom Goff 410b30f6fd Bug 1787 - Runtime error when using AnimationInterface::EnablePacketMetadata() to fetch metadata of CSMA packet 2014-02-20 22:35:51 +01:00
Daniel Lertpratchya 65bf9d35e8 [wifi] reformat wifi-tx-vector.cc 2014-02-17 08:43:58 -05:00
Tommaso Pecorella 4faabb5898 Bug 1855 - SixLowPanNetDevice is not correctly indexed 2014-02-13 22:53:39 +01:00
Peter D. Barnes, Jr. 73ceda8109 [Bug 1852] Restore missing config header 2014-02-11 14:38:25 -08:00
Peter D. Barnes, Jr. 13176beb94 Ignore introduction of rogue waf scripts. 2014-02-10 14:03:59 -08:00
Tommaso Pecorella 63d8c0f509 Update RELEASE_NOTES 2014-03-08 17:50:26 +01:00
Tommaso Pecorella 4f03cb0b56 Bug 1870 - Remove unnecessary AsInt functions 2014-03-08 17:43:28 +01:00
Rubén Martínez bee049436d Bug 1874 - Ipv4L3Protocol::ProcessFragment: addressCombination and idProto identifiers not properly computed 2014-03-07 22:22:31 +01:00
John Abraham 7b9f3873da NetAnim: Add figures 2014-02-09 19:49:31 -08:00
John Abraham 208294924d NetAnim: Update Documentation 2014-02-09 19:49:01 -08:00
John Abraham 8181d545fd NetAnim: Allow metadata as default in the examples 2014-02-09 11:25:35 -08:00
Peter D. Barnes, Jr. 4a5acb6109 One waf to rule them all. 2014-02-07 17:00:28 -08:00
Peter D. Barnes, Jr. eba6d81509 [Bug 1786] Fix undeclared identifiers cairo_impl64 and cairo_impl128 in int128 builds. 2014-02-05 10:58:19 -08:00
Peter D. Barnes, Jr. 1a54ac7031 [Bug 1786] Make cairo implementation type accessible. 2014-02-04 16:09:23 -08:00
Peter D. Barnes, Jr. 8d73d7448e [tutorial] Introduce more waf options and best work practices. 2014-02-04 16:14:44 -08:00
Daniel Lertpratchya 900d3ace25 [wifi] rescan Python binding 2014-02-04 14:04:01 -05:00
Daniel Lertpratchya 1b2b22150b [wifi] moved IsModeSupported to WifiPhy 2014-02-04 13:56:32 -05:00
Peter D. Barnes, Jr. 03fe7f5b3a Extend overeager signed comparison optimization to gcc-4.6 2014-02-04 09:38:42 -08:00
Tom Henderson 4ef03c0719 update click bindings 2014-02-02 11:03:06 -08:00
Peter D. Barnes, Jr. 1e4e8e1a11 Repeat the build output directory and the build profile in the configure report. 2014-01-31 14:57:58 -08:00
Peter D. Barnes, Jr. 3de55e7d5e [doxygen] Attempt to fix tooltip issue distorting some pages.
These configs have been tested with doxygen 1.8.1.1 through 1.8.6
2014-01-31 13:11:18 -08:00
Peter D. Barnes, Jr. e367628f60 [doxygen] Fix some minor doxygen errors. 2014-01-31 13:09:46 -08:00
Daniel Lertpratchya f3631afcf7 [wifi] rescan Python binding 2014-01-31 15:05:17 -05:00
Daniel Lertpratchya 7d8eea6cce Bug 1848 - yans-wifi-phy can receive frames sent using unsupported mode 2014-01-31 12:00:31 -05:00
Peter D. Barnes, Jr. a6eea770e2 Fix overeager signed comparison optimization in gcc-4.4 2014-01-30 12:18:29 -08:00
Tommaso Pecorella 7ed263378e Fix int64x64 test (clang errors) 2014-01-30 18:23:54 +01:00
Peter D. Barnes, Jr. 8f6bcf630c [Bug 1786] Fix for os << (int64x64_t) and fractional arithmetic
Arithmetic with fractions was never tested and it had lots of bugs.
This patch set:

- Defines many more tests, giving complete coverage of all operations
  (signed/unsigned, integer, fractions, mixed)

- Replaces over-generous #define creation of functions with minimal
  set of C++ functions.

- Minimizes differences between implementations.

- Documents all functions.

int128 and cairo implementations agree exactly on all int64x64 tests,
and pass all ns-3 tests.

long double implementation agrees with the other two on most int64x64
tests; failures have to do with less precision in long doubles.
The prior double implementation failed five ns-3 tests:
	devices-mesh-dot11s-regression
	devices-mesh-flame-regression
	int64x64
	routing-aodv-regression
	routing-olsr-regression
This implementation fails routing-olsr-regression because of single
bit differences in the pcap files.
2014-01-29 19:09:35 -08:00
Peter D. Barnes, Jr. 7fe84f050c Allow doxygen to find generated include files, such as ns3/core-config.h 2014-01-29 18:58:31 -08:00
Peter D. Barnes, Jr. f332b3cc2e Fix typos causing missing functions in cairo. 2014-01-29 17:47:09 -08:00
Peter D. Barnes, Jr. dd3118a745 Update Time scaling usage to use new functions.
With out this patch these locations will become
broken by the upcoming fix to bug 1768.
2014-01-29 17:46:21 -08:00
Peter D. Barnes, Jr. 0d2691af8b Enable minimal scaling and ratios with Time 2014-01-29 17:44:18 -08:00
Peter D. Barnes, Jr. 9e3bec943f Emacs mode line. 2014-01-29 17:41:03 -08:00
Peter D. Barnes, Jr. 678da4f186 Mixing signed and unsigned types can lead to misleading results in NS_TEST macros. 2014-01-28 13:34:46 -08:00
Peter D. Barnes, Jr. 022f3ad024 Enable selection of high precision int64x64 implementation at configure time. 2014-01-28 12:51:47 -08:00
Tommaso Pecorella d8d337c3d4 Updated RELEASE_NOTES 2014-01-26 18:22:04 +01:00
Tommaso Pecorella ffba6c64ee Bug 1846 - IPv6 should send Destination Unreachable if no route is available 2014-01-26 18:19:03 +01:00
Peter D. Barnes, Jr. 3a447bbcc0 Enable tests to get the name of the parent suite. 2014-01-23 11:45:36 -08:00
Tommaso Pecorella bbb25ddb08 Bug 1808: FlowMon relies on IPv4's Identification field to trace packets 2014-01-23 19:31:42 +01:00
Tommaso Pecorella 32a11da551 Update RELEASE_NOTES 2014-01-21 23:06:22 +01:00
Tommaso Pecorella 281f06e639 Bug 1841 - FlowMonitor fails to install if IPv4 is not installed in the node 2014-01-21 22:52:52 +01:00
2344 changed files with 294322 additions and 105007 deletions
+5
View File
@@ -48,4 +48,9 @@ massif.*
src/ndnSIM
configure
toggle
.ns3rc
.cproject
.project
.settings/
+2 -2
View File
@@ -38,11 +38,11 @@ massif.*
\.patch$
\.diff$
\.tr$
\.txt$
\.sh$
\.dat$
\.plt$
\#[^\#/]+\#$
^coverity
^(D|U)l[A-Z][a-z]*Stats.txt$
syntax: glob
TAGS
waf
+5
View File
@@ -66,3 +66,8 @@ ae540de68a2534213342c5e0b12afb47d7518a90 ns-3.14
49d343e55caec257bb01e400eef6c14522f37e1b ns-3.16
b4a70b99171ade6e9628a87780994238950a1df1 ns-3.17
cfbc9491d7e7c9d346cc042fd35b8afb8836e81f ns-3.18
322102df792e2be6c74df74f776b3470fb1db795 ns-3.19
da0eb48df23f96335f32a37f047a6bc27e197c8d ns-3.20
fa4be182ef17746cea50e89af557c79a28b76533 ns-3.21
103f62fc7d586cf6d4d6fd9f5e488d2f7f8fe436 ns-3.22
8ea92bc090cdc01e683a2116d7668ce745ae92e2 ns-3.23
+70 -3
View File
@@ -2,6 +2,7 @@ Alexander Afanasyev (alexander.afanasyev@ucla.edu)
Rohit Agarwal (mindprince@gmail.com)
Kirill Andreev (andreev@iitp.ru)
Dean Armstrong (deanarm@gmail.com)
Stefano Avallone (stefano.avallone@unina.it)
Ghada Badawy (gbadawy@gmail.com)
Nicola Baldo (nbaldo@cttc.es)
Mirko Banchi (mk.banchi@gmail.com)
@@ -11,29 +12,47 @@ Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
Raj Bhattacharjea (raj.b@gatech.edu)
Timo Bingmann (timo.bingmann@student.kit.edu)
Julien Boite (juboite@gmail.com)
Biljana Bojovic (bbojovic@cttc.es)
Elena Borovkova (borokovaes@iitp.ru)
Pavel Boyko (boyko@iitp.ru)
Dan Broyles (muxman@sbcglobal.net)
Jonathan Brugge (j.d.brugge@student.utwente.nl)
Junling Bu (linlinjavaer@gmail.com)
Elena Buchatskaia (borovkovaes@iitp.ru)
Nuno Cardoso (nunopcardoso@gmail.com)
Gustavo Carneiro (gjc@inescporto.pt, gjcarneiro@gmail.com)
Scott Carpenter (scarpen@ncsu.edu)
Tiago Cerqueira (tiago.miguel43@gmail.com)
Egemen K. Cetinkaya (ekc@iitc.ku.edu)
Angelos Chatzipapas (chatzipa@ceid.upatras.gr)
Eugene Chemeritskiy (echemeritskiy@arccn.ru)
Yufei Cheng (yfcheng@ittc.ku.edu)
Andrey Churin (aachurin@gmail.com)
Benjamin Cizdziel (ben.cizdziel@gmail.com)
Salva Climent (jocliba@gmail.com)
Luis Cortes (cortes@gatech.edu)
Luca Costantino (luca.costantino@gmail.com)
Matthieu Coudron (matthieu.coudron@lip6.fr)
Alexander D'souza (moijes12@gmail.com)
Sébastien Deronne (sebastien.deronne@gmail.com)
Craig Dowell (craigdo@ee.washington.edu)
Gilaras Drakeson (gilaras@gmail.com)
Christian Facchini (c.facchini@gmail.com)
Denis Fakhriev (fakhriev@iitp.ru)
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
Luca Favatella (slackydeb@gmail.com)
Margherita Filippetti (morag87@gmail.com)
Pedro Fortuna (pedro.fortuna@inescporto.pt)
Juliana Freitag Borin (juliana.freitag@gmail.com)
Piotr Gawlowicz (gawlowicz.p@gmail.com)
Eric Gamess (egamess@gmail.com)
Yida Gao (yidapb@gmail.com)
Thomas Geithner (thomas.geithner@dai-labor.de)
Ashim Ghosh (ashim.atiit@gmail.com)
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
Tom Goff (tgoff@tgoff.net)
Mohit Goyal (mohit.bits@gmail.com)
Juan C. Granda (jcgranda@uniovi.es)
David Gross (gdavid.devel@gmail.com)
Maja Grubišić (maja.grubisic@live.com)
Charline Taibi Guguen (charline.guguen@gmail.com)
@@ -41,63 +60,110 @@ Daniel Halperin (daniel@halper.in)
Bruno Haick (bghaick@hotmail.com)
Frank Helbert (frank@ime.usp.br)
Tom Henderson (tomhend@u.washington.edu)
Christopher Hepner (hepner@hs-ulm.de)
Budiarto Herman (budiarto.herman@magister.fi)
Tom Hewer (tomhewer@mac.com)
Kristian A. Hiorth (kristahi@ifi.uio.no)
Kim Højgaard-Hansen (kimrhh@gmail.com)
Chris Hood (chood8@gatech.edu)
Blake Hurd (naimorai@gmail.com)
ishan (ishan.chhabra@gmail.com)
Mohamed Amine Ismail (amine.ismail@inria.fr, iamine@udcast.com)
Jared Ivey (j.ivey@gatech.edu)
Atishay Jain (atishayjain25@gmail.com)
Sascha Alexander Jopen (jopen@informatik.uni-bonn.de)
Sam Jansen (sam.jansen@gmail.com)
Liu Jian (liujatp@gmail.com)
Joe Kopena (tjkopena@cs.drexel.edu)
Piotr Jurkiewicz (piotr.jerzy.jurkiewicz@gmail.com)
Evgeny Kalishenko (ydginster@gmail.com)
Konstantinos Katsaros (dinos.katsaros@gmail.com)
Morteza Kheirkhah (m.kheirkhah@sussex.ac.uk)
Flavio Kobuta (flaviokubota@gmail.com)
Joe Kopena (tjkopena@cs.drexel.edu)
Christopher Kosecki (christopher.l.kosecki.ctr@mail.mil)
Aleksey Kovalenko (kovalenko@iitp.ru)
Mathieu Lacage (mathieu.lacage@inria.fr)
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
Kristijan Lenković (k.lenkovic@me.com)
Daniel Lertpratchya (nikkipui@gmail.com)
Brett Levasseur (brettl20@gmail.com)
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
Timo Lindhorst (tlnd@online.de)
Erwan Livolant (erwan.livolant@inria.fr)
Keith Ma (keith.nwsuaf@gmail.com)
Federico Maguolo (maguolof@dei.unipd.it)
Antti Makela (zarhan@cc.hut.fi)
Francesco Malandrino (francesco.malandrino@gmail.com)
Rubén Martínez (rmartinez@deic.uab.cat)
Fabian Mauchle (f1mauchl@hsr.ch)
Andrey Mazo (mazo@iitp.ru)
Jonathan McCrohan (jmccroha@tcd.ie)
Andrew McGregor (andrewmcgr@gmail.com)
Vedran Miletić (rivanvx@gmail.com)
Jens Mittag (jens.mittag@kit.edu)
Marco Miozzo (mmiozzo@cttc.es)
Faker Moatamri (faker.moatamri@inria.fr)
Edvin Močibob (edvin.mocibob@gmail.com)
Mike Moreton (mjvm_ns@hotmail.com)
Michele Muccio (michelemuccio@virgilio.it)
Esteban Municio (esteban.municio@urjc.es)
Sidharth Nabar (snabar@uw.edu)
Hemanth Narra (hemanth@ittc.ku.edu)
Roman Naumann (naumann@informatik.hu-berlin.de)
Ben Newton (bn@cs.unc.edu)
Cecchi Niccolò (insa@igeek.it)
Andreas Nilsson (andrnils@gmail.com)
Jaume Nin (jnin@cttc.es)
Michael Nowatkowski (nowatkom@gmail.com)
Anh Nguyen (annguyen@ittc.ku.edu)
Duy Nguyen (duy@soe.ucsc.edu)
Luis Pacheco (luisbelem@gmail.com)
Lluís Parcerisa (parcerisa@gmail.com)
Natale Patriciello (natale.patriciello@gmail.com)
Tommaso Pecorella (tommaso.pecorella@unifi.it)
Vikas Pushkar (vikaskupushkar@gmail.com)
Guangyu Pei (guangyu.pei@boeing.com)
Josh Pelkey (jpelkey@gatech.edu)
Per (per_e_lists@rocketmail.com)
Fernando Pereira (ferdonfeup@gmail.com)
Colin Perkins (csp@csperkins.org)
Giuseppe Piro (g.piro@poliba.it)
Yana Podkosova (yanapdk@rambler.ru)
Guangyu Pei (guangyu.pei@boeing.com)
Vikas Pushkar (vikaskupushkar@gmail.com)
Andrea Ranieri (andreran@uno.it)
Bruno Ranieri (Yrrsinn@googlemail.com)
Ken Renard (kenneth.renard@arl.army.mil)
Manuel Requena (mrequena@cttc.es)
Matias Richart (mrichart@fing.edu.uy)
George F. Riley (riley@ece.gatech.edu)
Juergen Rinas (jrinas@gmx.de)
Sebastian Rohde (sebastian.rohde@tu-dortmund.de)
Karsten Roscher (sfx@rocktale.de)
Bill Roome (wdr@bell-labs.com)
David (david.rua@gmail.com)
Andrea Sacco (andrea.sacco85@gmail.com)
Lynne Salameh (l.salameh@cs.ucl.ac.uk)
Providence Salumu Munga (Providence.Salumu@gmail.com, Providence.Salumu_Munga@it-sudparis.eu)
Francisco Javier Sánchez-Roselly (fnavarro@ujaen.es)
Florian Schmidt (Florian.Schmidt@cs.rwth-aachen.de)
Guillaume Seguin (guillaume.seguin@inria.fr)
Ioannis Selinis (selinis.g@gmail.com)
Tomasz Seweryn (tomasz.seweryn7@gmail.com)
Dmitrii Shakshin (d.shakshin@gmail.com)
Kulin Shah (m.kulin@gmail.com)
Guowang Shi (shiguowang2007@gmail.com)
Phillip Sitbon (phillip.sitbon@gmail.com)
Pedro Silva (pmms@inesctec.pt)
Anirudh Sivaraman (sk.anirudh@gmail.com)
Steven Smith (smith84@llnl.gov)
Andrew Stanton (acstanton515@gmail.com)
Ewgenij Starostin (estar@cs.tu-berlin.de)
YunQiang Su (wzssyqa@gmail.com)
Brian Swenson (bswenson3@gatech.edu)
Lalith Suresh (suresh.lalith@gmail.com)
Dave Taht (dave.taht@bufferbloat.net)
Marcos Talau (talau@users.sourceforge.net)
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
Cristiano Tapparello (cristiano.tapparello@rochester.edu)
Hajime Tazaki (tazaki@sfc.wide.ad.jp)
Wilson Thong (wilsonwk@ee.cityu.edu.hk)
Mauro Tortonesi (mauro.tortonesi@unife.it)
@@ -113,3 +179,4 @@ Florian Westphal (fw@strlen.de)
He Wu (mdzz@u.washington.edu)
Yoshihiko Yazawa (yoshiyaz@gmail.com)
Dizhi Zhou (dizhi.zhou@gmail.com)
Gaurav Sathe (gaurav.sathe@tcs.com)
+406 -5
View File
@@ -51,22 +51,423 @@ 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.18 to ns-3.19</h1>
<h1>Changes from ns-3.23 to ns-3.24</h1>
<h2>New API:</h2>
<ul>
<li></li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li></li>
<li> The signatures on several TcpHeader methods were changed to take const arguments.</li>
<li> class TcpL4Protocol replaces Send() methods with SendPacket(), and adds new methods to AddSocket() and RemoveSocket() from a node. Also, a new PacketReceived() method was introduced to get the TCP header of an incoming packet and check its checksum.</li>
<li> The CongestionWindow and SlowStartThreshold trace sources have been moved from the TCP subclasses such as NewReno, Reno, Tahoe, and Westwood to the TcpSocketBase class.</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li></li>
</ul>
<h2>Changed behavior:</h2>
This section is for behavioral changes to the models that were not due to a bug fix.
<ul>
<li></li>
</ul>
<hr>
<h1>Changes from ns-3.22 to ns-3.23</h1>
<h2>New API:</h2>
<ul>
<li> The mobility module includes a GeographicPositions class used to
convert geographic to cartesian coordinates, and to generate randomly
distributed geographic coordinates.
</li>
<li> The spectrum module includes new TvSpectrumTransmitter classes and helpers to create television transmitter(s) that transmit PSD spectrums customized by attributes such as modulation type, power, antenna type, channel frequency, etc.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> In LteSpectrumPhy, LtePhyTxEndCallback and the corresponding methods have been removed, since they were unused.
</li>
<li> In the DataRate class in the network module, CalculateTxTime has been declared deprecated. CalculateBytesTxTime and CalculateBitsTxTime are to be used instead. The return value is a Time, instead of a double.
</li>
<li> In the Wi-Fi InterferenceHelper, the interference event now takes the WifiTxVector as an input parameter, instead of the WifiMode. A similar change was made to the WifiPhy::RxOkCallback signature.
</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> None </li>
</ul>
<h2>Changed behavior:</h2>
This section is for behavioral changes to the models that were not due to a bug fix.
<ul>
<li> In Wi-Fi, HT stations (802.11n) now support two-level aggregation. The InterferenceHelper now distinguishes between the PLCP and regular payload reception, for higher fidelity modeling. ACKs are now sent using legacy rates and preambles. Acces points now establish BSSBasicRateSet for control frame transmissions. PLCP header and PLCP payload reception have been decoupled to improve PHY layer modeling accuracy. RTS/CTS with A-MPDU is now fully supported.
</li>
<li> The mesh module was made more compliant to the IEEE 802.11s-2012 standard and packet traces are now parseable by Wireshark.
</li>
</ul>
<hr>
<h1>Changes from ns-3.21 to ns-3.22</h1>
<h2>New API:</h2>
<ul>
<li> New classes were added for the PARF and APARF WiFi power and rate control mechanisms.
</li>
<li> Support for WiFi 802.11n MPDU aggregation has been added.
</li>
<li> Additional support for modeling of vehicular WiFi networks has been added, including the channel-access coordination feature of IEEE 1609.4. In addition, a Basic Safety Message (BSM) packet generator and related statistics-gathering classes have been added to the wave module.
</li>
<li> A complete LTE release bearer procedure is now implemented which can be invoked by calling the new helper method LteHelper::DeActivateDedicatedEpsBearer ().
</li>
<li> It is now possible to print the Neighbor Cache (ARP and NDISC) by using
the RoutingProtocolHelper
</li>
<li> A TimeProbe class has been added to the data collection framework in
the stats module, enabling TracedValues emitting values of type
ns3::Time to be handled by the framework.
</li>
<li> A new attribute 'ClockGranularity' was added to the TcpSocketBase class,
to control modeling of RTO calculation.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> Several deprecated classes and class methods were removed, including EmuNetDevice, RandomVariable and derived classes, Packet::PeekData(), Ipv6AddressHelper::NewNetwork(Ipv6Address, Ipv6Prefix), Ipv6InterfaceContainer::SetRouter(), Ipv4Route::GetOutputTtl(), TestCase::AddTestCase(TestCase*), and TestCase::GetErrorStatus().
</li>
<li> Print methods involving routing tables and neighbor caches, in classes Ipv4RoutingHelper and Ipv6RoutingHelper, were converted to static methods.
</li>
<li>PointerValue attribute types in class UanChannel (NoiseModel), UanPhyGen (PerModel and SinrModel), UanPhyDual (PerModelPhy1, PerModelPhy2, SinrModelPhy1, and SinrModelPhy2), and SimpleNetDevice (TxQueue), were changed from PointerValue type to StringValue type, making them configurable via the Config subsystem.
</li>
<li> WifiPhy::CalculateTxDuration() and WifiPhy::GetPayloadDurationMicroSeconds () now take an additional frequency parameter.
</li>
<li> The attribute 'Recievers' in class YansWifiPhy was misspelled, so
this has been corrected to 'Receivers'.
</li>
<li> We have now documented the callback function signatures
for all TracedSources, using an extra (fourth) argument to
TypeId::AddTraceSource to pass the fully-qualified name
of the signature typedef. To ensure that future TraceSources
are similarly documented, the three argument version of
AddTraceSource has been deprecated.
</li>
<li> The "MinRTO" attribute of the RttEstimator class was moved to the TcpSocketBase class. The "Gain" attribute of the RttMeanDeviation class was replaced
by new "Alpha" and "Beta" attributes.
</li>
<li> Attributes of the TcpTxBuffer and TcpRxBuffer class are now accessible through the TcpSocketBase class.
</li>
<li> The LrWpanHelper class has a new constructor allowing users to configure a MultiModelSpectrumChannel as an option, and also provides Set/Get API to allow users to access the underlying channel object.
</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> waf was upgraded to version 1.7.16
</li>
</ul>
<h2>Changed behavior:</h2>
This section is for behavioral changes to the models that were not due to a bug fix.
<ul>
<li> The default value of the `Speed` attribute of ConstantSpeedPropagationDelayModel was changed from 300,000,000 m/s to 299,792,458 m/s (speed of light in a vacuum), causing propagation delays using this model to vary slightly.
</li>
<li> The LrWpanHelper object was previously instantiating only a LogDistancePropagationLossModel on a SingleModelSpectrumChannel, but no PropagationDelayModel. The constructor now adds by default a ConstantSpeedPropagationDelayModel.
</li>
<li> The Nix-vector routing implementation now uses a lazy flush mechanism,
which dramatically speeds up the creation of large topologies.
</li>
</ul>
<hr>
<h1>Changes from ns-3.20 to ns-3.21</h1>
<h2>New API:</h2>
<ul>
<li> New "const double& SpectrumValue:: operator[] (size_t index) const".
</li>
<li> A new TraceSource has been added to TCP sockets: SlowStartThreshold.
</li>
<li> New method CommmandLine::AddValue (name, attibutePath) to provide a
shorthand argument "name" for the Attribute "path". This also has
the effect of including the help string for the Attribute in the
Usage message.
</li>
<li> The GSoC 2014 project in the LTE module has brought some additional APIs:
<ul>
<li>a new abstract class LteFfrAlgorithm, which every future
implementation of frequency reuse algorithm should inherit from</li>
<li>a new SAPs: one between MAC Scheduler and FrAlgorithm, one between
RRC and FrAlgorithm</li>
<li>new attribute to enable Uplink Power Control in LteUePhy</li>
<li>new LteUePowerControl class, an implementation of Uplink Power Control, which is
configurable by attributes. ReferenceSignalPower is sent by eNB in SIB2.
Uplink Power Control in Closed Loop Accumulative Mode is enabled by default</li>
<li>seven different Frequency Reuse Algorithms (each has its own attributes): </li>
<ul>
<li>LteFrNoOpAlgorithm</li>
<li>LteFrHardAlgorithm</li>
<li>LteFrStrictAlgorithm</li>
<li>LteFrSoftAlgorithm</li>
<li>LteFfrSoftAlgorithm</li>
<li>LteFfrEnhancedAlgorithm</li>
<li>LteFfrDistributedAlgorithm</li>
</ul>
<li>attribute in LteFfrAlgorithm to set FrCellTypeId which is used in automatic
Frequency Reuse algorithm configuration</li>
<li>LteHelper has been updated with new methods related to frequency reuse algorithm:
SetFfrAlgorithmType and SetFfrAlgorithmAttribute</li>
</ul>
</li>
<li> A new SimpleNetDeviceHelper can now be used to install SimpleNetDevices.
</li>
<li> New PacketSocketServer and PacketSocketClient apps, meant to be used in tests.
</li>
<li> Tcp Timestamps and Window Scale options have been added and are enabled by default (controllable by attribute).
</li>
<li> A new CoDel queue model has been added to the 'internet' module.
</li>
<li> New test macros NS_TEST_ASSERT_MSG_GT_OR_EQ() and NS_TEST_EXPECT_MSG_GT_OR_EQ() have been added.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> "Icmpv6L4Protocol::ForgeEchoRequest" is now returning a packet with the proper IPv6 header.
</li>
<li> The TCP socket Attribute "SlowStartThreshold" has been renamed "InitialSlowStartThreshold" to
clarify that the effect is only on the initial value.
</li>
<li> all schedulers were updated to interact with FR entity via FFR-SAP. Only PF, PSS, CQA,
FD-TBFQ, TD-TBFQ schedulers supports Frequency Reuse functionality. In the beginning
of scheduling process, schedulers ask FR entity for avaiable RBGs and then ask if UE
can be scheduled on RB</li>
<li> eNB RRC interacts with FFR entity via RRC-FFR SAP</li>
<li> new DL-CQI generation approach was implemented. Now DL-CQI is computed from control channel as signal
and data channel (if received) as interference. New attribute in LteHelper was added to specify
DL-CQI generation approach. New approach is default one in LteHelper </li>
<li> RadioEnvironmentMap can be generated for Data or Control channel and for specified RbId;
Data or Control channel and RbId can be configured by new attributes in RadioEnvironmentMapHelper </li>
<li> lte-sinr-chunk-processor refactored to lte-chunk-processor. Removed all lte-xxx-chunk-processor
implementations</li>
<li> BindToNetDevice affects also sockets using IPv6.</li>
<li> BindToNetDevice now calls implicitly Bind (). To bind a socket to a NetDevice and to a specific address,
the correct sequence is Bind (address) - BindToNetDevice (device). The opposite will raise an error.</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> None for this release. </li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> Behavior will be changed due to the list of bugs fixed (listed in RELEASE_NOTES); users are requested to review that list as well.
</ul>
<hr>
<h1>Changes from ns-3.19 to ns-3.20</h1>
<h2>New API:</h2>
<ul>
<li> Models have been added for low-rate, wireless personal area networks
(LR-WPAN) as specified by IEEE standard 802.15.4 (2006). The current
emphasis is on the unslotted mode of 802.15.4 operation for use in Zigbee,
and the scope is limited to enabling a single mode (CSMA/CA) with basic
data transfer capabilities. Association with PAN coordinators is not yet
supported, nor the use of extended addressing. Interference is modeled as
AWGN but this is currently not thoroughly tested. The NetDevice Tx queue
is not limited, i.e., packets are never dropped due to queue becoming full.
They may be dropped due to excessive transmission retries or channel access
failure. </li>
<li> A new IPv6 routing protocol has been added: RIPng. This protocol is
an Interior Gateway Protocol and it is available in the Internet module. </li>
<li> A new LTE MAC downlink scheduling algorithm named Channel and QoS
Aware (CQA) Scheduler is provided by the new "ns3::CqaFfMacScheduler" object.
</li>
<li> Units may be attached to Time objects, to facilitate specific output
formats (see Time::As()) </li>
<li> FlowMonitor "SerializeToXml" functions are now directly available
from the helper. </li>
<li> Access to OLSR's HNA table has been enabled </li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> The SixLowPan model can now use uncompressed IPv6 headers. An option to
define the minimum compressed packet size has been added. </li>
<li> MinDistance wsa replaced by MinLoss in FriisPropagationLossModel, to
better handle conditions outside of the assumed far field region. </li>
<li> In the DSR model, the attribute DsrOptionRerrHeader::ErrorType" has
been removed. </li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> Python 3.3 is now supported for Python bindings for ns-3. Python 3.3
support for API scanning is not supported. Python 3.2 is not supported.</li>
<li> Enable selection of high precision int64x64_t implementation
at configure time, for debugging purposes.</li>
<li> Optimized builds are now enabling signed overflow optimization
(-fstrict-overflow) and for gcc 4.8.2 and greater, also warning for cases
where an optimizization may occur due to compiler assumption that
overflow will not occur. </li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> The Internet FlowMonitor can now track IPv6 packets. </li>
<li> Ipv6Extension::m_dropTrace has been removed. Ipv6L3Protocol::m_dropTrace
is now fired when appropriate. </li>
<li> IPv4 identification field value is now dependent on the protocol
field. </li>
<li> Point-to-point trace sources now contain PPP headers </li>
</ul>
<hr>
<h1>Changes from ns-3.18.1 to ns-3.19</h1>
<h2>New API:</h2>
<ul>
<li> A new wifi extension for vehicular simulation support is available in the
src/wave directory. The current code represents an interim capability to
realize an IEEE 802.11p-compliant device, but without the WAVE extensions
(which are planned for a later patch). The WaveNetDevice modelled herein
enforces that a WAVE-compliant physical layer (at 5.9 GHz) is selected, and
does not require any association between devices (similar to an adhoc WiFi
MAC), but is otherwise similar (at this time) to a WifiNetDevice. WAVE
capabililties of switching between control and service channels, or using
multiple radios, are not yet modelled.
</li>
<li>New SixLowPanNetDevice class providing a shim between
IPv6 and real NetDevices. The new module implements 6LoWPAN:
"Transmission of IPv6 Packets over IEEE 802.15.4 Networks" (see
<a href="http://www.ietf.org/rfc/rfc4944.txt">RFC 4944</a> and
<a href="http://www.ietf.org/rfc/rfc6262.txt">RFC 6262</a>),
resulting in a heavy header compression for IPv6 packets.
The module is intended to be used on 802.15.4 NetDevices, but
it can be used over other NetDevices. See the manual for
further discussion.
</li>
<li> LteHelper has been updated with some new APIs:
<ul>
<li>new overloaded Attach methods to enable UE to automatically determine
the eNodeB to attach to (using initial cell selection);</li>
<li>new methods related to handover algorithm: SetHandoverAlgorithmType
and SetHandoverAlgorithmAttribute;</li>
<li>a new attribute AnrEnabled to activate/deactivate Automatic Neighbour
Relation (ANR) function; and</li>
<li>a new method SetUeDeviceAttribute for configuring LteUeNetDevice.</li>
</ul>
</li>
<li> The GSoC 2013 project in the LTE module has brought some additional APIs:
<ul>
<li>a new abstract class LteHandoverAlgorithm, which every future
implementation of automatic handover trigger should inherit from;</li>
<li>new classes LteHandoverAlgorithm and LteAnr as sub-modules of
LteEnbNetDevice class; both interfacing with the LteEnbRrc sub-module
through Handover Management SAP and ANR SAP;</li>
<li>new attributes in LteEnbNetDevice and LteUeNetDevice classes related
to Closed Subscriber Group (CSG) functionality in initial cell
selection;</li>
<li>new attributes in LteEnbRrc for configuring UE measurements' filtering
coefficient (i.e., quantity configuration);</li>
<li>a new public method AddUeMeasReportConfig in LteEnbRrc for setting up
custom UE measurements' reporting configuration; measurement reports
can then be captured from the RecvMeasurementReport trace source;
and</li>
<li>new trace sources in LteUeRrc to capture more events, such as System
Information messages (MIB, SIB1, SIB2), initial cell selection, random
access, and handover.</li>
</ul>
</li>
<li>A new parallel scheduling algorithm based on null messages, a common
parallel DES scheduling algorithm, has been added. The null message
scheduler has better scaling properties when running on some scenarios
with large numbers of nodes since it does not require a global
communication.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> It is now possible to use Ipv6PacketInfoTag from UDP applications in the
same way as with Ipv4PacketInfoTag. See Doxygen for current limitations in
using Ipv[4,6]PacketInfoTag to set IP properties.</li>
<li>A change is introduced for the usage of the EpcHelper
class. Previously, the EpcHelper class included both the API
definition and its (only) implementation; as such, users would
instantiate and use the EpcHelper class directly in their
simulation programs. From now on,
EpcHelper is just the base class defining the API, and the
implementation has been moved to derived classes; as such,
users are now expected to use one of the derived classes in
their simulation program. The implementation previously
provided by the EpcHelper class has been moved to the new
derived class PointToPointEpcHelper.</li>
<li> The automatic handover trigger and ANR functions in LTE module have been
moved from LteEnbRrc class to separate classes. As a result, the related
attributes, e.g., ServingCellHandoverThreshold, NeighbourCellHandoverOffset,
EventA2Threshold, and EventA4Threshold have been removed from LteEnbRrc
class. The equivalent attributes are now in A2A4RsrqHandoverAlgorithm and
LteAnr classes.</li>
<li> Master Information Block (MIB) and System Information Block Type 1 (SIB1)
are now transmitted as LTE control messages, so they are no longer part of
RRC protocol.</li>
<li> UE RRC state model in LTE module has been considerably modified and is
not backward compatible with the previous state model.</li>
<li> Additional time units (Year, Day, Hour, Minute) were added to the time
value class that represents simulation time; the largest unit prior to
this addition was Second.
</li>
<li> SimpleNetDevice and SimpleChannel are not so simple anymore. SimpleNetDevice can be now a
Broadcast or PointToPoint NetDevice, it can have a limited bandwidth and it uses an output
queue.
</li>
</ul>
<h2>Changes to build system:</h2>
<h2>Changed behavior:</h2>
<ul>
<li> For the TapBridge device, in UseLocal mode there is a MAC learning function. TapBridge has been waiting for the first packet received from tap interface to set the address of the bridged device to the source address of the first packet. This has caused problems with WiFi. The new behavior is that after connection to the tap interface, ns-3 learns the MAC address of that interface with a system call and immediately sets the address of the bridged device to the learned one. See <a href="https://www.nsnam.org/bugzilla/show_bug.cgi?id=1777">bug 1777</a> for more details.</li>
<li> TapBridge device now correctly implements IsLinkUp() method.</li>
<li> IPv6 addresses and routing tables are printed like in Linux "route -A inet6" command.</li>
<li> A change in Ipv[4,6]Interface enforces the correct behaviour of IP
when a device do not support the minimum MTU requirements.
This is set to 68 and 1280 octects respectively. IP simulations that
may have run over devices with smaller MTUs than 68 or 1280, respectively,
will no longer be able to use such devices.</li>
</ul>
<hr>
<h1>Changes from ns-3.18 to ns-3.18.1</h1>
<h2>New API:</h2>
<ul>
<li> It is now possible to randomize the time of the first beacon from an
access point. Use an attribute "EnableBeaconJitter" to enable/disable
this feature.
</li>
<li> A new FixedRoomPositionAllocator helper class is available; it
allows one to generate a random position uniformly distributed in the
volume of a chosen room inside a chosen building.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> Logging wildcards: allow "***" as synonym for "*=**" to turn on all logging.
</li>
<li> The log component list ("NS_LOG=print-list") is now printed alphabetically.
</li>
<li> Some deprecated IEEE 802.11p code has been removed from the wifi module
</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> The Python API scanning system (./waf --apiscan) has been fixed (bug 1622)
</li>
<li> Waf has been upgraded from 1.7.11 to 1.7.13
</li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> Wifi simulations have additional jitter on AP beaconing (see above) and some bug fixes have been applied to wifi module (see RELEASE_NOTES)
</li>
</ul>
<hr>
+2 -1
View File
@@ -5,7 +5,8 @@ all:
# free free to change this part to suit your requirements
configure:
./waf configure --enable-examples --enable-tests
#./waf configure --enable-examples --enable-tests
./waf configure -d optimized --enable-examples --disable-python --disable-tests
build:
./waf build
+577 -18
View File
@@ -10,7 +10,7 @@ Consult the file CHANGES.html for more detailed information about changed
API and behavior across ns-3 releases.
Release 3-dev
=============
============
Availability
------------
@@ -21,21 +21,580 @@ Supported platforms
New user-visible features
-------------------------
- It is now possible to randomize the time of the first beacon from an access point.
Use an attribute "EnableBeaconJitter" to enable/disable this feature.
- a new FixedRoomPositionAllocator helper class is available, it
allows to generate a random position uniformly distributed in the
- (network) SimpleChannel allows per-NetDevice blacklists, in order to do hidden terminal testcases.
Bugs fixed
----------
- Bug 730 - Enabling fragmentation at run-time breaks simulation
- Bug 1249 - doxygen comments on device-level SetMobility ()
- Bug 1482 - mesh module was producing fatal error with ASCII and netanim traces
- Bug 1736 - default dot11EDCATableMSDULifetime
- Bug 1901 - mesh module producing malformed pcaps
- Bug 1929 - TcpL4Protocol::Send must indicate the source address to routing (if known)
- Bug 1982 - AODV and mesh modules use random variables before seeds can be set
- Bug 2058 - TCP window update can shrink left edge of window
- Bug 2063 - FdNetDevice::SendFrom assert does not account for headers correctly
- Bug 2082: Empirical RV fails if value provided in CDF function is negative
- Bug 2093 - MultiModelSpectrumChannel::GetDevice only works for 0-th index
- Bug 2096 - Wrong pcap information when MPDU aggregation is used
- Bug 2108 - Erroneous implementation in InterferenceHelper
- Bug 2119 - Fix memory leaks in FdNetDevice test due to non-executed events
- Bug 2124 - UdpSocketImpl::ShutdownRecv doesn't stop the Ipv[4,6]EndPointDemux
- Bug 2125 - subclasses must chain up to base class NotifyNewAggregate
- Bug 2126 - LrWpanNetDevice silently accepts no mobility on the node
- Bug 2127 - Scheduler benchmark utility works in first run only
- Bug 2130 - Allow SimpleChannel to simulate hidden terminals.
- Bug 2135 - TCP doesn't honor the socket's output interface
- Bug 2136 - The usage of tid in wifi and wave module shall be "if (tid > 7)" rather than "if (tid >= 7)"
- Bug 2132 - TCP RST packets were incorrectly formatted if no endpoints matched
- Bug 2138 - SimpleNetDevice could send overlapped packets
- Bug 2148 - Ipv6Interface::SetUp doesn't re-create the Link-Local addresses
- Bug 2153 - Incorrect power limits in wifi power control algorithms
- Bug 2154 - Incorrect power calculation in wifi power adaptation examples
- Bug 2156 - Duplicate packets when using two level aggregation
Known issues
------------
In general, known issues are tracked on the project tracker available
at http://www.nsnam.org/bugzilla/
Release 3.23
============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.23.tar.bz2
Supported platforms
-------------------
This release has been tested on the following platforms:
- Ubuntu 15.04 (64 bit) with g++-4.9.2
- Fedora Core 21 (64 bit) with g++-4.9.2
- Ubuntu 14.04 (64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (32/64 bit) with g++-4.6.3
- CentOS/RHEL 6.6 (64-bit) with g++-4.4.7
- OS X Yosemite 10.10.3 with Xcode 6.3.1 and Apple LLVM version 6.1.0
- FreeBSD 10.1-RELEASE (64 bit) with clang-3.4.1
New user-visible features
-------------------------
- (network) CalculateTxTime has been declared obsolete.
CalculateBytesTxTime and CalculateBitsTxTime are to be used instead.
The return value is a Time, instead of a double.
- (mobility) Classes added for converting geographic to cartesian coordinates.
- (spectrum) TvSpectrumTransmitter models added to create television
transmitter(s) that transmit PSD spectrums customized by attributes such
as modulation type, power, antenna type, channel frequency, etc.
- (wifi) Several model improvements have been made. Access points now
establish BSSBasicRateSet for control frame transmissions. PLCP header
and payload reception have been decoupled for improved PHY modeling
accuracy. RTS/CTS with A-MPDU is now fully supported, and 802.11n
stations now support two-level aggregation.
Bugs fixed
----------
- Bug 1757 - RLC AM not using NACK_SN
- Bug 1974 - CalculateTxTime should return a Time, not a double
- Bug 1982 - AODV and mesh use random variables before seed can be set
- Bug 2004 - Wrong timeout calculation for 802.11n in WifiMac
- Bug 2008 - (lr-wpan) Crash if ending rx while status change is in progress
- Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params
- Bug 2034 - (lr-wpan) CSMA-CA BackoffPeriod is too short
- Bug 2054 - TCP window update can shrink the Left Edge of the window
- Bug 2066 - A-MPDU reception should check for successful preamble
- Bug 2067 - TCP performance when advertised window exceeds sender buffer size
- Bug 2070 - Wrong report of Packets and Bytes stored in CoDeL
- Bug 2073 - NDisc cache entries update timer might be stuck in a loop
- Bug 2075 - A-MPDU using RTS/CTS behaves wrongly when MaxSsrc is reached
- Bug 2076 - TCP MinRTO Attribute is not actually used
- Bug 2077 - Icmpv6L4Protocol::HandleDestinationUnreachable must check the packet size, not its serialized size
- Bug 2079 - mcs variable in ht-wifi-network example is confusing
- Bug 2082 - Empirical RV fails if the value provided in the CDF member function is negative
- Bug 2083 - BridgeNetDevice may send corrupted packets
- Bug 2087 - Waf fails to build ns-3 if the path contains accented characters
- Bug 2090 - (rip-ng) Routes may be added twice on interface activation
- Bug 2093 - MultiModelSpectrumChannel::GetDevice only works for 0-th index
- Bug 2095 - (wimax) Wrong values in default-traces.h for 16 QAM 3/4
- Bug 2097 - ACKs should be sent using legacy rates and preambles in 802.11n
- Bug 2103 - Ipv[4,6]RoutingHelper::PrintRoutingTableAll[At,Every] hangs if a node doesn't have IP
Known issues
------------
In general, known issues are tracked on the project tracker available
at http://www.nsnam.org/bugzilla/
Release 3.22
============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.22.tar.bz2
Supported platforms
-------------------
This release has been tested on the following platforms:
- Fedora Core 21 (64 bit) with g++-4.9.2
- Ubuntu 14.10 (32 bit) with g++-4.9.1
- Ubuntu 14.04 (64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (32/64 bit) with g++-4.6.3
- CentOS/RHEL 6.6 (64-bit) with g++-4.4.7
- OS X Yosemite 10.10 with Xcode 6.1.1 and clang-600.0.56
- FreeBSD 10.1-RELEASE (64 bit) with clang-3.4.1
New user-visible features
-------------------------
- (wifi) Support for MPDU aggregation has been added to the wifi model,
as well as a number of related example programs.
- (wifi) Added two combined power and rate control mechanisms to the
wifi module. The new mechanisms, PARF and APARF, are the first in the
wifi module to jointly control transmission power and data rate. Two use
case examples (PowerAdaptationDistance and PowerAdaptationInterference)
and a test case have also been added.
- (lte) In previous releases of the LTE module, the bearer release
functionality was only partially supported. As an enhancement, a
complete release bearer procedure is now implemented, which can be
invoked by calling the new helper method
LteHelper::DeActivateDedicatedEpsBearer(). The related output can be
seen through the stats collected at different layers like PDCP, RLC,
MAC, PHY. To support this implementation, an example and test suite is
added within the LTE module examples and tests folder.
- (wave) Additional support has been added for WiFi-based vehicular networks,
including the channel-access coordination features of IEEE 1609.4 and a
comprehensive VANET routing example that includes a Basic Safety
Message (BSM) packet generator application and associated statistics
counters. Together, these allow users to evaluate the performance effects
in a VANET of varying transmission and channel properties (e.g., packet
rate, message size, transmit power, propagation loss model, impact of
routing protocol traffic, etc.).
- (internet) It is now possible to print the Neighbor Cache (ARP and NDISC)
by using the RoutingProtocolHelper
- (stats) A new TimeProbe class has been added to hook the data collection
framework to traced values emitting Time objects
- (documentation) the callback function signatures for all TraceSources
is documented in Doxygen
- (utils) print-introspected-doxygen.cc has had several enhancements;
use -h to read the usage message for details.
- (core) TracedValue and TracedCallback function signatures are now documented,
which required changing the TypeId::AddTraceSource API.
Bugs fixed
----------
- Bug 1405 - RttEstimator improvements
- Bug 1551 - NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
- Bug 1726 - WiFi Minstrel rate control algorithm doesn't save state
- Bug 1734 - TcpSocketBase produces spurious delayed ACKs
- Bug 1758 - Yans and Nist error rate models for 5/6 code rate 802.11n HT
- Bug 1770 - mesh test and example crash for 32-bit optimized builds
- Bug 1774 - compute signal power around channel, not across whole band, and fix LrWpanHelper to add a default PropagationDelayModel
- Bug 1791 - TCP Endpoint never deallocates when closing
- Bug 1801 - Setting Wi-Fi timing parameters through WifiMac attributes (documentation fix)
- Bug 1906 - 802.11n PHY configuration for 2.4GHz and 5GHz devices
- Bug 1957 - UdpSocketImpl is stuck after a Close()
- Bug 1968 - Missing supported 802.11n HT rates in the WifiPhy constructor
- Bug 1969 - Support short guard interval durations in 802.11n
- Bug 1970 - Missing NotifyAckTimeoutStartNow in MacLow::StartDataTxTimers
- Bug 1971 - 802.11n at 2.4 GHz should include a signal extension duration
- Bug 1972 - CommandLine duplicate argument handling: documentation updated.
- Bug 1983 - FlowMonitor returns containers copies instead of references.
- Bug 1986 - test result divergence for lte-frequency-reuse test
- Bug 1991 - PcapFileWrapper::CaptureSize attribute (snaplen) has no effect.
- Bug 1995 - avoid multiple definitions of PI
- Bug 1996 - RSRQ calculation: misleading variable names
- Bug 1997 - Fix PlotProbe() documentation and usage for GnuplotHelper and FileHelper
- Bug 2002 - Hardcoded include paths cause breakage
- Bug 2011 - Default Speed attribute in ConstantSpeedPropagationDelayModel
- Bug 2016 - Radvd do not consider the SendAdvert option and don't reply to RS
- Bug 2020 - Erroneous MCS field in 802.11n PCAP files
- Bug 2021 - Missing const qualifier in TopologyReader::Link::Attributes{Begin,End}()
- Bug 2026 - 802.11n Ness parameter badly set for data frames
- Bug 2027 - Calculation of HT training symbol duration does not accurately follow 802.11n standard
- Bug 2028 - remove unnecessary Time to double conversions in Wifi models
- Bug 2029 - new CQI generation approach fix
- Bug 2030 - provide default values for WifiTxVector
- Bug 2037 - HT capabilities may print bogus chars
- Bug 2038 - Stop method does not stop next wave in WaveformGenerator
- Bug 2042 - LTE a3-rsrp-handover-algorithm.cc: error: overflow in implicit constant conversion
- Bug 2043 - print-introspected-doxygen crashes when some modules are disabled
- Bug 2044 - Buffer::Iterator::ReadNtohU16() and ReadNtohU32() not implemented correctly
- Bug 2045 - Missing NS_OBJECT_ENSURE_REGISTERED in TcpTxBuffer and TcpRxBuffer
- Bug 2046 - set Block Ack timeout when SetStandard is called
- Bug 2047 - Ipv6EndPointDemux::Lookup may crash
- Bug 2049 - CQI feedback should always use the same calculation method
- Bug 2053 - In tcp-socket-base.cc, NotifyDataSent incorrectly called with retransmits
- Bug 2055 - TCP TxBuffer and RxBuffer traces don't work
- Nix-vector routing implementation now uses a lazy flush mechanism,
which dramatically speeds up the creation of large topologies.
Known issues
------------
In general, known issues are tracked on the project tracker available
at http://www.nsnam.org/bugzilla/
Release 3.21
============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.21.tar.bz2
Supported platforms
-------------------
- Fedora Core 20 (32/64 bit) with g++-4.8.2
- Ubuntu 14.04 (32/64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- CentOS/RHEL 6.5 (64-bit) with g++-4.4.7
- OS X Mavericks 10.9 with Xcode 5.1.1 and clang-503.0.40
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- The LTE module now supports the transport of the S1-U, X2-U and X2-C
interfaces over emulated links via the new helper class EmuEpcHelper.
- CommandLine can now provide a shorthand argument name for any
Attribute.
- Implemented support for Frequency Reuse algorithms in LTE module, as the
outcome of GSoC 2014 project.
The project also includes several sub-features, such as:
- implementation of Downlink Power Control
- implementation of Uplink Power Control
- new DL-CQI generation approach, which increases throughput if FR algorithms
are used
- seven options of Frequency Reuse algorithms: LteFrNoOpAlgorithm,
LteFrHardAlgorithm, LteFrStrictAlgorithm, LteFrSoftAlgorithm,
LteFfrSoftAlgorithm, LteFfrEnhancedAlgorithm, LteFfrDistributedAlgorithm
- updated RadioEnvironmentMapHelper. Now RadioEnvironmentMap can be generated
for Data or Control channel and for specified RbId, what is helpful when
using FR algorithms
- Added a CoDel queue model. CoDel queues measure and control the queue
traversal delay. The ns-3 implementation is a port of the Linux
implementation.
- Added support for TCP timestamp and window scale options, and added
ability to trace the TCP slow start threshold value.
- SimpleNetDevice and SimpleChannel (used for adding basic link effects
for testing of higher-layer protocols) have been extended to support
the option of broadcast or PointToPoint link semantics. The bandwidth
and link delay can be constrained, and it uses an output queue.
- SimpleNetDevice and SimpleChannel can be installed in a node through
a new helper: SimpleNetDeviceHelper.
- Implemented new PacketSocketServer and PacketSocketClient applications.
The primary use is in tests, to avoid using the ones from the
application module that also bring in a dependency on the internet module.
Bugs fixed
----------
- Bug 1673 - Config::Set/Connect does not search for attributes in parent class
- Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted
- Bug 1811 - basic traffic generator for network module
- Bug 1824 - L4 protocol sockets should support BindToNetDevice over IPv6
- Bug 1831 - TcpSocket SlowStartThreshold is not a TraceSource
- Bug 1851 - WifiRadioEnergyModel energy consumption values are taken from a 802.15.4 chip
- Bug 1854 - std::out_of_range Problem
- Bug 1858 - wireless examples not correctly recording packet reception
- Bug 1860 - TCP needs the Window Scale option
- Bug 1893 - issue in DoSchedUlTriggerReq with harq
- Bug 1911 - AODV cannot work on nodes with more than one netdevice
- Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet
- Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple
- Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing.
- Bug 1937 - FlowMonitor fails to track multiplexed packets
- Bug 1942 - refactoring of lte-sinr-chunk-processor -> lte-chunk-processor
- Bug 1943 - Waveform generator signal duration calc error
- Bug 1951 - AODV does not update nexthop for 1-hop nodes
- Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple
- Bug 1960 - Wrong information on index range, about Node::GetDevice
- Bug 1961 - planetlab-tap-creator "variable set but not used"
- Bug 1963 - AODV can tag the same packet twice (and raise an assert)
- Bug 1964 - Integer overflow on UniformRandomVariable::GetInteger()
- Bug 1967 - LL Multicast is not compressed in the right way in IPHC
- Bug 1981 - PyViz shell not compatible with ipython >= 0.11
Known issues
------------
- Bug 1770 - The mesh module will crash if used for g++ version >= 4.8.1
in optimized mode, on a 32-bit Linux machine. Lowering the optimization
level to -O1 in this case can be used as a workaround.
Release 3.20
=============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.20.tar.bz2
Supported platforms
-------------------
- Fedora Core 20 (32/64 bit) with g++-4.8.2
- Ubuntu 14.04 (32/64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- CentOS/RHEL 6.5 (64-bit) with g++-4.4.7
- OS X Mavericks 10.9 with Xcode 5.1.1 and clang-503.0.40
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- A new LrWpan model, providing initial support for IEEE 802.15.4 networks
- A new IPv6 routing protocol has been added: RIPng. This protocol is
an Interior Gateway Protocol and it is available in the Internet module.
- A new LTE MAC downlink scheduling algorithm named Channel and QoS Aware (CQA)
Scheduler is provided by the new ``ns3::CqaFfMacScheduler`` object.
- The Internet FlowMonitor can now track IPv6 packets.
- FlowMonitor no longer tracks multicast/broadcast packets, reflecting
its original design.
- FlowMonitor "SerializeToXml" functions are now directly available
from the helper.
- The SixLowPan model can now use uncompressed IPv6 headers. An option to
define the minimum compressed packet size has been added.
- Simplify output of Times in a specific unit; see Time::As ()
- Ipv6Extension::m_dropTrace has been removed. Ipv6L3Protocol::m_dropTrace
is now fired when appropriate.
- IPv4 identification field value is now dependent on the protocol field.
- Fixes to support Python >= 3.3 in ns3 Python bindings
- Enable selection of high precision int64x64_t implementation
at configure time, for debugging purposes.
Bugs fixed
----------
- Bug 1276 - optimize NistErrorRateModel
- Bug 1294 - New PeekU8 () and Read (Buffer::Iterator start, uint32_t size) methods in Buffer::Iterator
- Bug 1443 - MinDistance replaced by MinLoss in FriisPropagationLossModel, to
better handle conditions outside of the assumed far field region.
- Bug 1653 - Extension of CommandLine interface: restored operator << (CommandLine)
- Bug 1717 - Detect unsettable attributes
- Bug 1730 - no model library documentation for spectrum module
- Bug 1739 - The endpoint is not deallocated for UDP sockets
- Bug 1786 - os << int64x64_t prints un-normalized fractional values
- Bug 1787 - Runtime error when using AnimationInterface::EnablePacketMetadata() to fetch metadata of CSMA packet
- Bug 1792 - Parameter logger constructor
- Bug 1808 - FlowMon relies on IPv4's Identification field to trace packets
- Bug 1817 - IPv4 Identification field should consider protocol as well.
- Bug 1818 - FlowMonitor needs IPv6 support
- Bug 1820 - models library doc: make should not rm -rf figures
- Bug 1821 - Setting an interface to Down state will cause various asserts in IPv6
- Bug 1829 - Multiple TCP socket entries
- Bug 1837 - AODV crashes when using multiple interfaces
- Bug 1838 - FlowMonitorHelper must not be copied.
- Bug 1841 - FlowMonitor fails to install if IPv4 is not installed in the node
- Bug 1842 - FlowMonitor SerializeToXml<Something> should be called by the helper
- Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
- Bug 1845 - FlowMonitor should discard any broadcast/multicast packet
- Bug 1846 - IPv6 should send Destination Unreachable if no route is available
- Bug 1850 - TCP NewReno loss behavior
- Bug 1852 - cairo-wideint-private.h error cannot find definitions for fixed-width integral types
- Bug 1853 - NS_LOG_FUNCTION broken on OSX 10.9
- Bug 1855 - SixLowPanNetDevice is not correctly indexed
- Bug 1857 - Detect location of installed boost libraries
- Bug 1862 - NS_LOG="Time=*|prefix_time" causes stack overflow
- Bug 1868 - Optimized builds are sensitive to -fstrict-overflow
- Bug 1870 - Remove unnecessary AsInt functions
- Bug 1872 - Inside RREQ processing, in case of IP duplication, packet dropped instead of being forwarded
- Bug 1873 - Energy source checked to be aggregated to the node
- Bug 1874 - Ipv4L3Protocol::ProcessFragment: addressCombination and idProto identifiers not properly computed
- Bug 1876 - enable OLSR HNA table access
- Bug 1877 - constructors missing for PropagationLossModels
- Bug 1882 - int64x64 tests trigger valgrind bug
- Bug 1883 - IPv6 don't consider the prefix and network when choosing output address
- Bug 1885 - WifiSpectrumValue5MhzFactory::CreateRfFilter does not align with the used 5Mhz SpectrumModel
- Bug 1887 - Point-to-point traces should contain PPP headers
- Bug 1888 - COST231 propagation loss model: corrections
- Bug 1889 - PointToPointNetDevice: In some cases MacTxDrop trace is not called
- Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer
- Bug 1891 - UdpSocketImpl::GetSockName doesn't return the IPv6 address
- Bug 1894 - CqaFfMacScheduler needs an update
- Bug 1895 - IP header Source Address changed while forwarding RREQ
- Bug 1900 - Avoid floating point differences across platforms in test outputs
- Bug 1903 - Namespace usage in olsr-state.cc/h
- Bug 1907 - Add IsSupportedMcs method in YansWifiPhy
- Bug 1912 - Avoid multiple Wifi MacTxMiddle instances
- Bug 1913 - Avoid crash in Wifi BlockAckManager::GetNextPacket()
- Bug 1915 - BRITE channel delay is rounded to an integer
- Bug 1916 - RandomWalk2dMobilityMode default "Bounds" attribute is not a rectangle
- Bug 1919 - Strip trailing semi-colons from mobility trace files
- Bug 1920 - Remove DSR attributes so file can be re-loaded by config-store
- Bug 1922 - WAVE GetSsid should not be fatal
- Bug 1923 - Setting Active Probing to false in Wifi Sta has no effect
- Bug 1924 - sensing radius and CCA
Known issues
------------
- Bug 1770 - The mesh module will crash if used for g++ version >= 4.8.1
in optimized mode, on a 32-bit Linux machine. Lowering the optimization
level to -O1 in this case can be used as a workaround.
Release 3.19
=============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.19.tar.bz2
Supported platforms
-------------------
These platforms have been tested; others may work also:
- Fedora Core 20 (32 bit) with g++-4.8.2
- Fedora Core 19 (32/64 bit) with g++-4.8.1
- Ubuntu 13.10 (64 bit) with g++-4.8.1
- Ubuntu 12.04.3 (32/64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- OS X Mavericks 10.9 with Xcode 5.0.1 and clang-500.2.79
- OS X Mountain Lion 10.8.5 with Xcode 5 and g++-4.2.1
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- Extension to UE measurements and improved handover algorithm models in LTE
module, as the outcome of GSoC 2013 project. The project also includes several
sub-features, such as:
- implementation of System Information Block Type 1 (SIB1);
- a new option for automatic UE attachment using Idle mode cell selection
procedure;
- improved configurability of UE measurements; and
- two options of handover algorithms for enabling automatic handover trigger
in LTE simulation: A2-A4-RSRQ and strongest cell (A3-RSRP).
- A new FixedRoomPositionAllocator has been added to the buildings
module. It allows one to generate a random position uniformly
distributed in the volume of a chosen room inside a chosen building.
- A new attribute ns3::LteRlcAm::TxOpportunityForRetxAlwaysBigEnough
allows to overcome the lack for re-segmentation in the RLC AM
implementation by assuming that the size of a TxOpportunity is
always big enough for the RLC AM PDU to be retransmitted.
- After some profiling, the code of LteMiErrorModel has been optimized
for speed, resulting in a significantly lower execution time of the
LTE model when used with the error model enabled.
- A new WiFi extension for vehicular simulation support is available in
the src/wave directory. The current code represents an interim capability
to realize an IEEE 802.11p-compliant device, but without the WAVE
extensions (which are planned for a later patch). The WaveNetDevice
modelled herein enforces that a WAVE-compliant physical layer (at 5.9 GHz)
is selected, and does not require any association between devices (similar
to an adhoc WiFi MAC), but is otherwise similar (at this time) to a
WifiNetDevice. WAVE capabililties of switching between control and
service channels, or using multiple radios, are not yet modelled.
- A new IPv6 over Low power Wireless Personal Area Networks (6LoWPAN) model
is available. Using ns-3's naming convention, the acronym is expanded
to SixLowPanNetDevice. The SixLowPanNetDevice is able to act as a
shim between IPv6 and a NetDevice, compressing IPv6 headers according
to RFCs 4944 and 6262. The SixLowPanNetDevice is meant to be used over
IEEE 802.15.4 NetDevices, but it can be used on other NetDevices as
well (see the manual for full details). This model precedes the
general availability of an 802.15.4 model, so must be run in conjunction
with a wired NetDevice model for now, or with experimental versions of
802.15.4 models.
- It is now possible to use Ipv6PacketInfoTag from UDP applications in the
same way as with Ipv4PacketInfoTag. See Doxygen for current limitations in
using Ipv[4,6]PacketInfoTag to set IP properties.
- Ipv[4,6]Interfaces not respecting the minimum MTU requirements (68 octects
for IPv4 and 1280 octects for IPv6) will be automatically set as Down.
- IPv6 addresses and routing tables are printed in a more conventional way,
closely matching the Linux "route -A inet6" command.
- Additional time units (Year, Day, Hour, Minute) were added to the time
value class that represents simulation time; the largest unit prior to
this addition was Second.
- A new parallel scheduling algorithm based on null messages, a common
parallel DES scheduling algorithm, has been added. The null message
scheduler has better scaling properties when running on some scenarios
with large numbers of nodes since it does not require a global
communication.
Bugs fixed
----------
- Bug 1496 - Option to print log level in NS_LOG messages, and documentation.
- Bug 1592 - Parsing bug in FlowMonitor example script
- Bug 1756 - RLC AM Mode State Variable Bug
- Bug 1763 - Message 3 should be sent using the UL GRANT in the RAR
- Bug 1778 - Implement TapBridge::IsLinkUp() function
- Bug 1777 - Implement the more direct way of "using" configuration of existing tap interface
- Bug 1776 - Improve CRC performance for CsmaNetDevice in emulation modes
- Bug 1788 - unused private field warning
- Bug 1789 - missing test condition for sigma in buildings-shadowing-test
- Bug 1796 - Ipv6PacketInfoTag is not filled by UdpSocketImpl::ForwardUp6
- Bug 1798 - Changing the rate of onOffApplication might stop transmission
- Bug 1802 - FlowMon header deserialization problem with IPv4 fragments
- Bug 1803 - Lookup /NodeList/4/DeviceList/0/LteEnbRrc/UeMap/0 got no matches
- Bug 1807 - Multiple bugs in Ipv4L3Protocol::LocalDeliver
- Bug 1810 - IP packets can be sent on NetDevices not respecting the minimum MTU requirements
- Bug 1814 - IPv6 Packet with length not multiple of 8 bytes are fragmented incorrectly.
- Bug 1815 - Python bindings compilation with clang compiler toolchain
- Bug 1816 - IPv4 fragmentation loses Packet tags
- Bug 1877 - constructor missing for <something>PropagationLossModels
Release 3.18.2
==============
ns-allinone-3.18.2 was released to include a bake configuration file update
for Direct Code Execution. The ns-3 code in this release was unchanged
from that of ns-3.18.1.
Release 3.18.1
==============
This release is mainly to provide updated compiler support (clang/LLVM)
and fix the Python API scanning facility. A few additional bug fixes
and new features are described below.
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.18.1.tar.bz2
Supported platforms
-------------------
These platforms have been tested; others may work also:
- Fedora Core 19 (32/64 bit) with g++-4.8.1
- Ubuntu 13.10 (64 bit) with g++-4.8.1
- Ubuntu 12.04.3 (32/64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- OS X Mavericks 10.9 with Xcode 5.0.1 and clang-500.2.79
- OS X Mountain Lion 10.8.5 with Xcode 5 and g++-4.2.1
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- It is now possible to randomize the time of the first beacon from an
access point. Use an attribute "EnableBeaconJitter" to enable/disable
this feature.
- A new FixedRoomPositionAllocator helper class is available; it
allows one to generate a random position uniformly distributed in the
volume of a chosen room inside a chosen building.
- Logging wildcards: allow "***" as synonym for "*=**" to turn on all logging.
- The log component list ("NS_LOG=print-list") is now printed alphabetically.
Bugs fixed
----------
- Bug 1552 - Storing log name inside LogComponent class (NS_LOG) as std::string
- Bug 1722 - beacons transmitted concurrently
- Bug 1616 - WifiPhyStateHelper reports false CCA_BUSY times at State trace source
- Bug 1011 - assert failed. file=../src/devices/wifi/dcf-manager.cc
- Bug 1779 - NS_UNUSED_GLOBAL not working in attribute test class declaration
- Bug 1766 - Fixes to wifi-hidden-terminal.cc example
- Bug 1722 - Avoid transmitting beacons concurrently
- Bug 1691 - RTS/CTS NAV reset prematurely
- Bug 1622 - Avoid waf hanging during apiscan
- Bug 1616 - WifiPhyStateHelper reports false CCA_BUSY times at State trace source
- Bug 1552 - Storing log name inside LogComponent class (NS_LOG) as std::string
- Bug 1011 - assert failed. file=../src/devices/wifi/dcf-manager.cc
- bug 945 - remove deprecated IEEE 802.11p code from wifi module
- Fix aliasing bug in optimized static builds
- Fix memory leak due to circular reference in MPI module
- Make wifi tests more robust to random variable perturbations
- Fix Time class doxygen
- Fix compilation with Clang 3.2 and newer versions, including Apple Xcode 5
- Miscellaneous NetAnim fixes
Release 3.18
=============
@@ -982,7 +1541,7 @@ ns-3.9 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1139,7 +1698,7 @@ ns-3.8 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1283,7 +1842,7 @@ Unofficially supported platform
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1403,7 +1962,7 @@ ns-3.6 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1480,7 +2039,7 @@ ns-3.5 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1538,7 +2097,7 @@ ns-3.4 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1602,7 +2161,7 @@ ns-3.3 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1669,7 +2228,7 @@ ns-3.2 has been tested on the following platforms:
Not all ns-3 options are available on all platforms; consult the
wiki for more information:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
New user-visible features
-------------------------
@@ -1697,7 +2256,7 @@ New user-visible features
keep track of simulation data in persistent storage across multiple
runs (database and ascii file backends are available).
More information on the wiki:
http://www.nsnam.org/wiki/index.php/Statistical_Framework_for_Network_Simulation
http://www.nsnam.org/wiki/Statistical_Framework_for_Network_Simulation
API changes from ns-3.1
-----------------------
+13 -9
View File
@@ -1,3 +1,4 @@
from __future__ import print_function
import warnings
import sys
import os
@@ -6,6 +7,8 @@ from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandler
from pybindgen.module import MultiSectionFactory
import ns3modulegen_core_customizations
import logging
pybindgen.settings.wrapper_registry = pybindgen.settings.StdMapWrapperRegistry
import traceback
@@ -55,6 +58,9 @@ class MyMultiSectionFactory(MultiSectionFactory):
def main(argv):
logging.basicConfig()
logging.getLogger("pybindgen.typehandlers").setLevel(logging.DEBUG)
module_abs_src_path, target, extension_name, output_cc_file_name = argv[1:]
module_name = os.path.basename(module_abs_src_path)
out = MyMultiSectionFactory(output_cc_file_name)
@@ -71,11 +77,11 @@ def main(argv):
try:
from callbacks_list import callback_classes
except ImportError, ex:
print >> sys.stderr, "***************", repr(ex)
except ImportError as ex:
print("***************", repr(ex), file=sys.stderr)
callback_classes = []
else:
print >> sys.stderr, ">>>>>>>>>>>>>>>>", repr(callback_classes)
print(">>>>>>>>>>>>>>>>", repr(callback_classes), file=sys.stderr)
finally:
sys.path.pop(0)
@@ -97,7 +103,7 @@ def main(argv):
module_customization.post_register_types(root_module)
# register Callback<...> type handlers
ns3modulegen_core_customizations.generate_callback_classes(root_module.after_forward_declarations,
ns3modulegen_core_customizations.register_callback_classes(root_module.after_forward_declarations,
callback_classes)
# -----------
@@ -108,20 +114,18 @@ def main(argv):
ns3modulegen_core_customizations.Object_customizations(root_module)
ns3modulegen_core_customizations.Attribute_customizations(root_module)
ns3modulegen_core_customizations.generate_callback_classes(root_module,
callback_classes)
# -----------
module_apidefs.register_functions(root_module)
if hasattr(module_customization, 'post_register_functions'):
module_customization.post_register_functions(root_module)
# -----------
root_module.generate(out)
if __name__ == '__main__':
import sys
main(sys.argv)
@@ -1,3 +1,5 @@
from __future__ import print_function
import sys
import re
from pybindgen.typehandlers import base as typehandlers
@@ -5,6 +7,7 @@ from pybindgen import ReturnValue, Parameter
from pybindgen.cppmethod import CustomCppMethodWrapper, CustomCppConstructorWrapper
from pybindgen.typehandlers.codesink import MemoryCodeSink
from pybindgen.typehandlers import ctypeparser
from pybindgen.typehandlers.base import ForwardWrapperBase
from pybindgen import cppclass
import warnings
@@ -25,11 +28,13 @@ class SmartPointerTransformation(typehandlers.TypeTransformation):
def __init__(self):
super(SmartPointerTransformation, self).__init__()
self.rx = re.compile(r'(ns3::|::ns3::|)Ptr<([^>]+)>\s*$')
print("{0!r}".format(self), file=sys.stderr)
def _get_untransformed_type_traits(self, name):
m = self.rx.match(name)
is_const = False
if m is None:
print("{0!r} did not match".format(name), file=sys.stderr)
return None, False
else:
name1 = m.group(2).strip()
@@ -60,9 +65,9 @@ class SmartPointerTransformation(typehandlers.TypeTransformation):
## fix the ctype, add ns3:: namespace
orig_ctype, is_const = self._get_untransformed_type_traits(args[0])
if is_const:
correct_ctype = 'ns3::Ptr< %s const >' % orig_ctype[:-2]
correct_ctype = 'ns3::Ptr< {0} const >'.format(orig_ctype[:-2])
else:
correct_ctype = 'ns3::Ptr< %s >' % orig_ctype[:-2]
correct_ctype = 'ns3::Ptr< {0} >'.format(orig_ctype[:-2])
args = tuple([correct_ctype] + list(args[1:]))
handler = type_handler(*args, **kwargs)
@@ -83,58 +88,6 @@ typehandlers.param_type_matcher.register_transformation(transf)
del transf
class ArgvParam(Parameter):
"""
Converts a python list-of-strings argument to a pair of 'int argc,
char *argv[]' arguments to pass into C.
One Python argument becomes two C function arguments -> it's a miracle!
Note: this parameter type handler is not registered by any name;
must be used explicitly.
"""
DIRECTIONS = [Parameter.DIRECTION_IN]
CTYPES = []
def convert_c_to_python(self, wrapper):
raise NotImplementedError
def convert_python_to_c(self, wrapper):
py_name = wrapper.declarations.declare_variable('PyObject*', 'py_' + self.name)
argc_var = wrapper.declarations.declare_variable('int', 'argc')
name = wrapper.declarations.declare_variable('char**', self.name)
idx = wrapper.declarations.declare_variable('Py_ssize_t', 'idx')
wrapper.parse_params.add_parameter('O!', ['&PyList_Type', '&'+py_name], self.name)
#wrapper.before_call.write_error_check('!PyList_Check(%s)' % py_name) # XXX
wrapper.before_call.write_code("%s = (char **) malloc(sizeof(char*)*PyList_Size(%s));"
% (name, py_name))
wrapper.before_call.add_cleanup_code('free(%s);' % name)
wrapper.before_call.write_code('''
for (%(idx)s = 0; %(idx)s < PyList_Size(%(py_name)s); %(idx)s++)
{
''' % vars())
wrapper.before_call.sink.indent()
wrapper.before_call.write_code('''
PyObject *item = PyList_GET_ITEM(%(py_name)s, %(idx)s);
''' % vars())
#wrapper.before_call.write_error_check('item == NULL')
wrapper.before_call.write_error_check(
'!PyString_Check(item)',
failure_cleanup=('PyErr_SetString(PyExc_TypeError, '
'"argument %s must be a list of strings");') % self.name)
wrapper.before_call.write_code(
'%s[%s] = PyString_AsString(item);' % (name, idx))
wrapper.before_call.sink.unindent()
wrapper.before_call.write_code('}')
wrapper.before_call.write_code('%s = PyList_Size(%s);' % (argc_var, py_name))
wrapper.call_params.append(argc_var)
wrapper.call_params.append(name)
class CallbackImplProxyMethod(typehandlers.ReverseWrapperBase):
"""
Class that generates a proxy virtual method that calls a similarly named python method.
@@ -159,7 +112,73 @@ class CallbackImplProxyMethod(typehandlers.ReverseWrapperBase):
def generate_callback_classes(out, callbacks):
def register_callback_classes(out, callbacks):
for callback_impl_num, template_parameters in enumerate(callbacks):
cls_name = "ns3::Callback< %s >" % ', '.join(template_parameters)
#print >> sys.stderr, "***** trying to register callback: %r" % cls_name
class_name = "PythonCallbackImpl%i" % callback_impl_num
class PythonCallbackParameter(Parameter):
"Class handlers"
CTYPES = [cls_name]
print("***** registering callback handler: %r (%r)" % (ctypeparser.normalize_type_string(cls_name), cls_name), file=sys.stderr)
DIRECTIONS = [Parameter.DIRECTION_IN]
PYTHON_CALLBACK_IMPL_NAME = class_name
TEMPLATE_ARGS = template_parameters
DISABLED = False
def convert_python_to_c(self, wrapper):
"parses python args to get C++ value"
assert isinstance(wrapper, typehandlers.ForwardWrapperBase)
if self.DISABLED:
raise CodeGenerationError("wrapper could not be generated")
if self.default_value is None:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name)
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name)
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
callback_impl = wrapper.declarations.declare_variable(
'ns3::Ptr<%s>' % self.PYTHON_CALLBACK_IMPL_NAME,
'%s_cb_impl' % self.name)
wrapper.before_call.write_code("%s = ns3::Create<%s> (%s);"
% (callback_impl, self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.call_params.append(
'ns3::Callback<%s> (%s)' % (', '.join(self.TEMPLATE_ARGS), callback_impl))
else:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name, 'NULL')
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name, optional=True)
value = wrapper.declarations.declare_variable(
'ns3::Callback<%s>' % ', '.join(self.TEMPLATE_ARGS),
self.name+'_value',
self.default_value)
wrapper.before_call.write_code("if (%s) {" % (py_callback,))
wrapper.before_call.indent()
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
wrapper.before_call.write_code("%s = ns3::Callback<%s> (ns3::Create<%s> (%s));"
% (value, ', '.join(self.TEMPLATE_ARGS),
self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.before_call.unindent()
wrapper.before_call.write_code("}") # closes: if (py_callback) {
wrapper.call_params.append(value)
def convert_c_to_python(self, wrapper):
raise typehandlers.NotSupportedError("Reverse wrappers for ns3::Callback<...> types "
"(python using callbacks defined in C++) not implemented.")
def generate_callback_classes(module, callbacks):
out = module.after_forward_declarations
for callback_impl_num, template_parameters in enumerate(callbacks):
sink = MemoryCodeSink()
cls_name = "ns3::Callback< %s >" % ', '.join(template_parameters)
@@ -203,7 +222,7 @@ public:
kwargs = {}
try:
return_type = ReturnValue.new(str(return_ctype), **kwargs)
except (typehandlers.TypeLookupError, typehandlers.TypeConfigurationError), ex:
except (typehandlers.TypeLookupError, typehandlers.TypeConfigurationError) as ex:
warnings.warn("***** Unable to register callback; Return value '%s' error (used in %s): %r"
% (callback_return, cls_name, ex),
Warning)
@@ -222,74 +241,29 @@ public:
kwargs = {}
try:
arguments.append(Parameter.new(str(param_ctype), arg_name, **kwargs))
except (typehandlers.TypeLookupError, typehandlers.TypeConfigurationError), ex:
except (typehandlers.TypeLookupError, typehandlers.TypeConfigurationError) as ex:
warnings.warn("***** Unable to register callback; parameter '%s %s' error (used in %s): %r"
% (arg_type, arg_name, cls_name, ex),
Warning)
ok = False
if not ok:
try:
typehandlers.return_type_matcher.lookup(cls_name)[0].DISABLED = True
except typehandlers.TypeLookupError:
pass
try:
typehandlers.param_type_matcher.lookup(cls_name)[0].DISABLED = True
except typehandlers.TypeLookupError:
pass
continue
wrapper = CallbackImplProxyMethod(return_type, arguments)
wrapper.generate(sink, 'operator()', decl_modifiers=[])
sink.unindent()
sink.writeln('};\n')
print("Flushing to ", out, file=sys.stderr)
sink.flush_to(out)
class PythonCallbackParameter(Parameter):
"Class handlers"
CTYPES = [cls_name]
print >> sys.stderr, "***** registering callback handler: %r" % ctypeparser.normalize_type_string(cls_name)
DIRECTIONS = [Parameter.DIRECTION_IN]
PYTHON_CALLBACK_IMPL_NAME = class_name
TEMPLATE_ARGS = template_parameters
def convert_python_to_c(self, wrapper):
"parses python args to get C++ value"
assert isinstance(wrapper, typehandlers.ForwardWrapperBase)
if self.default_value is None:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name)
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name)
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
callback_impl = wrapper.declarations.declare_variable(
'ns3::Ptr<%s>' % self.PYTHON_CALLBACK_IMPL_NAME,
'%s_cb_impl' % self.name)
wrapper.before_call.write_code("%s = ns3::Create<%s> (%s);"
% (callback_impl, self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.call_params.append(
'ns3::Callback<%s> (%s)' % (', '.join(self.TEMPLATE_ARGS), callback_impl))
else:
py_callback = wrapper.declarations.declare_variable('PyObject*', self.name, 'NULL')
wrapper.parse_params.add_parameter('O', ['&'+py_callback], self.name, optional=True)
value = wrapper.declarations.declare_variable(
'ns3::Callback<%s>' % ', '.join(self.TEMPLATE_ARGS),
self.name+'_value',
self.default_value)
wrapper.before_call.write_code("if (%s) {" % (py_callback,))
wrapper.before_call.indent()
wrapper.before_call.write_error_check(
'!PyCallable_Check(%s)' % py_callback,
'PyErr_SetString(PyExc_TypeError, "parameter \'%s\' must be callbale");' % self.name)
wrapper.before_call.write_code("%s = ns3::Callback<%s> (ns3::Create<%s> (%s));"
% (value, ', '.join(self.TEMPLATE_ARGS),
self.PYTHON_CALLBACK_IMPL_NAME, py_callback))
wrapper.before_call.unindent()
wrapper.before_call.write_code("}") # closes: if (py_callback) {
wrapper.call_params.append(value)
def convert_c_to_python(self, wrapper):
raise typehandlers.NotSupportedError("Reverse wrappers for ns3::Callback<...> types "
"(python using callbacks defined in C++) not implemented.")
# def write_preamble(out):
@@ -421,15 +395,28 @@ def add_std_ofstream(module):
ofstream.add_constructor([Parameter.new("const char *", 'filename'),
Parameter.new("::std::ofstream::openmode", 'mode', default_value="std::ios_base::out")])
ofstream.add_method('close', None, [])
add_std_ios_openmode(module)
def add_std_ios_openmode(module):
import pybindgen.typehandlers.base
for alias in "std::_Ios_Openmode", "std::ios::openmode":
pybindgen.typehandlers.base.param_type_matcher.add_type_alias(alias, "int")
class IosOpenmodeParam(Parameter):
DIRECTIONS = [Parameter.DIRECTION_IN]
CTYPES = ['std::ios::openmode', 'std::_Ios_Openmode']
def convert_c_to_python(self, wrapper):
assert isinstance(wrapper, ReverseWrapperBase)
wrapper.build_params.add_parameter('i', [self.value])
def convert_python_to_c(self, wrapper):
assert isinstance(wrapper, ForwardWrapperBase)
name = wrapper.declarations.declare_variable("std::ios::openmode", self.name, self.default_value)
wrapper.parse_params.add_parameter('i', ['&'+name], self.name, optional=bool(self.default_value))
wrapper.call_params.append(name)
def add_std_ios_openmode(module):
for flag in 'in', 'out', 'ate', 'app', 'trunc', 'binary':
module.after_init.write_code('PyModule_AddIntConstant(m, (char *) "STD_IOS_%s", std::ios::%s);'
% (flag.upper(), flag))
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+50 -25
View File
@@ -12,11 +12,11 @@ from waflib.Errors import WafError
# feature = TaskGen.feature
# after = TaskGen.after
## https://launchpad.net/pybindgen/
REQUIRED_PYBINDGEN_VERSION = (0, 16, 0, 898)
# https://github.com/named-data-ndnSIM/pybindgen
REQUIRED_PYBINDGEN_VERSION = '0.17.0.post45+ng4806e4f'
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
RUN_ME=-3
def add_to_python_path(path):
if os.environ.get('PYTHONPATH', ''):
@@ -47,6 +47,10 @@ def options(opt):
opt.add_option('--with-python',
help=('Path to the Python interpreter to use.'),
default=None, dest='with_python', type="string")
opt.add_option('--no32bit-scan',
help=("Don't scan for the 32-bit variant of the bindings on 64-bit platforms."),
action="store_true", default=False,
dest='no32bit_scan')
def configure(conf):
@@ -159,17 +163,26 @@ def configure(conf):
"PyBindGen missing")
return
else:
out = subprocess.Popen([conf.env['PYTHON'][0], "-c",
"import pybindgen.version; "
"print '.'.join([str(x) for x in pybindgen.version.__version__])"],
stdout=subprocess.PIPE).communicate()[0]
pybindgen_version_str = out.strip()
pybindgen_version = tuple([int(x) for x in pybindgen_version_str.split('.')])
conf.msg('Checking for pybindgen version', pybindgen_version_str)
def getVersion():
out = subprocess.Popen([conf.env['PYTHON'][0], "-c",
"try:\n"
" import pybindgen.version\n"
" print(pybindgen.__version__)\n"
"except:\n"
" pass"],
stdout=subprocess.PIPE).communicate()[0]
return out.strip()
pybindgen_version = getVersion()
if pybindgen_version == '': # version is not generated yet (e.g., cloned from git repo directly)
subprocess.Popen([conf.env['PYTHON'][0], "setup.py", "--version"],
cwd=conf.env['WITH_PYBINDGEN'],
stdout=subprocess.PIPE).communicate()[0]
pybindgen_version = getVersion()
conf.msg('Checking for pybindgen version', pybindgen_version)
if not (pybindgen_version == REQUIRED_PYBINDGEN_VERSION):
Logs.warn("pybindgen (found %s), (need %s)" %
(pybindgen_version_str,
'.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION])))
Logs.warn("pybindgen (found %r), (need %r)" %
(pybindgen_version, REQUIRED_PYBINDGEN_VERSION))
conf.report_optional_feature("python", "Python Bindings", False,
"PyBindGen version not correct and newer version could not be retrieved")
return
@@ -188,13 +201,11 @@ int main ()
''' % dict(type1=t1, type2=t2)
try:
ret = conf.run_c_code(code=test_program,
env=conf.env.derive(), compile_filename='test.cc',
features='cxx cprogram', execute=False)
ret = conf.check(compiler='cxx', fragment=test_program, features='cxx')
except Errors.ConfigurationError:
ret = 1
ret = False
conf.msg('Checking for types %s and %s equivalence' % (t1, t2), (ret and 'no' or 'yes'))
return not ret
return ret
uint64_is_long = test("uint64_t", "unsigned long")
uint64_is_long_long = test("uint64_t", "unsigned long long")
@@ -251,6 +262,8 @@ int main ()
"import pygccxml; print pygccxml.__version__"],
stdout=subprocess.PIPE).communicate()[0]
pygccxml_version_str = out.strip()
# Bug 2013: pygccxml versions > 1.0.0 prepend a 'v' to version number
pygccxml_version_str = pygccxml_version_str.lstrip('v')
pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
conf.msg('Checking for pygccxml version', pygccxml_version_str)
if not (pygccxml_version >= REQUIRED_PYGCCXML_VERSION):
@@ -261,7 +274,7 @@ int main ()
conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
"pygccxml too old")
return
## Check gccxml version
try:
@@ -274,13 +287,17 @@ int main ()
"gccxml missing")
return
gccxml_version_line = os.popen(gccxml + " --version").readline().strip()
gccxml_version_line = os.popen(gccxml[0] + " --version").readline().strip()
m = re.match( "^GCC-XML version (\d\.\d(\.\d)?)$", gccxml_version_line)
gccxml_version = m.group(1)
gccxml_version_ok = ([int(s) for s in gccxml_version.split('.')] >= [0, 9])
try:
gccxml_version = m.group(1)
gccxml_version_ok = ([int(s) for s in gccxml_version.split('.')] >= [0, 9])
except AttributeError:
gccxml_version = gccxml_version_line
gccxml_version_ok = False
conf.msg('Checking for gccxml version', gccxml_version)
if not gccxml_version_ok:
Logs.warn("gccxml too old, need version >= 0.9; automatic scanning of API definitions will not be possible")
Logs.warn("gccxml version unknown or too old, need version >= 0.9; automatic scanning of API definitions will not be possible")
conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
"gccxml too old")
return
@@ -365,6 +382,12 @@ class apiscan_task(Task.Task):
retval = scan.wait()
return retval
def runnable_status(self):
# By default, Waf Task will skip running a task if the signature of
# the build has not changed. We want this task to always run if
# invoked by the user, particularly since --apiscan=all will require
# invoking this task many times, once per module.
return RUN_ME
def get_modules_and_headers(bld):
"""
@@ -399,7 +422,7 @@ class gen_ns3_compat_pymod_task(Task.Task):
"""Generates a 'ns3.py' compatibility module."""
before = 'cxx'
color = 'BLUE'
def run(self):
assert len(self.outputs) == 1
outfile = file(self.outputs[0].abspath(), "w")
@@ -430,7 +453,9 @@ def build(bld):
else:
import struct
if struct.calcsize('I') == 4 and struct.calcsize('L') == 8 and struct.calcsize('P') == 8:
scan_targets.extend([('gcc_ILP32', '-m32'), ('gcc_LP64', '-m64')])
if not Options.options.no32bit_scan:
scan_targets.append(('gcc_ILP32', '-m32'))
scan_targets.append(('gcc_LP64', '-m64'))
elif struct.calcsize('I') == 4 and struct.calcsize('L') == 4 and struct.calcsize('P') == 4:
scan_targets.append(('gcc_ILP32', ''))
else:
+1 -1
View File
@@ -3,7 +3,7 @@ build system (http://www.freehackers.org/~tnagy/waf.html)
Note: We've added a wiki page with more complete build instructions
than the quick ones you find below:
http://www.nsnam.org/wiki/index.php/Installation
http://www.nsnam.org/wiki/Installation
=== Installing Waf ===
+1550 -943
View File
File diff suppressed because it is too large Load Diff
+284 -41
View File
@@ -1,62 +1,287 @@
#!/bin/bash
# Process doxygen.warnings.log to generate sorted list of top offenders
# Process doxygen log to generate sorted list of top offenders.
#
# Flag to skip the build and running doxygen, and just analyze the log
skipdoxy=${1:-""}
me=$(basename $0)
DIR="$(dirname $0)"
# Trick to get the absolute path, since doxygen prefixes errors that way
ROOT=$(cd "$DIR/.."; pwd)
DIR=`dirname $0`
ROOT=`hg root`
# Final resting place for the log file
log=$DIR/doxygen.warnings.log
# Known log files
STANDARDLOGFILE=doxygen.log
WARNINGSLOGFILE=doxygen.warnings.log
# Default choice: generate it
LOG="$DIR/$WARNINGSLOGFILE"
# Verbose log
VERBLOG="$DIR/doxygen.verbose.log"
# First, we have to modify doxygen.conf to generate all the warnings
# (We also suppress dot graphs, so shorten the run time.)
# Options ------------------------------
#
if [ "$skipdoxy" == "" ]; then
function usage
{
cat <<-EOF
Usage: $me [-eithv] [-f <log-file> | -l | -s] [-m <module> | -F <regex>]
Run doxygen to generate all errors; report error counts
by module and file.
-i Skip build and print-introspected-doxygen.
-f Skip doxygen run; use existing <log-file>.
-s Skip doxygen run; use existing warnings log doc/$WARNINGSLOGFILE
-l Skip doxygen run; use the normal doxygen log doc/$STANDARDLOGFILE
-e Filter out warnings from */examples/*
-t Filter out warnings from */test/*
-m Only include files matching src/<module>
-F Only include files matching the <regex>
# Run introspection, which may require a build
cd $(hg root) && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h
-v Show the doxygen run output
-h Print this usage message
The default behavior is to modify doxygen.conf temporarily to
report all undocumented elements, and to reduce the run time.
The output of this special run is kept in doc/$WARNINGSLOGFILE.
To further reduce the run time, the -i option also skips
print-introspected-doxygen, so waf doesn\'t have to compile
any modified files at all.
The -f, -l, and -s options skip the doxygen run altogether.
The first two use a specified or the standard log file;
the -s option uses the warnings log from a prior run.
Only the first of -f <log-file>, -s, or -l will have effect.
The -e and -t options exclude examples and test directories
from the counts. The -m option only includes a specific module.
The -F option only includes files (or warnings) matching the <regex>.
The -m and -F options append the relevant warnings after the
numerical report. These can be used in any combination.
EOF
exit 1
}
# Messaging ----------------------------
#
# Arg -v Verbosity level
verbosity=0
function verbose
{
if [ "$1" == "-n" ]; then
echo -n "$2"
elif [ $verbosity -eq 1 ]; then
echo "$1 $2"
else
echo "$2"
fi
}
# Use file handle 6 for verbose output
rm -f $VERBLOG
exec 6>$VERBLOG
function status_report
{
local status="$1"
local long_msg="$2"
if [ $status -eq 0 ]; then
verbose "$long_msg " "done."
rm -f $VERBLOG
else
verbose "$long_msg " "FAILED. Details:"
cat $VERBLOG
rm -f $VERBLOG
exit 1
fi
}
# Argument processing ------------------
#
# -f argument
use_filearg=0
logfile_arg=
# -l
use_standard=0
# skip doxygen run; using existing log file
skip_doxy=0
# skip print-introspected-doxygen, avoiding a build
skip_intro=0
# Filtering flags
filter_examples=0
filter_test=0
filter_module=""
filter_regex=""
echo
echo "$me:"
while getopts :eitm:F:lF:svh option ; do
case $option in
(e) filter_examples=1 ;;
(i) skip_intro=1 ;;
(t) filter_test=1 ;;
(m) filter_module="$OPTARG" ;;
(F) filter_regex="$OPTARG" ;;
(l) use_standard=1 ;;
(f) use_filearg=1
logfile_arg="$OPTARG"
;;
(s) use_filearg=1
logfile_arg="$DIR/$WARNINGSLOGFILE"
;;
(v) verbosity=1
exec 6>&1
;;
(h) usage ;;
(:) echo "$me: Missing argument to -$OPTARG" ; usage ;;
(\?) echo "$me: Invalid option: -$OPTARG" ; usage ;;
esac
done
function checklogfile
{
if [ -e "$1" ] ; then
skip_doxy=1
LOG="$1"
else
echo "$me: log file $1 does not exist."
exit 1
fi
}
# Which log file
if [[ $use_filearg -eq 1 && "${logfile_arg:-}" != "" ]] ; then
checklogfile "$logfile_arg"
elif [ $use_standard -eq 1 ]; then
checklogfile "$DIR/$STANDARDLOGFILE"
fi
# Run doxygen -------------------------
#
if [ $skip_doxy -eq 1 ]; then
echo
echo "Skipping doxygen run, using existing log file $LOG"
else
if [ $skip_intro -eq 1 ]; then
verbose "" "Skipping ./waf build and print-introspected-doxygen."
else
# Run introspection, which may require a build
verbose -n "Building and running print-introspected-doxygen..."
(cd "$ROOT" && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h >&6 2>&6 )
status_report $? "./waf build"
fi
# Modify doxygen.conf to generate all the warnings
# (We also suppress dot graphs, so shorten the run time.)
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)
verbose -n "Rebuilding doxygen (v$(doxygen --version)) docs with full errors..."
(cd "$ROOT" && ./waf --doxygen-no-build >&6 2>&6 )
status=$?
hg revert $conf
rm -f $conf
mv -f $conf.bak $conf
if [ "$status" = "0" ]; then
echo "Done."
else
echo "FAILED."
exit 1
fi
status_report $status "Doxygen run"
mv $DIR/doxygen.log $log
cp -f "$DIR/$STANDARDLOGFILE" "$DIR/$WARNINGSLOGFILE"
else
echo "Skipping doxygen run, using existing log file $log"
fi
# Log filters --------------------------
#
# Analyze the log
# Filter regular expression for -m and -F
filter_inRE=""
if [ "$filter_module" != "" ] ; then
filter_inRE="${filter_inRE:-}${filter_inRE:+\\|}src/$filter_module"
fi
if [ "$filter_regex" != "" ] ; then
filter_inRE="${filter_inRE:-}${filter_inRE:+\\|}$filter_regex"
fi
# Filter regular expression for -e and -t
filter_outRE=""
if [ $filter_examples -eq 1 ]; then
filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}/examples/"
fi
if [ $filter_test -eq 1 ]; then
filter_outRE="${filter_outRE:-}${filter_outRE:+\\|}/test/"
fi
if [ "${filter_inRE:-}" != "" ] ; then
echo "Filtering in \"$filter_inRE\""
fi
if [ "${filter_outRE:-}" != "" ] ; then
echo "Filtering out \"$filter_outRE\""
fi
echo
# Filter log file
function filter_log
{
local flog;
flog=$( cat "$LOG" | grep "^$ROOT" )
if [ "${filter_inRE:-}" != "" ] ; then
flog=$( echo "$flog" | grep "$filter_inRE" )
fi
if [ "${filter_outRE:-}" != "" ] ; then
flog=$( echo "$flog" | grep -v "$filter_outRE" )
fi
flog=$( \
echo "$flog" | \
sort -t ':' -k1,1 -k2,2n | \
uniq \
)
echo "$flog"
}
# Analyze the log ----------------------
#
# List of module directories (e.g, "src/core/model")
undocmods=$( \
grep "^$ROOT" "$log" | \
filter_log | \
cut -d ':' -f 1 | \
sed "s|$ROOT||g" | \
cut -d '/' -f 2-4 | \
sed "s|$ROOT/||g" | \
cut -d '/' -f 1-3 | \
sort | \
uniq -c | \
sort -nr \
)
# Number of directories
modcount=$( \
@@ -68,24 +293,24 @@ modcount=$( \
# 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,
# Rather than work too hard to get the exact number for each file,
# we just list the total here.
addlparam=$( \
grep -v "^$ROOT" $log | \
grep -v "not generated, too many nodes" | \
grep "^ parameter '" $log | \
grep "^ parameter '" "$LOG" | \
wc -l | \
sed 's/^[ \t]*//;s/[ \t]*$//' \
)
# Total number of warnings
warncount=$(echo "$undocmods" | \
awk '{total += $1}; END {print total}' )
warncount=$( \
echo "$undocmods" | \
awk '{total += $1}; END {print total}' \
)
warncount=$((warncount + addlparam))
# List of files appearing in the log
undocfiles=$( \
grep "^$ROOT" "$log" | \
undocfiles=$( \
filter_log | \
cut -d ':' -f 1 | \
sed "s|$ROOT||g" | \
cut -d '/' -f 2- | \
@@ -95,7 +320,7 @@ undocfiles=$( \
)
# Sorted by number, decreasing
undocsort=$(echo "$undocfiles" | sort -r )
undocsort=$(echo "$undocfiles" | sort -k1nr,2 )
# Total number of files
filecount=$( \
@@ -104,7 +329,19 @@ filecount=$( \
sed 's/^[ \t]*//;s/[ \t]*$//' \
)
# Now we're ready to summarize the log
# Filtered in warnings
filterin=
if [ "${filter_inRE:-}" != "" ] ; then
filterin=$( \
filter_log | \
sed "s|$ROOT/||g" \
)
fi
# Summarize the log --------------------
#
echo
echo "Report of Doxygen warnings"
@@ -147,4 +384,10 @@ printf "%6d directories\n" $modcount
printf "%6d files\n" $filecount
printf "%6d warnings\n" $warncount
if [ "$filterin" != "" ] ; then
echo
echo
echo "Filtered Warnings"
echo "========================================"
echo "$filterin"
fi
+26 -2
View File
@@ -13,8 +13,7 @@
*
* \section install-sec Building the Documentation
*
* ns-3 requires Doxygen version 1.5.4 or greater to fully build all items,
* although earlier versions of Doxygen will mostly work.
* ns-3 requires Doxygen version 1.8.3.1 or greater.
*
* Type "./waf --doxygen" or "./waf --doxygen-no-build" to build the
* documentation. The doc/ directory contains
@@ -71,3 +70,28 @@
* ns3 namespace.
*/
// Macros defined by the build system.
//
// These have to be visible for doxygen to document them,
// so we put them here in a file only seen by doxygen, not the compiler.
/**
* \ingroup assert
*
* \def NS3_ASSERT_ENABLE
*
* Enable asserts at compile time.
*
* This is normally set by `./waf configure --build-profile=debug`.
*/
#define NS3_ASSERT_ENABLE
/**
* \ingroup logging
*
* \def NS3_LOG_ENABLE
*
* Enable logging at compile time.
*
* This is normally set by `./waf configure --build-profile=debug`.
*/
#define NS3_LOG_ENABLE
+17 -7
View File
@@ -16,6 +16,7 @@ SOURCES = \
source/replace.txt \
source/attributes.rst \
source/callbacks.rst \
source/documentation.rst \
source/enable-modules.rst \
source/enable-tests.rst \
source/events.rst \
@@ -89,13 +90,22 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
RESCALE = ../../utils/rescale-pdf.sh
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.eps; $(CONVERT) $< $@
%.pdf : %.eps;
$(EPSTOPDF) $< -o=$@
if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
# You can set these variables from the command line.
SPHINXOPTS =
@@ -134,7 +144,7 @@ help:
copy-sources: $(SOURCES)
@rm -rf $(SOURCETEMP)
@mkdir -p $(SOURCETEMP)
@mkdir -p $(FIGURES)
@mkdir -p $(FIGURES)
@cp -r $(SOURCES) $(SOURCETEMP)
@cp -r $(SOURCEFIGS) $(FIGURES)
File diff suppressed because it is too large Load Diff
+647
View File
@@ -0,0 +1,647 @@
.. include:: replace.txt
.. highlight:: cpp
Creating Documentation
----------------------
|ns3| supplies two kinds of documentation: expository "user-guide"-style
chapters, and source code API documentation.
The "user-guide" chapters are written by hand in reStructuredText_
format (``.rst``), which is processed by the Python documentation
system Sphinx_ to generate web pages and pdf files.
The API documentation is generated from the source code itself,
using Doxygen_, to generate cross-linked web pages.
Both of these are important: the Sphinx chapters explain the *why*
and overview of using a model; the API documentation explains the
*how* details.
This chapter gives a quick overview of these
tools, emphasizing preferred usage and customizations for |ns3|.
To build all the standard documentation:
.. sourcecode:: bash
$ ./waf docs
For more specialized options, read on.
.. _reStructuredText: http://sphinx-doc.org/rest.html
.. _sphinx: http://sphinx-doc.org/
.. _doxygen: http://www.doxygen.org/
Documenting with Sphinx
***********************
We use Sphinx_ to generate expository chapters describing
the design and usage of each module. Right now you are reading the
:doc:`Documentation <documentation>` Chapter.
If you are reading the html version, the
`Show Source <_sources/documentation.txt>`_ link in the sidebar
will show you the reStructuredText source for this chapter.
Adding New Chapters
===================
Adding a new chapter takes three steps (described in more detail below):
#. Choose `Where?`_ the documentation file(s) will live.
#. `Link`_ from an existing page to the new documentation.
#. Add the new file to the `Makefile`_.
Where?
######
Documentation for a specific module, ``foo``, should normally go in
``src/foo/doc/``. For example ``src/foo/doc/foo.rst`` would be the
top-level document for the module. The ``src/create-module.py`` script
will create this file for you.
Some models require several ``.rst`` files, and figures; these should
all go in the ``src/foo/doc/`` directory. The docs are actually built
by a Sphinx Makefile. For especially involved
documentation, it may be helpful to have a local ``Makefile``
in the ``src/foo/doc/`` directory to
simplify building the documentation for this module
(`Antenna`_ is an example). Setting this up
is not particularly hard, but is beyond the scope of this chapter.
In some cases, documentation spans multiple models; the
`Network`_ chapter is an example. In these cases
adding the ``.rst`` files directly to ``doc/models/source/`` might
be appropriate.
.. _antenna: http://www.nsnam.org/docs/models/html/antenna.html
.. _network: http://www.nsnam.org/docs/models/html/network.html
Link
####
Sphinx has to know *where* your new chapter should appear. In most
cases, a new model chapter should appear the in `Models` book.
To add your chapter there, edit ``doc/models/source/index.rst``
.. sourcecode:: rest
.. toctree::
:maxdepth: 1
organization
animation
antenna
aodv
applications
...
Add the name of your document (without the ``.rst`` extension) to
this list. Please keep the Model chapters in alphabetical order,
to ease visual scanning for specific chapters.
Makefile
########
You also have to add your document to the appropriate ``Makefile``,
so ``make`` knows to check it for updates. The Models book Makefile
is ``doc/models/Makefile``, the Manual book Makefile is
``doc/manual/Makefile``.
.. sourcecode:: make
# list all model library .rst files that need to be copied to $SOURCETEMP
SOURCES = \
source/conf.py \
source/_static \
source/index.rst \
source/replace.txt \
source/organization.rst \
...
$(SRC)/antenna/doc/source/antenna.rst \
...
You add your ``.rst`` files to the ``SOURCES`` variable. To add figures,
read the comments in the ``Makefile`` to see which variable should contain
your image files. Again, please keep these in alphabetical order.
Building Sphinx Docs
====================
Building the Sphinx documentation is pretty simple.
To build all the Sphinx documentation:
.. sourcecode:: bash
$ ./waf sphinx
To build just the Models documentation:
.. sourcecode:: bash
$ make -C doc/models html
To see the generated documentation point your browser at
``doc/models/build/html``.
As you can see, Sphinx uses Make to guide the process.
The default target builds all enabled output forms, which in
|ns3| are the multi-page ``html``, single-page ``singlehtml``, and pdf
(``latex``). To build just the multi-page html, you add the ``html`` target:
.. sourcecode:: bash
$ make -C doc/models html
This can be helpful to reduce the build time (and the size of the
build chatter) as you are writing your chapter.
Before committing your documentation to the repo, please check
that it builds without errors or warnings. The build process
generates lots of output (mostly normal chatter from LaTeX),
which can make it difficult to see if there are any Sphinx
warnings or errors. To find important warnings and errors
build just the ``html`` version, then search the build log
for ``warning`` or ``error``.
|ns3| Specifics
===============
The Sphinx documentation_ and tutorial_ are pretty good. We won't duplicate
the basics here, instead focusing on preferred usage for |ns3|.
.. _documentation: http://sphinx-doc.org/contents.html
.. _tutorial: http://sphinx-doc.org/tutorial.html
* Start documents with these two lines:
.. sourcecode:: rest
.. include:: replace.txt
.. highlight:: cpp
The first line enables some simple replacements. For example,
typing ``|ns3|`` renders as |ns3|.
The second sets the default source code highlighting language explicitly
for the file, since the parser guess isn't always accurate.
(It's also possible to set the language explicitly for a single code block,
see below.)
* Sections:
Sphinx is pretty liberal about marking section headings. By convention,
we prefer this hierarchy:
.. sourcecode:: rest
.. heading hierarchy:
------------- Chapter
************* Section (#.#)
============= Subsection (#.#.#)
############# Sub-subsection
* Syntax Highlighting:
To use the default syntax highlighter, simply start a sourcecode block:
+--------------------------------------+------------------------------------+
| Sphinx Source | Rendered Output |
+======================================+====================================+
| .. sourcecode:: rest | |
| | |
| The ``Frobnitz`` is accessed by:: | The ``Frobnitz`` is accessed by:: |
| | |
| Foo::Frobnitz frob; | Foo::Frobnitz frob; |
| frob.Set (...); | frob.Set (...); |
+--------------------------------------+------------------------------------+
To use a specific syntax highlighter, for example, ``bash`` shell commands:
+--------------------------------------+------------------------------------+
| Sphinx Source | Rendered Output |
+======================================+====================================+
| .. sourcecode:: rest | |
| | |
| .. sourcecode:: bash | .. sourcecode:: bash |
| | |
| $ ls | $ ls |
+--------------------------------------+------------------------------------+
* Shorthand Notations:
These shorthands are defined:
+--------------------------------------+------------------------------------+
| Sphinx Source | Rendered Output |
+======================================+====================================+
| .. sourcecode:: rest | |
| | |
| |ns3| | |ns3| |
+--------------------------------------+------------------------------------+
| .. sourcecode:: rest | |
| | |
| |ns2| | |ns2| |
+--------------------------------------+------------------------------------+
| .. sourcecode:: rest | |
| | |
| |check| | |check| |
+--------------------------------------+------------------------------------+
| .. sourcecode:: rest | |
| | |
| :rfc:`6282` | :rfc:`6282` |
+--------------------------------------+------------------------------------+
Documenting with Doxygen
************************
We use Doxygen_ to generate browsable_ API documentation. Doxygen
provides a number of useful features:
* Summary table of all class members.
* Graphs of inheritance and collaboration for all classes.
* Links to the source code implementing each function.
* Links to every place a member is used.
* Links to every object used in implementing a function.
* Grouping of related classes, such as all the classes related to
a specific protocol.
In addition, we use the ``TypeId`` system to add to the documentation
for every class
* The ``Config`` paths by which such objects can be reached.
* Documentation for any ``Attributes``, including ``Attributes``
defined in parent classes.
* Documentation for any ``Trace`` sources defined by the class.
* The memory footprint for each class.
Doxygen operates by scaning the source code, looking for
specially marked comments. It also creates a cross reference,
indicating *where* each file, class, method, and variable is used.
.. _browsable: https://www.nsnam.org/docs/doxygen
Preferred Style
===============
The preferred style for Doxygen comments is the JavaDoc style::
/**
* Brief description of this class or method.
* Adjacent lines become a single paragraph.
*
* Longer description, with lots of details.
*
* Blank lines separate paragraphs.
*
* Explain what the class or method does, using what algorithm.
* Explain the units of arguments and return values.
*
* \note Note any limitations or gotchas.
*
* (For functions with arguments or return valued:)
* \param [in] foo Brief noun phrase describing this argument. Note
* that we indicate if the argument is input,
* output, or both.
* \param [in,out] bar Note Sentence case, and terminating period.
* \param [in] baz Indicate boolean values with \c true or \c false.
* \return Brief noun phrase describing the value.
*
* \internal
*
* You can also discuss internal implementation details.
* Understanding this material shouldn't be necessary to using
* the class or method.
*/
void ExampleFunction (const int foo, double & bar, const bool baz);
In this style the Doxygen comment block begins with two \`*' characters:
``/**``, and precedes the item being documented.
For items needing only a brief description, either of these short forms
is appropriate::
/** Destructor implementation. */
void DoDispose ();
int m_count; //!< Count of ...
Note the special form of the end of line comment, ``//!<``, indicating
that it refers to the *preceding* item.
Some items to note:
* Use sentence case, including the initial capital.
* Use punctuation, especially \`.'s at the end of sentences or phrases.
* The ``\brief`` tag is not needed; the first sentence will be
used as the brief description.
Every class, method, typedef, member variable, function argument
and return value should be documented in all source code files
which form the formal API and implementation for |ns3|, such as
``src/<module>/model/*``, ``src/<module>/helper/*`` and
``src/<module>/utils/*``. Documentation for items in ``src/<module>/test/*``
and ``src/<module>/examples/*`` is preferred, but not required.
Useful Features
===============
* Inherited members will automatically inherit docs from the parent,
(but can be replaced by local documentation).
#. Document the base class.
#. In the sub class mark inherited functions with an ordinary comment::
// Inherited methods
virtual void FooBar (void);
virtual int BarFoo (double baz);
Note that the signatures have to match exactly, so include the formal
argument ``(void)``
This doesn't work for static functions; see ``GetTypeId``, below, for an
example.
Building Doxygen Docs
=====================
Building the Doxygen documentation is pretty simple:
.. sourcecode:: bash
$ ./waf doxygen
This builds using the default configuration, which generates
documentation sections for *all* items, even if they do not have
explicit comment documentation blocks. This has the effect of
suppressing warnings for undocumented items, but makes sure everything
appears in the generated output, which is usually what you want for
general use. Note that we generate documentation even for modules
which are disabled, to make it easier to see all the features
available in |ns3|.
When writing documentation, it's often more useful to see which items
are generating warnings, typically about missing documentation. To
see the full warnings list, use the ``doc/doxygen.warnings.report.sh``
script:
.. sourcecode:: bash
$ doc/doxygen.warnings.report.sh
doxygen.warnings.report.sh:
Building and running print-introspected-doxygen...done.
Rebuilding doxygen (v1.8.10) docs with full errors...done.
Report of Doxygen warnings
----------------------------------------
(All counts are lower bounds.)
Warnings by module/directory:
Count Directory
----- ----------------------------------
3414 src/lte/model
1532 src/wimax/model
825 src/lte/test
....
1 src/applications/test
97 additional undocumented parameters.
----------------------------------------
12460 total warnings
100 directories with warnings
Warnings by file (alphabetical)
Count File
----- ----------------------------------
15 examples/routing/manet-routing-compare.cc
26 examples/stats/wifi-example-apps.h
12 examples/tutorial/fifth.cc
....
17 utils/python-unit-tests.py
----------------------------------------
771 files with warnings
Warnings by file (numerical)
Count File
----- ----------------------------------
273 src/lte/model/lte-rrc-sap.h
272 src/core/model/simulator.h
221 src/netanim/model/animation-interface.h
....
1 src/wimax/model/ul-job.cc
----------------------------------------
771 files with warnings
Doxygen Warnings Summary
----------------------------------------
100 directories
771 files
12460 warnings
(This snippet has *a lot* of lines suppressed!)
The script modifies the configuration to show all warnings, and to
shorten the run time. (It shortens the run time primarily by
disabling creation of diagrams, such as call trees, and doesn't
generate documentation for undocumented items, in order to trigger the
warnings.) As you can see, at this writing we have *a lot* of
undocumented items. The report summarizes warnings by module
``src/*/*``, and by file, in alphabetically and numerical order.
The script has a few options to pare things down and make the output more
manageable. For help, use the ``-h`` option. Having run it once
to do the Doxygen build and generate the full warnings log,
you can reprocess the log file with various "filters,"
without having to do the full Doxygen build again by
using the ``-s`` option. You can exclude warnings
from ``*/examples/*`` files (``-e`` option), and/or ``*/test/*`` files
(``-t``). Just to be clear, all of the filter options do the complete
fast doxygen build; they just filter doxygen log and warnings output.
Perhaps the most useful option when writing documentation comments
is ``-m <module>``, which will limit the report to just files matching
``src/<module>/*``, and follow the report with the actual warning lines.
Combine with ``-et`` and you can focus on the warnings that are most
urgent in a single module:
.. sourcecode:: bash
$ doc/doxygen.warnings.report.sh -m mesh/helper
...
Doxygen Warnings Summary
----------------------------------------
1 directories
3 files
149 warnings
Filtered Warnings
========================================
src/mesh/helper/dot11s/dot11s-installer.h:72: warning: Member m_root (variable) of class ns3::Dot11sStack is not documented.
src/mesh/helper/dot11s/dot11s-installer.h:35: warning: return type of member ns3::Dot11sStack::GetTypeId is not documented
src/mesh/helper/dot11s/dot11s-installer.h:56: warning: return type of member ns3::Dot11sStack::InstallStack is not documented
src/mesh/helper/flame/lfame-installer.h:40: warning: Member GetTypeId() (function) of class ns3::FlameStack is not documented.
src/mesh/helper/flame/flame-installer.h:60: warning: return type of member ns3::FlameStack::InstallStack is not documented
src/mesh/helper/mesh-helper.h:213: warning: Member m_nInterfaces (variable) of class ns3::MeshHelper is not documented.
src/mesh/helper/mesh-helper.h:214: warning: Member m_spreadChannelPolicy (variable) of class ns3::MeshHelper is not documented.
src/mesh/helper/mesh-helper.h:215: warning: Member m_stack (variable) of class ns3::MeshHelper is not documented.
src/mesh/helper/mesh-helper.h:216: warning: Member m_stackFactory (variable) of class ns3::MeshHelper is not documented.
src/mesh/helper/mesh-helper.h:209: warning: parameters of member ns3::MeshHelper::CreateInterface are not (all) documented
src/mesh/helper/mesh-helper.h:119: warning: parameters of member ns3::MeshHelper::SetStandard are not (all) documented
Finally, note that undocumented items (classes, methods, functions,
typedefs, *etc.* won't produce documentation when you build with
``doxygen.warnings.report.sh``, and only the outermost item
will produce a warning. As a result, if you don't see documentation
for a class method in the generated documentation, the class itself
probably needs documentation.
Now it's just a matter of understanding the code, and writing some
docs!
|ns3| Specifics
===============
As for Sphinx, the Doxygen docs_ and reference_ are pretty good.
We won't duplicate the basics here, instead focusing on preferred
usage for |ns3|.
.. _docs: http://www.stack.nl/~dimitri/doxygen/index.html
.. _reference: http://www.stack.nl/~dimitri/doxygen/manual/commands.html
* Use Doxygen ``Modules`` to group related items.
In the main header for a module, create a Doxgyen group::
/**
* \defgroup foo Foo protocol.
* Implemenation of the Foo protocol.
*/
The symbol ``foo`` is how other items can add themselves to this group.
The string following that will be the title for the group. Any futher
text will be the detailed description for the group page.
* Document each file, assigning it to the relevant group. In a header file::
/**
* \file
* \ingroup foo
* Class Foo declaration.
*/
or in the corresponding ``.cc`` file::
/**
* \file
* \ingroup foo
* Class FooBar implementation.
*/
* Mark each associated class as belonging to the group::
/**
* \ingroup foo
*
* FooBar packet type.
*/
class FooBar
* Did you know ``typedefs`` can have formal arguments? This enables
documentation of function pointer signatures::
/**
* Bar callback function signature.
*
* \param ale The size of a pint of ale, in Imperial ounces.
*/
typedef void (* BarCallback)(const int ale);
* Copy the ``Attribute`` help strings from the ``GetTypeId`` method to use
as the brief descriptions of associated members.
* ``\bugid{298}`` will create a link to bug 298 in our Bugzilla.
* ``\p foo`` in a description will format ``foo``
the same as the ``\param foo`` parameter, making it clear that you
are referring to an actual argument.
* ``\RFC{301}`` will create a link to RFC 301.
* Document the direction of function arguments with ``\param [in]``, *etc*.
The allowed values of the direction token are ``[in]``, ``[out]``, and
``[in,out]`` (note the explicit square brackets), as discussed in the
Doxygen docs for ``\param``.
* Document template arguments with ``\tparam``, just as you use ``\param``
for function arguments.
* For template arguments, indicate if they will be deduced or must be given
explicitly::
/**
* A templated function.
* \tparam T \explicit The return type.
* \tparam U \deduced The argument type.
* \param [in] a The argument.
*/
template <typename T, typename U> T Function (U a);
* Use ``\tparam U \deduced`` because the type ``U`` can be deduced at
the site where the template is invoked. Basically deduction can only
be done for function arguments.
* Use ``\tparam T \explicit`` because the type ``T`` can't be deduced;
it must be given explicitly at the invocation site.
* ``\internal`` should be used only to set off a discussion of implementation
details, not to mark ``private`` functions (they are already marked,
as ``private``!)
* Don't create classes with trivial names, such as ``class A``,
even in test suites. These cause all instances of the class name
literal \`A' to be rendered as links.
As noted above, static functions don't inherit the documentation
of the same functions in the parent class. |ns3| uses a few static
functions ubiquitously; the suggested documentation block for these
cases is:
* Default constructor/destructor::
MyClass (); //!< Default constructor
~MyClass (); //!< Destructor
* Dummy destructor and DoDispose::
/** Dummy destructor, see DoDispose. */
~MyClass ();
/** Destructor implementation */
virtual void DoDispose ();
* GetTypeId::
/**
* Register this type.
* \return The object TypeId.
*/
static TypeId GetTypeId (void);
+10 -3
View File
@@ -8,10 +8,10 @@ available in five forms:
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentation of the public APIs of the simulator
* Tutorial, Manual *(this document)*, and Model Library for the `latest release <http://www.nsnam.org/documentation/latest/>`_ and `development tree <http://www.nsnam.org/ns-3-dev/documentation/>`_
* `ns-3 wiki <http://www.nsnam.org/wiki/index.php/Main_Page>`_
* `ns-3 wiki <http://www.nsnam.org/wiki/Main_Page>`_
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/manual`` directory of ns-3's source code.
Contents
--------
.. toctree::
:maxdepth: 2
@@ -34,3 +34,10 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
python
tests
support
Source
------
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/manual`` directory of ns-3's source code.
+353 -83
View File
@@ -22,16 +22,14 @@ 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
****************
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()``:
::
For example, this code snippet is from ``Ipv4L3Protocol::IsDestinationAddress()``::
if (address == iaddr.GetBroadcast ())
{
@@ -39,71 +37,33 @@ For example, this code snippet is from ``Ipv4L3Protocol::IsDestinationAddress()`
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
If logging has been enabled for the ``Ipv4L3Protocol`` component at a severity
of ``LOGIC`` or above (see below about log severity), the statement
will be printed out; otherwise, it will be suppressed.
Logging levels
==============
Enabling Output
===============
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:
.. sourcecode:: bash
$ 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.:
There are two ways that users typically control log output. The
first is by setting the ``NS_LOG`` environment variable; e.g.:
.. sourcecode:: bash
$ 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:
will run the ``first`` tutorial program with all logging output. (The
specifics of the ``NS_LOG`` format will be discussed below.)
This can be made more granular by selecting individual components:
.. sourcecode:: bash
$ 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:
::
The output can be further tailored with prefix options.
The second way to enable logging is to use explicit statements in your
program, such as in the ``first`` tutorial program::
int
main (int argc, char *argv[])
@@ -112,48 +72,358 @@ program, such as in the first tutorial program:
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:
(The meaning of ``LOG_LEVEL_INFO``, and other possible values,
will be discussed below.)
::
``NS_LOG`` Syntax
=================
The ``NS_LOG`` environment variable contains a list of log components
and options. Log components are separated by \`:' characters:
.. sourcecode:: bash
$ NS_LOG="<log-component>:<log-component>..."
Options for each log component are given as flags after
each log component:
.. sourcecode:: bash
$ NS_LOG="<log-component>=<option>|<option>...:<log-component>..."
Options control the severity and level for that component,
and whether optional information should be included, such as the
simulation time, simulation node, function name, and the symbolic severity.
Log Components
==============
Generally a log component refers to a single source code ``.cc`` file,
and encompasses the entire file.
Some helpers have special methods to enable the logging of all components
in a module, spanning different compilation units, but logically grouped
together, such as the |ns3| wifi code::
WifiHelper wifiHelper;
wifiHelper.EnableLogComponents ();
The ``NS_LOG`` log component wildcard \`*' will enable all components.
To see what log components are defined, any of these will work:
.. sourcecode:: bash
$ NS_LOG="print-list" ./waf --run ...
$ NS_LOG="foo" # a token not matching any log-component
The first form will print the name and enabled flags for all log components
which are linked in; try it with ``scratch-simulator``.
The second form prints all registered log components,
then exit with an error.
Severity and Level Options
==========================
Individual messages belong to a single "severity class," set by the macro
creating the message. In the example above,
``NS_LOG_LOGIC(..)`` creates the message in the ``LOG_LOGIC`` severity class.
The following severity classes are defined as ``enum`` constants:
================ =====================================
Severity Class Meaning
================ =====================================
``LOG_NONE`` The default, no logging
``LOG_ERROR`` Serious error messages only
``LOG_WARN`` Warning messages
``LOG_DEBUG`` For use in debugging
``LOG_INFO`` Informational
``LOG_FUNCTION`` Function tracing
``LOG_LOGIC`` Control flow tracing within functions
================ =====================================
Typically one wants to see messages at a given severity class *and higher*.
This is done by defining inclusive logging "levels":
====================== ===========================================
Level Meaning
====================== ===========================================
``LOG_LEVEL_ERROR`` Only ``LOG_ERROR`` severity class messages.
``LOG_LEVEL_WARN`` ``LOG_WARN`` and above.
``LOG_LEVEL_DEBUG`` ``LOG_DEBUG`` and above.
``LOG_LEVEL_INFO`` ``LOG_INFO`` and above.
``LOG_LEVEL_FUNCTION`` ``LOG_FUNCTION`` and above.
``LOG_LEVEL_LOGIC`` ``LOG_LOGIC`` and above.
``LOG_LEVEL_ALL`` All severity classes.
``LOG_ALL`` Synonym for ``LOG_LEVEL_ALL``
====================== ===========================================
The severity class and level options can be given in the ``NS_LOG``
environment variable by these tokens:
============ =================
Class Level
============ =================
``error`` ``level_error``
``warn`` ``level_warn``
``debug`` ``level_debug``
``info`` ``level_info``
``function`` ``level_function``
``logic`` ``level_logic``
.. | ``level_all``
| ``all``
| ``*``
============ =================
Using a severity class token enables log messages at that severity only.
For example, ``NS_LOG="*=warn"`` won't output messages with severity ``error``.
``NS_LOG="*=level_debug"`` will output messages at severity levels
``debug`` and above.
Severity classes and levels can be combined with the \`|' operator:
``NS_LOG="*=level_warn|logic"`` will output messages at severity levels
``error``, ``warn`` and ``logic``.
The ``NS_LOG`` severity level wildcard \`*' and ``all``
are synonyms for ``level_all``.
For log components merely mentioned in ``NS_LOG``
.. sourcecode:: bash
$ NS_LOG="<log-component>:..."
the default severity is ``LOG_LEVEL_ALL``.
Prefix Options
==============
A number of prefixes can help identify
where and when a message originated, and at what severity.
The available prefix options (as ``enum`` constants) are
====================== ===========================================
Prefix Symbol Meaning
====================== ===========================================
``LOG_PREFIX_FUNC`` Prefix the name of the calling function.
``LOG_PREFIX_TIME`` Prefix the simulation time.
``LOG_PREFIX_NODE`` Prefix the node id.
``LOG_PREFIX_LEVEL`` Prefix the severity level.
``LOG_PREFIX_ALL`` Enable all prefixes.
====================== ===========================================
The prefix options are described briefly below.
The options can be given in the ``NS_LOG``
environment variable by these tokens:
================ =========
Token Alternate
================ =========
``prefix_func`` ``func``
``prefix_time`` ``time``
``prefix_node`` ``node``
``prefix_level`` ``level``
``prefix_all`` | ``all``
| ``*``
================ =========
For log components merely mentioned in ``NS_LOG``
.. sourcecode:: bash
$ NS_LOG="<log-component>:..."
the default prefix options are ``LOG_PREFIX_ALL``.
Severity Prefix
###############
The severity class of a message can be included with the options
``prefix_level`` or ``level``. For example, this value of ``NS_LOG``
enables logging for all log components (\`*') and all severity
classes (``=all``), and prefixes the message with the severity
class (``|prefix_level``).
.. sourcecode:: bash
$ NS_LOG="*=all|prefix_level" ./waf --run scratch-simulator
Scratch Simulator
[ERROR] error message
[WARN] warn message
[DEBUG] debug message
[INFO] info message
[FUNCT] function message
[LOGIC] logic message
Time Prefix
###########
The simulation time can be included with the options
``prefix_time`` or ``time``. This prints the simulation time in seconds.
Node Prefix
###########
The simulation node id can be included with the options
``prefix_node`` or ``node``.
Function Prefix
###############
The name of the calling function can be included with the options
``prefix_func`` or ``func``.
``NS_LOG`` Wildcards
####################
The log component wildcard \`*' will enable all components. To
enable all components at a specific severity level
use ``*=<severity>``.
The severity level option wildcard \`*' is a synonym for ``all``.
This must occur before any \`|' characters separating options.
To enable all severity classes, use ``<log-component>=*``,
or ``<log-component>=*|<options>``.
The option wildcard \`*' or token ``all`` enables all prefix options,
but must occur *after* a \`|' character. To enable a specific
severity class or level, and all prefixes, use
``<log-component>=<severity>|*``.
The combined option wildcard ``**`` enables all severities and all prefixes;
for example, ``<log-component>=**``.
The uber-wildcard ``***`` enables all severities and all prefixes
for all log components. These are all equivalent:
.. sourcecode:: bash
$ NS_LOG="***" ... $ NS_LOG="*=all|*" ... $ NS_LOG="*=*|all" ...
$ NS_LOG="*=**" ... $ NS_LOG="*=level_all|*" ... $ NS_LOG="*=*|prefix_all" ...
$ NS_LOG="*=*|*" ...
Be advised: even the trivial ``scratch-simulator`` produces over
46K lines of output with ``NS_LOG="***"``!
How to add logging to your code
*******************************
To add logging to your code, please follow the below steps:
Adding logging to your code is very simple:
1) Put ``NS_LOG_COMPONENT_DEFINE`` macro outside of namespace ns3
1. Invoke the ``NS_LOG_COMPONENT_DEFINE (...);`` macro
inside of ``namespace ns3``.
Create a unique string identifier (usually based on the name of the file
and/or class defined within the file) and register it with a macro call
such as follows:
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 {
NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
...
namespace ns3 {
...
This registers ``Ipv4L3Protocol`` as a log component.
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``.
(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``
at file global scope.)
2. Add logging statements (macro calls) to your functions and function bodies.
Logging Macros
==============
The logging macros and associated severity levels are
================ ==========================
Severity Class Macro
================ ==========================
``LOG_NONE`` (none needed)
``LOG_ERROR`` ``NS_LOG_ERROR (...);``
``LOG_WARN`` ``NS_LOG_WARN (...);``
``LOG_DEBUG`` ``NS_LOG_DEBUG (...);``
``LOG_INFO`` ``NS_LOG_INFO (...);``
``LOG_FUNCTION`` ``NS_LOG_FUNCTION (...);``
``LOG_LOGIC`` ``NS_LOG_LOGIC (...);``
================ ==========================
The macros function as output streamers, so anything you can send to
``std::cout``, joined by ``<<`` operators, is allowed::
void MyClass::Check (int value, char * item)
{
NS_LOG_FUNCTION (this << arg << item);
if (arg > 10)
{
NS_LOG_ERROR ("encountered bad value " << value <<
" while checking " << name << "!");
}
...
}
Note that ``NS_LOG_FUNCTION`` automatically inserts a \`\ :literal:`,\ `'
(comma-space) separator between each of its arguments.
This simplifies logging of function arguments;
just concatenate them with ``<<`` as in the example above.
Unconditional Logging
=====================
As a convenience, the ``NS_LOG_UNCOND (...);`` macro will always log its
arguments, even if the associated log-component is not enabled at any
severity. This macro does not use any of the prefix options. Note that
logging is only enabled in debug builds; this macro won't produce
output in optimized builds.
Guidelines
==========
* Start every class method with ``NS_LOG_FUNCTION (this << args...);``
This enables easy function call tracing.
* Except: don't log operators or explicit copy constructors,
since these will cause infinite recursion and stack overflow.
* For methods without arguments use the same form:
``NS_LOG_FUNCTION (this);``
* For static functions:
* With arguments use ``NS_LOG_FUNCTION (...);`` as normal.
* Without arguments use ``NS_LOG_FUNCTION_NOARGS ();``
* Use ``NS_LOG_ERROR`` for serious error conditions that probably
invalidate the simulation execution.
* Use ``NS_LOG_WARN`` for unusual conditions that may be correctable.
Please give some hints as to the nature of the problem and how
it might be corrected.
* ``NS_LOG_DEBUG`` is usually used in an *ad hoc* way to understand
the execution of a model.
* Use ``NS_LOG_INFO`` for additional information about the execution,
such as the size of a data structure when adding/removing from it.
* Use ``NS_LOG_LOGIC`` to trace important logic branches within a function.
* Test that your logging changes do not break the code.
Run some example programs with all log components turned on (e.g.
``NS_LOG="***"``).
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.
+52 -40
View File
@@ -1,8 +1,8 @@
.. include:: replace.txt
.. highlight:: cpp
Creating a new ns-3 model
-------------------------
Creating a new |ns3| model
--------------------------
This chapter walks through the design process of an |ns3| model. In many
research cases, users will not be satisfied to merely adapt existing models, but
@@ -11,7 +11,16 @@ example of adding an ErrorModel to a simple |ns3| link as a motivating example
of how one might approach this problem and proceed through a design and
implementation.
Design-approach
.. note:: Documentation
Here we focus on the process of creating new models
and new modules, and some of the design choices involved.
For the sake of clarity, we defer discussion of the
*mechanics* of documenting models and source code to the
:doc:`Documentation <documentation>` chapter.
Design Approach
***************
Consider how you want it to work; what should it do. Think about these things:
@@ -26,13 +35,13 @@ Consider how you want it to work; what should it do. Think about these things:
should I avoid any dependence on IPv4 if I want it to also be used by IPv6?
Should I avoid any dependency on IP at all?
Do not be hesitant to contact the ns-3-users or ns-developers list if you have
Do not be hesitant to contact the `ns-3-users` or `ns-developers` list if you have
questions. In particular, it is important to think about the public API of your
new model and ask for feedback. It also helps to let others know of your work in
case you are interested in collaborators.
Example: ErrorModel
+++++++++++++++++++
Example: `ErrorModel`
+++++++++++++++++++++
An error model exists in |ns2|. It allows packets to be passed to a stateful
object that determines, based on a random variable, whether the packet is
@@ -44,7 +53,7 @@ return value of this function is a boolean that tells the caller whether any
corruption occurred. Note that depending on the error model, the packet data
buffer may or may not be corrupted. Let's call this function "IsCorrupt()".
So far, in our design, we have:::
So far, in our design, we have::
class ErrorModel
{
@@ -95,7 +104,7 @@ a user to force errors on otherwise successful packet transmissions, at the
NetDevice level.
After some thinking and looking at existing |ns2| code, here is a sample API of
a base class and first subclass that could be posted for initial review:::
a base class and first subclass that could be posted for initial review::
class ErrorModel
{
@@ -158,16 +167,16 @@ your model since if you follow the error model verbatim, the code you produce
will collide with the existing error model. The below is just an outline of how
ErrorModel was built that you can adapt to other models.
Review the ns-3 coding style document
+++++++++++++++++++++++++++++++++++++
Review the |ns3| Coding Style Document
++++++++++++++++++++++++++++++++++++++
At this point, you may want to pause and read the |ns3| coding style document,
especially if you are considering to contribute your code back to the project.
The coding style document is linked off the main project page: `ns-3 coding
style <http://www.nsnam.org/developers/contributing-code/coding-style/>`_.
Decide where in the source tree the model will reside in
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Decide Where in the Source Tree the Model Should Reside
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
All of the |ns3| model source code is in the directory ``src/``. You will need
to choose which subdirectory it resides in. If it is new model code of some
@@ -178,8 +187,8 @@ 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/`` module where |ns3|
packets are implemented.
waf and wscript
+++++++++++++++
`waf` and `wscript`
+++++++++++++++++++
|ns3| uses the `Waf <http://www.freehackers.org/~tnagy/waf.html>`_ build system.
You will want to integrate your new |ns3| uses the Waf build system. You will
@@ -193,7 +202,7 @@ rest of the source files, and the .h file to the list of the header files.
Now, pop up to the top level directory and type "./test.py". You
shouldn't have broken anything by this operation.
include guards
Include Guards
++++++++++++++
Next, let's add some `include guards
@@ -204,8 +213,8 @@ Next, let's add some `include guards
...
#endif
namespace ns3
+++++++++++++
`namespace ns3`
+++++++++++++++
|ns3| uses the |ns3| `namespace
<http://en.wikipedia.org/wiki/Namespace_(computer_science)#Use_in_common_languages>`_
@@ -217,7 +226,7 @@ an |ns3| namespace block in both the cc and h file.::
}
At this point, we have some skeletal files in which we can start defining
our new classes. The header file looks like this:::
our new classes. The header file looks like this::
#ifndef ERROR_MODEL_H
#define ERROR_MODEL_H
@@ -227,7 +236,7 @@ our new classes. The header file looks like this:::
} // namespace ns3
#endif
while the ``error-model.cc`` file simply looks like this:::
while the ``error-model.cc`` file simply looks like this::
#include "error-model.h"
@@ -244,8 +253,8 @@ Initial Implementation
At this point, we're still working on some scaffolding, but we can begin to
define our classes, with the functionality to be added later.
use of class Object?
++++++++++++++++++++
Inherit from the `Object` Class?
++++++++++++++++++++++++++++++++
This is an important design step; whether to use class :cpp:class:`Object` as a
base class for your new classes.
@@ -268,7 +277,7 @@ In our case, we want to make use of the attribute system, and we will be passing
instances of this object across the |ns3| public API, so class
:cpp:class:`Object` is appropriate for us.
initial classes
Initial Classes
+++++++++++++++
One way to proceed is to start by defining the bare minimum functions and see if
@@ -332,6 +341,7 @@ file.::
{
static TypeId tid = TypeId ("ns3::ErrorModel")
.SetParent<Object> ()
.SetGroupName ("Network")
;
return tid;
}
@@ -350,6 +360,7 @@ file.::
{
static TypeId tid = TypeId ("ns3::RateErrorModel")
.SetParent<ErrorModel> ()
.SetGroupName ("Network")
.AddConstructor<RateErrorModel> ()
;
return tid;
@@ -374,28 +385,28 @@ every class that defines a new GetTypeId method, and it does the actual
registration of the class into the system. The :ref:`Object-model` chapter
discusses this in more detail.
how to include files from elsewhere
+++++++++++++++++++++++++++++++++++
Including External Files
++++++++++++++++++++++++
log component
+++++++++++++
Logging Support
+++++++++++++++
*Here, write a bit about adding |ns3| logging macros. Note that
LOG_COMPONENT_DEFINE is done outside the namespace ns3*
constructor, empty function prototypes
Constructor, Empty Function Prototypes
++++++++++++++++++++++++++++++++++++++
key variables (default values, attributes)
Key Variables (Default Values, Attributes)
++++++++++++++++++++++++++++++++++++++++++
test program 1
Test Program 1
++++++++++++++
Object Framework
++++++++++++++++
Adding-a-sample-script
Adding a Sample Script
**********************
At this point, one may want to try to take the basic scaffolding defined above
@@ -404,7 +415,7 @@ model when plumbing into the system and may also reveal whether any design or
API modifications need to be made. Once this is done, we will return to building
out the functionality of the ErrorModels themselves.
Add basic support in the class
Add Basic Support in the Class
++++++++++++++++++++++++++++++
::
@@ -435,7 +446,7 @@ Add Accessor
MakePointerAccessor (&PointToPointNetDevice::m_receiveErrorModel),
MakePointerChecker<ErrorModel> ())
Plumb into the system
Plumb Into the System
+++++++++++++++++++++
::
@@ -469,7 +480,7 @@ Plumb into the system
}
}
Create null functional script
Create Null Functional Script
+++++++++++++++++++++++++++++
::
@@ -499,8 +510,8 @@ the receive path of the PointToPointNetDevice. It prints out the string
"Corrupt!" for each packet received at node n3. Next, we return to the error
model to add in a subclass that performs more interesting error modeling.
Add subclass
************
Add a Subclass
**************
The trivial base class ErrorModel does not do anything interesting, but it
provides a useful base class interface (Corrupt () and Reset ()), forwarded to
@@ -523,7 +534,7 @@ Here are a few simple requirements we will consider:
of granularity.
* Ability to enable/disable (default is enabled)
How to subclass
How to Subclass
+++++++++++++++
We declare BasicErrorModel to be a subclass of ErrorModel as follows,::
@@ -541,21 +552,22 @@ We declare BasicErrorModel to be a subclass of ErrorModel as follows,::
}
and configure the subclass GetTypeId function by setting a unique TypeId string
and setting the Parent to ErrorModel:::
and setting the Parent to ErrorModel::
TypeId RateErrorModel::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::RateErrorModel")
.SetParent<ErrorModel> ()
.SetGroupName ("Network")
.AddConstructor<RateErrorModel> ()
...
Build-core-functions-and-unit-tests
Build Core Functions and Unit Tests
***********************************
assert macros
Assert Macros
+++++++++++++
Writing unit tests
Writing Unit Tests
++++++++++++++++++
+204 -178
View File
@@ -11,14 +11,15 @@ used with existing |ns3| modules and by other researchers.
This chapter walks you through the steps necessary to add a new module
to |ns3|.
Step 1 - Familiarize yourself with the module layout
****************************************************
.. _Step-0:
Step 0 - Module Layout
**********************
All modules can be found in the ``src`` directory. Each module can be
found in a directory that has the same name as the module. For
example, the spectrum module can be found here: ::
src/spectrum
example, the ``spectrum`` module can be found here: ``src/spectrum``.
We'll be quoting from the ``spectrum`` module for illustration.
A prototypical module has the following directory structure and
required files:
@@ -26,129 +27,164 @@ required files:
.. sourcecode:: text
src/
module-name/
bindings/
doc/
examples/
wscript
helper/
model/
test/
examples-to-run.py
wscript
module-name/
bindings/
doc/
examples/
wscript
helper/
model/
test/
examples-to-run.py
wscript
Not all directories will be present in each module.
Step 2 - Create your new module based on the template module
************************************************************
Step 1 - Create a Module Skeleton
*********************************
A python program is provided in the source directory that will create a skeleton for a new module
.. sourcecode:: bash
$ src/create-module.py
For the purposes of this discussion we will assume that your new module is called "new-module". From the ``src`` directory, do the following to create the new module:
A python program is provided in the source directory that
will create a skeleton for a new module. For the purposes
of this discussion we will assume that your new module
is called ``new-module``. From the ``src`` directory, do the following
to create the new module:
.. sourcecode:: bash
$ ./create-module.py new-module
Next, cd into ``new-module``; you will find this directory layout:
Next, ``cd`` into ``new-module``; you will find this directory layout:
.. sourcecode:: text
$ examples helper model test wscript
$ cd new-module
$ ls
doc examples helper model test wscript
We next walk through how to customize this module. All |ns3| modules
depend on the 'core' module and usually on other modules. This
dependency is specified in the wscript file.
Let's assume that 'new-module' depends on the internet,
mobility, and aodv modules. Then the call to the function that will
create this module should look like this before editing:
In more detail, the ``create-module.py`` script will create the
directories as well as initial skeleton ``wscript``, ``.h``, ``.cc``
and ``.rst`` files. The complete module with skeleton files looks like this:
.. sourcecode:: text
src/
new-module/
doc/
new-module.rst
examples/
new-module-example.cc
wscript
helper/
new-module-helper.cc
new-module-helper.h
model/
new-module.cc
new-module.h
test/
new-module-test-suite.cc
wscript
(If required the ``bindings/`` directory listed in
:ref:`Step-0 <Step-0>` will be created automatically during
the build.)
We next walk through how to customize this module. Informing ``waf``
about the files which make up your module is done by editing the two
``wscript`` files. We will walk through the main steps in this chapter.
All |ns3| modules depend on the ``core`` module and usually on
other modules. This dependency is specified in the ``wscript`` file
(at the top level of the module, not the separate ``wscript`` file
in the ``examples`` directory!). In the skeleton ``wscript``
the call that will declare your new module to ``waf`` will look
like this (before editing):
.. sourcecode:: python
def build(bld):
module = bld.create_ns3_module('new-module', ['core'])
and after editing:
Let's assume that ``new-module`` depends on the ``internet``,
``mobility``, and ``aodv`` modules. After editing it the ``wscript`` file
should look like:
.. sourcecode:: python
def build(bld):
module = bld.create_ns3_module('new-module', ['internet', 'mobility', 'aodv'])
Your module will most likely have model source files. Initial skeletons (which will compile successfully) are created in ``model/new-module.cc`` and ``model/new-module.h``.
Note that only first level module dependencies should be listed, which
is why we removed ``core``; the ``internet`` module in turn depends on
``core``.
If your module will have helper source files, then they will go into the helper/ directory; again, initial skeletons are created in that directory.
Your module will most likely have model source files. Initial skeletons
(which will compile successfully) are created in ``model/new-module.cc``
and ``model/new-module.h``.
Finally, it is good practice to write tests. A skeleton test suite and test case is created in the test/ directory. The below constructor specifies that it will be a unit test named 'new-module': ::
If your module will have helper source files, then they will go into
the ``helper/`` directory; again, initial skeletons are created
in that directory.
New-moduleTestSuite::New-moduleTestSuite ()
Finally, it is good practice to write tests and examples. These will
almost certainly be required for new modules to be accepted into
the official |ns3| source tree. A skeleton
test suite and test case is created in the ``test/`` directory.
The skeleton test suite will contain the below constructor,
which declares a new unit test named ``new-module``,
with a single test case consisting of the class ``NewModuleTestCase1``::
NewModuleTestSuite::NewModuleTestSuite ()
: TestSuite ("new-module", UNIT)
{
AddTestCase (new New-moduleTestCase1);
AddTestCase (new NewModuleTestCase1);
}
Step 3 - Adding to your module's source files
*********************************************
Step 3 - Declare Source Files
*****************************
If your new module has model and/or helper source files, then they
must be specified in your
The public header and source code files for your new module
should be specified in the ``wscript`` file by modifying it with
your text editor.
.. sourcecode:: text
src/new-module/wscript
file by modifying it with your text editor.
As an example, the source files for the spectrum module are specified
in
.. sourcecode:: text
src/spectrum/wscript
with the following list of source files:
As an example, after declaring the ``spectrum`` module,
the ``src/spectrum/wscript`` specifies the source code files
with the following list:
.. sourcecode:: python
module.source = [
'model/spectrum-model.cc',
'model/spectrum-value.cc',
def build(bld):
module = bld.create_ns3_module('spectrum', ['internet', 'propagation', 'antenna', 'applications'])
module.source = [
'model/spectrum-model.cc',
'model/spectrum-value.cc',
.
.
.
'model/microwave-oven-spectrum-value-helper.cc',
'helper/spectrum-helper.cc',
'helper/adhoc-aloha-noack-ideal-phy-helper.cc',
'helper/waveform-generator-helper.cc',
'helper/spectrum-analyzer-helper.cc',
]
'model/microwave-oven-spectrum-value-helper.cc',
'helper/spectrum-helper.cc',
'helper/adhoc-aloha-noack-ideal-phy-helper.cc',
'helper/waveform-generator-helper.cc',
'helper/spectrum-analyzer-helper.cc',
]
Step 4 - Specify your module's header files
*******************************************
The objects resulting from compiling these sources will be assembled
into a link library, which will be linked to any programs relying on this
module.
If your new module has model and/or helper header files, then they
must be specified in your
But how do such programs learn the public API of our new module? Read on!
.. sourcecode:: text
Step 4 - Declare Public Header Files
************************************
src/new-module/wscript
The header files defining the public API of your model and helpers
also should be specified in the ``wscript`` file.
file by modifying it with your text editor.
As an example, the header files for the spectrum module are specified
in
.. sourcecode:: text
src/spectrum/wscript
with the following function call, module name, and list of header
files. Note that the argument for the function new_task_gen() tells
waf to install this module's headers with the other |ns3| headers:
Continuing with the ``spectrum`` model illustration,
the public header files are specified with the following stanza.
(Note that the argument to the ``bld`` function tells
``waf`` to install this module's headers with the other |ns3| headers):
.. sourcecode:: python
@@ -169,24 +205,29 @@ waf to install this module's headers with the other |ns3| headers:
'helper/spectrum-analyzer-helper.h',
]
Step 5 - Specify your module's tests
************************************
Headers made public in this way will be accessible to users of your model
with include statements like
.. sourcecode:: cpp
#include "ns3/spectrum-model.h"
Headers used strictly internally in your implementation should not
be included here. They are still accessible to your implemenation by
include statements like
.. sourcecode:: cpp
#include "my-module-implementation.h"
Step 5 - Declare Tests
**********************
If your new module has tests, then they must be specified in your
``wscript`` file by modifying it with your text editor.
.. sourcecode:: text
src/new-module/wscript
file by modifying it with your text editor.
As an example, the tests for the spectrum module are specified in
.. sourcecode:: text
src/spectrum/wscript
with the following function call and list of test suites:
The ``spectrum`` model tests are specified with the following stanza:
.. sourcecode:: python
@@ -197,62 +238,62 @@ with the following function call and list of test suites:
'test/spectrum-value-test.cc',
]
See :doc:`Tests <tests>` for more information on how to write test cases.
Step 6 - Specify your module's examples
***************************************
Step 6 - Declare Examples
*************************
If your new module has examples, then they must be specified in your
``examples/wscript`` file. (The skeleton top-level ``wscript`` will
recursively include ``examples/wscript`` only if the examples were
enabled at configure time.)
.. sourcecode:: text
src/new-module/examples/wscript
file by modifying it with your text editor.
As an example, the examples for the core module are specified in
.. sourcecode:: text
src/core/examples/wscript
The core module's C++ examples are specified using the following
function calls and source file names. Note that the second argument
for the function ``create_ns3_program()`` is the list of modules that the
program being created depends on:
The ``spectrum`` model defines it's first example in
``src/spectrum/examples/wscript`` with
.. sourcecode:: python
obj = bld.create_ns3_program('main-callback', ['core'])
obj.source = 'main-callback.cc'
def build(bld):
obj = bld.create_ns3_program('adhoc-aloha-ideal-phy',
['spectrum', 'mobility'])
obj.source = 'adhoc-aloha-ideal-phy.cc'
obj = bld.create_ns3_program('sample-simulator', ['core'])
obj.source = 'sample-simulator.cc'
Note that the second argument to the function ``create_ns3_program()``
is the list of modules that the program being created depends on; again,
don't forget to include ``new-module`` in the list. It's best practice
to list only the direct module dependencies, and let ``waf`` deduce
the full dependency tree.
The core module's Python examples are specified using the following
Occasionally, for clarity, you may want to split the implementation
for your example among several source files. In this case, just
include those files as additional explicit sources of the example:
.. sourcecode:: python
obj = bld.create_ns3_program('new-module-example', [new-module])
obj.source = ['new-module-example.cc', 'new-module-example-part.cc']
Python examples are specified using the following
function call. Note that the second argument for the function
register_ns3_script() is the list of modules that the Python example
``register_ns3_script()`` is the list of modules that the Python example
depends on:
.. sourcecode:: python
bld.register_ns3_script('sample-simulator.py', ['core'])
bld.register_ns3_script('new-module-example.py', ['new-module'])
Step 7 - Specify which of your module's examples should be run as tests
***********************************************************************
Step 7 - Examples Run as Tests
******************************
The test framework can also be instrumented to run example programs to
In addition to running explicit test code, the test framework
can also be instrumented to run full example programs to
try to catch regressions in the examples. However, not all examples
are suitable for regression tests. A file called ``examples-to-run.py``
that exists in each module's test directory can control the invocation
of the examples when the test framework runs.
are suitable for regression tests. The file ``test/examples-to-run.py``
controls the invocation of the examples when the test framework runs.
As an example, the examples that are run by ``test.py`` for the core module are specified in
.. sourcecode:: text
src/core/test/examples-to-run.py
using the following two lists of C++ and Python examples:
The ``spectrum`` model examples run by ``test.py`` are specified in
``src/spectrum/test/examples-to-run.py`` using the following
two lists of C++ and Python examples:
.. sourcecode:: python
@@ -263,12 +304,9 @@ using the following two lists of C++ and Python examples:
#
# See test.py for more information.
cpp_examples = [
("main-attribute-value", "True", "True"),
("main-callback", "True", "True"),
("sample-simulator", "True", "True"),
("main-ptr", "True", "True"),
("main-random-variable", "True", "True"),
("sample-random-variable", "True", "True"),
("adhoc-aloha-ideal-phy", "True", "True"),
("adhoc-aloha-ideal-phy-with-microwave-oven", "True", "True"),
("adhoc-aloha-ideal-phy-matrix-propagation-loss-model", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain
@@ -281,57 +319,43 @@ using the following two lists of C++ and Python examples:
("sample-simulator.py", "True"),
]
Each tuple in the C++ list of examples to run contains
As indicated in the comment, each entry in the C++ list of examples to run
contains the tuple ``(example_name, do_run, do_valgrind_run)``, where
.. sourcecode:: python
(example_name, do_run, do_valgrind_run)
where example_name is the executable to be run, do_run is a
condition under which to run the example, and do_valgrind_run is
a condition under which to run the example under valgrind. This
is needed because NSC causes illegal instruction crashes with
some tests when they are run under valgrind.
* ``example_name`` is the executable to be run,
* ``do_run`` is a condition under which to run the example, and
* ``do_valgrind_run`` is a condition under which to run the example
under valgrind. (This is needed because NSC causes illegal instruction
crashes with some tests when they are run under valgrind.)
Note that the two conditions are Python statements that
can depend on waf configuration variables. For example,
can depend on ``waf`` configuration variables. For example,
.. sourcecode:: python
("tcp-nsc-lfn", "NSC_ENABLED == True", "NSC_ENABLED == False"),
Each tuple in the Python list of examples to run contains
Each entry in the Python list of examples to run contains the tuple
``(example_name, do_run)``, where, as for the C++ examples,
.. sourcecode:: python
* ``example_name`` is the Python script to be run, and
* ``do_run`` is a condition under which to run the example.
(example_name, do_run)
where example_name is the Python script to be run and
do_run is a condition under which to run the example.
Note that the condition is a Python statement that can
depend on waf configuration variables. For example,
Again, the condition is a Python statement that can
depend on ``waf`` configuration variables. For example,
.. sourcecode:: python
("realtime-udp-echo.py", "ENABLE_REAL_TIME == False"),
If your new module has examples, then you must specify which of them
should be run in your
.. sourcecode:: text
Step 8 - Configure and Build
****************************
src/new-module/test/examples-to-run.py
file by modifying it with your text editor. These examples are run by
test.py.
Step 8 - Build and test your new module
***************************************
You can now build and test your module as normal. You must reconfigure
the project as a first step or else your new module will not be included
in the build.
You can now configure, build and test your module as normal.
You must reconfigure the project as a first step so that ``waf``
caches the new information in your ``wscript`` files,
or else your new module will not be included in the build.
.. sourcecode:: bash
@@ -339,9 +363,11 @@ in the build.
$ ./waf build
$ ./test.py
and look for your new module's test suite (and example programs, if enabled) in the test output.
Look for your new module's test suite (and example programs,
if your module has any enabled) in the test output.
Step 9 - Python bindings
Step 9 - Python Bindings
************************
Adding Python bindings to your module is optional, and the step is
+6 -6
View File
@@ -27,7 +27,7 @@ Object-oriented behavior
C++ objects, in general, provide common object-oriented capabilities
(abstraction, encapsulation, inheritance, and polymorphism) that are part
of classic object-oriented design. |ns3| objects make use of these
properties; for instance:::
properties; for instance::
class Address
{
@@ -130,7 +130,7 @@ holds true for |ns3| also, but some objects in the system have some additional
frameworks available. Specifically, reference counted objects are usually
allocated using a templated Create or CreateObject method, as follows.
For objects deriving from class :cpp:class:`Object`:::
For objects deriving from class :cpp:class:`Object`::
Ptr<WifiNetDevice> device = CreateObject<WifiNetDevice> ();
@@ -139,7 +139,7 @@ Please do not create such objects using ``operator new``; create them using
For objects deriving from class :cpp:class:`SimpleRefCount`, or other objects
that support usage of the smart pointer class, a templated helper function is
available and recommended to be used:::
available and recommended to be used::
Ptr<B> b = Create<B> ();
@@ -176,7 +176,7 @@ problems. This design is based on elements of the `Component Object Model
binary-level compatibility of replaceable components is not supported and we
have tried to simplify the syntax and impact on model developers.
Exmaples
Examples
********
Aggregation example
@@ -218,7 +218,7 @@ Consider a node pointer ``m_node`` that points to a Node object that has an
implementation of IPv4 previously aggregated to it. The client code wishes to
configure a default route. To do so, it must access an object within the node
that has an interface to the IP forwarding configuration. It performs the
following:::
following::
Ptr<Ipv4> ipv4 = m_node->GetObject<Ipv4> ();
@@ -281,7 +281,7 @@ to the subclass API?"
The answer to this is that in many situations, both techniques will work.
|ns3| provides a templated function for making the syntax of Object
dynamic casting much more user friendly:::
dynamic casting much more user friendly::
template <typename T1, typename T2>
Ptr<T1>
+1 -1
View File
@@ -312,4 +312,4 @@ The ``src/<module>/bindings`` directory may contain the following files, some of
More Information for Developers
*******************************
If you are a developer and need more information on |ns3|'s Python bindings, please see the `Python Bindings wiki page <http://www.nsnam.org/wiki/index.php/NS-3_Python_Bindings>`_.
If you are a developer and need more information on |ns3|'s Python bindings, please see the `Python Bindings wiki page <http://www.nsnam.org/wiki/NS-3_Python_Bindings>`_.
+36
View File
@@ -105,6 +105,41 @@ use a single RNG and streams and substreams from it.
.. _seeding-and-independent-replications:
Creating random variables
*************************
|ns3| supports a number of random variable objects from the base class
:cpp:class:`RandomVariableStream`. These objects derive from
:cpp:class:`ns3::Object` and are handled by smart pointers.
The correct way to create these objects is to use the templated
`CreateObject<>` method, such as:
::
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
then you can access values by calling methods on the object such as:
::
myRandomNo = x->GetInteger ();
If you try to instead do something like this:
::
myRandomNo = UniformRandomVariable().GetInteger ();
your program will encounter a segmentation fault, because the implementation
relies on some attribute construction that occurs only when `CreateObject`
is called.
Much of the rest of this chapter now discusses the properties of the
stream of pseudo-random numbers generated from such objects, and how to
control the seeding of such objects.
Seeding and independent replications
************************************
@@ -242,6 +277,7 @@ An example is in the propagation models for WifiNetDevice::
{
static TypeId tid = TypeId ("ns3::RandomPropagationDelayModel")
.SetParent<PropagationDelayModel> ()
.SetGroupName ("Propagation")
.AddConstructor<RandomPropagationDelayModel> ()
.AddAttribute ("Variable",
"The random variable which generates random delays (s).",
+1
View File
@@ -5,6 +5,7 @@ Support
new-models
new-modules
documentation
enable-modules
enable-tests
troubleshoot
+169 -168
View File
@@ -4,58 +4,51 @@
Testing framework
-----------------
ns-3 consists of a simulation core engine, a set of models, example programs,
|ns3| consists of a simulation core engine, a set of models, example programs,
and tests. Over time, new contributors contribute models, tests, and
examples. A Python test program ``test.py`` serves as the test
execution manager; ``test.py`` can run test code and examples to
look for regressions, can output the results into a number of forms, and
can manage code coverage analysis tools. On top of this, we layer
*Buildbots* that are automated build robots that perform
*buildslaves* that are automated build robots that perform
robustness testing by running the test framework on different systems
and with different configuration options.
BuildBots
*********
Buildslaves
***********
At the highest level of ns-3 testing are the buildbots (build robots).
At the highest level of |ns3| testing are the buildslaves (build robots).
If you are unfamiliar with
this system look at `<http://djmitche.github.com/buildbot/docs/0.7.11/>`_.
this system look at `<https://ns-buildmaster.ee.washington.edu:8010/>`_.
This is an open-source automated system that allows |ns3| to be rebuilt
and tested each time something has changed. By running the buildbots on a number
and tested daily. By running the buildbots on a number
of different systems we can ensure that |ns3| builds and executes
properly on all of its supported systems.
Users (and developers) typically will not interact with the buildbot system other
Users (and developers) typically will not interact with the buildslave system other
than to read its messages regarding test results. If a failure is detected in
one of the automated build and test jobs, the buildbot will send an email to the
*ns-developers* mailing list. This email will look something like
*ns-commits* mailing list. This email will look something like
.. sourcecode: text
The Buildbot has detected a new failure of osx-ppc-g++-4.2 on NsNam.
Full details are available at:
http://ns-regression.ee.washington.edu:8010/builders/osx-ppc-g%2B%2B-4.2/builds/0
Buildbot URL: http://ns-regression.ee.washington.edu:8010/
Buildslave for this Build: darwin-ppc
Build Reason: The web-page 'force build' button was pressed by 'ww': ww
Build Source Stamp: HEAD
Blamelist:
BUILD FAILED: failed shell_5 shell_6 shell_7 shell_8 shell_9 shell_10 shell_11 shell_12
sincerely,
-The Buildbot
[Ns-commits] Build failed in Jenkins: daily-ubuntu-without-valgrind » Ubuntu-64-15.04 #926
In the full details URL shown in the email, one can search for the keyword
``failed`` and select the ``stdio`` link for the corresponding step to see
the reason for the failure.
...
281 of 285 tests passed (281 passed, 3 skipped, 1 failed, 0 crashed, 0 valgrind errors)
List of SKIPped tests:
ns3-tcp-cwnd
ns3-tcp-interoperability
nsc-tcp-loss
List of FAILed tests:
random-variable-stream-generators
+ exit 1
Build step 'Execute shell' marked build as failure
The buildbot will do its job quietly if there are no errors, and the system will
undergo build and test cycles every day to verify that all is well.
In the full details URL shown in the email, one can find links to the detailed test output.
The buildslave system will do its job quietly if there are no errors, and the
system will undergo build and test cycles every day to verify that all is well.
Test.py
*******
@@ -73,7 +66,7 @@ have been built by doing the following
::
$ ./waf configure --enable-examples --enable-tests
$ ./waf
$ ./waf build
By default, ``test.py`` will run all available tests and report status
back in a very concise form. Running the command
@@ -90,7 +83,7 @@ indications followed by the kind of test that was run and its display name.
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
'build' finished successfully (0.939s)
FAIL: TestSuite ns3-wifi-propagation-loss-models
FAIL: TestSuite propagation-loss-model
PASS: TestSuite object-name-service
PASS: TestSuite pcap-file-object
PASS: TestSuite ns3-tcp-cwnd
@@ -120,6 +113,17 @@ if you run ``test.py --help`` you should see a command summary like:
-e EXAMPLE, --example=EXAMPLE
specify a single example to run (no relative path is
needed)
-d, --duration print the duration of each test suite and example
-e EXAMPLE, --example=EXAMPLE
specify a single example to run (no relative path is
needed)
-u, --update-data If examples use reference data files, get them to re-
generate them
-f FULLNESS, --fullness=FULLNESS
choose the duration of tests to run: QUICK, EXTENSIVE,
or TAKES_FOREVER, where EXTENSIVE includes QUICK and
TAKES_FOREVER includes QUICK and EXTENSIVE (only QUICK
tests are run by default)
-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
@@ -167,25 +171,25 @@ to be specified. Running the command
::
$ ./test.py --suite=ns3-wifi-propagation-loss-models
$ ./test.py --suite=propagation-loss-model
or equivalently
::
$ ./test.py -s ns3-wifi-propagation-loss-models
$ ./test.py -s propagation-loss-model
results in that single test suite being run.
.. sourcecode:: text
FAIL: TestSuite ns3-wifi-propagation-loss-models
FAIL: TestSuite propagation-loss-model
To find detailed information regarding the failure, one must specify the kind
of output desired. For example, most people will probably be interested in
a text file::
$ ./test.py --suite=ns3-wifi-propagation-loss-models --text=results.txt
$ ./test.py --suite=propagation-loss-model --text=results.txt
This will result in that single test suite being run with the test status written to
the file ''results.txt''.
@@ -194,7 +198,7 @@ You should find something similar to the following in that file
.. sourcecode:: text
FAIL: Test Suite ''ns3-wifi-propagation-loss-models'' (real 0.02 user 0.01 system 0.00)
FAIL: Test Suite ''propagation-loss-model'' (real 0.02 user 0.01 system 0.00)
PASS: Test Case "Check ... Friis ... model ..." (real 0.01 user 0.00 system 0.00)
FAIL: Test Case "Check ... Log Distance ... model" (real 0.01 user 0.01 system 0.00)
Details:
@@ -271,31 +275,39 @@ will result in a list of the test suite being displayed, similar to
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
'build' finished successfully (0.939s)
histogram
ns3-wifi-interference
ns3-tcp-cwnd
ns3-tcp-interoperability
sample
devices-mesh-flame
devices-mesh-dot11s
devices-mesh
Test Type Test Name
--------- ---------
performance many-uniform-random-variables-one-get-value-call
performance one-uniform-random-variable-many-get-value-calls
performance type-id-perf
system buildings-pathloss-test
system buildings-shadowing-test
system devices-mesh-dot11s-regression
system devices-mesh-flame-regression
system epc-gtpu
...
unit wimax-phy-layer
unit wimax-service-flow
unit wimax-ss-mac-layer
unit wimax-tlv
example adhoc-aloha-ideal-phy
example adhoc-aloha-ideal-phy-matrix-propagation-loss-model
example adhoc-aloha-ideal-phy-with-microwave-oven
example aodv
...
object-name-service
callback
attributes
config
global-value
command-line
basic-random-number
object
Any of these listed suites can be selected to be run by itself using the
``--suite`` option as shown above.
``--suite`` option as shown above. Examples are handled differently.
Similarly to test suites, one can run a single C++ example program
using the ``--example`` option. Note that the relative path for the
example does not need to be included and that the executables built
for C++ examples do not have extensions. Entering
for C++ examples do not have extensions. Furthermore, the example
must be registered as an example to the test framework; it is not
sufficient to create an example and run it through test.py; it must
be added to the relevant ``examples-to-run.py`` file, explained below.
Entering
::
@@ -307,7 +319,7 @@ results in that single example being run.
PASS: Example examples/udp/udp-echo
You can specify the directory where ns-3 was built using the
You can specify the directory where |ns3| was built using the
``--buildpath`` option as follows.
::
@@ -329,7 +341,7 @@ results in that single example being run.
PASS: Example examples/tutorial/first.py
Because Python examples are not built, you do not need to specify the
directory where ns-3 was built to run them.
directory where |ns3| was built to run them.
Normally when example programs are executed, they write a large amount of trace
file data. This is normally saved to the base directory of the distribution
@@ -358,12 +370,12 @@ will result in a list of the currently built test suites being displayed, simila
.. sourcecode:: text
ns3-wifi-propagation-loss-models
propagation-loss-model
ns3-tcp-cwnd
ns3-tcp-interoperability
pcap-file-object
pcap-file
object-name-service
random-number-generators
random-variable-stream-generators
Note the absence of the ``Waf`` build messages.
@@ -399,7 +411,7 @@ and examples. Select verbose in the following way::
$ ./test.py --verbose
All of these options can be mixed and matched. For example, to run all of the
ns-3 core test suites under valgrind, in verbose mode, while generating an HTML
|ns3| core test suites under valgrind, in verbose mode, while generating an HTML
output file, one would do::
$ ./test.py --verbose --grind --constrain=core --html=results.html
@@ -417,14 +429,32 @@ kinds of testing that need to be done.
* Examples
* Performance Tests
Moreover, each test is further classified according to the expected time needed to
run it. Tests are classified as:
* QUICK
* EXTENSIVE
* TAKES_FOREVER
Note that specifying EXTENSIVE fullness will also run tests in QUICK category.
Specifying TAKES_FOREVER will run tests in EXTENSIVE and QUICK categories.
By default, only QUICK tests are ran.
As a rule of thumb, tests that must be run to ensure |ns3| coherence should be
QUICK (i.e., take a few seconds). Tests that could be skipped, but are nice to do
can be EXTENSIVE; these are tests that typically need minutes. TAKES_FOREVER is
left for tests that take a really long time, in the order of several minutes.
The main classification goal is to be able to run the buildbots in a reasonable
time, and still be able to perform more extensive tests when needed.
BuildVerificationTests
++++++++++++++++++++++
These are relatively simple tests that are built along with the distribution
and are used to make sure that the build is pretty much working. Our
current unit tests live in the source files of the code they test and are
built into the ns-3 modules; and so fit the description of BVTs. BVTs live
in the same source code that is built into the ns-3 code. Our current tests
built into the |ns3| modules; and so fit the description of BVTs. BVTs live
in the same source code that is built into the |ns3| code. Our current tests
are examples of this kind of test.
Unit Tests
@@ -432,10 +462,10 @@ Unit Tests
Unit tests are more involved tests that go into detail to make sure that a
piece of code works as advertised in isolation. There is really no reason
for this kind of test to be built into an ns-3 module. It turns out, for
for this kind of test to be built into an |ns3| module. It turns out, for
example, that the unit tests for the object name service are about the same
size as the object name service code itself. Unit tests are tests that
check a single bit of functionality that are not built into the ns-3 code,
check a single bit of functionality that are not built into the |ns3| code,
but live in the same directory as the code it tests. It is possible that
these tests check integration of multiple implementation files in a module
as well. The file src/core/test/names-test-suite.cc is an example of this kind
@@ -451,11 +481,11 @@ have lots of this kind of test running in our current regression framework,
but they are typically overloaded examples. We provide a new place
for this kind of test in the directory ``src/test``. The file
src/test/ns3tcp/ns3-interop-test-suite.cc is an example of this kind of
test. It uses NSC TCP to test the ns-3 TCP implementation. Often there
test. It uses NSC TCP to test the |ns3| TCP implementation. Often there
will be test vectors required for this kind of test, and they are stored in
the directory where the test lives. For example,
ns3tcp-interop-response-vectors.pcap is a file consisting of a number of TCP
headers that are used as the expected responses of the ns-3 TCP under test
headers that are used as the expected responses of the |ns3| TCP under test
to a stimulus generated by the NSC TCP which is used as a ''known good''
implementation.
@@ -492,7 +522,7 @@ 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``
Then, build |ns3|, 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.
@@ -503,12 +533,19 @@ below, this ``test-runner`` can be a helpful way to debug tests.
Debugging Tests
***************
The debugging of the test programs is best performed running the low-level test-runner program. The test-runner is the bridge from generic Python code to |ns3| code. It is written in C++ and uses the automatic test discovery process in the
|ns3| code to find and allow execution of all of the various tests.
The debugging of the test programs is best performed running the low-level
test-runner program. The test-runner is the bridge from generic Python
code to |ns3| code. It is written in C++ and uses the automatic test
discovery process in the |ns3| code to find and allow execution of all
of the various tests.
The main reason why ``test.py`` is not suitable for debugging is that it is not allowed for logging to be turned on using the ``NS_LOG`` environmental variable when test.py runs. This limitation does not apply to the test-runner executable. Hence, if you want to see logging output from your tests, you have to run them using the test-runner directly.
The main reason why ``test.py`` is not suitable for debugging is that it is
not allowed for logging to be turned on using the ``NS_LOG`` environmental
variable when test.py runs. This limitation does not apply to the test-runner
executable. Hence, if you want to see logging output from your tests, you
have to run them using the test-runner directly.
In order to execute the test-runner, you run it like any other ns-3 executable
In order to execute the test-runner, you run it like any other |ns3| executable
-- using ``waf``. To get a list of available options, you can type::
$ ./waf --run "test-runner --help"
@@ -517,19 +554,35 @@ You should see something like the following
.. sourcecode:: text
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
'build' finished successfully (0.353s)
--assert: Tell tests to segfault (like assert) if an error is detected
--basedir=dir: Set the base directory (where to find src) to ''dir''
--tempdir=dir: Set the temporary directory (where to find data files) to ''dir''
--constrain=test-type: Constrain checks to test suites of type ''test-type''
--help: Print this message
--kinds: List all of the available kinds of tests
--list: List all of the test suites (optionally constrained by test-type)
--out=file-name: Set the test status output file to ''file-name''
--suite=suite-name: Run the test suite named ''suite-name''
--verbose: Turn on messages in the run test suites
Usage: /home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/utils/ns3-dev-test-runner-debug [OPTIONS]
Options:
--help : print these options
--print-test-name-list : print the list of names of tests available
--list : an alias for --print-test-name-list
--print-test-types : print the type of tests along with their names
--print-test-type-list : print the list of types of tests available
--print-temp-dir : print name of temporary directory before running
the tests
--test-type=TYPE : process only tests of type TYPE
--test-name=NAME : process only test whose name matches NAME
--suite=NAME : an alias (here for compatibility reasons only)
for --test-name=NAME
--assert-on-failure : when a test fails, crash immediately (useful
when running under a debugger
--stop-on-failure : when a test fails, stop immediately
--fullness=FULLNESS : choose the duration of tests to run: QUICK,
EXTENSIVE, or TAKES_FOREVER, where EXTENSIVE
includes QUICK and TAKES_FOREVER includes
QUICK and EXTENSIVE (only QUICK tests are
run by default)
--verbose : print details of test execution
--xml : format test run output as xml
--tempdir=DIR : set temp dir for tests to store output files
--datadir=DIR : set data dir for tests to read reference files
--out=FILE : send test result to FILE instead of standard output
--append=FILE : append test result to FILE instead of standard output
There are a number of things available to you which will be familiar to you if
you have looked at ``test.py``. This should be expected since the test-
@@ -539,7 +592,7 @@ the examples are really not |ns3| tests. ``test.py`` runs them
as if they were to present a unified testing environment, but they are really
completely different and not to be found here.
The first new option that appears here, but not in test.py is the ``--assert``
The first new option that appears here, but not in test.py is the ``--assert-on-failure``
option. This option is useful when debugging a test case when running under a
debugger like ``gdb``. When selected, this option tells the underlying
test case to cause a segmentation violation if an error is detected. This has
@@ -550,36 +603,23 @@ option something like,
::
$ ./waf shell
$ cd build/debug/utils
$ gdb test-runner
$ run --suite=global-value --assert
$ cd build/utils
$ gdb ns3-dev-test-runner-debug
$ run --suite=global-value --assert-on-failure
If an error is then found in the global-value test suite, a segfault would be
generated and the (source level) debugger would stop at the ``NS_TEST_ASSERT_MSG``
that detected the error.
Another new option that appears here is the ``--basedir`` option. It turns out
that some tests may need to reference the source directory of the |ns3|
distribution to find local data, so a base directory is always required to run
a test.
To run one of the tests directly from the test-runner
using ``waf``, you will need to specify the test suite to run.
So you could use the shell and do::
If you run a test from test.py, the Python program will provide the basedir
option for you. To run one of the tests directly from the test-runner
using ``waf``, you will need to specify the test suite to run along with
the base directory. So you could use the shell and do::
$ ./waf --run "test-runner --suite=pcap-file"
$ ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object"
|ns3| logging is available when you run it this way, such as:
Note the ''backward'' quotation marks on the ``pwd`` command.
If you are running the test suite out of a debugger, it can be quite painful
to remember and constantly type the absolute path of the distribution base
directory.
Because of this, if you omit the basedir, the test-runner will try to figure one
out for you. It begins in the current working directory and walks up the
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.
$ NS_LOG="Packet" ./waf --run "test-runner --suite=pcap-file"
Test output
+++++++++++
@@ -588,7 +628,7 @@ 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.
Just as in the basedir case, it can be annoying to continually have to provide
It can be annoying to continually have to provide
a ``--tempdir``, so the test runner will figure one out for you if you don't
provide one. It first looks for environment variables named ``TMP`` and
``TEMP`` and uses those. If neither ``TMP`` nor ``TEMP`` are defined
@@ -620,63 +660,15 @@ 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
returned something other than a zero exit code. To get some output from the
test, you need to specify an output file to which the tests will write their
XML status using the ``--out`` option. You need to be careful interpreting
the results because the test suites will *append* results onto this file.
When you run a test suite using the test-runner it will run the test
and report PASS or FAIL.
To run more quietly, you need to specify an output file to which the tests will write their status using the ``--out`` option.
Try,
::
$ ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object --out=myfile.xml"
$ ./waf --run "test-runner --suite=pcap-file --out=myfile.txt"
If you look at the file ``myfile.xml`` you should see something like,
.. sourcecode:: xml
<TestSuite>
<SuiteName>pcap-file-object</SuiteName>
<TestCase>
<CaseName>Check to see that PcapFile::Open with mode ''w'' works</CaseName>
<CaseResult>PASS</CaseResult>
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
</TestCase>
<TestCase>
<CaseName>Check to see that PcapFile::Open with mode ''r'' works</CaseName>
<CaseResult>PASS</CaseResult>
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
</TestCase>
<TestCase>
<CaseName>Check to see that PcapFile::Open with mode ''a'' works</CaseName>
<CaseResult>PASS</CaseResult>
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
</TestCase>
<TestCase>
<CaseName>Check to see that PcapFileHeader is managed correctly</CaseName>
<CaseResult>PASS</CaseResult>
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
</TestCase>
<TestCase>
<CaseName>Check to see that PcapRecordHeader is managed correctly</CaseName>
<CaseResult>PASS</CaseResult>
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
</TestCase>
<TestCase>
<CaseName>Check to see that PcapFile can read out a known good pcap file</CaseName>
<CaseResult>PASS</CaseResult>
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
</TestCase>
<SuiteResult>PASS</SuiteResult>
<SuiteTime>real 0.00 user 0.00 system 0.00</SuiteTime>
</TestSuite>
If you are familiar with XML this should be fairly self-explanatory. It is
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
+++++++++++++++++++++++++++++
@@ -702,8 +694,8 @@ arguments as needed, but basedir is the minimum needed)::
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`
(gdb) r --suite=
Starting program: <..>/build/utils/ns3-dev-test-runner-debug --suite=ns3-wifi-interference
[Thread debugging using libthread_db enabled]
assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0"
...
@@ -713,7 +705,7 @@ such as::
VALGR: TestSuite devices-mesh-dot11s-regression
$ ./waf --command-template="valgrind %s --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner
$ ./waf --command-template="valgrind %s --suite=devices-mesh-dot11s-regression" --run test-runner
Class TestRunner
****************
@@ -761,14 +753,21 @@ as a ''unit'' test with the display name, ``my-test-suite-name``.
MyTestSuite::MyTestSuite ()
: TestSuite ("my-test-suite-name", UNIT)
{
AddTestCase (new MyTestCase);
AddTestCase (new MyTestCase, TestCase::QUICK);
}
MyTestSuite myTestSuite;
static MyTestSuite myTestSuite;
The base class takes care of all of the registration and reporting required to
be a good citizen in the test framework.
Avoid putting initialization logic into the test suite or test case
constructors. This is
because an instance of the test suite is created at run time
(due to the static variable above) regardless of whether the test is being
run or not. Instead, the TestCase provides a virtual ``DoSetup`` method
that can be specialized to perform setup before ``DoRun`` is called.
Test Case
*********
@@ -778,13 +777,15 @@ Mixtures of these models may be used.
In order to create a new test case in the system, all one has to do is to inherit
from the ``TestCase`` base class, override the constructor to give the test
case a name and override the ``DoRun`` method to run the test.
case a name and override the ``DoRun`` method to run the test. Optionally,
override also the ``DoSetup`` method.
.. sourcecode:: cpp
class MyTestCase : public TestCase
{
MyTestCase ();
virtual void DoSetup (void);
virtual void DoRun (void);
};
+5 -10
View File
@@ -3,16 +3,11 @@
Overview
--------
This document is concerned with the testing and validation of |ns3| software.
This chapter is concerned with the testing and validation of |ns3| software.
This document provides
This chapter provides
* background about terminology and software testing (Chapter 2);
* a description of the ns-3 testing framework (Chapter 3);
* a guide to model developers or new model contributors for how to write tests (Chapter 4);
* background about terminology and software testing
* a description of the ns-3 testing framework
* a guide to model developers or new model contributors for how to write tests
In brief, the first three chapters should be read by ns developers and
contributors who need to understand how to contribute test code and
validated programs, and
the remainder of the document provides space for people to report on what
aspects of selected models have been validated.
+10 -10
View File
@@ -244,7 +244,7 @@ provided.
The first thing to do is to read the path backward. The last segment of the path
must be an ``Attribute`` of an ``Object``. In fact, if you had a pointer to the
``Object`` that has the "CongestionWindow" ``Attribute`` handy (call it
``theObject``), you could write this just like the previous example:::
``theObject``), you could write this just like the previous example::
void CwndTracer (uint32_t oldval, uint32_t newval) {}
@@ -314,7 +314,7 @@ different trace events and writing them to files. In previous sections,
primarily "Building Topologies," we have seen several varieties of the trace
helper methods designed for use inside other (device) helpers.
Perhaps you will recall seeing some of these variations:::
Perhaps you will recall seeing some of these variations::
pointToPoint.EnablePcapAll ("second");
pointToPoint.EnablePcap ("second", p2pNodes.Get (0)->GetId (), 0);
@@ -509,7 +509,7 @@ enable pcap tracing on a single device.
For example, in order to arrange for a device helper to create a single
promiscuous pcap capture file of a specific name (``my-pcap-file.pcap``) on a
given device, one could:::
given device, one could::
Ptr<NetDevice> nd;
...
@@ -600,7 +600,7 @@ suffix ".tr" instead of ".pcap".
If you want to enable ascii tracing on more than one net device and have all
traces sent to a single file, you can do that as well by using an object to
refer to a single file:::
refer to a single file::
Ptr<NetDevice> nd1;
Ptr<NetDevice> nd2;
@@ -632,7 +632,7 @@ belong to exactly one ``Node``. For example,::
This would result in two files named ``prefix-client-eth0.tr`` and
``prefix-server-eth0.tr`` with traces for each device in the respective trace
file. Since all of the EnableAscii functions are overloaded to take a stream
wrapper, you can use that form as well:::
wrapper, you can use that form as well::
Names::Add ("client" ...);
Names::Add ("client/eth0" ...);
@@ -660,7 +660,7 @@ since the found net device must belong to exactly one ``Node``. For example,::
This would result in a number of ascii trace files being created, each of which
follows the <prefix>-<node id>-<device id>.tr convention. Combining all of the
traces into a single file is accomplished similarly to the examples above:::
traces into a single file is accomplished similarly to the examples above::
NetDeviceContainer d = ...;
...
@@ -768,7 +768,7 @@ and ``NetDevice``- centric versions of the device versions. Instead of
``Node`` and ``NetDevice`` pair constraints, we use protocol and interface
constraints.
Note that just like in the device version, there are six methods:::
Note that just like in the device version, there are six methods::
void EnablePcapIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface);
void EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface);
@@ -948,7 +948,7 @@ suffix ".tr" instead of ".pcap".
If you want to enable ascii tracing on more than one interface and have all
traces sent to a single file, you can do that as well by using an object to
refer to a single file. We have already something similar to this in the "cwnd"
example above:::
example above::
Ptr<Ipv4> protocol1 = node1->GetObject<Ipv4> ();
Ptr<Ipv4> protocol2 = node2->GetObject<Ipv4> ();
@@ -978,7 +978,7 @@ between protocol instances and nodes, For example,::
This would result in two files named "prefix-nnode1Ipv4-i1.tr" and
"prefix-nnode2Ipv4-i1.tr" with traces for each interface in the respective
trace file. Since all of the EnableAscii functions are overloaded to take a
stream wrapper, you can use that form as well:::
stream wrapper, you can use that form as well::
Names::Add ("node1Ipv4" ...);
Names::Add ("node2Ipv4" ...);
@@ -1011,7 +1011,7 @@ one-to-one correspondence between each protocol and its node. For example,::
This would result in a number of ascii trace files being created, each of which
follows the <prefix>-n<node id>-i<interface>.tr convention. Combining all of the
traces into a single file is accomplished similarly to the examples above:::
traces into a single file is accomplished similarly to the examples above::
NodeContainer nodes;
...
+2 -2
View File
@@ -8,7 +8,7 @@ This chapter posts some information about possibly common errors in building
or running |ns3| programs.
Please note that the wiki
(`<http://www.nsnam.org/wiki/index.php/Troubleshooting>`_) may have contributed
(`<http://www.nsnam.org/wiki/Troubleshooting>`_) may have contributed
items.
Build errors
@@ -21,7 +21,7 @@ Sometimes, errors can occur with a program after a successful build. These are
run-time errors, and can commonly occur when memory is corrupted or pointer
values are unexpectedly null.
Here is an example of what might occur:::
Here is an example of what might occur::
$ ./waf --run tcp-point-to-point
Entering directory '/home/tomh/ns-3-nsc/build'
+148 -41
View File
@@ -38,7 +38,7 @@ SOURCES = \
$(SRC)/energy/doc/energy.rst \
$(SRC)/fd-net-device/doc/fd-net-device.rst \
$(SRC)/tap-bridge/doc/tap.rst \
$(SRC)/mesh/doc/mesh.rst \
$(SRC)/mesh/doc/source/mesh.rst \
$(SRC)/lte/doc/source/lte.rst \
$(SRC)/lte/doc/source/lte-user.rst \
$(SRC)/lte/doc/source/lte-design.rst \
@@ -57,18 +57,33 @@ SOURCES = \
$(SRC)/internet/doc/ipv6.rst \
$(SRC)/internet/doc/routing-overview.rst \
$(SRC)/internet/doc/tcp.rst \
$(SRC)/internet/doc/codel.rst \
$(SRC)/mobility/doc/mobility.rst \
$(SRC)/olsr/doc/olsr.rst \
$(SRC)/openflow/doc/openflow-switch.rst \
$(SRC)/point-to-point/doc/point-to-point.rst \
$(SRC)/wifi/doc/wifi.rst \
$(SRC)/wifi/doc/source/wifi.rst \
$(SRC)/wifi/doc/source/wifi-design.rst \
$(SRC)/wifi/doc/source/wifi-user.rst \
$(SRC)/wifi/doc/source/wifi-testing.rst \
$(SRC)/wifi/doc/source/wifi-references.rst \
$(SRC)/wimax/doc/wimax.rst \
$(SRC)/uan/doc/uan.rst \
$(SRC)/topology-read/doc/topology.rst \
$(SRC)/spectrum/doc/spectrum.rst \
$(SRC)/stats/doc/statistics.rst \
$(SRC)/stats/doc/adaptor.rst \
$(SRC)/stats/doc/aggregator.rst \
$(SRC)/stats/doc/collector.rst \
$(SRC)/stats/doc/data-collection-helpers.rst \
$(SRC)/stats/doc/data-collection-overview.rst \
$(SRC)/stats/doc/data-collection.rst \
$(SRC)/stats/doc/probe.rst \
$(SRC)/stats/doc/scope-and-limitations.rst \
$(SRC)/netanim/doc/animation.rst \
$(SRC)/flow-monitor/doc/flow-monitor.rst \
$(SRC)/wave/doc/wave.rst \
$(SRC)/sixlowpan/doc/sixlowpan.rst \
$(SRC)/lr-wpan/doc/lr-wpan.rst \
# list all model library figure files that need to be copied to
# $SOURCETEMP/figures. For each figure to be included in all
@@ -88,8 +103,8 @@ SOURCEFIGS = \
$(SRC)/internet/doc/internet-node-recv.dia \
$(SRC)/internet/doc/routing.dia \
$(SRC)/internet/doc/routing-specialization.dia \
$(SRC)/wifi/doc/WifiArchitecture.dia \
$(SRC)/wifi/doc/snir.dia \
$(SRC)/wifi/doc/source/figures/WifiArchitecture.dia \
$(SRC)/wifi/doc/source/figures/snir.dia \
$(SRC)/wimax/doc/WimaxArchitecture.dia \
$(SRC)/lte/doc/source/figures/epc-ctrl-arch.dia \
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
@@ -106,12 +121,20 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/lte-arch-ue-ctrl.dia \
$(SRC)/lte/doc/source/figures/lte-enb-phy.dia \
$(SRC)/lte/doc/source/figures/lte-ue-phy.dia \
$(SRC)/lte/doc/source/figures/lte-epc-x2-handover-seq-diagram.dia \
$(SRC)/lte/doc/source/figures/lte-epc-e2e-data-protocol-stack.dia \
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
$(SRC)/lte/doc/source/figures/lte-subframe-structure.dia \
$(SRC)/lte/doc/source/figures/lte-epc-x2-interface.dia \
$(SRC)/lte/doc/source/figures/lte-harq-architecture.dia \
$(SRC)/lte/doc/source/figures/lte-harq-processes-scheme.dia \
$(SRC)/lte/doc/source/figures/ue-meas-consumer.dia \
$(SRC)/lte/doc/source/figures/ue-meas-piecewise-motion.dia \
$(SRC)/lte/doc/source/figures/ue-meas-piecewise-a1.dia \
$(SRC)/lte/doc/source/figures/ue-meas-piecewise-a1-hys.dia \
$(SRC)/lte/doc/source/figures/lte-cell-selection-timeline.dia \
$(SRC)/lte/doc/source/figures/lte-cell-selection-scenario.dia \
$(SRC)/lte/doc/source/figures/lte-handover-target-scenario.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 \
@@ -123,13 +146,13 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/epcSimulationTime.eps \
$(SRC)/lte/doc/source/figures/epcEutranRunningTime.eps \
$(SRC)/lte/doc/source/figures/profiling-memory.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-implementation-model.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-dl.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-dl.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-ul.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.eps \
$(SRC)/lte/doc/source/figures/lte-epc-x2-handover-seq-diagram.eps \
$(SRC)/lte/doc/source/figures/lte-epc-x2-entity-saps.eps \
$(SRC)/lte/doc/source/figures/lte-rlc-implementation-model.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-dl.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-dl.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-ul.dia \
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.dia \
$(SRC)/lte/doc/source/figures/lte-epc-x2-entity-saps.dia \
$(SRC)/lte/doc/source/figures/lte-strongest-cell-handover-algorithm.eps \
$(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \
$(SRC)/lte/doc/source/figures/lte-phy-interference.png \
$(SRC)/lte/doc/source/figures/helpers.pdf \
@@ -150,14 +173,30 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/lte-enb-rrc-states.png \
$(SRC)/lte/doc/source/figures/lte-ue-rrc-states.pdf \
$(SRC)/lte/doc/source/figures/lte-ue-rrc-states.png \
$(SRC)/lte/doc/source/figures/lte-handover-algorithm.pdf \
$(SRC)/lte/doc/source/figures/lte-handover-algorithm.png \
$(SRC)/lte/doc/source/figures/fading_pedestrian.pdf \
$(SRC)/lte/doc/source/figures/fading_pedestrian.png \
$(SRC)/lte/doc/source/figures/fading_vehicular.pdf \
$(SRC)/lte/doc/source/figures/fading_vehicular.png \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.pdf \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \
$(SRC)/lte/doc/source/figures/fr-enhanced-fractional-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-full-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-hard-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-soft-fractional-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v1.dia \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v2.dia \
$(SRC)/lte/doc/source/figures/fr-strict-frequency-reuse-scheme.dia \
$(SRC)/lte/doc/source/figures/ffr-distributed-scheme.dia \
$(SRC)/lte/doc/source/figures/lte-fr-soft-1-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-soft-1-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-ffr-soft-2-spectrum-trace.png \
$(SRC)/lte/doc/source/figures/lte-ffr-soft-2-spectrum-trace.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-1-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-1-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-2-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-2-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-3-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-3-rem.pdf \
$(SRC)/lte/doc/source/figures/MCS_1_4.pdf \
$(SRC)/lte/doc/source/figures/MCS_1_4.png \
$(SRC)/lte/doc/source/figures/MCS_5_8.pdf \
@@ -182,31 +221,48 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/MCS_16_test.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
$(SRC)/lte/doc/source/figures/lte-dl-power-control.dia \
$(SRC)/lte/doc/source/figures/lte-ffr-scheduling.dia \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.png \
$(SRC)/lte/doc/source/figures/lte-legacy-handover-algorithm.pdf \
$(SRC)/lte/doc/source/figures/lte-legacy-handover-algorithm.png \
$(SRC)/uan/doc/auvmobility-classes.dia \
$(SRC)/stats/doc/Stat-framework-arch.png \
$(SRC)/stats/doc/Wifi-default.png \
$(SRC)/netanim/doc/figures/Dumbbell.png \
$(SRC)/netanim/doc/figures/Dumbbell.pdf \
$(SRC)/stats/doc/dcf-overview.dia \
$(SRC)/stats/doc/dcf-overview-with-aggregation.dia \
$(SRC)/stats/doc/file-example.png \
$(SRC)/stats/doc/gnuplot-aggregator.png \
$(SRC)/stats/doc/gnuplot-example.png \
$(SRC)/stats/doc/gnuplot-helper-example.png \
$(SRC)/stats/doc/seventh-packet-byte-count.png \
$(SRC)/netanim/doc/figures/PacketStatistics.png \
$(SRC)/netanim/doc/figures/PacketStatistics.pdf \
$(SRC)/netanim/doc/figures/FastForward.png \
$(SRC)/netanim/doc/figures/FastForward.pdf \
$(SRC)/netanim/doc/figures/Wireless.png \
$(SRC)/netanim/doc/figures/Wireless.pdf \
$(SRC)/netanim/doc/figures/Precision.png \
$(SRC)/netanim/doc/figures/Precision.pdf \
$(SRC)/netanim/doc/figures/Persist.png \
$(SRC)/netanim/doc/figures/Persist.pdf \
$(SRC)/netanim/doc/figures/SimTime.png \
$(SRC)/netanim/doc/figures/SimTime.pdf \
$(SRC)/netanim/doc/figures/NetAnim_3_105.png \
$(SRC)/netanim/doc/figures/NetAnim_3_105.pdf \
$(SRC)/netanim/doc/figures/Trajectory.png \
$(SRC)/netanim/doc/figures/Trajectory.pdf \
$(SRC)/netanim/doc/figures/UpdateRateInterval.png \
$(SRC)/netanim/doc/figures/UpdateRateInterval.pdf \
$(SRC)/netanim/doc/figures/WithoutPrecision.png \
$(SRC)/netanim/doc/figures/WithoutPrecision.pdf \
$(SRC)/netanim/doc/figures/WithPrecision.png \
$(SRC)/netanim/doc/figures/WithPrecision.pdf \
$(SRC)/netanim/doc/figures/NodeCountersChart.png \
$(SRC)/netanim/doc/figures/NodeCountersChart.pdf \
$(SRC)/netanim/doc/figures/NodeCountersTable.png \
$(SRC)/netanim/doc/figures/NodeCountersTable.pdf \
$(SRC)/netanim/doc/figures/RoutingTables.png \
$(SRC)/netanim/doc/figures/RoutingTables.pdf \
$(SRC)/netanim/doc/figures/PacketTimeline.png \
$(SRC)/netanim/doc/figures/PacketTimeline.pdf \
$(SRC)/spectrum/doc/spectrum-channel-phy-interface.png \
$(SRC)/spectrum/doc/spectrum-channel-phy-interface.pdf \
$(SRC)/spectrum/doc/spectrum-analyzer-example.eps \
$(SRC)/spectrum/doc/spectrum-tv-rand-geo-points.eps \
$(SRC)/spectrum/doc/spectrum-tv-8vsb.png \
$(SRC)/spectrum/doc/spectrum-tv-cofdm.png \
$(SRC)/lr-wpan/doc/lr-wpan-arch.dia \
$(SRC)/lr-wpan/doc/lr-wpan-data-example.dia \
$(SRC)/lr-wpan/doc/lr-wpan-primitives.dia \
$(SRC)/lr-wpan/doc/802-15-4-ber.eps \
$(SRC)/lr-wpan/doc/802-15-4-per-sens.eps \
$(SRC)/lr-wpan/doc/802-15-4-psr-distance.eps
# specify figures from which .png and .pdf figures need to be
# generated (all dia and eps figures)
@@ -225,6 +281,8 @@ IMAGES_EPS = \
$(FIGURES)/WifiArchitecture.eps \
$(FIGURES)/snir.eps \
$(FIGURES)/WimaxArchitecture.eps \
$(FIGURES)/dcf-overview.eps \
$(FIGURES)/dcf-overview-with-aggregation.eps \
$(FIGURES)/epc-ctrl-arch.eps \
$(FIGURES)/epc-data-flow-dl.eps \
$(FIGURES)/epc-data-flow-ul.eps \
@@ -234,6 +292,16 @@ IMAGES_EPS = \
$(FIGURES)/eutran-profiling-scenario.eps \
$(FIGURES)/ff-example.eps \
$(FIGURES)/ff-mac-saps.eps \
$(FIGURES)/lte-dl-power-control.eps \
$(FIGURES)/lte-ffr-scheduling.eps \
$(FIGURES)/fr-enhanced-fractional-frequency-reuse-scheme.eps \
$(FIGURES)/fr-full-frequency-reuse-scheme.eps \
$(FIGURES)/fr-hard-frequency-reuse-scheme.eps \
$(FIGURES)/fr-soft-fractional-frequency-reuse-scheme.eps \
$(FIGURES)/fr-soft-frequency-reuse-scheme-v1.eps \
$(FIGURES)/fr-soft-frequency-reuse-scheme-v2.eps \
$(FIGURES)/fr-strict-frequency-reuse-scheme.eps \
$(FIGURES)/ffr-distributed-scheme.eps \
$(FIGURES)/lte-arch-enb-data.eps \
$(FIGURES)/lte-arch-enb-ctrl.eps \
$(FIGURES)/lte-arch-ue-data.eps \
@@ -246,6 +314,13 @@ IMAGES_EPS = \
$(FIGURES)/lte-epc-x2-interface.eps \
$(FIGURES)/lte-harq-architecture.eps \
$(FIGURES)/lte-harq-processes-scheme.eps \
$(FIGURES)/ue-meas-consumer.eps \
$(FIGURES)/ue-meas-piecewise-motion.eps \
$(FIGURES)/ue-meas-piecewise-a1.eps \
$(FIGURES)/ue-meas-piecewise-a1-hys.eps \
$(FIGURES)/lte-cell-selection-timeline.eps \
$(FIGURES)/lte-cell-selection-scenario.eps \
$(FIGURES)/lte-handover-target-scenario.eps \
$(FIGURES)/lena-dual-stripe.eps \
$(FIGURES)/lte-mcs-index.eps \
$(FIGURES)/lenaThrTestCase1.eps \
@@ -264,7 +339,16 @@ IMAGES_EPS = \
$(FIGURES)/lte-rlc-data-retx-ul.eps \
$(FIGURES)/lte-epc-x2-handover-seq-diagram.eps \
$(FIGURES)/lte-epc-x2-entity-saps.eps \
$(FIGURES)/lte-strongest-cell-handover-algorithm.eps \
$(FIGURES)/auvmobility-classes.eps \
$(FIGURES)/spectrum-analyzer-example.eps \
$(FIGURES)/spectrum-tv-rand-geo-points.eps \
$(FIGURES)/lr-wpan-primitives.eps \
$(FIGURES)/lr-wpan-data-example.eps \
$(FIGURES)/lr-wpan-arch.eps \
$(FIGURES)/802-15-4-ber.eps \
$(FIGURES)/802-15-4-per-sens.eps \
$(FIGURES)/802-15-4-psr-distance.eps
# rescale pdf figures as necessary
$(FIGURES)/testbed.pdf_width = 5in
@@ -287,6 +371,16 @@ $(FIGURES)/lte-arch-data-rrc-pdcp-rlc.pdf_width = 3in
$(FIGURES)/lte-epc-e2e-data-protocol-stack.pdf_width = 15cm
$(FIGURES)/ff-mac-saps.pdf_width = 5in
$(FIGURES)/ff-example.pdf_width = 5in
$(FIGURES)/lte-dl-power-control.pdf_width = 8cm
$(FIGURES)/lte-ffr-scheduling.pdf_width = 8cm
$(FIGURES)/fr-enhanced-fractional-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-full-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-hard-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-soft-fractional-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/fr-soft-frequency-reuse-scheme-v1.pdf_width = 8cm
$(FIGURES)/fr-soft-frequency-reuse-scheme-v2.pdf_width = 8cm
$(FIGURES)/fr-strict-frequency-reuse-scheme.pdf_width = 8cm
$(FIGURES)/ffr-distributed-scheme.pdf_width = 8cm
$(FIGURES)/lte-arch-enb-data.pdf_width = 6cm
$(FIGURES)/lte-arch-enb-ctrl.pdf_width = 10cm
$(FIGURES)/lte-arch-ue-data.pdf_width = 6cm
@@ -294,15 +388,19 @@ $(FIGURES)/lte-arch-ue-ctrl.pdf_width = 10cm
$(FIGURES)/lte-rlc-implementation-model.pdf_width = 20in
$(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-retx-dl.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm
$(FIGURES)/lte-epc-x2-entity-saps.pdf_width = 12cm
$(FIGURES)/lte-phy-interference.pdf_width = 12cm
$(FIGURES)/lte-subframe-structure.pdf_width = 2in
$(FIGURES)/mac-random-access-contention.pdf_width = 10cm
$(FIGURES)/mac-random-access-noncontention.pdf_width = 15cm
$(FIGURES)/lte-ue-rrc-states.pdf_width = 7cm
$(FIGURES)/lte-handover-algorithm.pdf_width = 10cm
$(FIGURES)/helpers.pdf_width = 8cm
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
$(FIGURES)/spectrum-analyzer-example.pdf_width = 15cm
$(FIGURES)/spectrum-tv-rand-geo-points.pdf_width = 8cm
$(FIGURES)/lr-wpan-primitives.pdf_width = 3in
$(FIGURES)/lr-wpan-arch.pdf_width = 2in
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
@@ -311,11 +409,21 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
RESCALE = ../../utils/rescale-pdf.sh
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.eps; $(CONVERT) $< $@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
# You can set these variables from the command line.
@@ -353,11 +461,10 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
copy-sources: $(SOURCES)
@rm -rf $(SOURCETEMP)
@mkdir -p $(SOURCETEMP)
@mkdir -p $(FIGURES)
@cp -r $(SOURCES) $(SOURCETEMP)
@cp -r $(SOURCEFIGS) $(FIGURES)
@cp -r -p $(SOURCES) $(SOURCETEMP)
@cp -r -p $(SOURCEFIGS) $(FIGURES)
clean:
-rm -rf $(BUILDDIR)/*
+1 -2
View File
@@ -18,8 +18,7 @@ any combination of simulated or emulated devices.
**Note:** Prior to ns-3.17, the emulation capability was provided by a
special device called an ``Emu`` NetDevice; the ``Emu`` NetDevice has
been superseded by the ``FdNetDevice``, and will be deprecated and removed
in future revisions of |ns3|.
been replaced by the ``FdNetDevice``.
One of the use-cases we want to support is that of a testbed. A concrete example
of an environment of this kind is the ORBIT testbed. ORBIT is a laboratory
+7 -3
View File
@@ -8,13 +8,13 @@ available in five forms:
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentation of the public APIs of the simulator
* Tutorial, Manual, and Model Library *(this document)* for the `latest release <http://www.nsnam.org/documentation/latest/>`_ and `development tree <http://www.nsnam.org/ns-3-dev/documentation/>`_
* `ns-3 wiki <http://www.nsnam.org/wiki/index.php/Main_Page>`_
* `ns-3 wiki <http://www.nsnam.org/wiki>`_
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/models`` directory of ns-3's source code.
.. toctree::
:maxdepth: 2
:maxdepth: 1
organization
animation
@@ -26,12 +26,14 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
buildings
click
csma
data-collection
dsdv
dsr
emulation-overview
energy
flow-monitor
internet-models
lr-wpan
lte
mesh
distributed
@@ -41,8 +43,10 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
openflow-switch
point-to-point
propagation
statistics
spectrum
sixlowpan
topology
uan
wave
wifi
wimax
+1
View File
@@ -8,3 +8,4 @@ Internet Models
ipv6
routing-overview
tcp
codel
+7 -1
View File
@@ -34,7 +34,13 @@ Finally, additional documentation about various aspects of |ns3| may
exist on the `project wiki <http://www.nsnam.org/wiki>`_.
A sample outline of how to write model library documentation can be
found in :mod:`src/template/doc`.
found by executing the ``create-module.py`` program and looking at the
template created in the file ``new-module/doc/new-module.rst``.
.. sourcecode:: bash
$ cd src
$ ./create-module.py new-module
The remainder of this document is organized alphabetically by module name.
+25 -16
View File
@@ -1,33 +1,42 @@
/**
* @anchor modules_anchor
*
* @defgroup constructs Introspected Lists
* \brief These are lists of useful items found by examining the type system.
*
* @defgroup constants Constants
* @brief Constants you can change
*
* @defgroup utils Utils
* @brief The utils directory is for various programs and scripts related
* to code coverage, test suites, style checking, and benchmarking.
*
*/
/**
* @defgroup core Core
* \brief The "core" module contains:
* - a time management class to hold a time and convert between various time units: ns3::Time
* - a scheduler base class used to implement new simulation event schedulers:
* - a time management class to hold a time and convert between various
* time units: ns3::Time
* - a scheduler base class used to implement new simulation event
* schedulers:
* ns3::Scheduler and ns3::SchedulerFactory
* - a simulator class used to create, schedule and cancel events: ns3::Simulator
* - a simulator class used to create, schedule and cancel events:
* ns3::Simulator
* - a Functor class: ns3::Callback
* - an os-independent interface to get access to the elapsed wall clock time: ns3::SystemWallClockMs
* - a class to register regression tests with the test manager: ns3::Test and ns3::TestManager
* - debugging facilities: \ref logging, \ref assert
* - an os-independent interface to get access to the elapsed wall clock
* time: ns3::SystemWallClockMs
* - a class to register regression tests with the test manager: ns3::Test
* and ns3::TestManager
* - debugging facilities: \ref debugging
* - \ref randomvariable
* - a base class for objects which need to support per-instance "attributes" and
* trace sources: ns3::ObjectBase
* - a base class for objects which need to support per-instance
* "attributes" and trace sources: ns3::ObjectBase
* - a base class for objects which need to support reference counting
* and dynamic object aggregation: ns3::Object
* - a smart-pointer class ns3::Ptr designed to work together with ns3::Object
* - a configuration class used to set and control all attributes and trace sources
* in a simulation: ns3::Config.
*
* - a smart-pointer class ns3::Ptr designed to work together with
* ns3::Object
* - a configuration class used to set and control all attributes and
* trace sources in a simulation: ns3::Config.
*/
/**
* @ingroup core
* @defgroup debugging Debugging tools
*
* @brief Assertions, breakpoints, logging, and abnormal program termination
*/
+6 -5
View File
@@ -21,7 +21,7 @@
# 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
# a. We're on nsnam.org (actually, nsnam-www.coe-hosted.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.)
@@ -71,6 +71,7 @@ EOF
# script arguments
say
say using doxygen: $(which doxygen) $(doxygen --version)
public=0
nsnam=0
daily=0
@@ -91,9 +92,9 @@ while getopts :pndth option ; do
esac
done
# Hostname, fully qualified, e.g. nsnam.ece.gatech.edu
# Hostname, fully qualified, e.g. nsnam-www.coe-hosted.gatech.edu
HOST=`hostname`
NSNAM="nsnam.ece.gatech.edu"
NSNAM="nsnam-www.coe-hosted.gatech.edu"
# Build directory
DAILY="^/tmp/daily-nsnam/"
@@ -151,7 +152,7 @@ elif [ $tag -eq 1 ]; then
else
version=`hg log -r tip --template '{node|short}'`
# Check for uncommitted changes
hg summary | grep -q 'commit: (clean)'
hg summary | grep 'commit:' | grep -q '(clean)'
if [ ! $? ] ; then
say "beyond latest tag, last commit: $version, dirty"
dirty="(+)"
@@ -212,4 +213,4 @@ cd - 2>&1 >/dev/null
say
say "outf = $outf:"
cat -n $outf
say Done.
say Done.
+4
View File
@@ -1,3 +1,7 @@
<!-- ns-3 doxygen header, based on
HTML header for doxygen 1.8.3.1
Verified compatible with 1.8.6
-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+16 -11
View File
@@ -1,18 +1,23 @@
<!-- ns-3 doxygen header, based on
HTML header for doxygen 1.8.3.1
Verified compatible with 1.8.6
-->
<!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>
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--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"/>
<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^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
<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>
@@ -99,7 +104,7 @@ $mathjax
</tr>
</tbody>
</table>
<script type="text/javascript">ns3_write_links()</script>
<script type="text/javascript">ns3_write_links();</script>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -190,7 +190,7 @@ div.sphinxsidebar a {
#ns3-menu .menu div {
background: #94A901;
background-size: 100%; 100%
background-size: 100%;
color:#ffffff;
position: absolute;
visibility: hidden;
+3
View File
@@ -144,6 +144,9 @@ preparing the documentation
2. Check if these new files are available on the website
3. In ns-3-dev, edit the tutorial "Getting Started" page to
update the release version numbers.
preparing the Wordpress-based main website
------------------------------------------
+16 -3
View File
@@ -27,9 +27,22 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.NOTPARALLEL:
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
help:
@echo "Please use \`make <target>' where <target> is one of"
@@ -30,9 +30,9 @@ Baixando o ns-3
present on your system before proceeding. |ns3| provides a wiki
for your reading pleasure that includes pages with many useful hints and tips.
One such page is the "Installation" page,
http://www.nsnam.org/wiki/index.php/Installation.
http://www.nsnam.org/wiki/Installation.
O |ns3|, como um todo, é bastante complexo e possui várias dependências. Isto também é verdade para as ferramentas que fornecem suporte ao |ns3| (exemplos, `"GNU toolchain"`, Mercurial e um editor para a programação), desta forma é necessário assegurar que várias bibliotecas estejam presentes no sistema. O |ns3| fornece um Wiki com várias dicas sobre o sistema. Uma das páginas do Wiki é a página de instalação (`"Installation"`) que está disponível em: http://www.nsnam.org/wiki/index.php/Installation.
O |ns3|, como um todo, é bastante complexo e possui várias dependências. Isto também é verdade para as ferramentas que fornecem suporte ao |ns3| (exemplos, `"GNU toolchain"`, Mercurial e um editor para a programação), desta forma é necessário assegurar que várias bibliotecas estejam presentes no sistema. O |ns3| fornece um Wiki com várias dicas sobre o sistema. Uma das páginas do Wiki é a página de instalação (`"Installation"`) que está disponível em: http://www.nsnam.org/wiki/Installation.
..
The "Prerequisites" section of this wiki page explains which packages are
@@ -740,7 +740,7 @@ Agora, ao executar o programa ``hello-simulator`` devemos ter a seguinte a sa
..
If you want to run programs under another tool such as gdb or valgrind,
see this `wiki entry
<http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.
<http://www.nsnam.org/wiki/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.
Se o leitor for executar seus programas sob outras ferramentas, tais como Gdb ou Valgrind, é recomendável que leia a seguinte `entrada no Wiki <http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.
Se o leitor for executar seus programas sob outras ferramentas, tais como Gdb ou Valgrind, é recomendável que leia a seguinte `entrada no Wiki <http://www.nsnam.org/wiki/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.
+1 -1
View File
@@ -30,7 +30,7 @@ Este
* Tutorial *(este documento)*, manual, modelos de bibliotecas para a `última release <http://www.nsnam.org/documentation/latest/>`_ e `árvore de desenvolvimento <http://www.nsnam.org/ns-3-dev/documentation/>`_;
* `ns-3 wiki <http://www.nsnam.org/wiki/index.php/Main_Page>`_.
* `ns-3 wiki <http://www.nsnam.org/wiki/Main_Page>`_.
..
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
+3 -3
View File
@@ -132,15 +132,15 @@ O |ns3|
* Licença de código aberto compatível com GNU GPLv2;
* `Wiki <http://www.nsnam.org/wiki/index.php>`_;
* `Wiki <http://www.nsnam.org/wiki>`_;
..
* `Contributed Code
<http://www.nsnam.org/wiki/index.php/Contributed_Code>`_ page, similar to ns-2's popular Contributed Code
<http://www.nsnam.org/wiki/Contributed_Code>`_ page, similar to ns-2's popular Contributed Code
`page
<http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_
* Página para `contribuição com o código <http://www.nsnam.org/wiki/index.php/Contributed_Code>`_, similar a página de contribuição do `ns-2 <http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_;
* Página para `contribuição com o código <http://www.nsnam.org/wiki/Contributed_Code>`_, similar a página de contribuição do `ns-2 <http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_;
..
* Open `bug tracker
+16 -3
View File
@@ -27,9 +27,22 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.NOTPARALLEL:
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null
%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null
%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null
%.pdf : %.eps
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
help:
@echo "Please use \`make <target>' where <target> is one of"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

+100 -94
View File
@@ -1,6 +1,8 @@
.. include:: replace.txt
.. highlight:: cpp
.. _BuildingTopologies:
Building Topologies
-------------------
@@ -22,7 +24,7 @@ point-to-point topologies, we will see equivalent CSMA topology helpers in
this section. The appearance and operation of these helpers should look
quite familiar to you.
We provide an example script in our examples/tutorial} directory. This script
We provide an example script in our ``examples/tutorial`` directory. This script
builds on the ``first.cc`` script and adds a CSMA network to the
point-to-point simulation we've already considered. Go ahead and open
``examples/tutorial/second.cc`` in your favorite editor. You will have already seen
@@ -413,7 +415,7 @@ You should see the contents of the pcap file displayed:
reading from file second-0-0.pcap, link-type PPP (PPP)
2.000000 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.007602 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.017607 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
The first line of the dump indicates that the link type is PPP (point-to-point)
which we expect. You then see the echo packet leaving node zero via the
@@ -433,7 +435,7 @@ link:
reading from file second-1-0.pcap, link-type PPP (PPP)
2.003686 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Here we see that the link type is also PPP as we would expect. You see the
packet from IP address 10.1.1.1 (that was sent at 2.000000 seconds) headed
@@ -453,12 +455,12 @@ You should now see the promiscuous dump of node two, device zero:
.. sourcecode:: text
reading from file second-2-0.pcap, link-type EN10MB (Ethernet)
2.003696 arp who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003707 arp reply 10.1.2.4 is-at 00:00:00:00:00:06
2.003801 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4
2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.007698 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.007710 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
2.007803 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.013815 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.013828 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
As you can see, the link type is now "Ethernet". Something new has appeared,
though. The bus network needs ``ARP``, the Address Resolution Protocol.
@@ -473,15 +475,15 @@ This exchange is seen in the following lines,
.. sourcecode:: text
2.003696 arp who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003707 arp reply 10.1.2.4 is-at 00:00:00:00:00:06
2.007698 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.007710 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
Then node one, device one goes ahead and sends the echo packet to the UDP echo
server at IP address 10.1.2.4.
.. sourcecode:: text
2.003801 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.007803 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
The server receives the echo request and turns the packet around trying to send
it back to the source. The server knows that this address is on another network
@@ -492,14 +494,14 @@ just like the first CSMA node had to do.
.. sourcecode:: text
2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4
2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03
2.013815 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.013828 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
The server then sends the echo back to the forwarding node.
.. sourcecode:: text
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Looking back at the rightmost node of the point-to-point link,
@@ -514,7 +516,7 @@ the last line of the trace dump.
reading from file second-1-0.pcap, link-type PPP (PPP)
2.003686 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.013921 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Lastly, you can look back at the node that originated the echo
@@ -522,13 +524,13 @@ Lastly, you can look back at the node that originated the echo
$ tcpdump -nn -tt -r second-0-0.pcap
and see that the echoed packet arrives back at the source at 2.007602 seconds,
and see that the echoed packet arrives back at the source at 2.017607 seconds,
.. sourcecode:: text
reading from file second-0-0.pcap, link-type PPP (PPP)
2.000000 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024
2.007602 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
2.017607 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024
Finally, recall that we added the ability to control the number of CSMA devices
in the simulation by command line argument. You can change this argument in
@@ -547,9 +549,10 @@ You should now see,
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (0.405s)
Sent 1024 bytes to 10.1.2.5
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.2.5
At time 2s client sent 1024 bytes to 10.1.2.5 port 9
At time 2.0118s server received 1024 bytes from 10.1.1.1 port 49153
At time 2.0118s server sent 1024 bytes to 10.1.1.1 port 49153
At time 2.02461s client received 1024 bytes from 10.1.2.5 port 9
Notice that the echo server has now been relocated to the last of the CSMA
nodes, which is 10.1.2.5 instead of the default case, 10.1.2.4.
@@ -621,9 +624,10 @@ you will see the following output:
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (0.407s)
Sent 1024 bytes to 10.1.2.101
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.2.101
At time 2s client sent 1024 bytes to 10.1.2.101 port 9
At time 2.0068s server received 1024 bytes from 10.1.1.1 port 49153
At time 2.0068s server sent 1024 bytes to 10.1.1.1 port 49153
At time 2.01761s client received 1024 bytes from 10.1.2.101 port 9
Note that the echo server is now located at 10.1.2.101 which corresponds to
having 100 "extra" CSMA nodes with the echo server on the last one. If you
@@ -655,8 +659,8 @@ entire CSMA network.
.. sourcecode:: text
reading from file second-100-0.pcap, link-type EN10MB (Ethernet)
2.003696 arp who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101
2.006698 ARP, Request who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.013815 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101, length 50
Now take a look at the ``tcpdump`` for ``second-101-0.pcap``.
@@ -669,12 +673,12 @@ You can now see that node 101 is really the participant in the echo exchange.
.. sourcecode:: text
reading from file second-101-0.pcap, link-type EN10MB (Ethernet)
2.003696 arp who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1
2.003696 arp reply 10.1.2.101 is-at 00:00:00:00:00:67
2.003801 IP 10.1.1.1.49153 > 10.1.2.101.9: UDP, length 1024
2.003801 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101
2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03
2.003822 IP 10.1.2.101.9 > 10.1.1.1.49153: UDP, length 1024
2.006698 ARP, Request who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.006698 ARP, Reply 10.1.2.101 is-at 00:00:00:00:00:67, length 50
2.006803 IP 10.1.1.1.49153 > 10.1.2.101.9: UDP, length 1024
2.013803 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.101, length 50
2.013828 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.013828 IP 10.1.2.101.9 > 10.1.1.1.49153: UDP, length 1024
Models, Attributes and Reality
******************************
@@ -880,7 +884,7 @@ that we will connect via the point-to-point link.
Next, we see an old friend. We instantiate a ``PointToPointHelper`` and
set the associated default ``Attributes`` so that we create a five megabit
per second transmitter on devices created using the helper and a two millisecond
delay on channels created by the helper. We then ``Intall`` the devices
delay on channels created by the helper. We then ``Install`` the devices
on the nodes and the channel between them.
::
@@ -1183,7 +1187,7 @@ repository you would type,
.. sourcecode:: bash
$ cp examples/third.cc scratch/mythird.cc
$ cp examples/tutorial/third.cc scratch/mythird.cc
$ ./waf
$ ./waf --run scratch/mythird
@@ -1195,9 +1199,10 @@ Again, since we have set up the UDP echo applications just as we did in the
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (0.407s)
Sent 1024 bytes to 10.1.2.4
Received 1024 bytes from 10.1.3.3
Received 1024 bytes from 10.1.2.4
At time 2s client sent 1024 bytes to 10.1.2.4 port 9
At time 2.01796s server received 1024 bytes from 10.1.3.3 port 49153
At time 2.01796s server sent 1024 bytes to 10.1.3.3 port 49153
At time 2.03364s client received 1024 bytes from 10.1.2.4 port 9
Recall that the first message, ``Sent 1024 bytes to 10.1.2.4``," is the
UDP echo client sending a packet to the server. In this case, the client
@@ -1235,19 +1240,18 @@ You should see some wifi-looking contents you haven't seen here before:
reading from file third-0-1.pcap, link-type IEEE802_11 (802.11)
0.000025 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
0.000263 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000279 Acknowledgment RA:00:00:00:00:00:09
0.000552 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000568 Acknowledgment RA:00:00:00:00:00:07
0.000664 Assoc Response AID(0) :: Succesful
0.001001 Assoc Response AID(0) :: Succesful
0.001145 Acknowledgment RA:00:00:00:00:00:0a
0.001233 Assoc Response AID(0) :: Succesful
0.001377 Acknowledgment RA:00:00:00:00:00:0a
0.001597 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.001613 Acknowledgment RA:00:00:00:00:00:08
0.001691 Assoc Response AID(0) :: Succesful
0.001835 Acknowledgment RA:00:00:00:00:00:0a
0.000308 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000324 Acknowledgment RA:00:00:00:00:00:08
0.000402 Assoc Response AID(0) :: Successful
0.000546 Acknowledgment RA:00:00:00:00:00:0a
0.000721 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.000737 Acknowledgment RA:00:00:00:00:00:07
0.000824 Assoc Response AID(0) :: Successful
0.000968 Acknowledgment RA:00:00:00:00:00:0a
0.001134 Assoc Request (ns-3-ssid) [6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit]
0.001150 Acknowledgment RA:00:00:00:00:00:09
0.001273 Assoc Response AID(0) :: Successful
0.001417 Acknowledgment RA:00:00:00:00:00:0a
0.102400 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
0.204800 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
0.307200 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS
@@ -1257,7 +1261,7 @@ probably understand what is going on and find the IP echo request and response
packets in this trace. We leave it as an exercise to completely parse the
trace dump.
Now, look at the pcap file of the right side of the point-to-point link,
Now, look at the pcap file of the left side of the point-to-point link,
.. sourcecode:: bash
@@ -1268,8 +1272,8 @@ Again, you should see some familiar looking contents:
.. sourcecode:: text
reading from file third-0-0.pcap, link-type PPP (PPP)
2.002160 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.009767 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
2.008151 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.026758 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
This is the echo packet going from left to right (from Wifi to CSMA) and back
again across the point-to-point link.
@@ -1285,8 +1289,8 @@ Again, you should see some familiar looking contents:
.. sourcecode:: text
reading from file third-1-0.pcap, link-type PPP (PPP)
2.005846 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.006081 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
2.011837 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
This is also the echo packet going from left to right (from Wifi to CSMA) and
back again across the point-to-point link with slightly different timings
@@ -1304,12 +1308,12 @@ You should see some familiar looking contents:
.. sourcecode:: text
reading from file third-1-1.pcap, link-type EN10MB (Ethernet)
2.005846 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.005870 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
2.005870 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.005975 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.005975 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.006081 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
2.017837 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50
2.017861 ARP, Reply 10.1.2.4 is-at 00:00:00:00:00:06, length 50
2.017861 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024
2.022966 ARP, Request who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4, length 50
2.022966 ARP, Reply 10.1.2.1 is-at 00:00:00:00:00:03, length 50
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP, length 1024
This should be easily understood. If you've forgotten, go back and look at
the discussion in ``second.cc``. This is the same sequence.
@@ -1385,37 +1389,39 @@ they happen.
.. sourcecode:: text
Build finished successfully (00:00:01)
'build' finished successfully (5.989s)
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10, y = 0
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.41539, y = -0.811313
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.46199, y = -1.11303
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.52738, y = -1.46869
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.67099, y = -1.98503
/NodeList/7/$ns3::MobilityModel/CourseChange x = 5.6835, y = -2.14268
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.70932, y = -1.91689
Sent 1024 bytes to 10.1.2.4
Received 1024 bytes from 10.1.3.3
Received 1024 bytes from 10.1.2.4
/NodeList/7/$ns3::MobilityModel/CourseChange x = 5.53175, y = -2.48576
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.58021, y = -2.17821
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.18915, y = -1.25785
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.7572, y = -0.434856
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.62404, y = 0.556238
/NodeList/7/$ns3::MobilityModel/CourseChange x = 4.74127, y = 1.54934
/NodeList/7/$ns3::MobilityModel/CourseChange x = 5.73934, y = 1.48729
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.18521, y = 0.59219
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.58121, y = 1.51044
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.27897, y = 2.22677
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.42888, y = 1.70014
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.40519, y = 1.91654
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.51981, y = 1.45166
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.34588, y = 2.01523
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.81046, y = 2.90077
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.89186, y = 3.29596
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.46617, y = 2.47732
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.05492, y = 1.56579
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.00393, y = 1.25054
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.00968, y = 1.35768
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.33503, y = 2.30328
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.18682, y = 3.29223
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.96865, y = 2.66873
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.3841, y = 0.923277
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.2049, y = 1.90708
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.8136, y = 1.11368
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.8452, y = 2.11318
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.9797, y = 3.10409
At time 2s client sent 1024 bytes to 10.1.2.4 port 9
At time 2.01796s server received 1024 bytes from 10.1.3.3 port 49153
At time 2.01796s server sent 1024 bytes to 10.1.3.3 port 49153
At time 2.03364s client received 1024 bytes from 10.1.2.4 port 9
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.3273, y = 4.04175
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.013, y = 4.76955
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.4317, y = 5.67771
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.4607, y = 5.91681
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.0155, y = 6.74878
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.0076, y = 6.62336
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.6285, y = 5.698
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.32, y = 4.97559
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.1134, y = 3.99715
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.8359, y = 4.68851
/NodeList/7/$ns3::MobilityModel/CourseChange x = 13.5953, y = 3.71789
/NodeList/7/$ns3::MobilityModel/CourseChange x = 12.7595, y = 4.26688
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.7629, y = 4.34913
/NodeList/7/$ns3::MobilityModel/CourseChange x = 11.2292, y = 5.19485
/NodeList/7/$ns3::MobilityModel/CourseChange x = 10.2344, y = 5.09394
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.3601, y = 4.60846
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.40025, y = 4.32795
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.14292, y = 4.99761
/NodeList/7/$ns3::MobilityModel/CourseChange x = 9.08299, y = 5.99581
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.26068, y = 5.42677
/NodeList/7/$ns3::MobilityModel/CourseChange x = 8.35917, y = 6.42191
/NodeList/7/$ns3::MobilityModel/CourseChange x = 7.66805, y = 7.14466
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.71414, y = 6.84456
/NodeList/7/$ns3::MobilityModel/CourseChange x = 6.42489, y = 7.80181
+64 -1
View File
@@ -92,7 +92,7 @@ access* communication medium. This gives us Ethernet-like functionality.
Net Device
++++++++++
It used to be the case that if you wanted to connect a computers to a network,
It used to be the case that if you wanted to connect a computer to a network,
you had to buy a specific kind of network cable and a hardware device called
(in PC terminology) a *peripheral card* that needed to be installed in
your computer. If the peripheral card implemented some networking function,
@@ -743,6 +743,69 @@ took care of the hard part for you. The remaining lines of our first
return 0;
}
When the simulator will stop?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|ns3| is a Discrete Event (DE) simulator. In such a simulator, each event is
associated with its execution time, and the simulation proceeds by executing
events in the temporal order of simulation time. Events may cause future
events to be scheduled (for example, a timer may reschedule itself to
expire at the next interval).
The initial events are usually triggered by each object, e.g., IPv6 will
schedule Router Advertisements, Neighbor Solicitations, etc.,
an Application schedule the first packet sending event, etc.
When an event is processed, it may generate zero, one or more events.
As a simulation executes, events are consumed, but more events may (or may
not) be generated.
The simulation will stop automatically when no further events are in the
event queue, or when a special Stop event is found. The Stop event is
created through the
``Simulator::Stop (stopTime);`` function.
There is a typical case where ``Simulator::Stop`` is absolutely necessary
to stop the simulation: when there is a self-sustaining event.
Self-sustaining (or recurring) events are events that always reschedule
themselves. As a consequence, they always keep the event queue non-empty.
There are many protocols and modules containing recurring events, e.g.:
* FlowMonitor - periodic check for lost packets
* RIPng - periodic broadcast of routing tables update
* etc.
In these cases, ``Simulator::Stop`` is necessary to gracefully stop the
simulation. In addition, when |ns3| is in emulation mode, the
``RealtimeSimulator`` is used to keep the simulation clock aligned with
the machine clock, and ``Simulator::Stop`` is necessary to stop the
process.
Many of the simulation programs in the tutorial do not explicitly call
``Simulator::Stop``, since the event queue will automatically run out
of events. However, these programs will also accept a call to
``Simulator::Stop``. For example, the following additional statement
in the first example program will schedule an explicit stop at 11 seconds:
::
+ Simulator::Stop (Seconds (11.0));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
The above wil not actually change the behavior of this program, since
this particular simulation naturally ends after 10 seconds. But if you
were to change the stop time in the above statement from 11 seconds to 1
second, you would notice that the simulation stops before any output is
printed to the screen (since the output occurs around time 2 seconds of
simulation time).
It is important to call ``Simulator::Stop`` *before* calling
``Simulator::Run``; otherwise, ``Simulator::Run`` may never return control
to the main program to execute the stop!
Building Your Script
++++++++++++++++++++
We have made it trivial to build your simple scripts. All you have to do is
+30 -25
View File
@@ -103,19 +103,19 @@ some of the new lines of this diff:
::
+ std::string probeName;
+ std::string probeTrace;
+ std::string probeType;
+ std::string tracePath;
+ if (useV6 == false)
+ {
...
+ probeName = "ns3::Ipv4PacketProbe";
+ probeTrace = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
+ probeType = "ns3::Ipv4PacketProbe";
+ tracePath = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
+ }
+ else
+ {
...
+ probeName = "ns3::Ipv6PacketProbe";
+ probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
+ probeType = "ns3::Ipv6PacketProbe";
+ tracePath = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
+ }
...
+ // Use GnuplotHelper to plot the packet byte count over time
@@ -129,12 +129,12 @@ some of the new lines of this diff:
+ "Time (Seconds)",
+ "Packet Byte Count");
+
+ // Specify the probe type, probe path (in configuration namespace), and
+ // Specify the probe type, trace source path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to plot. The fourth argument
+ // specifies the name of the data series label on the plot. The last
+ // argument formats the plot by specifying where the key should be placed.
+ plotHelper.PlotProbe (probeName,
+ probeTrace,
+ plotHelper.PlotProbe (probeType,
+ tracePath,
+ "OutputBytes",
+ "Packet Byte Count",
+ GnuplotAggregator::KEY_BELOW);
@@ -151,8 +151,8 @@ some of the new lines of this diff:
+
+ // Specify the probe type, probe path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to write.
+ fileHelper.WriteProbe (probeName,
+ probeTrace,
+ fileHelper.WriteProbe (probeType,
+ tracePath,
+ "OutputBytes");
+
Simulator::Stop (Seconds (20));
@@ -161,7 +161,7 @@ some of the new lines of this diff:
The careful reader will have noticed, when testing the IPv6 command
line attribute, that ``seventh.cc`` had created a number of new output files:
line attribute above, that ``seventh.cc`` had created a number of new output files:
::
@@ -178,6 +178,8 @@ by hooking the data collection components to |ns3| trace sources, and
marshaling the data into a formatted ``gnuplot`` and into a formatted
text file. In the next sections, we'll review each of these.
.. _GnuPlotHelper:
GnuplotHelper
*************
@@ -257,26 +259,26 @@ variables for later use:
::
+ std::string probeName;
+ std::string probeTrace;
+ probeName = "ns3::Ipv6PacketProbe";
+ probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
+ std::string probeType;
+ std::string tracePath;
+ probeType = "ns3::Ipv6PacketProbe";
+ tracePath = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
We use them here:
::
+ // Specify the probe type, probe path (in configuration namespace), and
+ // Specify the probe type, trace source path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to plot. The fourth argument
+ // specifies the name of the data series label on the plot. The last
+ // argument formats the plot by specifying where the key should be placed.
+ plotHelper.PlotProbe (probeName,
+ probeTrace,
+ plotHelper.PlotProbe (probeType,
+ tracePath,
+ "OutputBytes",
+ "Packet Byte Count",
+ GnuplotAggregator::KEY_BELOW);
The first two arguments are the name of the probe type and the probe trace.
The first two arguments are the name of the probe type and the trace source path.
These two are probably the hardest to determine when you try to use
this framework to plot other traces. The probe trace here is the ``Tx``
trace source of class ``Ipv6L3Protocol``. When we examine this class
@@ -319,6 +321,7 @@ the data out of the probed Packet object:
{
static TypeId tid = TypeId ("ns3::Ipv6PacketProbe")
.SetParent<Probe> ()
.SetGroupName ("Stats")
.AddConstructor<Ipv6PacketProbe> ()
.AddTraceSource ( "Output",
"The packet plus its IPv6 object and interface that serve as the output for this probe",
@@ -359,6 +362,8 @@ The following traced values are supported with Probes as of this writing:
+------------------+-------------------+------------------------------------+
| bool | BooleanProbe | stats/model/uinteger-16-probe.h |
+------------------+-------------------+------------------------------------+
| ns3::Time | TimeProbe | stats/model/time-probe.h |
+------------------+-------------------+------------------------------------+
The following TraceSource types are supported by Probes as of this writing:
@@ -417,17 +422,17 @@ FORMATTED is specified) with a format string such as follows:
+ // Set the labels for this formatted output file.
+ fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f");
Finally, the probe of interest must be hooked. Again, the probeName and
probeTrace variables in this example are used, and the probe's output
Finally, the trace source of interest must be hooked. Again, the probeType and
tracePath variables in this example are used, and the probe's output
trace source "OutputBytes" is hooked:
::
+
+ // Specify the probe type, probe path (in configuration namespace), and
+ // Specify the probe type, trace source path (in configuration namespace), and
+ // probe output trace source ("OutputBytes") to write.
+ fileHelper.WriteProbe (probeName,
+ probeTrace,
+ fileHelper.WriteProbe (probeType,
+ tracePath,
+ "OutputBytes");
+
+462 -221
View File
@@ -33,8 +33,8 @@ from the main web site. The second is to fetch and build development
copies of |ns3|. We'll walk through both examples since the tools
involved are slightly different.
Downloading ns-3
****************
Downloading |ns3|
*****************
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
@@ -43,7 +43,7 @@ editor) you will need to ensure that a number of additional libraries are
present on your system before proceeding. |ns3| provides a wiki
page that includes pages with many useful hints and tips.
One such page is the "Installation" page,
http://www.nsnam.org/wiki/index.php/Installation.
http://www.nsnam.org/wiki/Installation.
The "Prerequisites" section of this wiki page explains which packages are
required to support common |ns3| options, and also provides the
@@ -62,7 +62,7 @@ and running on the target system.
The |ns3| code is available in Mercurial repositories on the server
http://code.nsnam.org. You can also download a tarball release at
http://www.nsnam.org/releases/, or you can work with repositories
http://www.nsnam.org/release/, or you can work with repositories
using Mercurial. We recommend using Mercurial unless there's a good reason
not to. See the end of this section for instructions on how to get a tarball
release.
@@ -72,8 +72,14 @@ The simplest way to get started using Mercurial repositories is to use the
downloading and building of various subsystems of |ns3| for you. We
recommend that you begin your |ns3| work in this environment.
Downloading ns-3 Using a Tarball
++++++++++++++++++++++++++++++++
One practice is to create a directory called ``workspace`` in one's home
directory under which one can keep local Mercurial repositories.
Any directory name will do, but we'll assume that ``workspace`` is used
herein (note: ``repos`` may also be used in some documentation as
an example directory name).
Downloading |ns3| Using a Tarball
+++++++++++++++++++++++++++++++++
A tarball is a particular format of software archive where multiple
files are bundled together and the archive possibly compressed.
@@ -85,43 +91,43 @@ Let's assume that you, as a user, wish to build |ns3| in a local
directory called ``workspace``.
If you adopt the ``workspace`` directory approach, you can
get a copy of a release by typing the following into your Linux shell
(substitute the appropriate version numbers, of course):
::
(substitute the appropriate version numbers, of course)::
$ cd
$ mkdir workspace
$ cd workspace
$ wget http://www.nsnam.org/releases/ns-allinone-3.17.tar.bz2
$ tar xjf ns-allinone-3.17.tar.bz2
$ wget http://www.nsnam.org/release/ns-allinone-3.23.tar.bz2
$ tar xjf ns-allinone-3.23.tar.bz2
If you change into the directory ``ns-allinone-3.17`` you should see a
number of files:
If you change into the directory ``ns-allinone-3.23`` you should see a
number of files::
::
$ ls
bake constants.py ns-3.23 README
build.py netanim-3.106 pybindgen-0.17.0.886 util.py
bake constants.py ns-3.17 README
build.py netanim-3.103 pybindgen-0.16.0.825 util.py
You are now ready to build the base |ns3| distribution.
You are now ready to build the |ns3| distribution.
Downloading ns-3 Using Bake
Downloading |ns3| Using Bake
++++++++++++++++++++++++++++
Bake is a tool for distributed integration and building,
developed for the |ns3| project.  First of all, Bake is
developed in Python, and should be fetched from the project's
master code repositories using a tool called Mercurial, so to
run Bake one must have Python and mercurial on one's machine.
developed for the |ns3| project.  Bake can be used to fetch development
versions of the |ns3| software, and to download and build extensions to the
base |ns3| distribution, such as the Direct Code Execution environment,
Network Simulation Cradle, ability to create new Python bindings, and
others.
One practice is to create a directory called ``workspace`` in one's home
directory under which one can keep local Mercurial repositories.
Any directory name will do, but we'll assume that ``workspace`` is used
herein (note: ``repos`` may also be used in some documentation as
an example directory name). You can get a copy of ``bake`` by typing the
following into your Linux shell (assuming you have installed Mercurial):
In recent |ns3| releases, Bake has been included in the release
tarball. The configuration file included in the released version
will allow one to download any software that was current at the
time of the release. That is, for example, the version of Bake that
is distributed with the ``ns-3.21`` release can be used to fetch components
for that |ns3| release or earlier, but can't be used to fetch components
for later releases (unless the ``bakeconf.xml`` file is updated).
::
You can also get the most recent copy of ``bake`` by typing the
following into your Linux shell (assuming you have installed Mercurial)::
$ cd
$ mkdir workspace
@@ -133,20 +139,20 @@ following displayed,
::
...
destination directory: bake
requesting all changes
adding changesets
adding manifests
adding file changes
added 252 changesets with 661 changes to 62 files
added 339 changesets with 796 changes to 63 files
updating to branch default
45 files updated, 0 files merged, 0 files removed, 0 files unresolved
After the clone command completes, you should have a directory called
``bake``, the contents of which should look something like the following:
::
``bake``, the contents of which should look something like the following::
$ ls
bake bakeconf.xml doc generate-binary.py TODO
bake.py examples test
@@ -157,10 +163,10 @@ distribution of your choice.
There are a few configuration targets available:
1. ``ns-3.17``: the module corresponding to the release; it will download
1. ``ns-3.23``: the module corresponding to the release; it will download
components similar to the release tarball.
2. ``ns-3-dev``: a similar module but using the development code tree
3. ``ns-allinone-3.17``: the module that includes other optional features
3. ``ns-allinone-3.23``: the module that includes other optional features
such as click routing, openflow for |ns3|, and the Network Simulation
Cradle
4. ``ns-3-allinone``: similar to the released version of the allinone
@@ -178,7 +184,7 @@ code either by inspection of the repository list or by going to the
`"ns-3 Releases"
<http://www.nsnam.org/releases>`_
web page and clicking on the latest release link. We'll proceed in
this tutorial example with ``ns-3.17``.
this tutorial example with ``ns-3.23``.
We are now going to use the bake tool to pull down the various pieces of
|ns3| you will be using. First, we'll say a word about running bake.
@@ -187,28 +193,27 @@ bake works by downloading source packages into a source directory,
and installing libraries into a build directory. bake can be run
by referencing the binary, but if one chooses to run bake from
outside of the directory it was downloaded into, it is advisable
to put bake into your path, such as follows (Linux bash shell example):
to put bake into your path, such as follows (Linux bash shell example).
First, change into the 'bake' directory, and then set the following
environment variables
::
$ export BAKE_HOME=`pwd`/bake
$ export PATH=$PATH:$BAKE_HOME
$ export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
$ export BAKE_HOME=`pwd`
$ export PATH=$PATH:$BAKE_HOME:$BAKE_HOME/build/bin
$ export PYTHONPATH=$PYTHONPATH:$BAKE_HOME:$BAKE_HOME/build/lib
However, setting environment variables is not strictly necessary to
complete this tutorial, so we'll call bake directly by specifying the path
to it in our shell commands.
This will put the bake.py program into the shell's path, and will allow
other programs to find executables and libraries created by bake. Although
several bake use cases do not require setting PATH and PYTHONPATH as above,
full builds of ns-3-allinone (with the optional packages) typically do.
Step into the workspace directory and type the following into your shell:
Step into the workspace directory and type the following into your shell::
::
$ ./bake.py configure -e ns-3.17
$ ./bake.py configure -e ns-3.23
Next, we'l ask bake to check whether we have enough tools to download
various components. Type:
::
various components. Type::
$ ./bake.py check
@@ -238,41 +243,38 @@ You should see something like the following,
In particular, download tools such as Mercurial, CVS, GIT, and Bazaar
are our principal concerns at this point, since they allow us to fetch
the code. Please install missing tools at this stage if you are able to.
the code. Please install missing tools at this stage, in the usual
way for your system (if you are able to), or contact your system
administrator as needed to install these tools.
Next, try to download the software:
Next, try to download the software::
::
$ ./bake.py download
./bake.py download
should yield something like:
::
should yield something like::
>> Searching for system dependency pygoocanvas - OK
>> Searching for system dependency python-dev - OK
>> Searching for system dependency pygraphviz - OK
>> Downloading pybindgen-0.16.0.825 - OK
>> Downloading pybindgen-0.17.0.886 - OK
>> Searching for system dependency g++ - OK
>> Searching for system dependency qt4 - OK
>> Downloading netanim-3.103 - OK
>> Downloading ns-3.17 - OK
>> Downloading netanim-3.106 - OK
>> Downloading ns-3.23 - OK
The above suggests that three sources have been downloaded. Check the
``source`` directory now and type ``ls``; one should see:
``source`` directory now and type ``ls``; one should see::
::
netanim-3.103 ns-3.17 pybindgen-0.16.0.825
$ ls
netanim-3.106 ns-3.23 pybindgen-0.17.0.886
You are now ready to build the |ns3| distribution.
Building ns-3
*************
Building |ns3|
**************
Building with build.py
++++++++++++++++++++++
Building with ``build.py``
++++++++++++++++++++++++++
When working from a released tarball, the first time you build the
|ns3| project you can build using a convenience program found in the
``allinone`` directory. This program is called ``build.py``. This
@@ -283,10 +285,8 @@ native |ns3| build system, Waf, to be introduced later in this tutorial.
If you downloaded
using a tarball you should have a directory called something like
``ns-allinone-3.17`` under your ``~/workspace`` directory.
Type the following:
::
``ns-allinone-3.23`` under your ``~/workspace`` directory.
Type the following::
$ ./build.py --enable-examples --enable-tests
@@ -299,43 +299,39 @@ are not necessary for your work, if you wish.
You will see lots of typical compiler output messages displayed as the build
script builds the various pieces you downloaded. Eventually you should see the
following magic words:
following::
::
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.17/ns-3.17/build'
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.23/ns-3.23/build'
'build' finished successfully (6m25.032s)
Modules built:
antenna aodv applications
bridge buildings config-store
core csma csma-layout
dsdv dsr emu
energy fd-net-device flow-monitor
internet lte mesh
dsdv dsr energy
fd-net-device flow-monitor internet
lr-wpan lte mesh
mobility mpi netanim (no Python)
network nix-vector-routing olsr
point-to-point point-to-point-layout propagation
spectrum stats tap-bridge
test (no Python) tools topology-read
uan virtual-net-device wifi
wimax
sixlowpan spectrum stats
tap-bridge test (no Python) topology-read
uan virtual-net-device wave
wifi wimax
Modules not built (see ns-3 tutorial for explanation):
brite click openflow
visualizer
Leaving directory `./ns-3.17'
Leaving directory `./ns-3.23'
Regarding the portion about modules not built:
::
Regarding the portion about modules not built::
Modules not built (see ns-3 tutorial for explanation):
brite click openflow
visualizer
This just means that some ns-3 modules that have dependencies on
This just means that some |ns3| 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
@@ -351,20 +347,16 @@ may continue to use it to build |ns3|. Type
$ ./bake.py build
and you should see something like:
and you should see something like::
::
>> Building pybindgen-0.16.0.825 - OK
>> Building netanim-3.103 - OK
>> Building ns-3.17 - OK
>> Building pybindgen-0.17.0.886 - OK
>> Building netanim-3.106 - OK
>> Building ns-3.23 - OK
*Hint: you can also perform both steps, download and build by calling 'bake.py deploy'.*
If there happens to be a failure, please have a look at what the following
command tells you; it may give a hint as to a missing dependency:
::
command tells you; it may give a hint as to a missing dependency::
$ ./bake.py show
@@ -390,83 +382,96 @@ build the optimized version of the code. By default you have configured
your project to build the debug version. Let's tell the project to
make an optimized build. To explain to Waf that it should do optimized
builds that include the examples and tests, you will need to execute the
following commands,
::
following commands::
$ ./waf clean
$ ./waf -d optimized --enable-examples --enable-tests configure
$ ./waf --build-profile=optimized --enable-examples --enable-tests configure
This runs Waf out of the local directory (which is provided as a convenience
for you). The first command to clean out the previous build is not
typically strictly necessary but is good practice; it will remove the
typically strictly necessary but is good practice (but see `Build Profiles`_,
below); it will remove the
previously built libraries and object files found in directory ``build/``.
When the project is reconfigured and the build system checks for various
dependencies, you should see
output that looks similar to the following,
output that looks similar to the following::
::
Checking for program g++ : ok /usr/bin/g++
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for g++ : ok
Checking for program pkg-config : ok /usr/bin/pkg-config
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -Wl,--soname=foo support : yes
Checking for header stdlib.h : ok
Checking for header signal.h : ok
Checking for header pthread.h : ok
Checking for high precision time implementation : 128-bit integer
Checking for header stdint.h : ok
Checking for header inttypes.h : ok
Checking for header sys/inttypes.h : not found
Checking for library rt : ok
Checking for header netpacket/packet.h : ok
Checking for pkg-config flags for GSL : ok
Checking for header linux/if_tun.h : ok
Checking for pkg-config flags for GTK_CONFIG_STORE : ok
Checking for pkg-config flags for LIBXML2 : ok
Checking for library sqlite3 : ok
Checking for NSC location : ok ../nsc (guessed)
Checking for library dl : ok
Checking for NSC supported architecture x86_64 : ok
Checking for program python : ok /usr/bin/python
Checking for Python version >= 2.3 : ok 2.5.2
Checking for library python2.5 : ok
Checking for program python2.5-config : ok /usr/bin/python2.5-config
Checking for header Python.h : ok
Checking for -fvisibility=hidden support : yes
Checking for pybindgen location : ok ../pybindgen (guessed)
Checking for Python module pybindgen : ok
Checking for pybindgen version : ok 0.10.0.640
Checking for Python module pygccxml : ok
Checking for pygccxml version : ok 0.9.5
Checking for program gccxml : ok /usr/local/bin/gccxml
Checking for gccxml version : ok 0.9.0
Checking for program sudo : ok /usr/bin/sudo
Checking for program hg : ok /usr/bin/hg
Checking for program valgrind : ok /usr/bin/valgrind
Setting top to : .
Setting out to : build
Checking for 'gcc' (c compiler) : /usr/bin/gcc
Checking for cc version : 4.2.1
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Checking boost includes : 1_46_1
Checking boost libs : ok
Checking for boost linkage : ok
Checking for click location : not found
Checking for program pkg-config : /sw/bin/pkg-config
Checking for 'gtk+-2.0' >= 2.12 : yes
Checking for 'libxml-2.0' >= 2.7 : yes
Checking for type uint128_t : not found
Checking for type __uint128_t : yes
Checking high precision implementation : 128-bit integer (default)
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for header sys/types.h : yes
Checking for header sys/stat.h : yes
Checking for header dirent.h : yes
Checking for header stdlib.h : yes
Checking for header signal.h : yes
Checking for header pthread.h : yes
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for library rt : not found
Checking for header netpacket/packet.h : not found
Checking for header sys/ioctl.h : yes
Checking for header net/if.h : not found
Checking for header net/ethernet.h : yes
Checking for header linux/if_tun.h : not found
Checking for header netpacket/packet.h : not found
Checking for NSC location : not found
Checking for 'mpic++' : yes
Checking for 'sqlite3' : yes
Checking for header linux/if_tun.h : not found
Checking for program sudo : /usr/bin/sudo
Checking for program valgrind : /sw/bin/valgrind
Checking for 'gsl' : yes
Checking for compilation flag -Wno-error=deprecated-d... support : ok
Checking for compilation flag -Wno-error=deprecated-d... support : ok
Checking for compilation flag -fstrict-aliasing... support : ok
Checking for compilation flag -fstrict-aliasing... support : ok
Checking for compilation flag -Wstrict-aliasing... support : ok
Checking for compilation flag -Wstrict-aliasing... support : ok
Checking for program doxygen : /usr/local/bin/doxygen
---- Summary of optional NS-3 features:
Threading Primitives : enabled
Real Time Simulator : enabled
Emulated Net Device : enabled
GNU Scientific Library (GSL) : enabled
Tap Bridge : enabled
Build profile : debug
Build directory : build
Python Bindings : enabled
BRITE Integration : not enabled (BRITE not enabled (see option --with-brite))
NS-3 Click Integration : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore : enabled
XmlIo : enabled
Threading Primitives : enabled
Real Time Simulator : enabled (librt is not available)
Emulated Net Device : enabled (<netpacket/packet.h> include not detected)
File descriptor NetDevice : enabled
Tap FdNetDevice : not enabled (needs linux/if_tun.h)
Emulation FdNetDevice : not enabled (needs netpacket/packet.h)
PlanetLab FdNetDevice : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle : not enabled (NSC not found (see option --with-nsc))
MPI Support : enabled
NS-3 OpenFlow Integration : not enabled (Required boost libraries not found, missing: system, signals, filesystem)
SQlite stats data output : enabled
Network Simulation Cradle : enabled
Python Bindings : enabled
Python API Scanning Support : enabled
Tap Bridge : not enabled (<linux/if_tun.h> include not detected)
PyViz visualizer : enabled
Use sudo to set suid bit : not enabled (option --enable-sudo not selected)
Build tests : enabled
Build examples : enabled
Static build : not enabled (option --enable-static not selected)
'configure' finished successfully (2.870s)
GNU Scientific Library (GSL) : enabled
'configure' finished successfully (1.944s)
Note the last part of the above output. Some ns-3 options are not enabled by
Note the last part of the above output. Some |ns3| options are not enabled by
default or require support from the underlying system to work properly.
For instance, to enable XmlTo, the library libxml-2.0 must be found on the
system. If this library were not found, the corresponding |ns3| feature
@@ -479,7 +484,7 @@ Now go ahead and switch back to the debug build that includes the examples and t
::
$ ./waf clean
$ ./waf -d debug --enable-examples --enable-tests configure
$ ./waf --build-profile=debug --enable-examples --enable-tests configure
The build system is now configured and you can build the debug versions of
the |ns3| programs by simply typing
@@ -491,73 +496,245 @@ the |ns3| programs by simply typing
Okay, sorry, I made you build the |ns3| part of the system twice,
but now you know how to change the configuration and build optimized code.
The build.py script discussed above supports also the ``--enable-examples``
and ``enable-tests`` arguments, but in general, does not directly support
other waf options; for example, this will not work:
::
$ ./build.py --disable-python
will result in
::
build.py: error: no such option: --disable-python
However, the special operator ``--`` can be used to pass additional
options through to waf, so instead of the above, the following will work:
::
$ ./build.py -- --disable-python
as it generates the underlying command ``./waf configure --disable-python``.
Here are a few more introductory tips about Waf.
Some waf commands are meaningful during the build phase and some commands are valid
in the configuration phase. For example, if you wanted to use the emulation
Configure vs. Build
===================
Some Waf commands are only meaningful during the configure phase and some commands are valid
in the build phase. For example, if you wanted to use the emulation
features of |ns3|, you might want to enable setting the suid bit using
sudo as described above. This turns out to be a configuration-time command, and so
you could reconfigure using the following command that also includes the examples and tests
you could reconfigure using the following command that also includes the examples and tests.
::
$ ./waf configure -d debug --enable-sudo --enable-examples --enable-tests
$ ./waf configure --enable-sudo --enable-examples --enable-tests
If you do this, waf will have run sudo to change the socket creator programs of the
emulation code to run as root. There are many other configure- and build-time options
available in waf. To explore these options, type:
If you do this, Waf will have run sudo to change the socket creator programs of the
emulation code to run as root.
::
There are many other configure- and build-time options
available in Waf. To explore these options, type::
$ ./waf --help
We'll use some of the testing-related commands in the next section.
Finally, as an aside, it is possible to specify that waf builds the
project in
a directory different than the default ``build/`` directory by passing
the ``-o`` option to configure; e.g.
Build Profiles
==============
We already saw how you can configure Waf for ``debug`` or ``optimized`` builds::
$ ./waf --build-profile=debug
There is also an intermediate build profile, ``release``. ``-d`` is a
synonym for ``--build-profile``.
The build profile controls the use of logging, assertions, and compiler optimization:
+--------------------+---------------------------------+-----------------------------------------------------------------+
| Feature | Build Profile |
+ +---------------------------------+-------------------------------+---------------------------------+
| | ``debug`` | ``release`` | ``optimized`` |
+====================+=================================+===============================+=================================+
| Enabled Features | | ``NS3_BUILD_PROFILE_DEBUG`` | ``NS3_BUILD_PROFILE_RELEASE`` | ``NS3_BUILD_PROFILE_OPTIMIZED`` |
| | | ``NS_LOG...`` | | |
| | | ``NS_ASSERT...`` | | |
+--------------------+---------------------------------+-------------------------------+---------------------------------+
| Code Wrapper Macro | ``NS_BUILD_DEBUG(code)`` | ``NS_BUILD_RELEASE(code)`` | ``NS_BUILD_OPTIMIZED(code)`` |
+--------------------+---------------------------------+-------------------------------+---------------------------------+
| Compiler Flags | ``-O0 -ggdb -g3`` | ``-O3 -g0`` | ``-O3 -g`` |
| | | ``-fomit-frame-pointer`` | ``-fstrict-overflow`` |
| | | | ``-march=native`` |
+--------------------+---------------------------------+-------------------------------+---------------------------------+
As you can see, logging and assertions are only available in debug builds.
Recommended practice is to develop your scenario in debug mode, then
conduct repetitive runs (for statistics or changing parameters) in
optimized build profile.
If you have code that should only run in specific build profiles,
use the indicated Code Wrapper macro:
.. sourcecode:: cpp
NS_BUILD_DEBUG (std::cout << "Part of an output line..." << std::flush; timer.Start ());
DoLongInvolvedComputation ();
NS_BUILD_DEBUG (timer.Stop (); std::cout << "Done: " << timer << std::endl;)
By default Waf puts the build artifacts in the ``build`` directory.
You can specify a different output directory with the ``--out``
option, e.g.
::
$ ./waf configure -d debug -o build/debug --enable-examples --enable-tests
$ ./waf configure --out=foo
This allows users to work with multiple builds rather than always
overwriting the last build.
Combining this with build profiles lets you switch between the different
compile options in a clean way::
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
$ ./waf configure --build-profile=debug --out=build/debug
$ ./waf build
...
$ ./waf configure --build-profile=optimized --out=build/optimized
$ ./waf build
...
This allows you to work with multiple builds rather than always
overwriting the last build. When you switch, Waf will only compile
what it has to, instead of recompiling everything.
When you do switch build profiles like this, you have to be careful
to give the same configuration parameters each time. It may be convenient
to define some environment variables to help you avoid mistakes::
$ export NS3CONFIG="--enable-examples --enable-tests"
$ export NS3DEBUG="--build-profile=debug --out=build/debug"
$ export NS3OPT=="--build-profile=optimized --out=build/optimized"
$ ./waf configure $NS3CONFIG $NS3DEBUG
$ ./waf build
...
$ ./waf configure $NS3CONFIG $NS3OPT
$ ./waf build
Compilers and Flags
===================
In the examples above, Waf uses the GCC C++ compiler, ``g++``, for
building |ns3|. However, it's possible to change the C++ compiler used by Waf
by defining the ``CXX`` environment variable.
For example, to use the Clang C++ compiler, ``clang++``,
::
$ CXX="clang++" ./waf configure
$ ./waf build
One can also set up waf to do distributed compilation with ``distcc`` in
a similar way:
::
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
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
************
To add compiler flags, use the ``CXXFLAGS_EXTRA`` environment variable when
you configure |ns3|.
You can run the unit tests of the |ns3| distribution by running the
"./test.py -c core" script,
Install
=======
Waf may be used to install libraries in various places on the system.
The default location where libraries and executables are built is
in the ``build`` directory, and because Waf knows the location of these
libraries and executables, it is not necessary to install the libraries
elsewhere.
If users choose to install things outside of the build directory, users
may issue the ``./waf install`` command. By default, the prefix for
installation is ``/usr/local``, so ``./waf install`` will install programs
into ``/usr/local/bin``, libraries into ``/usr/local/lib``, and headers
into ``/usr/local/include``. Superuser privileges are typically needed
to install to the default prefix, so the typical command would be
``sudo ./waf install``. When running programs with Waf, Waf will
first prefer to use shared libraries in the build directory, then
will look for libraries in the library path configured in the local
environment. So when installing libraries to the system, it is good
practice to check that the intended libraries are being used.
Users may choose to install to a different prefix by passing the ``--prefix``
option at configure time, such as:
::
./waf configure --prefix=/opt/local
If later after the build the user issues the ``./waf install`` command, the
prefix ``/opt/local`` will be used.
The ``./waf clean`` command should be used prior to reconfiguring
the project if Waf will be used to install things at a different prefix.
In summary, it is not necessary to call ``./waf install`` to use |ns3|.
Most users will not need this command since Waf will pick up the
current libraries from the ``build`` directory, but some users may find
it useful if their use case involves working with programs outside
of the |ns3| directory.
One Waf
=======
There is only one Waf script, at the top level of the |ns3| source tree.
As you work, you may find yourself spending a lot of time in ``scratch/``,
or deep in ``src/...``, and needing to invoke Waf. You could just
remember where you are, and invoke Waf like this::
$ ../../../waf ...
but that gets tedious, and error prone, and there are better solutions.
If you have the full |ns3| repository this little gem is a start::
$ cd $(hg root) && ./waf ...
Even better is to define this as a shell function::
$ function waff { cd $(hg root) && ./waf $* ; }
$ waff build
If you only have the tarball, an environment variable can help::
$ export NS3DIR="$PWD"
$ function waff { cd $NS3DIR && ./waf $* ; }
$ cd scratch
$ waff build
It might be tempting in a module directory to add a trivial ``waf``
script along the lines of ``exec ../../waf``. Please don't. It's
confusing to new-comers, and when done poorly it leads to subtle build
errors. The solutions above are the way to go.
Testing |ns3|
*************
You can run the unit tests of the |ns3| distribution by running the
``./test.py -c core`` script::
$ ./test.py -c core
These tests are run in parallel by waf. You should eventually
see a report saying that,
These tests are run in parallel by Waf. You should eventually
see a report saying that
::
@@ -565,9 +742,8 @@ see a report saying that,
This is the important message.
You will also see output from the test runner and the output will actually look something like,
::
You will also see the summary output from Waf and the test runner
executing each test, which will actually look something like::
Waf: Entering directory `/path/to/workspace/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/path/to/workspace/ns-3-allinone/ns-3-dev/build'
@@ -590,34 +766,26 @@ You will also see output from the test runner and the output will actually look
PASS: TestSuite ns3-wifi-interference
PASS: TestSuite histogram
PASS: TestSuite sample
PASS: TestSuite ipv4-address-helper
PASS: TestSuite devices-wifi
PASS: TestSuite propagation-loss-model
...
PASS: TestSuite attributes
PASS: TestSuite config
PASS: TestSuite global-value
PASS: TestSuite command-line
PASS: TestSuite basic-random-number
PASS: TestSuite object
PASS: TestSuite random-number-generators
92 of 92 tests passed (92 passed, 0 failed, 0 crashed, 0 valgrind errors)
This command is typically run by users to quickly verify that an
|ns3| distribution has built correctly.
|ns3| distribution has built correctly. (Note the order of the ``PASS: ...``
lines can vary, which is okay. What's important is that the summary line at
the end report that all tests passed; none failed or crashed.)
Running a Script
****************
We typically run scripts under the control of Waf. This allows the build
system to ensure that the shared library paths are set correctly and that
the libraries are available at run time. To run a program, simply use the
``--run`` option in Waf. Let's run the |ns3| equivalent of the
ubiquitous hello world program by typing the following:
::
ubiquitous hello world program by typing the following::
$ ./waf --run hello-simulator
@@ -629,28 +797,26 @@ produces the following output.
Hello Simulator
*Congratulations. You are now an ns-3 user.*
Congratulations! You are now an ns-3 user!
*What do I do if I don't see the output?*
**What do I do if I don't see the output?**
If you 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
"debug" mode. All of the console output used in this tutorial uses a
chances are that you have switched your build mode to ``optimized`` in
the `Building with Waf`_ section, but have missed the change back to
``debug`` mode. All of the console output used in this tutorial uses a
special |ns3| logging component that is useful for printing
user messages to the console. Output from this component is
automatically disabled when you compile optimized code -- it is
"optimized out." If you don't see the "Hello Simulator" output,
type the following,
type the following::
::
$ ./waf configure --build-profile=debug --enable-examples --enable-tests
$ ./waf configure -d debug --enable-examples --enable-tests
to tell ``waf`` to build the debug versions of the |ns3|
to tell Waf to build the debug versions of the |ns3|
programs that includes the examples and tests. You must still build
the actual debug version of the code by typing,
the actual debug version of the code by typing
::
@@ -659,7 +825,82 @@ the actual debug version of the code by typing,
Now, if you run the ``hello-simulator`` program, you should see the
expected output.
If you want to run programs under another tool such as gdb or valgrind,
see this `wiki entry
<http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.
Program Arguments
+++++++++++++++++
To feed command line arguments to an |ns3| program use this pattern::
$ ./waf --run <ns3-program> --command-template="%s <args>"
Substitute your program name for ``<ns3-program>``, and the arguments
for ``<args>``. The ``--command-template`` argument to Waf is
basically a recipe for constructing the actual command line Waf should use
to execute the program. Waf checks that the build is complete,
sets the shared library paths, then invokes the executable
using the provided command line template,
inserting the program name for the ``%s`` placeholder.
(I admit this is a bit awkward, but that's the way it is. Patches welcome!)
Another particularly useful example is to run a test suite by itself.
Let's assume that a ``mytest`` test suite exists (it doesn't).
Above, we used the ``./test.py`` script to run a whole slew of
tests in parallel, by repeatedly invoking the real testing program,
``test-runner``. To invoke ``test-runner`` directly for a single test::
$ ./waf --run test-runner --command-template="%s --suite=mytest --verbose"
This passes the arguments to the ``test-runner`` program.
Since ``mytest`` does not exist, an error message will be generated.
To print the available ``test-runner`` options::
$ ./waf --run test-runner --command-template="%s --help"
Debugging
+++++++++
To run |ns3| programs under the control of another utility, such as
a debugger (*e.g.* ``gdb``) or memory checker (*e.g.* ``valgrind``),
you use a similar ``--command-template="..."`` form.
For example, to run your |ns3| program ``hello-simulator`` with the arguments
``<args>`` under the ``gdb`` debugger::
$ ./waf --run=hello-simulator --command-template="gdb %s --args <args>"
Notice that the |ns3| program name goes with the ``--run`` argument,
and the control utility (here ``gdb``) is the first token
in the ``--commmand-template`` argument. The ``--args`` tells ``gdb``
that the remainder of the command line belongs to the "inferior" program.
(Some ``gdb``'s don't understand the ``--args`` feature. In this case,
omit the program arguments from the ``--command-template``,
and use the ``gdb`` command ``set args``.)
We can combine this recipe and the previous one to run a test under the
debugger::
$ ./waf --run test-runner --command-template="gdb %s --args --suite=mytest --verbose"
Working Directory
+++++++++++++++++
Waf needs to run from its location at the top of the |ns3| tree.
This becomes the working directory where output files will be written.
But what if you want to keep those ouf to the |ns3| source tree? Use
the ``--cwd`` argument::
$ ./waf --cwd=...
It may be more convenient to start with your working directory where
you want the output files, in which case a little indirection can help::
$ function waff {
CWD="$PWD"
cd $NS3DIR >/dev/null
./waf --cwd="$CWD" $*
cd - >/dev/null
}
This embellishment of the previous version saves the current working directory,
``cd``'s to the Waf directory, then instructs Waf to change the working
directory *back* to the saved current working directory before running the
program.
+1 -1
View File
@@ -8,7 +8,7 @@ available in five forms:
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentation of the public APIs of the simulator
* Tutorial *(this document)*, Manual, and Model Library for the `latest release <http://www.nsnam.org/documentation/latest/>`_ and `development tree <http://www.nsnam.org/ns-3-dev/documentation/>`_
* `ns-3 wiki <http://www.nsnam.org/wiki/index.php/Main_Page>`_
* `ns-3 wiki <http://www.nsnam.org/wiki/Main_Page>`_
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/tutorial`` directory of ns-3's source code.
+2 -2
View File
@@ -135,9 +135,9 @@ contribute to |ns3| like they have for |ns2|:
* Open source licensing based on GNU GPLv2 compatibility
* `wiki
<http://www.nsnam.org/wiki/index.php>`_
<http://www.nsnam.org/wiki>`_
* `Contributed Code
<http://www.nsnam.org/wiki/index.php/Contributed_Code>`_ page, similar to |ns2|'s popular Contributed Code
<http://www.nsnam.org/wiki/Contributed_Code>`_ page, similar to |ns2|'s popular Contributed Code
`page
<http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_
* Open `bug tracker
File diff suppressed because it is too large Load Diff
+46
View File
@@ -5,6 +5,8 @@
Tweaking
--------
.. _UsingLogging:
Using the Logging Module
************************
@@ -412,6 +414,8 @@ message,
Using Command Line Arguments
****************************
.. _Attribute:
Overriding Default Attributes
+++++++++++++++++++++++++++++
Another way you can change how |ns3| scripts behave without editing
@@ -628,6 +632,46 @@ end up looking something like,
--ns3::PointToPointChannel::Delay=2ms
--ns3::UdpEchoClient::MaxPackets=2"
A natural question to arise at this point is how to learn about the existence
of all of these attributes. Again, the command line help facility has
a feature for this. If we ask for command line help we should see:
.. sourcecode:: bash
$ ./waf --run "scratch/myfirst --PrintHelp"
myfirst [Program Arguments] [General Arguments]
General Arguments:
--PrintGlobals: Print the list of globals.
--PrintGroups: Print the list of groups.
--PrintGroup=[group]: Print all TypeIds of group.
--PrintTypeIds: Print all TypeIds.
--PrintAttributes=[typeid]: Print all attributes of typeid.
--PrintHelp: Print this help message.
If you select the "PrintGroups" argument, you should see a list of all
registered TypeId groups. The group names are aligned with the module names
in the source directory (although with a leading capital letter). Printing
out all of the information at once would be too much, so a further filter
is available to print information on a per-group basis. So, focusing
again on the point-to-point module:
.. sourcecode:: bash
./waf --run "scratch/myfirst --PrintGroup=PointToPoint"
TypeIds in group PointToPoint:
ns3::PointToPointChannel
ns3::PointToPointNetDevice
ns3::PointToPointRemoteChannel
ns3::PppHeader
and from here, one can find the possible TypeId names to search for
attributes, such as in the ``--PrintAttributes=ns3::PointToPointChannel``
example shown above.
Another way to find out about attributes is through the ns-3 Doxygen; there
is a page that lists out all of the registered attributes in the simulator.
Hooking Your Own Values
+++++++++++++++++++++++
You can also add your own hooks to the command line system. This is done
@@ -722,6 +766,8 @@ they will automatically be available for setting by your users through the
command line system. If you are a script author, you can add new variables to
your scripts and hook them into the command line system quite painlessly.
.. _UsingTracingSystem:
Using the Tracing System
************************
+2 -2
View File
@@ -31,10 +31,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("EnergyExample");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("EnergyExample");
static inline std::string
PrintReceivedPacket (Address& from)
{
@@ -0,0 +1,337 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Wireless Communications and Networking Group (WCNG),
* University of Rochester, Rochester, NY, USA.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Cristiano Tapparello <cristiano.tapparello@rochester.edu>
*/
/**
*
* This example extends the energy model example by connecting a basic energy
* harvester to the nodes.
*
* The example considers a simple communication link between a source and a
* destination node, where the source node sends a packet to the destination
* every 1 second. Each node is powered by a BasiEnergySource, which is recharged
* by a BasicEnergyHarvester, and the WiFi radio consumes energy for the transmission/
* reception of the packets.
*
* For the receiver node, the example prints the energy consumption of the WiFi radio,
* the power harvested by the energy harvester and the residual energy in the
* energy source.
*
* The nodes initial energy is set to 1.0 J, the transmission and reception entail a
* current consumption of 0.0174 A and 0.0197 A, respectively (default values in
* WifiRadioEnergyModel). The energy harvester provides an amount of power that varies
* according to a random variable uniformly distributed in [0 0.1] W, and is updated
* every 1 s. The energy source voltage is 3 V (default value in BasicEnergySource) and
* the residual energy level is updated every 1 second (default value).
*
* The simulation start at time 0 and it is hard stopped at time 10 seconds. Given the
* packet size and the distance between the nodes, each transmission lasts 0.0023s.
* As a result, the destination node receives 10 messages.
*
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/energy-module.h"
#include "ns3/internet-module.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample");
static inline std::string
PrintReceivedPacket (Address& from)
{
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (from);
std::ostringstream oss;
oss << "--\nReceived one packet! Socket: " << iaddr.GetIpv4 ()
<< " port: " << iaddr.GetPort ()
<< " at time = " << Simulator::Now ().GetSeconds ()
<< "\n--";
return oss.str ();
}
/**
* \param socket Pointer to socket.
*
* Packet receiving sink.
*/
void
ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
Address from;
while ((packet = socket->RecvFrom (from)))
{
if (packet->GetSize () > 0)
{
NS_LOG_UNCOND (PrintReceivedPacket (from));
}
}
}
/**
* \param socket Pointer to socket.
* \param pktSize Packet size.
* \param n Pointer to node.
* \param pktCount Number of packets to generate.
* \param pktInterval Packet sending interval.
*
* Traffic generator.
*/
static void
GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize, Ptr<Node> n,
uint32_t pktCount, Time pktInterval)
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic, socket, pktSize, n,
pktCount - 1, pktInterval);
}
else
{
socket->Close ();
}
}
/// Trace function for remaining energy at node.
void
RemainingEnergy (double oldValue, double remainingEnergy)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Current remaining energy = " << remainingEnergy << "J" << std::endl;
}
/// Trace function for total energy consumption at node.
void
TotalEnergy (double oldValue, double totalEnergy)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Total energy consumed by radio = " << totalEnergy << "J" << std::endl;
}
/// Trace function for the power harvested by the energy harvester.
void
HarvestedPower (double oldValue, double harvestedPower)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Current harvested power = " << harvestedPower << " W" << std::endl;
}
/// Trace function for the total energy harvested by the node.
void
TotalEnergyHarvested (double oldValue, double TotalEnergyHarvested)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Total energy harvested by harvester = "
<< TotalEnergyHarvested << " J" << std::endl;
}
int
main (int argc, char *argv[])
{
/*
LogComponentEnable ("EnergySource", LOG_LEVEL_DEBUG);
LogComponentEnable ("BasicEnergySource", LOG_LEVEL_DEBUG);
LogComponentEnable ("DeviceEnergyModel", LOG_LEVEL_DEBUG);
LogComponentEnable ("WifiRadioEnergyModel", LOG_LEVEL_DEBUG);
LogComponentEnable ("EnergyHarvester", LOG_LEVEL_DEBUG);
LogComponentEnable ("BasicEnergyHarvester", LOG_LEVEL_DEBUG);
*/
std::string phyMode ("DsssRate1Mbps");
double Prss = -80; // dBm
uint32_t PpacketSize = 200; // bytes
bool verbose = false;
// simulation parameters
uint32_t numPackets = 10000; // number of packets to send
double interval = 1; // seconds
double startTime = 0.0; // seconds
double distanceToRx = 100.0; // meters
/*
* This is a magic number used to set the transmit power, based on other
* configuration.
*/
double offset = 81;
// Energy Harvester variables
double harvestingUpdateInterval = 1; // seconds
CommandLine cmd;
cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("Prss", "Intended primary RSS (dBm)", Prss);
cmd.AddValue ("PpacketSize", "size of application packet sent", PpacketSize);
cmd.AddValue ("numPackets", "Total number of packets to send", numPackets);
cmd.AddValue ("startTime", "Simulation start time", startTime);
cmd.AddValue ("distanceToRx", "X-Axis distance between nodes", distanceToRx);
cmd.AddValue ("verbose", "Turn on all device log components", verbose);
cmd.Parse (argc, argv);
// Convert to time object
Time interPacketInterval = Seconds (interval);
// disable fragmentation for frames below 2200 bytes
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold",
StringValue ("2200"));
// turn off RTS/CTS for frames below 2200 bytes
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold",
StringValue ("2200"));
// Fix non-unicast data rate to be the same as that of unicast
Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
StringValue (phyMode));
NodeContainer c;
c.Create (2); // create 2 nodes
NodeContainer networkNodes;
networkNodes.Add (c.Get (0));
networkNodes.Add (c.Get (1));
// The below set of helpers will help us to put together the wifi NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents ();
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
/** Wifi PHY **/
/***************************************************************************/
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
wifiPhy.Set ("RxGain", DoubleValue (-10));
wifiPhy.Set ("TxGain", DoubleValue (offset + Prss));
wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
/***************************************************************************/
/** wifi channel **/
YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
// create wifi channel
Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
wifiPhy.SetChannel (wifiChannelPtr);
/** MAC layer **/
// Add a non-QoS upper MAC, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",
StringValue (phyMode), "ControlMode",
StringValue (phyMode));
// Set it to ad-hoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
/** install PHY + MAC **/
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, networkNodes);
/** mobility **/
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (2 * distanceToRx, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
/** Energy Model **/
/***************************************************************************/
/* energy source */
BasicEnergySourceHelper basicSourceHelper;
// configure energy source
basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (1.0));
// install source
EnergySourceContainer sources = basicSourceHelper.Install (c);
/* device energy model */
WifiRadioEnergyModelHelper radioEnergyHelper;
// configure radio energy model
radioEnergyHelper.Set ("TxCurrentA", DoubleValue (0.0174));
radioEnergyHelper.Set ("RxCurrentA", DoubleValue (0.0197));
// install device model
DeviceEnergyModelContainer deviceModels = radioEnergyHelper.Install (devices, sources);
/* energy harvester */
BasicEnergyHarvesterHelper basicHarvesterHelper;
// configure energy harvester
basicHarvesterHelper.Set ("PeriodicHarvestedPowerUpdateInterval", TimeValue (Seconds (harvestingUpdateInterval)));
basicHarvesterHelper.Set ("HarvestablePower", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=0.1]"));
// install harvester on all energy sources
EnergyHarvesterContainer harvesters = basicHarvesterHelper.Install (sources);
/***************************************************************************/
/** Internet stack **/
InternetStackHelper internet;
internet.Install (networkNodes);
Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (networkNodes.Get (1), tid); // node 1, Destination
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
Ptr<Socket> source = Socket::CreateSocket (networkNodes.Get (0), tid); // node 0, Source
InetSocketAddress remote = InetSocketAddress (Ipv4Address::GetBroadcast (), 80);
source->SetAllowBroadcast (true);
source->Connect (remote);
/** connect trace sources **/
/***************************************************************************/
// all traces are connected to node 1 (Destination)
// energy source
Ptr<BasicEnergySource> basicSourcePtr = DynamicCast<BasicEnergySource> (sources.Get (1));
basicSourcePtr->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback (&RemainingEnergy));
// device energy model
Ptr<DeviceEnergyModel> basicRadioModelPtr =
basicSourcePtr->FindDeviceEnergyModels ("ns3::WifiRadioEnergyModel").Get (0);
NS_ASSERT (basicRadioModelPtr != 0);
basicRadioModelPtr->TraceConnectWithoutContext ("TotalEnergyConsumption", MakeCallback (&TotalEnergy));
// energy harvester
Ptr<BasicEnergyHarvester> basicHarvesterPtr = DynamicCast<BasicEnergyHarvester> (harvesters.Get (1));
basicHarvesterPtr->TraceConnectWithoutContext ("HarvestedPower", MakeCallback (&HarvestedPower));
basicHarvesterPtr->TraceConnectWithoutContext ("TotalEnergyHarvested", MakeCallback (&TotalEnergyHarvested));
/***************************************************************************/
/** simulation setup **/
// start traffic
Simulator::Schedule (Seconds (startTime), &GenerateTraffic, source, PpacketSize,
networkNodes.Get (0), numPackets, interPacketInterval);
Simulator::Stop (Seconds (10.0));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+2
View File
@@ -3,3 +3,5 @@
def build(bld):
obj = bld.create_ns3_program('energy-model-example', ['core', 'mobility', 'wifi', 'energy', 'internet'])
obj.source = 'energy-model-example.cc'
obj = bld.create_ns3_program('energy-model-with-harvesting-example', ['core', 'mobility', 'wifi', 'energy', 'internet'])
obj.source = 'energy-model-with-harvesting-example.cc'
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
-1
View File
@@ -41,7 +41,6 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6Example");
int main (int argc, char** argv)
{
bool verbose = false;
+1
View File
@@ -44,6 +44,7 @@
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-header.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("LooseRoutingIpv6Example");
-2
View File
@@ -132,7 +132,6 @@ int main (int argc, char** argv)
tmp2.Add (d1.Get (1)); /* R */
Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */
iicr1.SetForwarding (0, true);
iicr1.SetDefaultRouteInAllNodes (0);
iic1.Add (iicr1);
/* add another IPv6 address for second prefix advertised on first subnet */
@@ -145,7 +144,6 @@ int main (int argc, char** argv)
tmp3.Add (d2.Get (0)); /* R */
Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */
iicr2.SetForwarding (0, true);
iicr2.SetDefaultRouteInAllNodes (0);
NetDeviceContainer tmp4;
tmp4.Add (d2.Get (1)); /* n1 */
+6 -3
View File
@@ -97,7 +97,6 @@ int main (int argc, char** argv)
tmp2.Add (d1.Get (1)); /* R */
Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */
iicr1.SetForwarding (0, true);
iicr1.SetDefaultRouteInAllNodes (0);
iic1.Add (iicr1);
/* second subnet R - n1 */
@@ -106,7 +105,6 @@ int main (int argc, char** argv)
tmp3.Add (d2.Get (0)); /* R */
Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */
iicr2.SetForwarding (0, true);
iicr2.SetDefaultRouteInAllNodes (0);
NetDeviceContainer tmp4;
tmp4.Add (d2.Get (1)); /* n1 */
@@ -115,10 +113,15 @@ int main (int argc, char** argv)
/* radvd configuration */
RadvdHelper radvdHelper;
/* R interface (n0 - R) */
radvdHelper.AddAnnouncedPrefix(iic1.GetInterfaceIndex (1), Ipv6Address("2001:1::0"), 64);
/* n0 will receive unsolicited (periodic) RA */
radvdHelper.AddAnnouncedPrefix (iic1.GetInterfaceIndex (1), Ipv6Address("2001:1::0"), 64);
/* R interface (R - n1) */
/* n1 will have to use RS, as RA are not sent automatically */
radvdHelper.AddAnnouncedPrefix(iic2.GetInterfaceIndex (1), Ipv6Address("2001:2::0"), 64);
radvdHelper.GetRadvdInterface (iic2.GetInterfaceIndex (1))->SetSendAdvert (false);
ApplicationContainer radvdApps = radvdHelper.Install (r);
radvdApps.Start (Seconds (1.0));
+2 -2
View File
@@ -24,10 +24,10 @@
#include "ns3/node.h"
#include "ns3/mac48-address.h"
NS_LOG_COMPONENT_DEFINE ("TestIpv6");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TestIpv6");
int
main (int argc, char *argv[])
{
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+9 -6
View File
@@ -1,13 +1,13 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('icmpv6-redirect', ['csma', 'internet'])
obj = bld.create_ns3_program('icmpv6-redirect', ['csma', 'internet', 'applications'])
obj.source = 'icmpv6-redirect.cc'
obj = bld.create_ns3_program('ping6', ['csma', 'internet'])
obj = bld.create_ns3_program('ping6', ['csma', 'internet', 'applications'])
obj.source = 'ping6.cc'
obj = bld.create_ns3_program('radvd', ['csma', 'internet'])
obj = bld.create_ns3_program('radvd', ['csma', 'internet', 'applications'])
obj.source = 'radvd.cc'
obj = bld.create_ns3_program('radvd-two-prefix', ['csma', 'internet', 'applications'])
@@ -16,12 +16,15 @@ def build(bld):
obj = bld.create_ns3_program('test-ipv6', ['point-to-point', 'internet'])
obj.source = 'test-ipv6.cc'
obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet'])
obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet', 'applications'])
obj.source = 'fragmentation-ipv6.cc'
obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet'])
obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet', 'applications'])
obj.source = 'fragmentation-ipv6-two-MTU.cc'
obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet'])
obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet', 'applications'])
obj.source = 'loose-routing-ipv6.cc'
obj = bld.create_ns3_program('wsn-ping6', ['lr-wpan', 'internet', 'sixlowpan', 'mobility', 'applications'])
obj.source = 'wsn-ping6.cc'
+141
View File
@@ -0,0 +1,141 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Universita' di Firenze
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
*/
// Network topology
//
// n0 n1
// | |
// =================
// WSN (802.15.4)
//
// - ICMPv6 echo request flows from n0 to n1 and back with ICMPv6 echo reply
// - DropTail queues
// - Tracing of queues and packet receptions to file "wsn-ping6.tr"
//
// This example is based on the "ping6.cc" example.
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/sixlowpan-module.h"
#include "ns3/lr-wpan-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("Ping6WsnExample");
int main (int argc, char **argv)
{
bool verbose = false;
CommandLine cmd;
cmd.AddValue ("verbose", "turn on log components", verbose);
cmd.Parse (argc, argv);
if (verbose)
{
LogComponentEnable ("Ping6WsnExample", LOG_LEVEL_INFO);
LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL);
LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL);
LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL);
LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL);
LogComponentEnable ("SixLowPanNetDevice", LOG_LEVEL_ALL);
}
NS_LOG_INFO ("Create nodes.");
NodeContainer nodes;
nodes.Create (2);
// Set seed for random numbers
SeedManager::SetSeed (167);
// Install mobility
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
Ptr<ListPositionAllocator> nodesPositionAlloc = CreateObject<ListPositionAllocator> ();
nodesPositionAlloc->Add (Vector (0.0, 0.0, 0.0));
nodesPositionAlloc->Add (Vector (50.0, 0.0, 0.0));
mobility.SetPositionAllocator (nodesPositionAlloc);
mobility.Install (nodes);
NS_LOG_INFO ("Create channels.");
LrWpanHelper lrWpanHelper;
// Add and install the LrWpanNetDevice for each node
// lrWpanHelper.EnableLogComponents();
NetDeviceContainer devContainer = lrWpanHelper.Install(nodes);
lrWpanHelper.AssociateToPan (devContainer, 10);
std::cout << "Created " << devContainer.GetN() << " devices" << std::endl;
std::cout << "There are " << nodes.GetN() << " nodes" << std::endl;
/* Install IPv4/IPv6 stack */
NS_LOG_INFO ("Install Internet stack.");
InternetStackHelper internetv6;
internetv6.SetIpv4StackInstall (false);
internetv6.Install (nodes);
// Install 6LowPan layer
NS_LOG_INFO ("Install 6LoWPAN.");
SixLowPanHelper sixlowpan;
NetDeviceContainer six1 = sixlowpan.Install (devContainer);
NS_LOG_INFO ("Assign addresses.");
Ipv6AddressHelper ipv6;
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
Ipv6InterfaceContainer i = ipv6.Assign (six1);
NS_LOG_INFO ("Create Applications.");
/* Create a Ping6 application to send ICMPv6 echo request from node zero to
* all-nodes (ff02::1).
*/
uint32_t packetSize = 10;
uint32_t maxPacketCount = 5;
Time interPacketInterval = Seconds (1.);
Ping6Helper ping6;
ping6.SetLocal (i.GetAddress (0, 1));
ping6.SetRemote (i.GetAddress (1, 1));
// ping6.SetRemote (Ipv6Address::GetAllNodesMulticast ());
ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
ping6.SetAttribute ("Interval", TimeValue (interPacketInterval));
ping6.SetAttribute ("PacketSize", UintegerValue (packetSize));
ApplicationContainer apps = ping6.Install (nodes.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));
AsciiTraceHelper ascii;
lrWpanHelper.EnableAsciiAll (ascii.CreateFileStream ("ping6wsn.tr"));
lrWpanHelper.EnablePcapAll (std::string ("ping6wsn"), true);
NS_LOG_INFO ("Run Simulation.");
Simulator::Run ();
Simulator::Destroy ();
NS_LOG_INFO ("Done.");
}
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+1 -1
View File
@@ -1,5 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('object-names', ['core', 'csma', 'internet'])
obj = bld.create_ns3_program('object-names', ['core', 'csma', 'internet', 'applications'])
obj.source = 'object-names.cc'
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+4 -3
View File
@@ -1,7 +1,8 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet'])
obj.source = 'realtime-udp-echo.cc'
if bld.env["ENABLE_REAL_TIME"]:
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet', 'applications'])
obj.source = 'realtime-udp-echo.cc'
bld.register_ns3_script('realtime-udp-echo.py', ['csma', 'internet', 'applications'])
bld.register_ns3_script('realtime-udp-echo.py', ['csma', 'internet', 'applications'])
+1 -1
View File
@@ -343,7 +343,7 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
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++)
for (int i = 0; i < nSinks; i++)
{
Ptr<Socket> sink = SetupPacketReceive (adhocInterfaces.GetAddress (i), adhocNodes.Get (i));
+268
View File
@@ -0,0 +1,268 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Universita' di Firenze, Italy
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
*/
// Network topology
//
// SRC
// |<=== source network
// A-----B
// \ / \ all networks have cost 1, except
// \ / | for the direct link from C to D, which
// C / has cost 10
// | /
// |/
// D
// |<=== target network
// DST
//
//
// A, B, C and D are RIPng routers.
// A and D are configured with static addresses.
// SRC and DST will exchange packets.
//
// After about 3 seconds, the topology is built, and Echo Reply will be received.
// After 40 seconds, the link between B and D will break, causing a route failure.
// After 44 seconds from the failure, the routers will recovery from the failure.
// Split Horizoning should affect the recovery time, but it is not. See the manual
// for an explanation of this effect.
//
// If "showPings" is enabled, the user will see:
// 1) if the ping has been acknowledged
// 2) if a Destination Unreachable has been received by the sender
// 3) nothing, when the Echo Request has been received by the destination but
// the Echo Reply is unable to reach the sender.
// Examining the .pcap files with Wireshark can confirm this effect.
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-static-routing-helper.h"
#include "ns3/ipv6-routing-table-entry.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("RipNgSimpleRouting");
void TearDownLink (Ptr<Node> nodeA, Ptr<Node> nodeB, uint32_t interfaceA, uint32_t interfaceB)
{
nodeA->GetObject<Ipv6> ()->SetDown (interfaceA);
nodeB->GetObject<Ipv6> ()->SetDown (interfaceB);
}
int main (int argc, char **argv)
{
bool verbose = false;
bool printRoutingTables = false;
bool showPings = false;
std::string SplitHorizon ("PoisonReverse");
CommandLine cmd;
cmd.AddValue ("verbose", "turn on log components", verbose);
cmd.AddValue ("printRoutingTables", "Print routing tables at 30, 60 and 90 seconds", printRoutingTables);
cmd.AddValue ("showPings", "Show Ping6 reception", showPings);
cmd.AddValue ("splitHorizonStrategy", "Split Horizon strategy to use (NoSplitHorizon, SplitHorizon, PoisonReverse)", SplitHorizon);
cmd.Parse (argc, argv);
if (verbose)
{
LogComponentEnable ("RipNgSimpleRouting", LOG_LEVEL_INFO);
LogComponentEnable ("RipNg", LOG_LEVEL_ALL);
LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_INFO);
LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL);
LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL);
LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL);
LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL);
}
if (showPings)
{
LogComponentEnable ("Ping6Application", LOG_LEVEL_INFO);
}
if (SplitHorizon == "NoSplitHorizon")
{
Config::SetDefault ("ns3::RipNg::SplitHorizon", EnumValue (RipNg::NO_SPLIT_HORIZON));
}
else if (SplitHorizon == "SplitHorizon")
{
Config::SetDefault ("ns3::RipNg::SplitHorizon", EnumValue (RipNg::SPLIT_HORIZON));
}
else
{
Config::SetDefault ("ns3::RipNg::SplitHorizon", EnumValue (RipNg::POISON_REVERSE));
}
NS_LOG_INFO ("Create nodes.");
Ptr<Node> src = CreateObject<Node> ();
Names::Add ("SrcNode", src);
Ptr<Node> dst = CreateObject<Node> ();
Names::Add ("DstNode", dst);
Ptr<Node> a = CreateObject<Node> ();
Names::Add ("RouterA", a);
Ptr<Node> b = CreateObject<Node> ();
Names::Add ("RouterB", b);
Ptr<Node> c = CreateObject<Node> ();
Names::Add ("RouterC", c);
Ptr<Node> d = CreateObject<Node> ();
Names::Add ("RouterD", d);
NodeContainer net1 (src, a);
NodeContainer net2 (a, b);
NodeContainer net3 (a, c);
NodeContainer net4 (b, c);
NodeContainer net5 (c, d);
NodeContainer net6 (b, d);
NodeContainer net7 (d, dst);
NodeContainer routers (a, b, c, d);
NodeContainer nodes (src, dst);
NS_LOG_INFO ("Create channels.");
CsmaHelper csma;
csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
NetDeviceContainer ndc1 = csma.Install (net1);
NetDeviceContainer ndc2 = csma.Install (net2);
NetDeviceContainer ndc3 = csma.Install (net3);
NetDeviceContainer ndc4 = csma.Install (net4);
NetDeviceContainer ndc5 = csma.Install (net5);
NetDeviceContainer ndc6 = csma.Install (net6);
NetDeviceContainer ndc7 = csma.Install (net7);
NS_LOG_INFO ("Create IPv6 and routing");
RipNgHelper ripNgRouting;
// Rule of thumb:
// Interfaces are added sequentially, starting from 0
// However, interface 0 is always the loopback...
ripNgRouting.ExcludeInterface (a, 1);
ripNgRouting.ExcludeInterface (d, 3);
ripNgRouting.SetInterfaceMetric (c, 3, 10);
ripNgRouting.SetInterfaceMetric (d, 1, 10);
Ipv6ListRoutingHelper listRH;
listRH.Add (ripNgRouting, 0);
InternetStackHelper internetv6;
internetv6.SetIpv4StackInstall (false);
internetv6.SetRoutingHelper (listRH);
internetv6.Install (routers);
InternetStackHelper internetv6Nodes;
internetv6Nodes.SetIpv4StackInstall (false);
internetv6Nodes.Install (nodes);
// Assign addresses.
// The source and destination networks have global addresses
// The "core" network just needs link-local addresses for routing.
// We assign global addresses to the routers as well to receive
// ICMPv6 errors.
NS_LOG_INFO ("Assign IPv6 Addresses.");
Ipv6AddressHelper ipv6;
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic1 = ipv6.Assign (ndc1);
iic1.SetForwarding (1, true);
iic1.SetDefaultRouteInAllNodes (1);
ipv6.SetBase (Ipv6Address ("2001:0:1::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic2 = ipv6.Assign (ndc2);
iic2.SetForwarding (0, true);
iic2.SetForwarding (1, true);
ipv6.SetBase (Ipv6Address ("2001:0:2::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic3 = ipv6.Assign (ndc3);
iic3.SetForwarding (0, true);
iic3.SetForwarding (1, true);
ipv6.SetBase (Ipv6Address ("2001:0:3::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic4 = ipv6.Assign (ndc4);
iic4.SetForwarding (0, true);
iic4.SetForwarding (1, true);
ipv6.SetBase (Ipv6Address ("2001:0:4::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic5 = ipv6.Assign (ndc5);
iic5.SetForwarding (0, true);
iic5.SetForwarding (1, true);
ipv6.SetBase (Ipv6Address ("2001:0:5::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic6 = ipv6.Assign (ndc6);
iic6.SetForwarding (0, true);
iic6.SetForwarding (1, true);
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
Ipv6InterfaceContainer iic7 = ipv6.Assign (ndc7);
iic7.SetForwarding (0, true);
iic7.SetDefaultRouteInAllNodes (0);
if (printRoutingTables)
{
RipNgHelper routingHelper;
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper> (&std::cout);
routingHelper.PrintRoutingTableAt (Seconds (30.0), a, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (30.0), b, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (30.0), c, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (30.0), d, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (60.0), a, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (60.0), b, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (60.0), c, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (60.0), d, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (90.0), a, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (90.0), b, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (90.0), c, routingStream);
routingHelper.PrintRoutingTableAt (Seconds (90.0), d, routingStream);
}
NS_LOG_INFO ("Create Applications.");
uint32_t packetSize = 1024;
uint32_t maxPacketCount = 100;
Time interPacketInterval = Seconds (1.0);
Ping6Helper ping6;
ping6.SetLocal (iic1.GetAddress (0, 1));
ping6.SetRemote (iic7.GetAddress (1, 1));
ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
ping6.SetAttribute ("Interval", TimeValue (interPacketInterval));
ping6.SetAttribute ("PacketSize", UintegerValue (packetSize));
ApplicationContainer apps = ping6.Install (src);
apps.Start (Seconds (1.0));
apps.Stop (Seconds (110.0));
AsciiTraceHelper ascii;
csma.EnableAsciiAll (ascii.CreateFileStream ("ripng-simple-routing.tr"));
csma.EnablePcapAll ("ripng-simple-routing", true);
Simulator::Schedule (Seconds (40), &TearDownLink, b, d, 3, 2);
/* Now, do the actual simulation. */
NS_LOG_INFO ("Run Simulation.");
Simulator::Stop (Seconds (120));
Simulator::Run ();
Simulator::Destroy ();
NS_LOG_INFO ("Done.");
}
+2 -3
View File
@@ -149,11 +149,10 @@ main (int argc, char *argv[])
p2p.EnablePcapAll ("simple-global-routing");
// Flow Monitor
Ptr<FlowMonitor> flowmon;
FlowMonitorHelper flowmonHelper;
if (enableFlowMonitor)
{
flowmon = flowmonHelper.InstallAll ();
flowmonHelper.InstallAll ();
}
NS_LOG_INFO ("Run Simulation.");
@@ -163,7 +162,7 @@ main (int argc, char *argv[])
if (enableFlowMonitor)
{
flowmon->SerializeToXmlFile ("simple-global-routing.flowmon", false, false);
flowmonHelper.SerializeToXmlFile ("simple-global-routing.flowmon", false, false);
}
Simulator::Destroy ();
+6 -4
View File
@@ -70,12 +70,14 @@ def main(argv):
# Create networks and assign IPv6 Addresses
print "Addressing"
ipv6 = ns.internet.Ipv6AddressHelper();
ipv6.NewNetwork(ns.network.Ipv6Address("2001:1::"), ns.network.Ipv6Prefix(64));
ipv6.SetBase(ns.network.Ipv6Address("2001:1::"), ns.network.Ipv6Prefix(64));
i1 = ipv6.Assign(d1);
i1.SetRouter(1, True);
ipv6.NewNetwork(ns.network.Ipv6Address("2001:2::"), ns.network.Ipv6Prefix(64));
i1.SetForwarding(1, True);
i1.SetDefaultRouteInAllNodes(1);
ipv6.SetBase(ns.network.Ipv6Address("2001:2::"), ns.network.Ipv6Prefix(64));
i2 = ipv6.Assign(d2);
i2.SetRouter(0, True);
i2.SetForwarding(0, True);
i2.SetDefaultRouteInAllNodes(0);
# Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via r
print "Application"
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+11 -7
View File
@@ -2,19 +2,19 @@
def build(bld):
obj = bld.create_ns3_program('dynamic-global-routing',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'dynamic-global-routing.cc'
obj = bld.create_ns3_program('static-routing-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'static-routing-slash32.cc'
obj = bld.create_ns3_program('global-routing-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'global-routing-slash32.cc'
obj = bld.create_ns3_program('global-injection-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'global-injection-slash32.cc'
obj = bld.create_ns3_program('simple-global-routing',
@@ -25,16 +25,20 @@ def build(bld):
['point-to-point', 'internet', 'applications'])
obj.source = 'simple-alternate-routing.cc'
obj = bld.create_ns3_program( 'mixed-global-routing',
['point-to-point', 'internet', 'csma'])
obj = bld.create_ns3_program('mixed-global-routing',
['point-to-point', 'internet', 'csma', 'applications'])
obj.source = 'mixed-global-routing.cc'
obj = bld.create_ns3_program('simple-routing-ping6',
['csma', 'internet'])
['csma', 'internet', 'applications'])
obj.source = 'simple-routing-ping6.cc'
obj = bld.create_ns3_program('manet-routing-compare',
['wifi', 'dsr', 'dsdv', 'aodv', 'olsr', 'internet', 'applications'])
obj.source = 'manet-routing-compare.cc'
obj = bld.create_ns3_program('ripng-simple-network',
['csma', 'internet', 'applications'])
obj.source = 'ripng-simple-network.cc'
bld.register_ns3_script('simple-routing-ping6.py', ['csma', 'internet', 'applications'])
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+1 -1
View File
@@ -4,7 +4,7 @@ def build(bld):
obj = bld.create_ns3_program('socket-bound-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-bound-static-routing.cc'
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet', 'applications'])
obj.source = 'socket-bound-tcp-static-routing.cc'
obj = bld.create_ns3_program('socket-options-ipv4', ['network', 'csma', 'point-to-point', 'internet'])
+1 -1
View File
@@ -13,7 +13,7 @@ output from this example.
More information on the statistics package and this example is
available online on the ns-3 wiki at:
http://www.nsnam.org/wiki/index.php/Statistical_Framework_for_Network_Simulation
http://www.nsnam.org/wiki/Statistical_Framework_for_Network_Simulation
*** Using ns-3 with the OMNeT++ analysis tool ***
+2 -1
View File
@@ -66,7 +66,8 @@ Sender::GetTypeId (void)
MakePointerAccessor (&Sender::m_interval),
MakePointerChecker <RandomVariableStream>())
.AddTraceSource ("Tx", "A new packet is created and is sent",
MakeTraceSourceAccessor (&Sender::m_txTrace))
MakeTraceSourceAccessor (&Sender::m_txTrace),
"ns3::Packet::TracedCallback")
;
return tid;
}
+2 -1
View File
@@ -70,7 +70,8 @@ CMD="select exp.input,avg(100-((rx.value*100)/tx.value)) \
order by abs(exp.input) ASC;"
sqlite3 -noheader data.db "$CMD" > wifi-default.data
sed -i "s/|/ /" wifi-default.data
sed -i.bak "s/|/ /" wifi-default.data
rm wifi-default.data.bak
gnuplot wifi-example.gnuplot
echo "Done; data in wifi-default.data, plot in wifi-default.eps"
-3
View File
@@ -49,9 +49,6 @@ using namespace std;
NS_LOG_COMPONENT_DEFINE ("WiFiDistanceExperiment");
void TxCallback (Ptr<CounterCalculator<uint32_t> > datac,
std::string path, Ptr<const Packet> packet) {
NS_LOG_INFO ("Sent frame counted in " <<
-1
View File
@@ -44,7 +44,6 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpLargeTransfer");
// The number of bytes to send in this simulation.
static const uint32_t totalTxBytes = 2000000;
static uint32_t currentTxBytes = 0;
+211 -180
View File
@@ -1,180 +1,211 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2012 NICT
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Hajime Tazaki <tazaki@nict.go.jp>
*
* This code is a modified version of the code used for the the experiments in the paper
* "DCE Cradle: Simulate Network Protocols with Real Stacks for Better Realism"
* by Hajime Tazaki, Frederic Urbani and Thierry Turlett presented at WNS3 2013
*
*/
#include "ns3/log.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/flow-monitor-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpNscComparison");
std::string m_stack = "nsc-linux";
std::string sock_factory;
int m_seed = 1;
double startTime = 4.0;
double stopTime = 20.0;
uint32_t m_nNodes = 2;
bool enablePcap = false;
int
main (int argc, char *argv[])
{
//ensure the ns3 TCP default values match what nsc is using
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1448));
Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (1));
CommandLine cmd;
cmd.AddValue ("stack", "choose network stack", m_stack);
cmd.AddValue ("seed", "randomize seed", m_seed);
cmd.AddValue ("nNodes", "the number of nodes in left side", m_nNodes);
cmd.AddValue ("stopTime", "duration", stopTime);
cmd.AddValue ("enablePcap", "pcap", enablePcap);
cmd.Parse (argc, argv);
SeedManager::SetSeed (m_seed);
NodeContainer lefts, routers, rights, nodes;
lefts.Create (m_nNodes);
routers.Create (2);
rights.Create (m_nNodes);
nodes = NodeContainer (lefts, routers, rights);
InternetStackHelper internetStack;
GlobalValue::Bind ("ChecksumEnabled", BooleanValue (true));
if (m_stack == "ns3")
{
sock_factory = "ns3::TcpSocketFactory";
internetStack.Install (nodes);
}
else if (m_stack == "nsc-linux")
{
internetStack.Install (routers);
sock_factory = "ns3::TcpSocketFactory";
internetStack.SetTcp ("ns3::NscTcpL4Protocol",
"Library", StringValue ("liblinux2.6.26.so"));
internetStack.Install (lefts);
internetStack.Install (rights);
//these are not implemented in ns3 tcp so disable for comparison
Config::Set ("/NodeList/*/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_sack", StringValue ("0"));
Config::Set ("/NodeList/*/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_timestamps", StringValue ("0"));
Config::Set ("/NodeList/*/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_window_scaling", StringValue ("0"));
}
PointToPointHelper pointToPoint;
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
Ipv4AddressHelper address;
Ipv4InterfaceContainer interfaces;
NetDeviceContainer dev0, dev1, dev2;
for (uint32_t i = 0; i < m_nNodes; i++)
{
std::ostringstream oss;
oss << "10.0." << i << ".0";
address.SetBase (oss.str ().c_str (), "255.255.255.0");
dev0 = pointToPoint.Install (NodeContainer (lefts.Get (i), routers.Get (0)));
address.Assign (dev0);
}
// bottle neck link
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("2Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("100ms"));
dev1 = pointToPoint.Install (NodeContainer (routers.Get (0), routers.Get (1)));
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
// for right links
for (uint32_t i = 0; i < m_nNodes; i++)
{
std::ostringstream oss;
oss << "10.2." << i << ".0";
address.SetBase (oss.str ().c_str (), "255.255.255.0");
dev2 = pointToPoint.Install (NodeContainer (routers.Get (1), rights.Get (i)));
address.Assign (dev2);
}
// bottle neck link
Ptr<RateErrorModel> em1 =
CreateObjectWithAttributes<RateErrorModel> (
"ErrorRate", DoubleValue (0.05),
"ErrorUnit", EnumValue (RateErrorModel::ERROR_UNIT_PACKET)
);
dev1.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em1));
address.SetBase ("10.1.0.0", "255.255.255.0");
address.Assign (dev1);
Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
ApplicationContainer apps;
OnOffHelper onoff = OnOffHelper (sock_factory,
InetSocketAddress (Ipv4Address ("10.2.0.2"), 2000));
onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
// Flow 1 - n
for (uint32_t i = 0; i < m_nNodes; i++)
{
std::ostringstream oss;
oss << "10.2." << i << ".2";
onoff.SetAttribute ("Remote", AddressValue (InetSocketAddress (Ipv4Address (oss.str ().c_str ()), 2000)));
onoff.SetAttribute ("PacketSize", StringValue ("1024"));
onoff.SetAttribute ("DataRate", StringValue ("1Mbps"));
onoff.SetAttribute ("StartTime", TimeValue (Seconds (startTime)));
apps = onoff.Install (lefts.Get (i));
}
PacketSinkHelper sink = PacketSinkHelper (sock_factory,
InetSocketAddress (Ipv4Address::GetAny (), 2000));
apps = sink.Install (rights);
apps.Start (Seconds (3.9999));
pointToPoint.EnablePcapAll ("nsc.pcap");
Simulator::Stop (Seconds (stopTime));
Simulator::Run ();
Ptr<PacketSink> pktsink;
std::cout << "Total ";
for (uint32_t i = 0; i < m_nNodes; i++)
{
pktsink = apps.Get (i)->GetObject<PacketSink> ();
std::cout << "Rx(" << i << ") = " << pktsink->GetTotalRx () <<
" bytes (" << pktsink->GetTotalRx () * 8 / (stopTime - startTime) << " bps), ";
}
std::cout << std::endl;
Simulator::Destroy ();
return 0;
}
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2012 NICT
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Hajime Tazaki <tazaki@nict.go.jp>
*
* This code is a modified version of the code used for the the experiments in the paper
* "DCE Cradle: Simulate Network Protocols with Real Stacks for Better Realism"
* by Hajime Tazaki, Frederic Urbani and Thierry Turlett presented at WNS3 2013
*
* By default, TCP timestamps, window scale, and SACK are disabled because
* they were not supported in ns-3 at the time of this paper. TCP timestamp
* and window scale can be enabled by command line arguments.
*
*/
#include "ns3/log.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/flow-monitor-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpNscComparison");
std::string m_stack = "nsc-linux";
std::string sock_factory;
uint32_t m_seed = 1;
double startTime = 4.0;
double stopTime = 20.0;
uint32_t m_nNodes = 2;
bool enablePcap = false;
bool enableTimestamps = false;
bool enableWindowScale = false;
int
main (int argc, char *argv[])
{
//ensure the ns3 TCP default values match what nsc is using
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1448));
Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (1));
CommandLine cmd;
cmd.AddValue ("stack", "choose network stack", m_stack);
cmd.AddValue ("seed", "randomize seed", m_seed);
cmd.AddValue ("nNodes", "the number of source and sink nodes", m_nNodes);
cmd.AddValue ("stopTime", "duration", stopTime);
cmd.AddValue ("enablePcap", "pcap", enablePcap);
cmd.AddValue ("enableTimestamps", "use TCP Timestamps option", enableTimestamps);
cmd.AddValue ("enableWindowScale", "use TCP Window Scale option", enableWindowScale);
cmd.Parse (argc, argv);
SeedManager::SetSeed (m_seed);
if (m_stack != "nsc-linux" && m_stack != "ns3")
{
NS_FATAL_ERROR ("Error, stack named " << m_stack << " is not supported");
}
NodeContainer lefts, routers, rights, nodes;
lefts.Create (m_nNodes);
routers.Create (2);
rights.Create (m_nNodes);
nodes = NodeContainer (lefts, routers, rights);
InternetStackHelper internetStack;
GlobalValue::Bind ("ChecksumEnabled", BooleanValue (true));
if (m_stack == "ns3")
{
sock_factory = "ns3::TcpSocketFactory";
if (enableTimestamps == false)
{
Config::SetDefault ("ns3::TcpSocketBase::WindowScaling", BooleanValue (false));
}
if (enableWindowScale == false)
{
Config::SetDefault ("ns3::TcpSocketBase::Timestamp", BooleanValue (false));
}
internetStack.Install (nodes);
}
else if (m_stack == "nsc-linux")
{
internetStack.Install (routers);
sock_factory = "ns3::TcpSocketFactory";
internetStack.SetTcp ("ns3::NscTcpL4Protocol",
"Library", StringValue ("liblinux2.6.26.so"));
internetStack.Install (lefts);
internetStack.Install (rights);
// at the time this program was written, these were not implemented
// in ns3 tcp, so disable for comparison
Config::Set ("/NodeList/*/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_sack", StringValue ("0"));
if (enableTimestamps == false)
{
Config::Set ("/NodeList/*/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_timestamps", StringValue ("0"));
}
if (enableWindowScale == false)
{
Config::Set ("/NodeList/*/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_window_scaling", StringValue ("0"));
}
}
PointToPointHelper pointToPoint;
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
Ipv4AddressHelper address;
Ipv4InterfaceContainer interfaces;
NetDeviceContainer dev0, dev1, dev2;
for (uint32_t i = 0; i < m_nNodes; i++)
{
std::ostringstream oss;
oss << "10.0." << i << ".0";
address.SetBase (oss.str ().c_str (), "255.255.255.0");
dev0 = pointToPoint.Install (NodeContainer (lefts.Get (i), routers.Get (0)));
address.Assign (dev0);
}
// bottle neck link
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("2Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("100ms"));
dev1 = pointToPoint.Install (NodeContainer (routers.Get (0), routers.Get (1)));
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
// for right links
for (uint32_t i = 0; i < m_nNodes; i++)
{
std::ostringstream oss;
oss << "10.2." << i << ".0";
address.SetBase (oss.str ().c_str (), "255.255.255.0");
dev2 = pointToPoint.Install (NodeContainer (routers.Get (1), rights.Get (i)));
address.Assign (dev2);
}
// bottle neck link
Ptr<RateErrorModel> em1 =
CreateObjectWithAttributes<RateErrorModel> (
"ErrorRate", DoubleValue (0.05),
"ErrorUnit", EnumValue (RateErrorModel::ERROR_UNIT_PACKET)
);
dev1.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em1));
address.SetBase ("10.1.0.0", "255.255.255.0");
address.Assign (dev1);
Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
ApplicationContainer apps;
OnOffHelper onoff = OnOffHelper (sock_factory,
InetSocketAddress (Ipv4Address ("10.2.0.2"), 2000));
onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
// Flow 1 - n
for (uint32_t i = 0; i < m_nNodes; i++)
{
std::ostringstream oss;
oss << "10.2." << i << ".2";
onoff.SetAttribute ("Remote", AddressValue (InetSocketAddress (Ipv4Address (oss.str ().c_str ()), 2000)));
onoff.SetAttribute ("PacketSize", StringValue ("1024"));
onoff.SetAttribute ("DataRate", StringValue ("1Mbps"));
onoff.SetAttribute ("StartTime", TimeValue (Seconds (startTime)));
apps = onoff.Install (lefts.Get (i));
}
PacketSinkHelper sink = PacketSinkHelper (sock_factory,
InetSocketAddress (Ipv4Address::GetAny (), 2000));
apps = sink.Install (rights);
apps.Start (Seconds (3.9999));
if (enablePcap)
{
pointToPoint.EnablePcapAll ("nsc.pcap");
}
Simulator::Stop (Seconds (stopTime));
Simulator::Run ();
Ptr<PacketSink> pktsink;
std::cout << "Total ";
for (uint32_t i = 0; i < m_nNodes; i++)
{
pktsink = apps.Get (i)->GetObject<PacketSink> ();
std::cout << "Rx(" << i << ") = " << pktsink->GetTotalRx () <<
" bytes (" << pktsink->GetTotalRx () * 8 / (stopTime - startTime) << " bps), ";
}
std::cout << std::endl;
Simulator::Destroy ();
return 0;
}
+178 -144
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
* Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -54,92 +54,105 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpVariantsComparison");
double old_time = 0.0;
EventId output;
Time current = Time::FromInteger(3, Time::S); //Only record cwnd and ssthresh values every 3 seconds
bool first = true;
bool firstCwnd = true;
bool firstSshThr = true;
bool firstRtt = true;
bool firstRto = true;
Ptr<OutputStreamWrapper> cWndStream;
Ptr<OutputStreamWrapper> ssThreshStream;
Ptr<OutputStreamWrapper> rttStream;
Ptr<OutputStreamWrapper> rtoStream;
uint32_t cWndValue;
uint32_t ssThreshValue;
static void
OutputTrace ()
CwndTracer (uint32_t oldval, uint32_t newval)
{
// *stream->GetStream() << newtime << " " << newval << std::endl;
// old_time = newval;
}
static void
CwndTracer (Ptr<OutputStreamWrapper>stream, uint32_t oldval, uint32_t newval)
{
double new_time = Simulator::Now().GetSeconds();
if (old_time == 0 && first)
{
double mycurrent = current.GetSeconds();
*stream->GetStream() << new_time << " " << mycurrent << " " << newval << std::endl;
first = false;
output = Simulator::Schedule(current,&OutputTrace);
}
else
{
if (output.IsExpired())
if (firstCwnd)
{
*stream->GetStream() << new_time << " " << newval << std::endl;
output.Cancel();
output = Simulator::Schedule(current,&OutputTrace);
*cWndStream->GetStream () << "0.0 " << oldval << std::endl;
firstCwnd = false;
}
*cWndStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval << std::endl;
cWndValue = newval;
if (!firstSshThr)
{
*ssThreshStream->GetStream () << Simulator::Now ().GetSeconds () << " " << ssThreshValue << std::endl;
}
}
}
static void
SsThreshTracer (Ptr<OutputStreamWrapper>stream, uint32_t oldval, uint32_t newval)
SsThreshTracer (uint32_t oldval, uint32_t newval)
{
double new_time = Simulator::Now().GetSeconds();
if (old_time == 0 && first)
{
double mycurrent = current.GetSeconds();
*stream->GetStream() << new_time << " " << mycurrent << " " << newval << std::endl;
first = false;
output = Simulator::Schedule(current,&OutputTrace);
}
else
{
if (output.IsExpired())
if (firstSshThr)
{
*stream->GetStream() << new_time << " " << newval << std::endl;
output.Cancel();
output = Simulator::Schedule(current,&OutputTrace);
*ssThreshStream->GetStream () << "0.0 " << oldval << std::endl;
firstSshThr = false;
}
*ssThreshStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval << std::endl;
ssThreshValue = newval;
if (!firstCwnd)
{
*cWndStream->GetStream () << Simulator::Now ().GetSeconds () << " " << cWndValue << std::endl;
}
}
}
static void
RttTracer (Time oldval, Time newval)
{
if (firstRtt)
{
*rttStream->GetStream () << "0.0 " << oldval.GetSeconds () << std::endl;
firstRtt = false;
}
*rttStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval.GetSeconds () << std::endl;
}
static void
RtoTracer (Time oldval, Time newval)
{
if (firstRto)
{
*rtoStream->GetStream () << "0.0 " << oldval.GetSeconds () << std::endl;
firstRto = false;
}
*rtoStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval.GetSeconds () << std::endl;
}
static void
TraceCwnd (std::string cwnd_tr_file_name)
{
AsciiTraceHelper ascii;
if (cwnd_tr_file_name.compare("") == 0)
{
NS_LOG_DEBUG ("No trace file for cwnd provided");
return;
}
else
{
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream(cwnd_tr_file_name.c_str());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow",MakeBoundCallback (&CwndTracer, stream));
}
cWndStream = ascii.CreateFileStream (cwnd_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow", MakeCallback (&CwndTracer));
}
static void
TraceSsThresh(std::string ssthresh_tr_file_name)
TraceSsThresh (std::string ssthresh_tr_file_name)
{
AsciiTraceHelper ascii;
if (ssthresh_tr_file_name.compare("") == 0)
{
NS_LOG_DEBUG ("No trace file for ssthresh provided");
return;
}
else
{
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream(ssthresh_tr_file_name.c_str());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold",MakeBoundCallback (&SsThreshTracer, stream));
}
ssThreshStream = ascii.CreateFileStream (ssthresh_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold", MakeCallback (&SsThreshTracer));
}
static void
TraceRtt (std::string rtt_tr_file_name)
{
AsciiTraceHelper ascii;
rttStream = ascii.CreateFileStream (rtt_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/RTT", MakeCallback (&RttTracer));
}
static void
TraceRto (std::string rto_tr_file_name)
{
AsciiTraceHelper ascii;
rtoStream = ascii.CreateFileStream (rto_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/RTO", MakeCallback (&RtoTracer));
}
int main (int argc, char *argv[])
@@ -153,6 +166,8 @@ int main (int argc, char *argv[])
std::string tr_file_name = "";
std::string cwnd_tr_file_name = "";
std::string ssthresh_tr_file_name = "";
std::string rtt_tr_file_name = "";
std::string rto_tr_file_name = "";
double data_mbytes = 0;
uint32_t mtu_bytes = 400;
uint16_t num_flows = 1;
@@ -162,25 +177,27 @@ int main (int argc, char *argv[])
CommandLine cmd;
cmd.AddValue("transport_prot", "Transport protocol to use: TcpTahoe, TcpReno, TcpNewReno, TcpWestwood, TcpWestwoodPlus ", transport_prot);
cmd.AddValue("error_p", "Packet error rate", error_p);
cmd.AddValue("bandwidth", "Bottleneck bandwidth", bandwidth);
cmd.AddValue("access_bandwidth", "Access link bandwidth", access_bandwidth);
cmd.AddValue("delay", "Access link delay", access_delay);
cmd.AddValue("tracing", "Flag to enable/disable tracing", tracing);
cmd.AddValue("tr_name", "Name of output trace file", tr_file_name);
cmd.AddValue("cwnd_tr_name", "Name of output trace file", cwnd_tr_file_name);
cmd.AddValue("ssthresh_tr_name", "Name of output trace file", ssthresh_tr_file_name);
cmd.AddValue("data", "Number of Megabytes of data to transmit", data_mbytes);
cmd.AddValue("mtu", "Size of IP packets to send in bytes", mtu_bytes);
cmd.AddValue("num_flows", "Number of flows", num_flows);
cmd.AddValue("duration", "Time to allow flows to run in seconds", duration);
cmd.AddValue("run", "Run index (for setting repeatable seeds)", run);
cmd.AddValue("flow_monitor", "Enable flow monitor", flow_monitor);
cmd.AddValue ("transport_prot", "Transport protocol to use: TcpTahoe, TcpReno, TcpNewReno, TcpWestwood, TcpWestwoodPlus ", transport_prot);
cmd.AddValue ("error_p", "Packet error rate", error_p);
cmd.AddValue ("bandwidth", "Bottleneck bandwidth", bandwidth);
cmd.AddValue ("access_bandwidth", "Access link bandwidth", access_bandwidth);
cmd.AddValue ("delay", "Access link delay", access_delay);
cmd.AddValue ("tracing", "Flag to enable/disable tracing", tracing);
cmd.AddValue ("tr_name", "Name of output trace file", tr_file_name);
cmd.AddValue ("cwnd_tr_name", "Name of output trace file", cwnd_tr_file_name);
cmd.AddValue ("ssthresh_tr_name", "Name of output trace file", ssthresh_tr_file_name);
cmd.AddValue ("rtt_tr_name", "Name of output trace file", rtt_tr_file_name);
cmd.AddValue ("rto_tr_name", "Name of output trace file", rto_tr_file_name);
cmd.AddValue ("data", "Number of Megabytes of data to transmit", data_mbytes);
cmd.AddValue ("mtu", "Size of IP packets to send in bytes", mtu_bytes);
cmd.AddValue ("num_flows", "Number of flows", num_flows);
cmd.AddValue ("duration", "Time to allow flows to run in seconds", duration);
cmd.AddValue ("run", "Run index (for setting repeatable seeds)", run);
cmd.AddValue ("flow_monitor", "Enable flow monitor", flow_monitor);
cmd.Parse (argc, argv);
SeedManager::SetSeed(1);
SeedManager::SetRun(run);
SeedManager::SetSeed (1);
SeedManager::SetRun (run);
// User may find it convenient to enable logging
//LogComponentEnable("TcpVariantsComparison", LOG_LEVEL_ALL);
@@ -188,12 +205,12 @@ int main (int argc, char *argv[])
//LogComponentEnable("DropTailQueue", LOG_LEVEL_ALL);
// Calculate the ADU size
Header* temp_header = new Ipv4Header();
uint32_t ip_header = temp_header->GetSerializedSize();
Header* temp_header = new Ipv4Header ();
uint32_t ip_header = temp_header->GetSerializedSize ();
NS_LOG_LOGIC ("IP Header size is: " << ip_header);
delete temp_header;
temp_header = new TcpHeader();
uint32_t tcp_header = temp_header->GetSerializedSize();
temp_header = new TcpHeader ();
uint32_t tcp_header = temp_header->GetSerializedSize ();
NS_LOG_LOGIC ("TCP Header size is: " << tcp_header);
delete temp_header;
uint32_t tcp_adu_size = mtu_bytes - (ip_header + tcp_header);
@@ -204,22 +221,28 @@ int main (int argc, char *argv[])
float stop_time = start_time + duration;
// Select TCP variant
if (transport_prot.compare("TcpTahoe") == 0)
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpTahoe::GetTypeId()));
else if (transport_prot.compare("TcpReno") == 0)
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpReno::GetTypeId()));
else if (transport_prot.compare("TcpNewReno") == 0)
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpNewReno::GetTypeId()));
else if (transport_prot.compare("TcpWestwood") == 0)
{// the default protocol type in ns3::TcpWestwood is WESTWOOD
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId()));
Config::SetDefault("ns3::TcpWestwood::FilterType", EnumValue(TcpWestwood::TUSTIN));
}
else if (transport_prot.compare("TcpWestwoodPlus") == 0)
if (transport_prot.compare ("TcpTahoe") == 0)
{
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId()));
Config::SetDefault("ns3::TcpWestwood::ProtocolType", EnumValue(TcpWestwood::WESTWOODPLUS));
Config::SetDefault("ns3::TcpWestwood::FilterType", EnumValue(TcpWestwood::TUSTIN));
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpTahoe::GetTypeId ()));
}
else if (transport_prot.compare ("TcpReno") == 0)
{
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpReno::GetTypeId ()));
}
else if (transport_prot.compare ("TcpNewReno") == 0)
{
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpNewReno::GetTypeId ()));
}
else if (transport_prot.compare ("TcpWestwood") == 0)
{ // the default protocol type in ns3::TcpWestwood is WESTWOOD
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId ()));
Config::SetDefault ("ns3::TcpWestwood::FilterType", EnumValue (TcpWestwood::TUSTIN));
}
else if (transport_prot.compare ("TcpWestwoodPlus") == 0)
{
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId ()));
Config::SetDefault ("ns3::TcpWestwood::ProtocolType", EnumValue (TcpWestwood::WESTWOODPLUS));
Config::SetDefault ("ns3::TcpWestwood::FilterType", EnumValue (TcpWestwood::TUSTIN));
}
else
{
@@ -231,18 +254,18 @@ int main (int argc, char *argv[])
NodeContainer gateways;
gateways.Create (1);
NodeContainer sources;
sources.Create(num_flows);
sources.Create (num_flows);
NodeContainer sinks;
sinks.Create(num_flows);
sinks.Create (num_flows);
// Configure the error model
// Here we use RateErrorModel with packet error rate
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable>();
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable> ();
uv->SetStream (50);
RateErrorModel error_model;
error_model.SetRandomVariable(uv);
error_model.SetUnit(RateErrorModel::ERROR_UNIT_PACKET);
error_model.SetRate(error_p);
error_model.SetRandomVariable (uv);
error_model.SetUnit (RateErrorModel::ERROR_UNIT_PACKET);
error_model.SetRate (error_p);
PointToPointHelper UnReLink;
UnReLink.SetDeviceAttribute ("DataRate", StringValue (bandwidth));
@@ -262,16 +285,16 @@ int main (int argc, char *argv[])
LocalLink.SetDeviceAttribute ("DataRate", StringValue (access_bandwidth));
LocalLink.SetChannelAttribute ("Delay", StringValue (access_delay));
Ipv4InterfaceContainer sink_interfaces;
for (int i=0; i<num_flows; i++)
for (int i = 0; i < num_flows; i++)
{
NetDeviceContainer devices;
devices = LocalLink.Install(sources.Get(i), gateways.Get(0));
address.NewNetwork();
devices = LocalLink.Install (sources.Get (i), gateways.Get (0));
address.NewNetwork ();
Ipv4InterfaceContainer interfaces = address.Assign (devices);
devices = UnReLink.Install(gateways.Get(0), sinks.Get(i));
address.NewNetwork();
devices = UnReLink.Install (gateways.Get (0), sinks.Get (i));
address.NewNetwork ();
interfaces = address.Assign (devices);
sink_interfaces.Add(interfaces.Get(1));
sink_interfaces.Add (interfaces.Get (1));
}
NS_LOG_INFO ("Initialize Global Routing.");
@@ -281,29 +304,29 @@ int main (int argc, char *argv[])
Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory", sinkLocalAddress);
for(uint16_t i=0; i<sources.GetN(); i++)
for (uint16_t i = 0; i < sources.GetN (); i++)
{
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress(i, 0), port));
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress (i, 0), port));
if (transport_prot.compare("TcpTahoe") == 0
|| transport_prot.compare("TcpReno") == 0
|| transport_prot.compare("TcpNewReno") == 0
|| transport_prot.compare("TcpWestwood") == 0
|| transport_prot.compare("TcpWestwoodPlus") == 0)
if (transport_prot.compare ("TcpTahoe") == 0
|| transport_prot.compare ("TcpReno") == 0
|| transport_prot.compare ("TcpNewReno") == 0
|| transport_prot.compare ("TcpWestwood") == 0
|| transport_prot.compare ("TcpWestwoodPlus") == 0)
{
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (tcp_adu_size));
BulkSendHelper ftp("ns3::TcpSocketFactory", Address());
BulkSendHelper ftp ("ns3::TcpSocketFactory", Address ());
ftp.SetAttribute ("Remote", remoteAddress);
ftp.SetAttribute ("SendSize", UintegerValue (tcp_adu_size));
ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes*1000000)));
ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes * 1000000)));
ApplicationContainer sourceApp = ftp.Install (sources.Get(i));
sourceApp.Start (Seconds (start_time*i));
ApplicationContainer sourceApp = ftp.Install (sources.Get (i));
sourceApp.Start (Seconds (start_time * i));
sourceApp.Stop (Seconds (stop_time - 3));
sinkHelper.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
ApplicationContainer sinkApp = sinkHelper.Install (sinks);
sinkApp.Start (Seconds (start_time*i));
sinkApp.Start (Seconds (start_time * i));
sinkApp.Stop (Seconds (stop_time));
}
else
@@ -316,42 +339,53 @@ int main (int argc, char *argv[])
// Set up tracing if enabled
if (tracing)
{
std::ofstream ascii;
Ptr<OutputStreamWrapper> ascii_wrap;
if (tr_file_name.compare("") == 0)
if (tr_file_name.compare ("") != 0)
{
NS_LOG_DEBUG ("No trace file provided");
exit (1);
}
else
{
ascii.open (tr_file_name.c_str());
ascii_wrap = new OutputStreamWrapper(tr_file_name.c_str(), std::ios::out);
std::ofstream ascii;
Ptr<OutputStreamWrapper> ascii_wrap;
ascii.open (tr_file_name.c_str ());
ascii_wrap = new OutputStreamWrapper (tr_file_name.c_str (), std::ios::out);
stack.EnableAsciiIpv4All (ascii_wrap);
}
stack.EnableAsciiIpv4All (ascii_wrap);
if (cwnd_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceCwnd, cwnd_tr_file_name);
}
if (ssthresh_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceSsThresh, ssthresh_tr_file_name);
}
if (rtt_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceRtt, rtt_tr_file_name);
}
if (rto_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceRto, rto_tr_file_name);
}
Simulator::Schedule(Seconds(0.00001), &TraceCwnd, cwnd_tr_file_name);
Simulator::Schedule(Seconds(0.00001), &TraceSsThresh, ssthresh_tr_file_name);
}
UnReLink.EnablePcapAll("TcpVariantsComparison", true);
LocalLink.EnablePcapAll("TcpVariantsComparison", true);
UnReLink.EnablePcapAll ("TcpVariantsComparison", true);
LocalLink.EnablePcapAll ("TcpVariantsComparison", true);
// Flow monitor
Ptr<FlowMonitor> flowMonitor;
FlowMonitorHelper flowHelper;
if (flow_monitor)
{
flowMonitor = flowHelper.InstallAll();
flowHelper.InstallAll ();
}
Simulator::Stop (Seconds(stop_time));
Simulator::Stop (Seconds (stop_time));
Simulator::Run ();
if (flow_monitor)
{
flowMonitor->SerializeToXmlFile("TcpVariantsComparison.flowmonitor", true, true);
flowHelper.SerializeToXmlFile ("TcpVariantsComparison.flowmonitor", true, true);
}
Simulator::Destroy ();
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+4 -3
View File
@@ -35,9 +35,10 @@ stack = ns.internet.InternetStackHelper()
stack.Install(nodes)
address = ns.internet.Ipv4AddressHelper()
address.SetBase(ns.network.Ipv4Address("10.1.1.0"), ns.network.Ipv4Mask("255.255.255.0"))
address.SetBase(ns.network.Ipv4Address("10.1.1.0"),
ns.network.Ipv4Mask("255.255.255.0"))
interfaces = address.Assign (devices);
interfaces = address.Assign(devices)
echoServer = ns.applications.UdpEchoServerHelper(9)
@@ -47,7 +48,7 @@ serverApps.Stop(ns.core.Seconds(10.0))
echoClient = ns.applications.UdpEchoClientHelper(interfaces.GetAddress(1), 9)
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds(1.0)))
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
clientApps = echoClient.Install(nodes.Get(0))
+8 -2
View File
@@ -26,14 +26,20 @@ using namespace ns3;
class MyObject : public Object
{
public:
/**
* Register this type.
* \return The TypeId.
*/
static TypeId GetTypeId (void)
{
static TypeId tid = TypeId ("MyObject")
.SetParent (Object::GetTypeId ())
.SetParent<Object> ()
.SetGroupName ("Tutorial")
.AddConstructor<MyObject> ()
.AddTraceSource ("MyInteger",
"An integer value to trace.",
MakeTraceSourceAccessor (&MyObject::m_myInt))
MakeTraceSourceAccessor (&MyObject::m_myInt),
"ns3::TracedValue::Int32Callback")
;
return tid;
}
+2 -2
View File
@@ -16,10 +16,10 @@
#include "ns3/core-module.h"
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
int
main (int argc, char *argv[])
{
+102
View File
@@ -0,0 +1,102 @@
# -*- Mode: Python; -*-
# /*
# * 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
# *
# * Ported to Python by Mohit P. Tahiliani
# */
import ns.core
import ns.network
import ns.csma
import ns.internet
import ns.point_to_point
import ns.applications
import sys
# // Default Network Topology
# //
# // 10.1.1.0
# // n0 -------------- n1 n2 n3 n4
# // point-to-point | | | |
# // ================
# // LAN 10.1.2.0
cmd = ns.core.CommandLine()
cmd.nCsma = 3
cmd.verbose = "True"
cmd.AddValue("nCsma", "Number of \"extra\" CSMA nodes/devices")
cmd.AddValue("verbose", "Tell echo applications to log if true")
cmd.Parse(sys.argv)
nCsma = int(cmd.nCsma)
verbose = cmd.verbose
if verbose == "True":
ns.core.LogComponentEnable("UdpEchoClientApplication", ns.core.LOG_LEVEL_INFO)
ns.core.LogComponentEnable("UdpEchoServerApplication", ns.core.LOG_LEVEL_INFO)
nCsma = 1 if int(nCsma) == 0 else int(nCsma)
p2pNodes = ns.network.NodeContainer()
p2pNodes.Create(2)
csmaNodes = ns.network.NodeContainer()
csmaNodes.Add(p2pNodes.Get(1))
csmaNodes.Create(nCsma)
pointToPoint = ns.point_to_point.PointToPointHelper()
pointToPoint.SetDeviceAttribute("DataRate", ns.core.StringValue("5Mbps"))
pointToPoint.SetChannelAttribute("Delay", ns.core.StringValue("2ms"))
p2pDevices = pointToPoint.Install(p2pNodes)
csma = ns.csma.CsmaHelper()
csma.SetChannelAttribute("DataRate", ns.core.StringValue("100Mbps"))
csma.SetChannelAttribute("Delay", ns.core.TimeValue(ns.core.NanoSeconds(6560)))
csmaDevices = csma.Install(csmaNodes)
stack = ns.internet.InternetStackHelper()
stack.Install(p2pNodes.Get(0))
stack.Install(csmaNodes)
address = ns.internet.Ipv4AddressHelper()
address.SetBase(ns.network.Ipv4Address("10.1.1.0"), ns.network.Ipv4Mask("255.255.255.0"))
p2pInterfaces = address.Assign(p2pDevices)
address.SetBase(ns.network.Ipv4Address("10.1.2.0"), ns.network.Ipv4Mask("255.255.255.0"))
csmaInterfaces = address.Assign(csmaDevices)
echoServer = ns.applications.UdpEchoServerHelper(9)
serverApps = echoServer.Install(csmaNodes.Get(nCsma))
serverApps.Start(ns.core.Seconds(1.0))
serverApps.Stop(ns.core.Seconds(10.0))
echoClient = ns.applications.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma), 9)
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
clientApps = echoClient.Install(p2pNodes.Get(0))
clientApps.Start(ns.core.Seconds(2.0))
clientApps.Stop(ns.core.Seconds(10.0))
ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
pointToPoint.EnablePcapAll("second")
csma.EnablePcap ("second", csmaDevices.Get (1), True)
ns.core.Simulator.Run()
ns.core.Simulator.Destroy()
+28 -12
View File
@@ -66,6 +66,11 @@ public:
MyApp ();
virtual ~MyApp ();
/**
* Register this type.
* \return The TypeId.
*/
static TypeId GetTypeId (void);
void Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate);
private:
@@ -102,6 +107,17 @@ MyApp::~MyApp ()
m_socket = 0;
}
/* static */
TypeId MyApp::GetTypeId (void)
{
static TypeId tid = TypeId ("MyApp")
.SetParent<Application> ()
.SetGroupName ("Tutorial")
.AddConstructor<MyApp> ()
;
return tid;
}
void
MyApp::Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate)
{
@@ -210,8 +226,8 @@ main (int argc, char *argv[])
uint16_t sinkPort = 8080;
Address sinkAddress;
Address anyAddress;
std::string probeName;
std::string probeTrace;
std::string probeType;
std::string tracePath;
if (useV6 == false)
{
Ipv4AddressHelper address;
@@ -219,8 +235,8 @@ main (int argc, char *argv[])
Ipv4InterfaceContainer interfaces = address.Assign (devices);
sinkAddress = InetSocketAddress (interfaces.GetAddress (1), sinkPort);
anyAddress = InetSocketAddress (Ipv4Address::GetAny (), sinkPort);
probeName = "ns3::Ipv4PacketProbe";
probeTrace = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
probeType = "ns3::Ipv4PacketProbe";
tracePath = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx";
}
else
{
@@ -229,8 +245,8 @@ main (int argc, char *argv[])
Ipv6InterfaceContainer interfaces = address.Assign (devices);
sinkAddress = Inet6SocketAddress (interfaces.GetAddress (1,1), sinkPort);
anyAddress = Inet6SocketAddress (Ipv6Address::GetAny (), sinkPort);
probeName = "ns3::Ipv6PacketProbe";
probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
probeType = "ns3::Ipv6PacketProbe";
tracePath = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx";
}
PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", anyAddress);
@@ -265,12 +281,12 @@ main (int argc, char *argv[])
"Time (Seconds)",
"Packet Byte Count");
// Specify the probe type, probe path (in configuration namespace), and
// Specify the probe type, trace source path (in configuration namespace), and
// probe output trace source ("OutputBytes") to plot. The fourth argument
// specifies the name of the data series label on the plot. The last
// argument formats the plot by specifying where the key should be placed.
plotHelper.PlotProbe (probeName,
probeTrace,
plotHelper.PlotProbe (probeType,
tracePath,
"OutputBytes",
"Packet Byte Count",
GnuplotAggregator::KEY_BELOW);
@@ -285,10 +301,10 @@ main (int argc, char *argv[])
// Set the labels for this formatted output file.
fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f");
// Specify the probe type, probe path (in configuration namespace), and
// Specify the probe type, trace source path (in configuration namespace), and
// probe output trace source ("OutputBytes") to write.
fileHelper.WriteProbe (probeName,
probeTrace,
fileHelper.WriteProbe (probeType,
tracePath,
"OutputBytes");
Simulator::Stop (Seconds (20));
+16
View File
@@ -65,6 +65,11 @@ public:
MyApp ();
virtual ~MyApp ();
/**
* Register this type.
* \return The TypeId.
*/
static TypeId GetTypeId (void);
void Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate);
private:
@@ -101,6 +106,17 @@ MyApp::~MyApp ()
m_socket = 0;
}
/* static */
TypeId MyApp::GetTypeId (void)
{
static TypeId tid = TypeId ("MyApp")
.SetParent<Application> ()
.SetGroupName ("Tutorial")
.AddConstructor<MyApp> ()
;
return tid;
}
void
MyApp::Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate)
{
+18 -7
View File
@@ -25,6 +25,10 @@
// Default Network Topology
//
// Number of wifi or csma nodes can be increased up to 250
// |
// Rank 0 | Rank 1
// -------------------------|----------------------------
// Wifi 10.1.3.0
// AP
// * * * *
@@ -44,19 +48,23 @@ main (int argc, char *argv[])
bool verbose = true;
uint32_t nCsma = 3;
uint32_t nWifi = 3;
bool tracing = false;
CommandLine cmd;
cmd.AddValue ("nCsma", "Number of \"extra\" CSMA nodes/devices", nCsma);
cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi);
cmd.AddValue ("verbose", "Tell echo applications to log if true", verbose);
cmd.AddValue ("tracing", "Enable pcap tracing", tracing);
cmd.Parse (argc,argv);
if (nWifi > 18)
// Check for valid number of csma or wifi nodes
// 250 should be enough, otherwise IP addresses
// soon become an issue
if (nWifi > 250 || nCsma > 250)
{
std::cout << "Number of wifi nodes " << nWifi <<
" specified exceeds the mobility bounding box" << std::endl;
exit (1);
std::cout << "Too many wifi or csma nodes, no more than 250 each." << std::endl;
return 1;
}
if (verbose)
@@ -169,9 +177,12 @@ main (int argc, char *argv[])
Simulator::Stop (Seconds (10.0));
pointToPoint.EnablePcapAll ("third");
phy.EnablePcap ("third", apDevices.Get (0));
csma.EnablePcap ("third", csmaDevices.Get (0), true);
if (tracing == true)
{
pointToPoint.EnablePcapAll ("third");
phy.EnablePcap ("third", apDevices.Get (0));
csma.EnablePcap ("third", csmaDevices.Get (0), true);
}
Simulator::Run ();
Simulator::Destroy ();
+153
View File
@@ -0,0 +1,153 @@
# -*- Mode: Python; -*-
# /*
# * 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
# *
# * Ported to Python by Mohit P. Tahiliani
# */
import ns.core
import ns.network
import ns.point_to_point
import ns.applications
import ns.wifi
import ns.mobility
import ns.csma
import ns.internet
import sys
# // Default Network Topology
# //
# // Wifi 10.1.3.0
# // AP
# // * * * *
# // | | | | 10.1.1.0
# // n5 n6 n7 n0 -------------- n1 n2 n3 n4
# // point-to-point | | | |
# // ================
# // LAN 10.1.2.0
cmd = ns.core.CommandLine()
cmd.nCsma = 3
cmd.verbose = "True"
cmd.nWifi = 3
cmd.AddValue("nCsma", "Number of \"extra\" CSMA nodes/devices")
cmd.AddValue("nWifi", "Number of wifi STA devices")
cmd.AddValue("verbose", "Tell echo applications to log if true")
cmd.Parse(sys.argv)
nCsma = int(cmd.nCsma)
verbose = cmd.verbose
nWifi = int(cmd.nWifi)
if nWifi > 18:
print "Number of wifi nodes "+ str(nWifi)+ " specified exceeds the mobility bounding box"
sys.exit(1)
if verbose == "True":
ns.core.LogComponentEnable("UdpEchoClientApplication", ns.core.LOG_LEVEL_INFO)
ns.core.LogComponentEnable("UdpEchoServerApplication", ns.core.LOG_LEVEL_INFO)
p2pNodes = ns.network.NodeContainer()
p2pNodes.Create(2)
pointToPoint = ns.point_to_point.PointToPointHelper()
pointToPoint.SetDeviceAttribute("DataRate", ns.core.StringValue("5Mbps"))
pointToPoint.SetChannelAttribute("Delay", ns.core.StringValue("2ms"))
p2pDevices = pointToPoint.Install(p2pNodes)
csmaNodes = ns.network.NodeContainer()
csmaNodes.Add(p2pNodes.Get(1))
csmaNodes.Create(nCsma)
csma = ns.csma.CsmaHelper()
csma.SetChannelAttribute("DataRate", ns.core.StringValue("100Mbps"))
csma.SetChannelAttribute("Delay", ns.core.TimeValue(ns.core.NanoSeconds(6560)))
csmaDevices = csma.Install(csmaNodes)
wifiStaNodes = ns.network.NodeContainer()
wifiStaNodes.Create(nWifi)
wifiApNode = p2pNodes.Get(0)
channel = ns.wifi.YansWifiChannelHelper.Default()
phy = ns.wifi.YansWifiPhyHelper.Default()
phy.SetChannel(channel.Create())
wifi = ns.wifi.WifiHelper.Default()
wifi.SetRemoteStationManager("ns3::AarfWifiManager")
mac = ns.wifi.NqosWifiMacHelper.Default()
ssid = ns.wifi.Ssid ("ns-3-ssid")
mac.SetType ("ns3::StaWifiMac", "Ssid", ns.wifi.SsidValue(ssid), "ActiveProbing", ns.core.BooleanValue(False))
staDevices = wifi.Install(phy, mac, wifiStaNodes)
mac.SetType("ns3::ApWifiMac","Ssid", ns.wifi.SsidValue (ssid))
apDevices = wifi.Install(phy, mac, wifiApNode)
mobility = ns.mobility.MobilityHelper()
mobility.SetPositionAllocator ("ns3::GridPositionAllocator", "MinX", ns.core.DoubleValue(0.0),
"MinY", ns.core.DoubleValue (0.0), "DeltaX", ns.core.DoubleValue(5.0), "DeltaY", ns.core.DoubleValue(10.0),
"GridWidth", ns.core.UintegerValue(3), "LayoutType", ns.core.StringValue("RowFirst"))
mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel", "Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle (-50, 50, -50, 50)))
mobility.Install(wifiStaNodes)
mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel")
mobility.Install(wifiApNode)
stack = ns.internet.InternetStackHelper()
stack.Install(csmaNodes)
stack.Install(wifiApNode)
stack.Install(wifiStaNodes)
address = ns.internet.Ipv4AddressHelper()
address.SetBase(ns.network.Ipv4Address("10.1.1.0"), ns.network.Ipv4Mask("255.255.255.0"))
p2pInterfaces = address.Assign(p2pDevices)
address.SetBase(ns.network.Ipv4Address("10.1.2.0"), ns.network.Ipv4Mask("255.255.255.0"))
csmaInterfaces = address.Assign(csmaDevices)
address.SetBase(ns.network.Ipv4Address("10.1.3.0"), ns.network.Ipv4Mask("255.255.255.0"))
address.Assign(staDevices)
address.Assign(apDevices)
echoServer = ns.applications.UdpEchoServerHelper(9)
serverApps = echoServer.Install(csmaNodes.Get(nCsma))
serverApps.Start(ns.core.Seconds(1.0))
serverApps.Stop(ns.core.Seconds(10.0))
echoClient = ns.applications.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma), 9)
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
clientApps = echoClient.Install(wifiStaNodes.Get (nWifi - 1))
clientApps.Start(ns.core.Seconds(2.0))
clientApps.Stop(ns.core.Seconds(10.0))
ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
ns.core.Simulator.Stop(ns.core.Seconds(10.0))
pointToPoint.EnablePcapAll ("third")
phy.EnablePcap ("third", apDevices.Get (0))
csma.EnablePcap ("third", csmaDevices.Get (0), True)
ns.core.Simulator.Run()
ns.core.Simulator.Destroy()
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"
+5 -1
View File
@@ -12,9 +12,13 @@ def build(bld):
obj = bld.create_ns3_program('second', ['core', 'point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'second.cc'
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet'])
bld.register_ns3_script('second.py', ['core', 'point-to-point', 'csma', 'internet', 'applications'])
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet', 'applications'])
obj.source = 'third.cc'
bld.register_ns3_script('third.py', ['core', 'point-to-point', 'csma', 'wifi', 'internet', 'applications'])
obj = bld.create_ns3_program('fourth', ['core'])
obj.source = 'fourth.cc'
-1
View File
@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../waf "$@"

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