Compare commits

...

414 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
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
Nicola Baldo 91621686b4 added comment 2014-04-14 17:21:29 +02:00
Nicola Baldo 39afbfc8c8 discard duplicate AMD PDU segments 2013-12-11 13:12:52 +01:00
Nicola Baldo eb3a9225fe LteRlcAm: add RBS timer, fix polling for retransmissions 2013-12-10 20:16:50 +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
Nicola Baldo dbffc3a3ee lte-rlc-am-e2e test now using LteTestMac with AUTOMATIC_MODE 2013-12-10 17:42:30 +01:00
Nicola Baldo 3d75fe5639 LteRlcAm: trigger a STATUS report when T_reordering expires 2013-11-22 20:33:30 +01: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
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
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
1179 changed files with 46293 additions and 23044 deletions
+56
View File
@@ -0,0 +1,56 @@
*.pyc
.waf*
src/NDNabstraction
build/
doc/html/
doc/latex/
\.rej$
\.orig$
\.o$
~$
^build-dir
^build
^testpy-output
^doc/html
^doc/latex
.lock-wscript
doc/ns3-object.txt
doc/introspected-doxygen.h
.lock-waf_darwin_build
.lock-waf_linux2_build
.lock-waf_cygwin_build
.lock-waf_freebsd7_build
.lock-waf_freebsd8_build
.lock-waf_freebsd9_build
.waf
^doc/introspected-doxygen\.h$
.*\.py[co]$
\.pcap$
\.mob$
\.routes$
^doc/manual/build
^doc/tutorial/build
^doc/testing/build
^doc/models/build
^doc/models/source-temp
^doc/manual/figures/.*eps
^doc/manual/figures/.*pdf
^doc/manual/figures/.*png
^bindings/python/pybindgen/
ms_print.*
massif.*
\.patch$
\.diff$
\.tr$
\#[^\#/]+\#$
.lock-wscript
.lock-wafbuild
src/ndnSIM
configure
toggle
.ns3rc
.cproject
.project
.settings/
+2
View File
@@ -69,3 +69,5 @@ cfbc9491d7e7c9d346cc042fd35b8afb8836e81f ns-3.18
322102df792e2be6c74df74f776b3470fb1db795 ns-3.19
da0eb48df23f96335f32a37f047a6bc27e197c8d ns-3.20
fa4be182ef17746cea50e89af557c79a28b76533 ns-3.21
103f62fc7d586cf6d4d6fd9f5e488d2f7f8fe436 ns-3.22
8ea92bc090cdc01e683a2116d7668ce745ae92e2 ns-3.23
+7
View File
@@ -28,9 +28,11 @@ 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)
@@ -49,6 +51,7 @@ 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)
@@ -57,6 +60,7 @@ 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)
@@ -82,6 +86,7 @@ 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)
@@ -101,10 +106,12 @@ 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)
+52
View File
@@ -50,6 +50,58 @@ the cracks, unfortunately. If you, as a user, can suggest improvements
to this file based on your experience, please contribute a patch or drop
us a note on ns-developers mailing list.</p>
<hr>
<h1>Changes from ns-3.23 to ns-3.24</h1>
<h2>New API:</h2>
<ul>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<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>
</ul>
<h2>Changed behavior:</h2>
This section is for behavioral changes to the models that were not due to a bug fix.
<ul>
</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>
+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
+6
View File
@@ -1,3 +1,9 @@
Note:
This is a custom and unsupported fork of NS-3 simulator (http://www.nsnam.org/).
**The code in this repository is frequently rebased on top of the latest ns-3-dev branch**
The Network Simulator, Version 3
--------------------------------
+127 -4
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
------------
@@ -19,6 +19,130 @@ This release is not yet available.
Supported platforms
-------------------
New user-visible features
-------------------------
- (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,
@@ -28,7 +152,6 @@ New user-visible features
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.
- (wifi) PARF and APARF WiFi rate controls have been added to the wifi model.
- (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
@@ -51,9 +174,9 @@ New user-visible features
framework to traced values emitting Time objects
- (documentation) the callback function signatures for all TraceSources
is documented in Doxygen
- print-introspected-doxygen.sh has had several enhancements;
- (utils) print-introspected-doxygen.cc has had several enhancements;
use -h to read the usage message for details.
- TracedValue and TracedCallback function signatures are now documented,
- (core) TracedValue and TracedCallback function signatures are now documented,
which required changing the TypeId::AddTraceSource API.
Bugs fixed
+32 -21
View File
@@ -12,8 +12,8 @@ from waflib.Errors import WafError
# feature = TaskGen.feature
# after = TaskGen.after
## https://launchpad.net/pybindgen/
REQUIRED_PYBINDGEN_VERSION = (0, 17, 0, 886)
# https://github.com/named-data-ndnSIM/pybindgen
REQUIRED_PYBINDGEN_VERSION = '0.17.0.post45+ng4806e4f'
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
RUN_ME=-3
@@ -163,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
@@ -192,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")
@@ -280,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
+16 -2
View File
@@ -245,6 +245,16 @@ ALIASES += pname{1}="<span class=\"params\"><span class=\"paramnam
## Link to RFC's
ALIASES += RFC{1}="<a href=\"http://datatracker.ietf.org/doc/rfc\1/\">RFC \1</a>"
## Highlight template parameter induction
## Inferred template parameters are clear from the context:
## template <typename T> void Func (T x);
## Explicit template parameters must be given at the call site:
## template <typename T> void Func (void);
## which is called as
## Func<MyClass> ();
ALIASES += deduced="<span class=\"params\"><span class=\"paramdir\">[deduced] </span></span>"
ALIASES += explicit="<span class=\"params\"><span class=\"paramdir\">[explicit]</span></span>"
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
@@ -546,7 +556,7 @@ SHOW_GROUPED_MEMB_INC = NO
# files with double quotes in the documentation rather than with sharp brackets.
# The default value is: NO.
FORCE_LOCAL_INCLUDES = NO
FORCE_LOCAL_INCLUDES = YES
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
# documentation for inline members.
@@ -857,6 +867,7 @@ EXAMPLE_PATH = src/aodv/examples \
src/click/examples \
src/config-store/examples \
src/core/examples \
src/core/doc \
src/csma/examples \
src/csma-layout/examples \
src/dsdv/examples \
@@ -2066,7 +2077,10 @@ PREDEFINED = NS3_ASSERT_ENABLE \
NS3_LOG_ENABLE \
NS_LOG_COMPONENT_DEFINE()=1 \
NS_LOG_COMPONENT_DEFINE_MASK()=1 \
NS_OBJECT_ENSURE_REGISTERED()=1
NS_OBJECT_ENSURE_REGISTERED()=1 \
NS3_BUILD_PROFILE_DEBUG \
NS3_BUILD_PROFILE_RELEASE \
NS3_BUILD_PROFILE_OPTIMIZED
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
+2
View File
@@ -165,6 +165,7 @@ This is defined in the ``node.cc`` file as follows::
{
static TypeId tid = TypeId ("ns3::Node")
.SetParent<Object> ()
.SetGroupName ("Network")
.AddConstructor<Node> ()
.AddAttribute ("DeviceList",
"The list of devices associated to this Node.",
@@ -300,6 +301,7 @@ registrations are moved into the :cpp:class:`TypeId` class; *e.g*.::
{
static TypeId tid = TypeId ("ns3::DropTailQueue")
.SetParent<Queue> ()
.SetGroupName ("Network")
.AddConstructor<DropTailQueue> ()
.AddAttribute ("MaxPackets",
"The maximum number of packets accepted by this DropTailQueue.",
+142 -74
View File
@@ -38,7 +38,8 @@ 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.
The `Show Source <_sources/documentation.txt>`_ link in the sidebar
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
@@ -59,7 +60,7 @@ 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 build
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
@@ -137,7 +138,7 @@ To build just the Models documentation:
.. sourcecode:: bash
$ make -C doc/models
$ make -C doc/models html
To see the generated documentation point your browser at
``doc/models/build/html``.
@@ -260,7 +261,7 @@ 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 imlementing each function.
* 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
@@ -273,6 +274,7 @@ for every class
* 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,
@@ -300,8 +302,11 @@ The preferred style for Doxygen comments is the JavaDoc style::
* \note Note any limitations or gotchas.
*
* (For functions with arguments or return valued:)
* \param foo Brief noun phrase describing this argument.
* \param bar Note Sentence case, and terminating period.
* \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
@@ -310,7 +315,7 @@ The preferred style for Doxygen comments is the JavaDoc style::
* Understanding this material shouldn't be necessary to using
* the class or method.
*/
class Example
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.
@@ -368,91 +373,100 @@ Building the Doxygen documentation is pretty simple:
$ ./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.
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``
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
Waf: Entering directory `build'
...
Waf: Leaving directory `build'
'build' finished successfully (3m24.094s)
Rebuilding doxygen docs with full errors...Done.
$ 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
----------------------------------------
Report of Doxygen warnings
----------------------------------------
(All counts are lower bounds.)
(All counts are lower bounds.)
Warnings by module/directory:
Warnings by module/directory:
Count Directory
----- ----------------------------------
3844 src/lte/model
1718 src/wimax/model
1423 src/core/model
....
138 additional undocumented parameters.
----------------------------------------
15765 total warnings
126 directories with warnings
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)
Warnings by file (alphabetical)
Count File
----- ----------------------------------
17 doc/introspected-doxygen.h
15 examples/routing/manet-routing-compare.cc
26 examples/stats/wifi-example-apps.h
....
----------------------------------------
967 files with warnings
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)
Warnings by file (numerical)
Count File
----- ----------------------------------
374 src/lte/model/lte-asn1-header.h
280 src/lte/model/lte-rrc-sap.h
262 src/lte/model/lte-rrc-header.h
....
----------------------------------------
967 files with warnings
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
----------------------------------------
126 directories
967 files
15765 warnings
Doxygen Warnings Summary
----------------------------------------
100 directories
771 files
12460 warnings
The script modifies the configuration to show all warnings, and
to shorten the run time. 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.
(This snippet has *a lot* of lines suppressed!)
The script has a few options to pare things down and make this more
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 by,
again using the ``-s`` option. You can exclude warnings
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``).
(``-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
@@ -486,6 +500,13 @@ urgent in a single module:
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!
@@ -508,24 +529,45 @@ usage for |ns3|.
/**
* \defgroup foo Foo protocol.
* Implemenation of the Foo protocol.
*/
Mark each associated class as belonging to the group::
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
*
* Foo packet type.
* FooBar packet type.
*/
class Foo
class FooBar
* Did you know ``typedefs`` can have formal arguments? This enables
documentation of function pointer signatures::
/**
* Bar callback function signature.
* Bar callback function signature.
*
* \param ale The size of a pint of ale, in Imperial ounces.
* \param ale The size of a pint of ale, in Imperial ounces.
*/
typedef void (* BarCallback)(const int ale);
@@ -534,12 +576,38 @@ usage for |ns3|.
* ``\bugid{298}`` will create a link to bug 298 in our Bugzilla.
* ``\pname{foo}`` in a description will format ``foo``
as a ``\param foo`` parameter, making it clear that you
* ``\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``!)
+3
View File
@@ -341,6 +341,7 @@ file.::
{
static TypeId tid = TypeId ("ns3::ErrorModel")
.SetParent<Object> ()
.SetGroupName ("Network")
;
return tid;
}
@@ -359,6 +360,7 @@ file.::
{
static TypeId tid = TypeId ("ns3::RateErrorModel")
.SetParent<ErrorModel> ()
.SetGroupName ("Network")
.AddConstructor<RateErrorModel> ()
;
return tid;
@@ -556,6 +558,7 @@ and setting the Parent to ErrorModel::
{
static TypeId tid = TypeId ("ns3::RateErrorModel")
.SetParent<ErrorModel> ()
.SetGroupName ("Network")
.AddConstructor<RateErrorModel> ()
...
+1
View File
@@ -277,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).",
+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.
+13 -4
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 \
@@ -62,7 +62,11 @@ SOURCES = \
$(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 \
@@ -99,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 \
@@ -250,6 +254,9 @@ SOURCEFIGS = \
$(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 \
@@ -335,6 +342,7 @@ IMAGES_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 \
@@ -390,6 +398,7 @@ $(FIGURES)/mac-random-access-noncontention.pdf_width = 15cm
$(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
+1 -1
View File
@@ -152,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="(+)"
+4 -4
View File
@@ -24,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
@@ -524,7 +524,7 @@ 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
@@ -884,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.
::
@@ -1261,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
+1 -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,
+1
View File
@@ -321,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",
+58 -23
View File
@@ -96,15 +96,15 @@ get a copy of a release by typing the following into your Linux shell
$ cd
$ mkdir workspace
$ cd workspace
$ wget http://www.nsnam.org/release/ns-allinone-3.22.tar.bz2
$ tar xjf ns-allinone-3.22.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.22`` you should see a
If you change into the directory ``ns-allinone-3.23`` you should see a
number of files::
$ ls
bake constants.py ns-3.22 README
build.py netanim-3.105 pybindgen-0.16.0.886 util.py
bake constants.py ns-3.23 README
build.py netanim-3.106 pybindgen-0.17.0.886 util.py
You are now ready to build the base |ns3| distribution.
@@ -163,10 +163,10 @@ distribution of your choice.
There are a few configuration targets available:
1. ``ns-3.22``: 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.22``: 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
@@ -184,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.22``.
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.
@@ -210,7 +210,7 @@ full builds of ns-3-allinone (with the optional packages) typically do.
Step into the workspace directory and type the following into your shell::
$ ./bake.py configure -e ns-3.22
$ ./bake.py configure -e ns-3.23
Next, we'l ask bake to check whether we have enough tools to download
various components. Type::
@@ -256,17 +256,17 @@ 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.886 - OK
>> Downloading pybindgen-0.17.0.886 - OK
>> Searching for system dependency g++ - OK
>> Searching for system dependency qt4 - OK
>> Downloading netanim-3.105 - OK
>> Downloading ns-3.22 - 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::
$ ls
netanim-3.105 ns-3.22 pybindgen-0.16.0.886
netanim-3.106 ns-3.23 pybindgen-0.17.0.886
You are now ready to build the |ns3| distribution.
@@ -285,7 +285,7 @@ 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.22`` under your ``~/workspace`` directory.
``ns-allinone-3.23`` under your ``~/workspace`` directory.
Type the following::
$ ./build.py --enable-examples --enable-tests
@@ -301,7 +301,7 @@ 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::
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.22/ns-3.22/build'
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.23/ns-3.23/build'
'build' finished successfully (6m25.032s)
Modules built:
@@ -323,7 +323,7 @@ following::
brite click openflow
visualizer
Leaving directory `./ns-3.22'
Leaving directory `./ns-3.23'
Regarding the portion about modules not built::
@@ -349,9 +349,9 @@ may continue to use it to build |ns3|. Type
and you should see something like::
>> Building pybindgen-0.16.0.886 - OK
>> Building netanim-3.105 - OK
>> Building ns-3.22 - 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'.*
@@ -554,6 +554,38 @@ We already saw how you can configure Waf for ``debug`` or ``optimized`` builds::
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.
@@ -590,8 +622,8 @@ to define some environment variables to help you avoid mistakes::
$ ./waf configure $NS3CONFIG $NS3OPT
$ ./waf build
Compilers
=========
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
@@ -614,6 +646,9 @@ More info on ``distcc`` and distributed compilation can be found on it's
<http://code.google.com/p/distcc/>`_
under Documentation section.
To add compiler flags, use the ``CXXFLAGS_EXTRA`` environment variable when
you configure |ns3|.
Install
=======
@@ -664,7 +699,7 @@ remember where you are, and invoke Waf like this::
$ ../../../waf ...
but that get's tedious, and error prone, and there are better solutions.
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::
@@ -848,7 +883,7 @@ debugger::
Working Directory
+++++++++++++++++
Waf needs to run from it's location at the top of the |ns3| tree.
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::
+1
View File
@@ -365,6 +365,7 @@ simple Object we can work with.
{
static TypeId tid = TypeId ("MyObject")
.SetParent (Object::GetTypeId ())
.SetGroupName ("MyGroup")
.AddConstructor<MyObject> ()
.AddTraceSource ("MyInteger",
"An integer value to trace.",
+40
View File
@@ -632,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
+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', 'applications'])
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'])
+6 -1
View File
@@ -26,10 +26,15 @@ 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.",
+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()
+16
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)
{
+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()
+4
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'
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'
+35 -35
View File
@@ -54,7 +54,7 @@ int main (int argc, char *argv[])
cmd.Parse (argc,argv);
std::cout << "DataRate" << "\t" << "Throughput" << '\n';
for (int mcs = 0; mcs <= 31; mcs++)
for (int i = 0; i <= 31; i++)
{
uint32_t payloadSize; //1500 byte IP packet
if (udp)
@@ -76,17 +76,17 @@ int main (int argc, char *argv[])
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
phy.SetChannel (channel.Create ());
if (mcs <= 7)
if (i <= 7)
{
phy.Set ("ShortGuardEnabled", BooleanValue (false));
phy.Set ("ChannelBonding", BooleanValue (false));
}
else if (mcs > 7 && mcs <= 15)
else if (i > 7 && i <= 15)
{
phy.Set ("ShortGuardEnabled", BooleanValue (true));
phy.Set ("ChannelBonding", BooleanValue (false));
}
else if (mcs > 15 && mcs <= 23)
else if (i > 15 && i <= 23)
{
phy.Set ("ShortGuardEnabled", BooleanValue (false));
phy.Set ("ChannelBonding", BooleanValue (true));
@@ -105,157 +105,157 @@ int main (int argc, char *argv[])
double datarate = 0;
StringValue DataRate;
if (mcs == 0)
if (i == 0)
{
DataRate = StringValue ("OfdmRate6_5MbpsBW20MHz");
datarate = 6.5;
}
else if (mcs == 1)
else if (i == 1)
{
DataRate = StringValue ("OfdmRate13MbpsBW20MHz");
datarate = 13;
}
else if (mcs == 2)
else if (i == 2)
{
DataRate = StringValue ("OfdmRate19_5MbpsBW20MHz");
datarate = 19.5;
}
else if (mcs == 3)
else if (i == 3)
{
DataRate = StringValue ("OfdmRate26MbpsBW20MHz");
datarate = 26;
}
else if (mcs == 4)
else if (i == 4)
{
DataRate = StringValue ("OfdmRate39MbpsBW20MHz");
datarate = 39;
}
else if (mcs == 5)
else if (i == 5)
{
DataRate = StringValue ("OfdmRate52MbpsBW20MHz");
datarate = 52;
}
else if (mcs == 6)
else if (i == 6)
{
DataRate = StringValue ("OfdmRate58_5MbpsBW20MHz");
datarate = 58.5;
}
else if (mcs == 7)
else if (i == 7)
{
DataRate = StringValue ("OfdmRate65MbpsBW20MHz");
datarate = 65;
}
else if (mcs == 8)
else if (i == 8)
{
DataRate = StringValue ("OfdmRate7_2MbpsBW20MHz");
datarate = 7.2;
}
else if (mcs == 9)
else if (i == 9)
{
DataRate = StringValue ("OfdmRate14_4MbpsBW20MHz");
datarate = 14.4;
}
else if (mcs == 10)
else if (i == 10)
{
DataRate = StringValue ("OfdmRate21_7MbpsBW20MHz");
datarate = 21.7;
}
else if (mcs == 11)
else if (i == 11)
{
DataRate = StringValue ("OfdmRate28_9MbpsBW20MHz");
datarate = 28.9;
}
else if (mcs == 12)
else if (i == 12)
{
DataRate = StringValue ("OfdmRate43_3MbpsBW20MHz");
datarate = 43.3;
}
else if (mcs == 13)
else if (i == 13)
{
DataRate = StringValue ("OfdmRate57_8MbpsBW20MHz");
datarate = 57.8;
}
else if (mcs == 14)
else if (i == 14)
{
DataRate = StringValue ("OfdmRate65MbpsBW20MHzShGi");
datarate = 65;
}
else if (mcs == 15)
else if (i == 15)
{
DataRate = StringValue ("OfdmRate72_2MbpsBW20MHz");
datarate = 72.2;
}
else if (mcs == 16)
else if (i == 16)
{
DataRate = StringValue ("OfdmRate13_5MbpsBW40MHz");
datarate = 13.5;
}
else if (mcs == 17)
else if (i == 17)
{
DataRate = StringValue ("OfdmRate27MbpsBW40MHz");
datarate = 27;
}
else if (mcs == 18)
else if (i == 18)
{
DataRate = StringValue ("OfdmRate40_5MbpsBW40MHz");
datarate = 40.5;
}
else if (mcs == 19)
else if (i == 19)
{
DataRate = StringValue ("OfdmRate54MbpsBW40MHz");
datarate = 54;
}
else if (mcs == 20)
else if (i == 20)
{
DataRate = StringValue ("OfdmRate81MbpsBW40MHz");
datarate = 81;
}
else if (mcs == 21)
else if (i == 21)
{
DataRate = StringValue ("OfdmRate108MbpsBW40MHz");
datarate = 108;
}
else if (mcs == 22)
else if (i == 22)
{
DataRate = StringValue ("OfdmRate121_5MbpsBW40MHz");
datarate = 121.5;
}
else if (mcs == 23)
else if (i == 23)
{
DataRate = StringValue ("OfdmRate135MbpsBW40MHz");
datarate = 135;
}
else if (mcs == 24)
else if (i == 24)
{
DataRate = StringValue ("OfdmRate15MbpsBW40MHz");
datarate = 15;
}
else if (mcs == 25)
else if (i == 25)
{
DataRate = StringValue ("OfdmRate30MbpsBW40MHz");
datarate = 30;
}
else if (mcs == 26)
else if (i == 26)
{
DataRate = StringValue ("OfdmRate45MbpsBW40MHz");
datarate = 45;
}
else if (mcs == 27)
else if (i == 27)
{
DataRate = StringValue ("OfdmRate60MbpsBW40MHz");
datarate = 60;
}
else if (mcs == 28)
else if (i == 28)
{
DataRate = StringValue ("OfdmRate90MbpsBW40MHz");
datarate = 90;
}
else if (mcs == 29)
else if (i == 29)
{
DataRate = StringValue ("OfdmRate120MbpsBW40MHz");
datarate = 120;
}
else if (mcs == 30)
else if (i == 30)
{
DataRate = StringValue ("OfdmRate135MbpsBW40MHzShGi");
datarate = 135;
+19 -12
View File
@@ -72,13 +72,15 @@ import ns.wifi
def main(argv):
#
# First, we declare and initialize a few local variables that control some
# First, we initialize a few local variables that control some
# simulation parameters.
#
backboneNodes = 10
infraNodes = 2
lanNodes = 2
stopTime = 20
#
cmd = ns.core.CommandLine()
cmd.backboneNodes = 10
cmd.infraNodes = 2
cmd.lanNodes = 2
cmd.stopTime = 20
#
# Simulation defaults are typically set next, before command line
@@ -92,18 +94,23 @@ def main(argv):
# system so that they can be overridden with flags such as
# "--backboneNodes=20"
#
cmd = ns.core.CommandLine()
cmd.AddValue("backboneNodes", "number of backbone nodes", str(backboneNodes))
cmd.AddValue("infraNodes", "number of leaf nodes", str(infraNodes))
cmd.AddValue("lanNodes", "number of LAN nodes", str(lanNodes))
cmd.AddValue("stopTime", "simulation stop time(seconds)", str(stopTime))
cmd.AddValue("backboneNodes", "number of backbone nodes")
cmd.AddValue("infraNodes", "number of leaf nodes")
cmd.AddValue("lanNodes", "number of LAN nodes")
cmd.AddValue("stopTime", "simulation stop time(seconds)")
#
# The system global variables and the local values added to the argument
# system can be overridden by command line arguments by using this call.
#
cmd.Parse(argv)
backboneNodes = int(cmd.backboneNodes)
infraNodes = int(cmd.infraNodes)
lanNodes = int(cmd.lanNodes)
stopTime = int(cmd.stopTime)
if (stopTime < 10):
print "Use a simulation stop time >= 10 seconds"
exit(1)
@@ -197,9 +197,11 @@ NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet)
packet->PeekHeader (head);
Mac48Address dest = head.GetAddr1 ();
totalEnergy += actualPower[dest] * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
if (head.GetType() == WIFI_MAC_DATA)
{
totalEnergy += pow (10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
}
}
void
@@ -259,10 +261,10 @@ NodeStatistics::AdvancePosition (Ptr<Node> node, int stepsSize, int stepsTime)
Vector pos = GetPosition (node);
double mbs = ((m_bytesTotal * 8.0) / (1000000 * stepsTime));
m_bytesTotal = 0;
double atm = pow (10, ((totalEnergy / stepsTime) / 10));
double atp = totalEnergy / stepsTime;
totalEnergy = 0;
totalTime = 0;
m_output_power.Add (pos.x, atm);
m_output_power.Add (pos.x, atp);
m_output.Add (pos.x, mbs);
pos.x += stepsSize;
SetPosition (node, pos);
@@ -193,9 +193,11 @@ NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet)
packet->PeekHeader (head);
Mac48Address dest = head.GetAddr1 ();
totalEnergy += actualPower[dest] * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
if (head.GetType() == WIFI_MAC_DATA)
{
totalEnergy += pow(10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
}
}
void
@@ -259,10 +261,10 @@ NodeStatistics::CheckStatistics (double time)
{
double mbs = ((m_bytesTotal * 8.0) / (1000000 * time));
m_bytesTotal = 0;
double atm = pow (10, ((totalEnergy / time) / 10));
double atp = totalEnergy / time;
totalEnergy = 0;
totalTime = 0;
m_output_power.Add ((Simulator::Now ()).GetSeconds (), atm);
m_output_power.Add ((Simulator::Now ()).GetSeconds (), atp);
m_output.Add ((Simulator::Now ()).GetSeconds (), mbs);
m_output_idle.Add ((Simulator::Now ()).GetSeconds (), idleTime * 100);
@@ -0,0 +1,179 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Sébastien Deronne
*
* 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: Sébastien Deronne <sebastien.deronne@gmail.com>
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/internet-module.h"
// This example considers two hidden stations in an 802.11n network which supports MPDU aggregation.
// The user can specify whether RTS/CTS is used and can set the number of aggregated MPDUs.
//
// Example: ./waf --run "simple-ht-hidden-stations --enableRts=1 --nMpdus=8"
//
// Network topology:
//
// Wifi 192.168.1.0
//
// AP
// * * *
// | | |
// n1 n2 n3
//
// Packets in this simulation aren't marked with a QosTag so they are considered
// belonging to BestEffort Access Class (AC_BE).
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("SimplesHtHiddenStations");
int main (int argc, char *argv[])
{
uint32_t payloadSize = 1472; //bytes
uint64_t simulationTime = 10; //seconds
uint32_t nMpdus = 1;
bool enableRts = 0;
CommandLine cmd;
cmd.AddValue("nMpdus", "Number of aggregated MPDUs", nMpdus);
cmd.AddValue("payloadSize", "Payload size in bytes", payloadSize);
cmd.AddValue("enableRts", "Enable RTS/CTS", enableRts); // 1: RTS/CTS enabled; 0: RTS/CTS disabled
cmd.AddValue("simulationTime", "Simulation time in seconds", simulationTime);
cmd.Parse (argc, argv);
if(!enableRts)
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("999999"));
else
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("0"));
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("990000"));
// Set the maximum wireless range to 5 meters in order to reproduce a hidden nodes scenario, i.e. the distance between hidden stations is larger than 5 meters
Config::SetDefault ("ns3::RangePropagationLossModel::MaxRange", DoubleValue (5));
NodeContainer wifiStaNodes;
wifiStaNodes.Create (2);
NodeContainer wifiApNode;
wifiApNode.Create(1);
YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
channel.AddPropagationLoss ("ns3::RangePropagationLossModel"); //wireless range limited to 5 meters!
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
phy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
phy.SetChannel (channel.Create());
WifiHelper wifi = WifiHelper::Default ();
wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue("OfdmRate65MbpsBW20MHz"), "ControlMode", StringValue("OfdmRate6_5MbpsBW20MHz"));
HtWifiMacHelper mac = HtWifiMacHelper::Default ();
Ssid ssid = Ssid ("simple-mpdu-aggregation");
mac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid),
"ActiveProbing", BooleanValue (false));
if (nMpdus > 1) mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable Block ACK when A-MPDU is enabled
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
"MaxAmpduSize", UintegerValue (nMpdus*(payloadSize+100))); //enable MPDU aggregation for AC_BE with a maximum aggregated size of nMpdus*(payloadSize+100) bytes,
//i.e. nMpdus aggregated packets in an A-MPDU
NetDeviceContainer staDevices;
staDevices = wifi.Install (phy, mac, wifiStaNodes);
mac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid),
"BeaconInterval", TimeValue (MicroSeconds(102400)),
"BeaconGeneration", BooleanValue (true));
if (nMpdus > 1) mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable Block ACK when A-MPDU is enabled
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
"MaxAmpduSize", UintegerValue (nMpdus*(payloadSize+100))); //enable MPDU aggregation for AC_BE with a maximum aggregated size of nMpdus*(payloadSize+100) bytes,
//i.e. nMpdus aggregated packets in an A-MPDU
NetDeviceContainer apDevice;
apDevice = wifi.Install (phy, mac, wifiApNode);
// Setting mobility model
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
// AP is between the two stations, each station being located at 5 meters from the AP.
// The distance between the two stations is thus equal to 10 meters.
// Since the wireless range is limited to 5 meters, the two stations are hidden from each other.
positionAlloc->Add (Vector (5.0, 0.0, 0.0));
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (10.0, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (wifiApNode);
mobility.Install (wifiStaNodes);
// Internet stack
InternetStackHelper stack;
stack.Install (wifiApNode);
stack.Install (wifiStaNodes);
Ipv4AddressHelper address;
address.SetBase ("192.168.1.0", "255.255.255.0");
Ipv4InterfaceContainer StaInterface;
StaInterface = address.Assign (staDevices);
Ipv4InterfaceContainer ApInterface;
ApInterface = address.Assign (apDevice);
// Setting applications
UdpServerHelper myServer (9);
ApplicationContainer serverApp = myServer.Install (wifiApNode);
serverApp.Start (Seconds (0.0));
serverApp.Stop (Seconds (simulationTime+1));
UdpClientHelper myClient (ApInterface.GetAddress (0), 9);
myClient.SetAttribute ("MaxPackets", UintegerValue (4294967295u));
myClient.SetAttribute ("Interval", TimeValue (Time ("0.00002"))); //packets/s
myClient.SetAttribute ("PacketSize", UintegerValue (payloadSize));
// Saturated UDP traffic from stations to AP
ApplicationContainer clientApp1 = myClient.Install (wifiStaNodes);
clientApp1.Start (Seconds (1.0));
clientApp1.Stop (Seconds (simulationTime+1));
phy.EnablePcap ("SimpleHtHiddenStations_Ap", apDevice.Get (0));
phy.EnablePcap ("SimpleHtHiddenStations_Sta1", staDevices.Get (0));
phy.EnablePcap ("SimpleHtHiddenStations_Sta2", staDevices.Get (1));
Simulator::Stop (Seconds (simulationTime+1));
Simulator::Run ();
Simulator::Destroy ();
uint32_t totalPacketsThrough = DynamicCast<UdpServer>(serverApp.Get (0))->GetReceived ();
double throughput = totalPacketsThrough*payloadSize*8/(simulationTime*1000000.0);
std::cout << "Throughput: " << throughput << " Mbit/s" << '\n';
return 0;
}
@@ -0,0 +1,214 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Sébastien Deronne
*
* 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: Sébastien Deronne <sebastien.deronne@gmail.com>
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/internet-module.h"
// This is a simple example in order to show how 802.11n two-level aggregation feature works.
// Two-level aggregation is the simultaneous use of MSDU and MPDU aggregation schemes (known as one-level aggregation techniques).
//
// The throughput is obtained for a given number of aggregated MSDUs and MPDUs.
// The number of aggregated MSDUs and MPDUs can be chosen by the user through the nMsdus and nMpdus attibutes, respectively.
//
// Example: ./waf --run "simple-two-level-aggregation --nMsdus=3 --nMpdus=8"
//
// Network topology:
//
// Wifi 192.168.1.0
//
// AP
// * *
// | |
// n1 n2
//
// Packets in this simulation aren't marked with a QosTag so they are considered
// belonging to BestEffort Access Class (AC_BE).
//
// Throughput gets higher as either nMsdus or nMpdus is increased (one-level aggregation),
// or when both nMsdus and nMpdus are increases (two-level aggregation).
// MSDU aggregation offers a better header reduction compare to MPDU aggregation,
// while MPDU aggregation is more robust against transmission errors than MSDU aggregation.
// The good setting of nMsdu and nMpdus will depends on various factors (payload size, channel conditions, ...).
// Since this example considers an ideal channel, the highest throughput is obtained with the largest values for nMsdus and nMpdus parameters.
// Users should nevertheless take care that the standard rules limit the maximum MSDU size to 7935 bytes and the MPDU size to 65535 bytes.
// Consequently, more packets should be aggregated if their payload is small with standard-compliant parameters.
// Users should also note that the maximum duration of the frame is limited by the standard.
// As a result, higher values for nMsdus and nMpdus may not always provide throughput improvements.
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("SimpleTwoLevelAggregation");
int main (int argc, char *argv[])
{
uint32_t payloadSize = 1472; //bytes
uint64_t simulationTime = 10; //seconds
uint32_t nMsdus = 1;
uint32_t nMpdus = 1;
bool enableRts = 0;
CommandLine cmd;
cmd.AddValue ("nMsdus", "Number of aggregated MSDUs", nMsdus); //number of aggregated MSDUs specified by the user
cmd.AddValue ("nMpdus", "Number of aggregated MPDUs", nMpdus); //number of aggregated MPDUs specified by the user
cmd.AddValue ("payloadSize", "Payload size in bytes", payloadSize);
cmd.AddValue ("enableRts", "Enable RTS/CTS", enableRts);
cmd.AddValue ("simulationTime", "Simulation time in seconds", simulationTime);
cmd.Parse (argc, argv);
if (!enableRts)
{
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("999999"));
}
else
{
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("0"));
}
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("990000"));
NodeContainer wifiStaNode;
wifiStaNode.Create (1);
NodeContainer wifiApNode;
wifiApNode.Create (1);
YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
phy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
phy.SetChannel (channel.Create ());
WifiHelper wifi = WifiHelper::Default ();
wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ);
//We consider a constant bitrate since HT rate adaptation algorithms are not supported yet in the simulator
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode", StringValue ("OfdmRate65MbpsBW20MHz"),
"ControlMode", StringValue ("OfdmRate6_5MbpsBW20MHz"));
HtWifiMacHelper mac = HtWifiMacHelper::Default ();
Ssid ssid = Ssid ("simple-two-level-aggregation");
mac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid),
"ActiveProbing", BooleanValue (false));
//Enable aggregation at the station side
if (nMpdus > 1)
{
mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable BlockAck when A-MPDU is used
}
if (nMsdus > 0)
{
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
"MaxAmpduSize", UintegerValue (nMpdus * (nMsdus * (payloadSize + 100)))); //Set the maximum size for A-MPDU with regards to the payload size and the number of MSDUs expected in each MPDU.
}
else //MPDU aggregation only (one-level aggregation)
{
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
"MaxAmpduSize", UintegerValue (nMpdus * (payloadSize + 200))); //Set the maximum size for A-MPDU with regards to the payload size
}
mac.SetMsduAggregatorForAc (AC_BE,"ns3::MsduStandardAggregator",
"MaxAmsduSize", UintegerValue (nMsdus * (payloadSize + 100))); //Set the maximum size for A-MSDU with regards to the payload size
NetDeviceContainer staDevice;
staDevice = wifi.Install (phy, mac, wifiStaNode);
mac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid),
"BeaconInterval", TimeValue (MicroSeconds (102400)),
"BeaconGeneration", BooleanValue (true));
//Enable aggregation at the AP side
if (nMpdus > 1)
{
mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable BlockAck when A-MPDU is used
}
if (nMsdus > 0)
{
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
"MaxAmpduSize", UintegerValue (nMpdus * (nMsdus * (payloadSize + 100)))); //Set the maximum size for A-MPDU according to the payload size and the number of MSDUs expected in each MPDU.
}
else //MPDU aggregation only (one-level aggregation)
{
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
"MaxAmpduSize", UintegerValue (nMpdus * (payloadSize + 200))); //Set the maximum size for A-MPDU with regards to the payload size
}
mac.SetMsduAggregatorForAc (AC_BE,"ns3::MsduStandardAggregator",
"MaxAmsduSize", UintegerValue (nMsdus * (payloadSize + 100))); //Set the maximum size for A-MSDU with regards to the payload size
NetDeviceContainer apDevice;
apDevice = wifi.Install (phy, mac, wifiApNode);
/* Setting mobility model */
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (1.0, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (wifiApNode);
mobility.Install (wifiStaNode);
/* Internet stack*/
InternetStackHelper stack;
stack.Install (wifiApNode);
stack.Install (wifiStaNode);
Ipv4AddressHelper address;
address.SetBase ("192.168.1.0", "255.255.255.0");
Ipv4InterfaceContainer StaInterface;
StaInterface = address.Assign (staDevice);
Ipv4InterfaceContainer ApInterface;
ApInterface = address.Assign (apDevice);
/* Setting applications */
UdpServerHelper myServer (9);
ApplicationContainer serverApp = myServer.Install (wifiStaNode.Get (0));
serverApp.Start (Seconds (0.0));
serverApp.Stop (Seconds (simulationTime + 1));
UdpClientHelper myClient (StaInterface.GetAddress (0), 9);
myClient.SetAttribute ("MaxPackets", UintegerValue (4294967295u));
myClient.SetAttribute ("Interval", TimeValue (Time ("0.00002"))); //packets/s
myClient.SetAttribute ("PacketSize", UintegerValue (payloadSize));
ApplicationContainer clientApp = myClient.Install (wifiApNode.Get (0));
clientApp.Start (Seconds (1.0));
clientApp.Stop (Seconds (simulationTime + 1));
Simulator::Stop (Seconds (simulationTime + 1));
Simulator::Run ();
Simulator::Destroy ();
uint32_t totalPacketsThrough = DynamicCast<UdpServer> (serverApp.Get (0))->GetReceived ();
double throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
std::cout << "Throughput: " << throughput << " Mbit/s" << '\n';
return 0;
}
+2 -2
View File
@@ -24,7 +24,7 @@
// +-----+ +-----+ +-----+ +-----+
// | STA | | STA | | STA | | STA |
// +-----+ +-----+ +-----+ +-----+
// 192.168.0.3 192.168.0.4 192.168.0.5 192.168.0.6
// 192.168.0.2 192.168.0.3 192.168.0.5 192.168.0.6
// -------- -------- -------- --------
// WIFI STA WIFI STA WIFI STA WIFI STA
// -------- -------- -------- --------
@@ -37,7 +37,7 @@
// ############## ##############
// BRIDGE BRIDGE
// ############## ##############
// 192.168.0.1 192.168.0.2
// 192.168.0.1 192.168.0.4
// +---------+ +---------+
// | AP Node | | AP Node |
// +---------+ +---------+
+7 -1
View File
@@ -71,4 +71,10 @@ def build(bld):
obj.source = 'rate-adaptation-distance.cc'
obj = bld.create_ns3_program('simple-mpdu-aggregation', ['internet', 'mobility', 'wifi', 'applications'])
obj.source = 'simple-mpdu-aggregation.cc'
obj.source = 'simple-mpdu-aggregation.cc'
obj = bld.create_ns3_program('simple-two-level-aggregation', ['internet', 'mobility', 'wifi', 'applications'])
obj.source = 'simple-two-level-aggregation.cc'
obj = bld.create_ns3_program('simple-ht-hidden-stations', ['internet', 'mobility', 'wifi', 'applications'])
obj.source = 'simple-ht-hidden-stations.cc'
+5
View File
@@ -0,0 +1,5 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
+5
View File
@@ -0,0 +1,5 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
+1
View File
@@ -44,6 +44,7 @@ AntennaModel::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::AntennaModel")
.SetParent<Object> ()
.SetGroupName("Antenna")
;
return tid;
}
@@ -39,6 +39,7 @@ CosineAntennaModel::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::CosineAntennaModel")
.SetParent<AntennaModel> ()
.SetGroupName("Antenna")
.AddConstructor<CosineAntennaModel> ()
.AddAttribute ("Beamwidth",
"The 3dB beamwidth (degrees)",
@@ -37,6 +37,7 @@ IsotropicAntennaModel::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::IsotropicAntennaModel")
.SetParent<AntennaModel> ()
.SetGroupName("Antenna")
.AddConstructor<IsotropicAntennaModel> ()
;
return tid;
@@ -39,6 +39,7 @@ ParabolicAntennaModel::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::ParabolicAntennaModel")
.SetParent<AntennaModel> ()
.SetGroupName("Antenna")
.AddConstructor<ParabolicAntennaModel> ()
.AddAttribute ("Beamwidth",
"The 3dB beamwidth (degrees)",
+21 -27
View File
@@ -729,17 +729,17 @@ def register_Ns3Buffer_methods(root_module, cls):
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
cls.add_constructor([param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
cls.add_method('AddAtEnd',
'bool',
'void',
[param('uint32_t', 'end')])
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
cls.add_method('AddAtEnd',
'void',
[param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
cls.add_method('AddAtStart',
'bool',
'void',
[param('uint32_t', 'start')])
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
cls.add_method('Begin',
@@ -761,11 +761,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer',
[param('uint32_t', 'start'), param('uint32_t', 'length')],
is_const=True)
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
cls.add_method('CreateFullCopy',
'ns3::Buffer',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
cls.add_method('Deserialize',
'uint32_t',
@@ -775,16 +770,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer::Iterator',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
cls.add_method('GetCurrentEndOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
cls.add_method('GetCurrentStartOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
cls.add_method('GetSerializedSize',
'uint32_t',
@@ -1022,14 +1007,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
cls.add_method('Add',
'void',
[param('ns3::ByteTagList const &', 'o')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
cls.add_method('AddAtEnd',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
[param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
cls.add_method('AddAtStart',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
[param('int32_t', 'prependOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
cls.add_method('Adjust',
'void',
[param('int32_t', 'adjustment')])
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
cls.add_method('Begin',
'ns3::ByteTagList::Iterator',
@@ -2373,10 +2362,10 @@ def register_Ns3Simulator_methods(root_module, cls):
'void',
[],
is_static=True)
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
cls.add_method('Stop',
'void',
[param('ns3::Time const &', 'time')],
[param('ns3::Time const &', 'delay')],
is_static=True)
return
@@ -5250,10 +5239,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
'double',
[],
is_virtual=True)
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
cls.add_method('Interpolate',
'double',
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
visibility='private', is_virtual=True)
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
cls.add_method('Validate',
@@ -7648,6 +7637,11 @@ def register_Ns3AodvRoutingProtocol_methods(root_module, cls):
[param('ns3::Time', 't')])
## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::AODV_PORT [variable]
cls.add_static_attribute('AODV_PORT', 'uint32_t const', is_const=True)
## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::DoInitialize() [member function]
cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
return
def register_Ns3AodvRoutingTable_methods(root_module, cls):
+21 -27
View File
@@ -729,17 +729,17 @@ def register_Ns3Buffer_methods(root_module, cls):
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
cls.add_constructor([param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
cls.add_method('AddAtEnd',
'bool',
'void',
[param('uint32_t', 'end')])
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
cls.add_method('AddAtEnd',
'void',
[param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
cls.add_method('AddAtStart',
'bool',
'void',
[param('uint32_t', 'start')])
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
cls.add_method('Begin',
@@ -761,11 +761,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer',
[param('uint32_t', 'start'), param('uint32_t', 'length')],
is_const=True)
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
cls.add_method('CreateFullCopy',
'ns3::Buffer',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
cls.add_method('Deserialize',
'uint32_t',
@@ -775,16 +770,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer::Iterator',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
cls.add_method('GetCurrentEndOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
cls.add_method('GetCurrentStartOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
cls.add_method('GetSerializedSize',
'uint32_t',
@@ -1022,14 +1007,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
cls.add_method('Add',
'void',
[param('ns3::ByteTagList const &', 'o')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
cls.add_method('AddAtEnd',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
[param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
cls.add_method('AddAtStart',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
[param('int32_t', 'prependOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
cls.add_method('Adjust',
'void',
[param('int32_t', 'adjustment')])
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
cls.add_method('Begin',
'ns3::ByteTagList::Iterator',
@@ -2373,10 +2362,10 @@ def register_Ns3Simulator_methods(root_module, cls):
'void',
[],
is_static=True)
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
cls.add_method('Stop',
'void',
[param('ns3::Time const &', 'time')],
[param('ns3::Time const &', 'delay')],
is_static=True)
return
@@ -5250,10 +5239,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
'double',
[],
is_virtual=True)
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
cls.add_method('Interpolate',
'double',
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
visibility='private', is_virtual=True)
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
cls.add_method('Validate',
@@ -7648,6 +7637,11 @@ def register_Ns3AodvRoutingProtocol_methods(root_module, cls):
[param('ns3::Time', 't')])
## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::AODV_PORT [variable]
cls.add_static_attribute('AODV_PORT', 'uint32_t const', is_const=True)
## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::DoInitialize() [member function]
cls.add_method('DoInitialize',
'void',
[],
visibility='protected', is_virtual=True)
return
def register_Ns3AodvRoutingTable_methods(root_module, cls):
+31 -25
View File
@@ -94,37 +94,43 @@ Future Work
No announced plans.
References
++++++++++
..
References
++++++++++
..
Usage
*****
Usage
*****
..
Examples
++++++++
Examples
++++++++
..
Helpers
+++++++
Helpers
+++++++
..
Attributes
++++++++++
Attributes
++++++++++
..
Tracing
+++++++
Tracing
+++++++
..
Logging
+++++++
Logging
+++++++
..
Caveats
+++++++
Caveats
+++++++
Validation
**********
Unit tests
++++++++++
Larger-scale performance tests
++++++++++++++++++++++++++++++
..
Validation
**********
Unit tests
++++++++++
Larger-scale performance tests
++++++++++++++++++++++++++++++
+5
View File
@@ -46,6 +46,7 @@ TypeHeader::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::aodv::TypeHeader")
.SetParent<Header> ()
.SetGroupName("Aodv")
.AddConstructor<TypeHeader> ()
;
return tid;
@@ -153,6 +154,7 @@ RreqHeader::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::aodv::RreqHeader")
.SetParent<Header> ()
.SetGroupName("Aodv")
.AddConstructor<RreqHeader> ()
;
return tid;
@@ -292,6 +294,7 @@ RrepHeader::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::aodv::RrepHeader")
.SetParent<Header> ()
.SetGroupName("Aodv")
.AddConstructor<RrepHeader> ()
;
return tid;
@@ -434,6 +437,7 @@ RrepAckHeader::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::aodv::RrepAckHeader")
.SetParent<Header> ()
.SetGroupName("Aodv")
.AddConstructor<RrepAckHeader> ()
;
return tid;
@@ -500,6 +504,7 @@ RerrHeader::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::aodv::RerrHeader")
.SetParent<Header> ()
.SetGroupName("Aodv")
.AddConstructor<RerrHeader> ()
;
return tid;
+19 -8
View File
@@ -65,8 +65,9 @@ public:
static TypeId GetTypeId ()
{
static TypeId tid = TypeId ("ns3::aodv::DeferredRouteOutputTag").SetParent<Tag> ()
static TypeId tid = TypeId ("ns3::aodv::DeferredRouteOutputTag")
.SetParent<Tag> ()
.SetGroupName("Aodv")
.AddConstructor<DeferredRouteOutputTag> ()
;
return tid;
@@ -158,6 +159,7 @@ RoutingProtocol::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::aodv::RoutingProtocol")
.SetParent<Ipv4RoutingProtocol> ()
.SetGroupName("Aodv")
.AddConstructor<RoutingProtocol> ()
.AddAttribute ("HelloInterval", "HELLO messages emission interval.",
TimeValue (Seconds (1)),
@@ -580,12 +582,6 @@ RoutingProtocol::SetIpv4 (Ptr<Ipv4> ipv4)
NS_ASSERT (ipv4 != 0);
NS_ASSERT (m_ipv4 == 0);
if (EnableHello)
{
m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this);
m_htimer.Schedule (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 100)));
}
m_ipv4 = ipv4;
// Create lo route. It is asserted that the only one interface up for now is loopback
@@ -1928,5 +1924,20 @@ RoutingProtocol::FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAdd
return socket;
}
void
RoutingProtocol::DoInitialize (void)
{
NS_LOG_FUNCTION (this);
uint32_t startTime;
if (EnableHello)
{
m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this);
startTime = m_uniformRandomVariable->GetInteger (0, 100);
NS_LOG_DEBUG ("Starting at time " << startTime << "ms");
m_htimer.Schedule (MilliSeconds (startTime));
}
Ipv4RoutingProtocol::DoInitialize ();
}
}
} //namespace aodv
} //namespace ns3
+2
View File
@@ -97,6 +97,8 @@ public:
*/
int64_t AssignStreams (int64_t stream);
protected:
virtual void DoInitialize (void);
private:
// Protocol parameters.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5 -2
View File
@@ -37,11 +37,14 @@ namespace aodv
// Tests
//-----------------------------------------------------------------------------
/// Unit test for id cache
struct IdCacheTest : public TestCase
class IdCacheTest : public TestCase
{
public:
IdCacheTest () : TestCase ("Id Cache"), cache (Seconds (10))
{}
virtual void DoRun ();
private:
void CheckTimeout1 ();
void CheckTimeout2 ();
void CheckTimeout3 ();
@@ -93,7 +96,7 @@ IdCacheTest::CheckTimeout3 ()
class IdCacheTestSuite : public TestSuite
{
public:
IdCacheTestSuite () : TestSuite ("routing-id-cache", UNIT)
IdCacheTestSuite () : TestSuite ("aodv-routing-id-cache", UNIT)
{
AddTestCase (new IdCacheTest, TestCase::QUICK);
}
+44 -18
View File
@@ -20,7 +20,6 @@
#include "aodv-regression.h"
#include "bug-772.h"
#include "loopback.h"
#include "ns3/simulator.h"
#include "ns3/mobility-helper.h"
@@ -32,19 +31,18 @@
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/abort.h"
#include "ns3/udp-echo-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/pcap-file.h"
#include "ns3/aodv-helper.h"
#include "ns3/v4ping-helper.h"
#include "ns3/nqos-wifi-mac-helper.h"
#include "ns3/config.h"
#include "ns3/pcap-test.h"
#include "ns3/rng-seed-manager.h"
#include "ns3/icmpv4.h"
#include <sstream>
using namespace ns3;
using namespace aodv;
//-----------------------------------------------------------------------------
// Test suite
//-----------------------------------------------------------------------------
@@ -56,17 +54,12 @@ public:
SetDataDir (NS_TEST_SOURCEDIR);
// General RREQ-RREP-RRER test case
AddTestCase (new ChainRegressionTest ("aodv-chain-regression-test"), TestCase::QUICK);
/// \internal
/// \bugid{606} test case, should crash if bug is not fixed
// \bugid{606} test case, should crash if bug is not fixed
AddTestCase (new ChainRegressionTest ("bug-606-test", Seconds (10), 3, Seconds (1)), TestCase::QUICK);
/// \internal
/// \bugid{772} UDP test case
// \bugid{772} UDP test case
AddTestCase (new Bug772ChainTest ("udp-chain-test", "ns3::UdpSocketFactory", Seconds (3), 10), TestCase::QUICK);
/// \internal
/// \bugid{772} TCP test case
// \bugid{772} TCP test case
AddTestCase (new Bug772ChainTest ("tcp-chain-test", "ns3::TcpSocketFactory", Seconds (3), 10), TestCase::QUICK);
// Ping loopback test case
AddTestCase (new LoopbackTestCase (), TestCase::QUICK);
}
} g_aodvRegressionTestSuite;
@@ -81,7 +74,8 @@ ChainRegressionTest::ChainRegressionTest (const char * const prefix, Time t, uin
m_time (t),
m_size (size),
m_step (120),
m_arpAliveTimeout (arpAliveTimeout)
m_arpAliveTimeout (arpAliveTimeout),
m_seq (0)
{
}
@@ -90,6 +84,35 @@ ChainRegressionTest::~ChainRegressionTest ()
delete m_nodes;
}
void
ChainRegressionTest::SendPing ()
{
if (Simulator::Now () >= m_time)
{
return;
}
Ptr<Packet> p = Create<Packet> ();
Icmpv4Echo echo;
echo.SetSequenceNumber (m_seq);
m_seq++;
echo.SetIdentifier (0);
Ptr<Packet> dataPacket = Create<Packet> (56);
echo.SetData (dataPacket);
p->AddHeader (echo);
Icmpv4Header header;
header.SetType (Icmpv4Header::ECHO);
header.SetCode (0);
if (Node::ChecksumEnabled ())
{
header.EnableChecksum ();
}
p->AddHeader (header);
m_socket->Send (p, 0);
Simulator::Schedule (Seconds (1), &ChainRegressionTest::SendPing, this);
}
void
ChainRegressionTest::DoRun ()
{
@@ -173,11 +196,14 @@ ChainRegressionTest::CreateDevices ()
Ipv4InterfaceContainer interfaces = address.Assign (devices);
// 3. Setup ping
V4PingHelper ping (interfaces.GetAddress (m_size - 1));
ping.SetAttribute ("Verbose", BooleanValue (false)); // don't need verbose ping in regression test
ApplicationContainer p = ping.Install (m_nodes->Get (0));
p.Start (Seconds (0));
p.Stop (m_time);
m_socket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::Ipv4RawSocketFactory"));
m_socket->SetAttribute ("Protocol", UintegerValue (1)); // icmp
InetSocketAddress src = InetSocketAddress (Ipv4Address::GetAny (), 0);
m_socket->Bind (src);
InetSocketAddress dst = InetSocketAddress (interfaces.GetAddress (m_size - 1), 0);
m_socket->Connect (dst);
SendPing ();
// 4. write PCAP
wifiPhy.EnablePcapAll (CreateTempDirFilename (m_prefix));
+7
View File
@@ -23,6 +23,7 @@
#include "ns3/test.h"
#include "ns3/nstime.h"
#include "ns3/socket.h"
#include "ns3/node-container.h"
using namespace ns3;
@@ -177,6 +178,10 @@ private:
const double m_step;
/// ARP alive timeout
const Time m_arpAliveTimeout;
/// Socket
Ptr<Socket> m_socket;
/// Sequence number
uint16_t m_seq;
/// Create test topology
void CreateNodes ();
@@ -186,6 +191,8 @@ private:
void CheckResults ();
/// Go
void DoRun ();
/// Send one ping
void SendPing ();
};
#endif /* AODV_REGRESSION_H */
Binary file not shown.
Binary file not shown.
Binary file not shown.
+28 -16
View File
@@ -33,17 +33,14 @@
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/abort.h"
#include "ns3/udp-echo-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/pcap-file.h"
#include "ns3/aodv-helper.h"
#include "ns3/v4ping-helper.h"
#include "ns3/nqos-wifi-mac-helper.h"
#include "ns3/config.h"
#include "ns3/on-off-helper.h"
#include "ns3/inet-socket-address.h"
#include "ns3/data-rate.h"
#include "ns3/packet-sink-helper.h"
#include "ns3/pcap-test.h"
#include <sstream>
@@ -59,8 +56,8 @@ Bug772ChainTest::Bug772ChainTest (const char * const prefix, const char * const
m_proto (proto),
m_time (t),
m_size (size),
m_step (120)
{
m_step (120),
m_port (9){
}
Bug772ChainTest::~Bug772ChainTest ()
@@ -68,6 +65,17 @@ Bug772ChainTest::~Bug772ChainTest ()
delete m_nodes;
}
void
Bug772ChainTest::SendData (Ptr<Socket> socket)
{
if (Simulator::Now () < m_time)
{
socket->Send (Create<Packet> (1000));
Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0.125),
&Bug772ChainTest::SendData, this, socket);
}
}
void
Bug772ChainTest::DoRun ()
{
@@ -133,24 +141,28 @@ Bug772ChainTest::CreateDevices ()
InternetStackHelper internetStack;
internetStack.SetRoutingHelper (aodv);
internetStack.Install (*m_nodes);
streamsUsed += internetStack.AssignStreams (*m_nodes, streamsUsed);
// Expect to use (3*m_size) more streams for internet stack random variables
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + (3*m_size)), "Stream assignment mismatch");
streamsUsed += aodv.AssignStreams (*m_nodes, streamsUsed);
// Expect to use m_size more streams for AODV
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + m_size), "Stream assignment mismatch");
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + (3*m_size) + m_size), "Stream assignment mismatch");
Ipv4AddressHelper address;
address.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer interfaces = address.Assign (devices);
// 3. Setup UDP source and sink
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff (m_proto, Address (InetSocketAddress (interfaces.GetAddress (m_size-1), port)));
onoff.SetConstantRate (DataRate (64000));
onoff.SetAttribute ("PacketSize", UintegerValue (1000));
ApplicationContainer app = onoff.Install (m_nodes->Get (0));
app.Start (Seconds (1.0));
app.Stop (m_time);
PacketSinkHelper sink (m_proto, Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
app = sink.Install (m_nodes->Get (m_size - 1));
app.Start (Seconds (0.0));
m_sendSocket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName (m_proto));
m_sendSocket->Bind ();
m_sendSocket->Connect (InetSocketAddress (interfaces.GetAddress (m_size-1), m_port));
m_sendSocket->SetAllowBroadcast (true);
Simulator::ScheduleWithContext (m_sendSocket->GetNode ()->GetId (), Seconds (1.0),
&Bug772ChainTest::SendData, this, m_sendSocket);
m_recvSocket = Socket::CreateSocket (m_nodes->Get (m_size - 1), TypeId::LookupByName (m_proto));
m_recvSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), m_port));
m_recvSocket->Listen ();
m_recvSocket->ShutdownSend ();
// 4. write PCAP on the first and last nodes only
wifiPhy.EnablePcap (CreateTempDirFilename (m_prefix), devices.Get (0));
+14
View File
@@ -24,6 +24,7 @@
#include "ns3/test.h"
#include "ns3/nstime.h"
#include "ns3/node-container.h"
#include "ns3/socket.h"
using namespace ns3;
@@ -62,6 +63,8 @@ private:
const uint32_t m_size;
/// Chain step, meters
const double m_step;
/// port number
const uint16_t m_port;
/// Create test topology
void CreateNodes ();
@@ -71,6 +74,17 @@ private:
void CheckResults ();
/// Go
void DoRun ();
/// Receiving socket
Ptr<Socket> m_recvSocket;
/// Transmitting socket
Ptr<Socket> m_sendSocket;
/**
* Send data
* \param socket the sending socket
*/
void SendData (Ptr<Socket> socket);
};
#endif /* BUG_772_H */
+97 -15
View File
@@ -18,8 +18,10 @@
* Authors: Pavel Boyko <boyko@iitp.ru>
*/
#include "loopback.h"
#include "ns3/test.h"
#include "ns3/simulator.h"
#include "ns3/socket-factory.h"
#include "ns3/udp-socket-factory.h"
#include "ns3/mobility-helper.h"
#include "ns3/double.h"
#include "ns3/uinteger.h"
@@ -45,12 +47,66 @@ namespace ns3
namespace aodv
{
static uint32_t g_count (0);
static void
PingRtt (std::string context, Time rtt)
/**
* \ingroup aodv
*
* \brief AODV loopback UDP echo test case
*/
class LoopbackTestCase : public TestCase
{
g_count++;
uint32_t m_count; //!< number of packet received;
Ptr<Socket> m_txSocket;
Ptr<Socket> m_echoSocket;
Ptr<Socket> m_rxSocket;
uint16_t m_echoSendPort;
uint16_t m_echoReplyPort;
void SendData (Ptr<Socket> socket);
void ReceivePkt (Ptr<Socket> socket);
void EchoData (Ptr<Socket> socket);
public:
LoopbackTestCase ();
void DoRun ();
};
LoopbackTestCase::LoopbackTestCase () :
TestCase ("UDP Echo 127.0.0.1 test"), m_count (0)
{
m_echoSendPort = 1233;
m_echoReplyPort = 1234;
}
void LoopbackTestCase::ReceivePkt (Ptr<Socket> socket)
{
Ptr<Packet> receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0);
m_count ++;
}
void
LoopbackTestCase::EchoData (Ptr<Socket> socket)
{
Address from;
Ptr<Packet> receivedPacket = socket->RecvFrom (std::numeric_limits<uint32_t>::max (), 0, from);
Ipv4Address src = InetSocketAddress::ConvertFrom (from).GetIpv4 ();
Address to = InetSocketAddress (src, m_echoReplyPort);
receivedPacket->RemoveAllPacketTags ();
receivedPacket->RemoveAllByteTags ();
socket->SendTo (receivedPacket, 0, to);
}
void
LoopbackTestCase::SendData (Ptr<Socket> socket)
{
Address realTo = InetSocketAddress (Ipv4Address::GetLoopback (), m_echoSendPort);
socket->SendTo (Create<Packet> (123), 0, realTo);
Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (1.0),
&LoopbackTestCase::SendData, this, socket);
}
void
@@ -80,23 +136,49 @@ LoopbackTestCase::DoRun ()
address.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer interfaces = address.Assign (devices);
// Setup ping
Ptr<V4Ping> ping = CreateObject<V4Ping> ();
ping->SetAttribute ("Remote", Ipv4AddressValue (Ipv4Address::GetLoopback ()));
nodes.Get (0)->AddApplication (ping);
ping->SetStartTime (Seconds (0));
ping->SetStopTime (Seconds (4));
Names::Add ("ping", ping);
Config::Connect ("/Names/ping/Rtt", MakeCallback (&PingRtt));
// Setup echos
Ptr<SocketFactory> socketFactory = nodes.Get (0)->GetObject<UdpSocketFactory> ();
m_rxSocket = socketFactory->CreateSocket ();
m_rxSocket->Bind (InetSocketAddress (Ipv4Address::GetLoopback (), m_echoReplyPort));
m_rxSocket->SetRecvCallback (MakeCallback (&LoopbackTestCase::ReceivePkt, this));
m_echoSocket = socketFactory->CreateSocket ();
m_echoSocket->Bind (InetSocketAddress (Ipv4Address::GetLoopback (), m_echoSendPort));
m_echoSocket->SetRecvCallback (MakeCallback (&LoopbackTestCase::EchoData, this));
m_txSocket = socketFactory->CreateSocket ();
Simulator::ScheduleWithContext (m_txSocket->GetNode ()->GetId (), Seconds (1.0),
&LoopbackTestCase::SendData, this, m_txSocket);
// Run
Simulator::Stop (Seconds (5));
Simulator::Run ();
m_txSocket->Close ();
m_echoSocket->Close ();
m_rxSocket->Close ();
Simulator::Destroy ();
// Check that 4 packets delivered
NS_TEST_ASSERT_MSG_EQ (g_count, 4, "Exactly 4 ping replies must be delivered.");
NS_TEST_ASSERT_MSG_EQ (m_count, 4, "Exactly 4 echo replies must be delivered.");
}
//-----------------------------------------------------------------------------
// Test suite
//-----------------------------------------------------------------------------
class AodvLoopbackTestSuite : public TestSuite
{
public:
AodvLoopbackTestSuite () : TestSuite ("routing-aodv-loopback", SYSTEM)
{
SetDataDir (NS_TEST_SOURCEDIR);
// UDP Echo loopback test case
AddTestCase (new LoopbackTestCase (), TestCase::QUICK);
}
} g_aodvLoopbackTestSuite;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
module = bld.create_ns3_module('aodv', ['internet', 'wifi', 'applications'])
module = bld.create_ns3_module('aodv', ['internet', 'wifi'])
module.includes = '.'
module.source = [
'model/aodv-id-cache.cc',
+135 -37
View File
@@ -110,6 +110,8 @@ def register_types(module):
module.add_class('NodeContainer', import_from_module='ns.network')
## node-list.h (module 'network'): ns3::NodeList [class]
module.add_class('NodeList', import_from_module='ns.network')
## non-copyable.h (module 'core'): ns3::NonCopyable [class]
module.add_class('NonCopyable', destructor_visibility='protected', import_from_module='ns.core')
## object-base.h (module 'core'): ns3::ObjectBase [class]
module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core')
## object.h (module 'core'): ns3::ObjectDeleter [struct]
@@ -155,7 +157,7 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_LINUX_SSL', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4', 'DLT_NETLINK'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class]
@@ -234,6 +236,12 @@ def register_types(module):
module.add_enum('', ['FRAME_FLAG_NONE', 'FRAME_FLAG_CFP', 'FRAME_FLAG_SHORT_PREAMBLE', 'FRAME_FLAG_WEP', 'FRAME_FLAG_FRAGMENTED', 'FRAME_FLAG_FCS_INCLUDED', 'FRAME_FLAG_DATA_PADDING', 'FRAME_FLAG_BAD_FCS', 'FRAME_FLAG_SHORT_GUARD'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['CHANNEL_FLAG_NONE', 'CHANNEL_FLAG_TURBO', 'CHANNEL_FLAG_CCK', 'CHANNEL_FLAG_OFDM', 'CHANNEL_FLAG_SPECTRUM_2GHZ', 'CHANNEL_FLAG_SPECTRUM_5GHZ', 'CHANNEL_FLAG_PASSIVE', 'CHANNEL_FLAG_DYNAMIC', 'CHANNEL_FLAG_GFSK'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['MCS_KNOWN_NONE', 'MCS_KNOWN_BANDWIDTH', 'MCS_KNOWN_INDEX', 'MCS_KNOWN_GUARD_INTERVAL', 'MCS_KNOWN_HT_FORMAT', 'MCS_KNOWN_FEC_TYPE', 'MCS_KNOWN_STBC', 'MCS_KNOWN_NESS', 'MCS_KNOWN_NESS_BIT_1'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['MCS_FLAGS_NONE', 'MCS_FLAGS_BANDWIDTH_40', 'MCS_FLAGS_BANDWIDTH_20L', 'MCS_FLAGS_BANDWIDTH_20U', 'MCS_FLAGS_GUARD_INTERVAL', 'MCS_FLAGS_HT_GREENFIELD', 'MCS_FLAGS_FEC_TYPE', 'MCS_FLAGS_STBC_STREAMS', 'MCS_FLAGS_NESS_BIT_0'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['A_MPDU_STATUS_NONE', 'A_MPDU_STATUS_REPORT_ZERO_LENGTH', 'A_MPDU_STATUS_IS_ZERO_LENGTH', 'A_MPDU_STATUS_LAST_KNOWN', 'A_MPDU_STATUS_LAST', 'A_MPDU_STATUS_DELIMITER_CRC_ERROR', 'A_MPDU_STATUS_DELIMITER_CRC_KNOWN'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## random-variable-stream.h (module 'core'): ns3::RandomVariableStream [class]
module.add_class('RandomVariableStream', import_from_module='ns.core', parent=root_module['ns3::Object'])
## red-queue.h (module 'network'): ns3::RedQueue [class]
@@ -659,6 +667,7 @@ def register_methods(root_module):
register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer'])
register_Ns3NodeContainer_methods(root_module, root_module['ns3::NodeContainer'])
register_Ns3NodeList_methods(root_module, root_module['ns3::NodeList'])
register_Ns3NonCopyable_methods(root_module, root_module['ns3::NonCopyable'])
register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter'])
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
@@ -1242,17 +1251,17 @@ def register_Ns3Buffer_methods(root_module, cls):
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
cls.add_constructor([param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
cls.add_method('AddAtEnd',
'bool',
'void',
[param('uint32_t', 'end')])
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
cls.add_method('AddAtEnd',
'void',
[param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
cls.add_method('AddAtStart',
'bool',
'void',
[param('uint32_t', 'start')])
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
cls.add_method('Begin',
@@ -1274,11 +1283,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer',
[param('uint32_t', 'start'), param('uint32_t', 'length')],
is_const=True)
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
cls.add_method('CreateFullCopy',
'ns3::Buffer',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
cls.add_method('Deserialize',
'uint32_t',
@@ -1288,16 +1292,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer::Iterator',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
cls.add_method('GetCurrentEndOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
cls.add_method('GetCurrentStartOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
cls.add_method('GetSerializedSize',
'uint32_t',
@@ -1561,14 +1555,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
cls.add_method('Add',
'void',
[param('ns3::ByteTagList const &', 'o')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
cls.add_method('AddAtEnd',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
[param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
cls.add_method('AddAtStart',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
[param('int32_t', 'prependOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
cls.add_method('Adjust',
'void',
[param('int32_t', 'adjustment')])
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
cls.add_method('Begin',
'ns3::ByteTagList::Iterator',
@@ -1721,11 +1719,21 @@ def register_Ns3DataRate_methods(root_module, cls):
cls.add_constructor([param('uint64_t', 'bps')])
## data-rate.h (module 'network'): ns3::DataRate::DataRate(std::string rate) [constructor]
cls.add_constructor([param('std::string', 'rate')])
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBitsTxTime(uint32_t bits) const [member function]
cls.add_method('CalculateBitsTxTime',
'ns3::Time',
[param('uint32_t', 'bits')],
is_const=True)
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBytesTxTime(uint32_t bytes) const [member function]
cls.add_method('CalculateBytesTxTime',
'ns3::Time',
[param('uint32_t', 'bytes')],
is_const=True)
## data-rate.h (module 'network'): double ns3::DataRate::CalculateTxTime(uint32_t bytes) const [member function]
cls.add_method('CalculateTxTime',
'double',
[param('uint32_t', 'bytes')],
is_const=True)
deprecated=True, is_const=True)
## data-rate.h (module 'network'): uint64_t ns3::DataRate::GetBitRate() const [member function]
cls.add_method('GetBitRate',
'uint64_t',
@@ -2634,6 +2642,12 @@ def register_Ns3NodeList_methods(root_module, cls):
is_static=True)
return
def register_Ns3NonCopyable_methods(root_module, cls):
## non-copyable.h (module 'core'): ns3::NonCopyable::NonCopyable() [constructor]
cls.add_constructor([],
visibility='protected')
return
def register_Ns3ObjectBase_methods(root_module, cls):
## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor]
cls.add_constructor([])
@@ -3311,10 +3325,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
cls.add_method('Close',
'void',
[])
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
cls.add_method('Diff',
'bool',
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
is_static=True)
## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function]
cls.add_method('Eof',
@@ -3378,10 +3392,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
cls.add_method('Write',
'void',
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
cls.add_method('Write',
'void',
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file.h (module 'network'): ns3::PcapFile::SNAPLEN_DEFAULT [variable]
cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True)
## pcap-file.h (module 'network'): ns3::PcapFile::ZONE_DEFAULT [variable]
@@ -3641,10 +3655,10 @@ def register_Ns3Simulator_methods(root_module, cls):
'void',
[],
is_static=True)
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
cls.add_method('Stop',
'void',
[param('ns3::Time const &', 'time')],
[param('ns3::Time const &', 'delay')],
is_static=True)
return
@@ -3987,6 +4001,11 @@ def register_Ns3TypeId_methods(root_module, cls):
cls.add_method('SetParent',
'ns3::TypeId',
[param('ns3::TypeId', 'tid')])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent() [member function]
cls.add_method('SetParent',
'ns3::TypeId',
[],
template_parameters=['ns3::Object'])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
cls.add_method('SetSize',
'ns3::TypeId',
@@ -4673,10 +4692,10 @@ def register_Ns3PcapFileWrapper_methods(root_module, cls):
cls.add_method('Write',
'void',
[param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
cls.add_method('Write',
'void',
[param('ns3::Time', 't'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
[param('ns3::Time', 't'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function]
cls.add_method('Write',
'void',
@@ -4809,6 +4828,16 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
'uint32_t',
[param('ns3::Buffer::Iterator', 'start')],
is_virtual=True)
## radiotap-header.h (module 'network'): uint16_t ns3::RadiotapHeader::GetAmpduStatusFlags() const [member function]
cls.add_method('GetAmpduStatusFlags',
'uint16_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint32_t ns3::RadiotapHeader::GetAmpduStatusRef() const [member function]
cls.add_method('GetAmpduStatusRef',
'uint32_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetAntennaNoisePower() const [member function]
cls.add_method('GetAntennaNoisePower',
'uint8_t',
@@ -4839,6 +4868,21 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
'ns3::TypeId',
[],
is_const=True, is_virtual=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsFlags() const [member function]
cls.add_method('GetMcsFlags',
'uint8_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsKnown() const [member function]
cls.add_method('GetMcsKnown',
'uint8_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsRate() const [member function]
cls.add_method('GetMcsRate',
'uint8_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetRate() const [member function]
cls.add_method('GetRate',
'uint8_t',
@@ -4869,6 +4913,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
'void',
[param('ns3::Buffer::Iterator', 'start')],
is_const=True, is_virtual=True)
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAmpduStatus(uint32_t referenceNumber, uint16_t flags, uint8_t crc) [member function]
cls.add_method('SetAmpduStatus',
'void',
[param('uint32_t', 'referenceNumber'), param('uint16_t', 'flags'), param('uint8_t', 'crc')])
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAntennaNoisePower(double noise) [member function]
cls.add_method('SetAntennaNoisePower',
'void',
@@ -4885,6 +4933,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
cls.add_method('SetFrameFlags',
'void',
[param('uint8_t', 'flags')])
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetMcsFields(uint8_t known, uint8_t flags, uint8_t mcs) [member function]
cls.add_method('SetMcsFields',
'void',
[param('uint8_t', 'known'), param('uint8_t', 'flags'), param('uint8_t', 'mcs')])
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetRate(uint8_t rate) [member function]
cls.add_method('SetRate',
'void',
@@ -6722,6 +6774,11 @@ def register_Ns3DataCalculator_methods(root_module, cls):
'std::string',
[],
is_const=True)
## data-calculator.h (module 'stats'): static ns3::TypeId ns3::DataCalculator::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## data-calculator.h (module 'stats'): void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -6796,6 +6853,11 @@ def register_Ns3DataOutputInterface_methods(root_module, cls):
'std::string',
[],
is_const=True)
## data-output-interface.h (module 'stats'): static ns3::TypeId ns3::DataOutputInterface::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function]
cls.add_method('Output',
'void',
@@ -6914,10 +6976,11 @@ def register_Ns3DropTailQueue_methods(root_module, cls):
cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')])
## drop-tail-queue.h (module 'network'): ns3::DropTailQueue::DropTailQueue() [constructor]
cls.add_constructor([])
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() [member function]
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() const [member function]
cls.add_method('GetMode',
'ns3::Queue::QueueMode',
[])
[],
is_const=True)
## drop-tail-queue.h (module 'network'): static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
@@ -6966,10 +7029,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
'double',
[],
is_virtual=True)
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
cls.add_method('Interpolate',
'double',
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
visibility='private', is_virtual=True)
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
cls.add_method('Validate',
@@ -7794,6 +7857,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
cls.add_constructor([])
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<double>::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -7859,6 +7927,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls)
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')])
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int>::MinMaxAvgTotalCalculator() [constructor]
cls.add_constructor([])
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<unsigned int>::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -8552,6 +8625,11 @@ def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls):
cls.add_method('FrameUpdate',
'void',
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketSizeMinMaxAvgTotalCalculator::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
cls.add_method('PacketUpdate',
'void',
@@ -10284,6 +10362,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
'void',
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')],
is_virtual=True)
## simple-channel.h (module 'network'): void ns3::SimpleChannel::BlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
cls.add_method('BlackList',
'void',
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
is_virtual=True)
## simple-channel.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::SimpleChannel::GetDevice(uint32_t i) const [member function]
cls.add_method('GetDevice',
'ns3::Ptr< ns3::NetDevice >',
@@ -10304,6 +10387,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
'void',
[param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')],
is_virtual=True)
## simple-channel.h (module 'network'): void ns3::SimpleChannel::UnBlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
cls.add_method('UnBlackList',
'void',
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
is_virtual=True)
return
def register_Ns3SimpleNetDevice_methods(root_module, cls):
@@ -10946,6 +11034,11 @@ def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls):
'unsigned int',
[],
is_const=True)
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::CounterCalculator<unsigned int>::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -10975,6 +11068,11 @@ def register_Ns3PacketCounterCalculator_methods(root_module, cls):
cls.add_method('FrameUpdate',
'void',
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketCounterCalculator::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
cls.add_method('PacketUpdate',
'void',
+135 -37
View File
@@ -110,6 +110,8 @@ def register_types(module):
module.add_class('NodeContainer', import_from_module='ns.network')
## node-list.h (module 'network'): ns3::NodeList [class]
module.add_class('NodeList', import_from_module='ns.network')
## non-copyable.h (module 'core'): ns3::NonCopyable [class]
module.add_class('NonCopyable', destructor_visibility='protected', import_from_module='ns.core')
## object-base.h (module 'core'): ns3::ObjectBase [class]
module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core')
## object.h (module 'core'): ns3::ObjectDeleter [struct]
@@ -155,7 +157,7 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_LINUX_SSL', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4', 'DLT_NETLINK'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class]
@@ -234,6 +236,12 @@ def register_types(module):
module.add_enum('', ['FRAME_FLAG_NONE', 'FRAME_FLAG_CFP', 'FRAME_FLAG_SHORT_PREAMBLE', 'FRAME_FLAG_WEP', 'FRAME_FLAG_FRAGMENTED', 'FRAME_FLAG_FCS_INCLUDED', 'FRAME_FLAG_DATA_PADDING', 'FRAME_FLAG_BAD_FCS', 'FRAME_FLAG_SHORT_GUARD'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['CHANNEL_FLAG_NONE', 'CHANNEL_FLAG_TURBO', 'CHANNEL_FLAG_CCK', 'CHANNEL_FLAG_OFDM', 'CHANNEL_FLAG_SPECTRUM_2GHZ', 'CHANNEL_FLAG_SPECTRUM_5GHZ', 'CHANNEL_FLAG_PASSIVE', 'CHANNEL_FLAG_DYNAMIC', 'CHANNEL_FLAG_GFSK'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['MCS_KNOWN_NONE', 'MCS_KNOWN_BANDWIDTH', 'MCS_KNOWN_INDEX', 'MCS_KNOWN_GUARD_INTERVAL', 'MCS_KNOWN_HT_FORMAT', 'MCS_KNOWN_FEC_TYPE', 'MCS_KNOWN_STBC', 'MCS_KNOWN_NESS', 'MCS_KNOWN_NESS_BIT_1'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['MCS_FLAGS_NONE', 'MCS_FLAGS_BANDWIDTH_40', 'MCS_FLAGS_BANDWIDTH_20L', 'MCS_FLAGS_BANDWIDTH_20U', 'MCS_FLAGS_GUARD_INTERVAL', 'MCS_FLAGS_HT_GREENFIELD', 'MCS_FLAGS_FEC_TYPE', 'MCS_FLAGS_STBC_STREAMS', 'MCS_FLAGS_NESS_BIT_0'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
module.add_enum('', ['A_MPDU_STATUS_NONE', 'A_MPDU_STATUS_REPORT_ZERO_LENGTH', 'A_MPDU_STATUS_IS_ZERO_LENGTH', 'A_MPDU_STATUS_LAST_KNOWN', 'A_MPDU_STATUS_LAST', 'A_MPDU_STATUS_DELIMITER_CRC_ERROR', 'A_MPDU_STATUS_DELIMITER_CRC_KNOWN'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
## random-variable-stream.h (module 'core'): ns3::RandomVariableStream [class]
module.add_class('RandomVariableStream', import_from_module='ns.core', parent=root_module['ns3::Object'])
## red-queue.h (module 'network'): ns3::RedQueue [class]
@@ -659,6 +667,7 @@ def register_methods(root_module):
register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer'])
register_Ns3NodeContainer_methods(root_module, root_module['ns3::NodeContainer'])
register_Ns3NodeList_methods(root_module, root_module['ns3::NodeList'])
register_Ns3NonCopyable_methods(root_module, root_module['ns3::NonCopyable'])
register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter'])
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
@@ -1242,17 +1251,17 @@ def register_Ns3Buffer_methods(root_module, cls):
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
cls.add_constructor([param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
cls.add_method('AddAtEnd',
'bool',
'void',
[param('uint32_t', 'end')])
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
cls.add_method('AddAtEnd',
'void',
[param('ns3::Buffer const &', 'o')])
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
cls.add_method('AddAtStart',
'bool',
'void',
[param('uint32_t', 'start')])
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
cls.add_method('Begin',
@@ -1274,11 +1283,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer',
[param('uint32_t', 'start'), param('uint32_t', 'length')],
is_const=True)
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
cls.add_method('CreateFullCopy',
'ns3::Buffer',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
cls.add_method('Deserialize',
'uint32_t',
@@ -1288,16 +1292,6 @@ def register_Ns3Buffer_methods(root_module, cls):
'ns3::Buffer::Iterator',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
cls.add_method('GetCurrentEndOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
cls.add_method('GetCurrentStartOffset',
'int32_t',
[],
is_const=True)
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
cls.add_method('GetSerializedSize',
'uint32_t',
@@ -1561,14 +1555,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
cls.add_method('Add',
'void',
[param('ns3::ByteTagList const &', 'o')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
cls.add_method('AddAtEnd',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
[param('int32_t', 'appendOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
cls.add_method('AddAtStart',
'void',
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
[param('int32_t', 'prependOffset')])
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
cls.add_method('Adjust',
'void',
[param('int32_t', 'adjustment')])
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
cls.add_method('Begin',
'ns3::ByteTagList::Iterator',
@@ -1721,11 +1719,21 @@ def register_Ns3DataRate_methods(root_module, cls):
cls.add_constructor([param('uint64_t', 'bps')])
## data-rate.h (module 'network'): ns3::DataRate::DataRate(std::string rate) [constructor]
cls.add_constructor([param('std::string', 'rate')])
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBitsTxTime(uint32_t bits) const [member function]
cls.add_method('CalculateBitsTxTime',
'ns3::Time',
[param('uint32_t', 'bits')],
is_const=True)
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBytesTxTime(uint32_t bytes) const [member function]
cls.add_method('CalculateBytesTxTime',
'ns3::Time',
[param('uint32_t', 'bytes')],
is_const=True)
## data-rate.h (module 'network'): double ns3::DataRate::CalculateTxTime(uint32_t bytes) const [member function]
cls.add_method('CalculateTxTime',
'double',
[param('uint32_t', 'bytes')],
is_const=True)
deprecated=True, is_const=True)
## data-rate.h (module 'network'): uint64_t ns3::DataRate::GetBitRate() const [member function]
cls.add_method('GetBitRate',
'uint64_t',
@@ -2634,6 +2642,12 @@ def register_Ns3NodeList_methods(root_module, cls):
is_static=True)
return
def register_Ns3NonCopyable_methods(root_module, cls):
## non-copyable.h (module 'core'): ns3::NonCopyable::NonCopyable() [constructor]
cls.add_constructor([],
visibility='protected')
return
def register_Ns3ObjectBase_methods(root_module, cls):
## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor]
cls.add_constructor([])
@@ -3311,10 +3325,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
cls.add_method('Close',
'void',
[])
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
cls.add_method('Diff',
'bool',
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
is_static=True)
## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function]
cls.add_method('Eof',
@@ -3378,10 +3392,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
cls.add_method('Write',
'void',
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
cls.add_method('Write',
'void',
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file.h (module 'network'): ns3::PcapFile::SNAPLEN_DEFAULT [variable]
cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True)
## pcap-file.h (module 'network'): ns3::PcapFile::ZONE_DEFAULT [variable]
@@ -3641,10 +3655,10 @@ def register_Ns3Simulator_methods(root_module, cls):
'void',
[],
is_static=True)
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
cls.add_method('Stop',
'void',
[param('ns3::Time const &', 'time')],
[param('ns3::Time const &', 'delay')],
is_static=True)
return
@@ -3987,6 +4001,11 @@ def register_Ns3TypeId_methods(root_module, cls):
cls.add_method('SetParent',
'ns3::TypeId',
[param('ns3::TypeId', 'tid')])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent() [member function]
cls.add_method('SetParent',
'ns3::TypeId',
[],
template_parameters=['ns3::Object'])
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
cls.add_method('SetSize',
'ns3::TypeId',
@@ -4673,10 +4692,10 @@ def register_Ns3PcapFileWrapper_methods(root_module, cls):
cls.add_method('Write',
'void',
[param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
cls.add_method('Write',
'void',
[param('ns3::Time', 't'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
[param('ns3::Time', 't'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function]
cls.add_method('Write',
'void',
@@ -4809,6 +4828,16 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
'uint32_t',
[param('ns3::Buffer::Iterator', 'start')],
is_virtual=True)
## radiotap-header.h (module 'network'): uint16_t ns3::RadiotapHeader::GetAmpduStatusFlags() const [member function]
cls.add_method('GetAmpduStatusFlags',
'uint16_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint32_t ns3::RadiotapHeader::GetAmpduStatusRef() const [member function]
cls.add_method('GetAmpduStatusRef',
'uint32_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetAntennaNoisePower() const [member function]
cls.add_method('GetAntennaNoisePower',
'uint8_t',
@@ -4839,6 +4868,21 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
'ns3::TypeId',
[],
is_const=True, is_virtual=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsFlags() const [member function]
cls.add_method('GetMcsFlags',
'uint8_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsKnown() const [member function]
cls.add_method('GetMcsKnown',
'uint8_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsRate() const [member function]
cls.add_method('GetMcsRate',
'uint8_t',
[],
is_const=True)
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetRate() const [member function]
cls.add_method('GetRate',
'uint8_t',
@@ -4869,6 +4913,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
'void',
[param('ns3::Buffer::Iterator', 'start')],
is_const=True, is_virtual=True)
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAmpduStatus(uint32_t referenceNumber, uint16_t flags, uint8_t crc) [member function]
cls.add_method('SetAmpduStatus',
'void',
[param('uint32_t', 'referenceNumber'), param('uint16_t', 'flags'), param('uint8_t', 'crc')])
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAntennaNoisePower(double noise) [member function]
cls.add_method('SetAntennaNoisePower',
'void',
@@ -4885,6 +4933,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
cls.add_method('SetFrameFlags',
'void',
[param('uint8_t', 'flags')])
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetMcsFields(uint8_t known, uint8_t flags, uint8_t mcs) [member function]
cls.add_method('SetMcsFields',
'void',
[param('uint8_t', 'known'), param('uint8_t', 'flags'), param('uint8_t', 'mcs')])
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetRate(uint8_t rate) [member function]
cls.add_method('SetRate',
'void',
@@ -6722,6 +6774,11 @@ def register_Ns3DataCalculator_methods(root_module, cls):
'std::string',
[],
is_const=True)
## data-calculator.h (module 'stats'): static ns3::TypeId ns3::DataCalculator::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## data-calculator.h (module 'stats'): void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -6796,6 +6853,11 @@ def register_Ns3DataOutputInterface_methods(root_module, cls):
'std::string',
[],
is_const=True)
## data-output-interface.h (module 'stats'): static ns3::TypeId ns3::DataOutputInterface::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function]
cls.add_method('Output',
'void',
@@ -6914,10 +6976,11 @@ def register_Ns3DropTailQueue_methods(root_module, cls):
cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')])
## drop-tail-queue.h (module 'network'): ns3::DropTailQueue::DropTailQueue() [constructor]
cls.add_constructor([])
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() [member function]
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() const [member function]
cls.add_method('GetMode',
'ns3::Queue::QueueMode',
[])
[],
is_const=True)
## drop-tail-queue.h (module 'network'): static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
@@ -6966,10 +7029,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
'double',
[],
is_virtual=True)
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
cls.add_method('Interpolate',
'double',
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
visibility='private', is_virtual=True)
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
cls.add_method('Validate',
@@ -7794,6 +7857,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
cls.add_constructor([])
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<double>::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -7859,6 +7927,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls)
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')])
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int>::MinMaxAvgTotalCalculator() [constructor]
cls.add_constructor([])
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<unsigned int>::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -8552,6 +8625,11 @@ def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls):
cls.add_method('FrameUpdate',
'void',
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketSizeMinMaxAvgTotalCalculator::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
cls.add_method('PacketUpdate',
'void',
@@ -10284,6 +10362,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
'void',
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')],
is_virtual=True)
## simple-channel.h (module 'network'): void ns3::SimpleChannel::BlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
cls.add_method('BlackList',
'void',
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
is_virtual=True)
## simple-channel.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::SimpleChannel::GetDevice(uint32_t i) const [member function]
cls.add_method('GetDevice',
'ns3::Ptr< ns3::NetDevice >',
@@ -10304,6 +10387,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
'void',
[param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')],
is_virtual=True)
## simple-channel.h (module 'network'): void ns3::SimpleChannel::UnBlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
cls.add_method('UnBlackList',
'void',
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
is_virtual=True)
return
def register_Ns3SimpleNetDevice_methods(root_module, cls):
@@ -10946,6 +11034,11 @@ def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls):
'unsigned int',
[],
is_const=True)
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::CounterCalculator<unsigned int>::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
cls.add_method('Output',
'void',
@@ -10975,6 +11068,11 @@ def register_Ns3PacketCounterCalculator_methods(root_module, cls):
cls.add_method('FrameUpdate',
'void',
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketCounterCalculator::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
cls.add_method('PacketUpdate',
'void',
@@ -39,6 +39,7 @@ ApplicationPacketProbe::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::ApplicationPacketProbe")
.SetParent<Probe> ()
.SetGroupName("Applications")
.AddConstructor<ApplicationPacketProbe> ()
.AddTraceSource ( "Output",
"The packet plus its socket address that serve "
@@ -42,6 +42,7 @@ BulkSendApplication::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::BulkSendApplication")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<BulkSendApplication> ()
.AddAttribute ("SendSize", "The amount of data to send each time.",
UintegerValue (512),
@@ -224,7 +225,7 @@ void BulkSendApplication::DataSend (Ptr<Socket>, uint32_t)
if (m_connected)
{ // Only send new data if the connection has completed
Simulator::ScheduleNow (&BulkSendApplication::SendData, this);
SendData ();
}
}
@@ -53,6 +53,7 @@ OnOffApplication::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::OnOffApplication")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<OnOffApplication> ()
.AddAttribute ("DataRate", "The data rate in on state.",
DataRateValue (DataRate ("500kb/s")),
+1
View File
@@ -43,6 +43,7 @@ PacketSink::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::PacketSink")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<PacketSink> ()
.AddAttribute ("Local",
"The Address on which to Bind the rx socket.",
+1
View File
@@ -46,6 +46,7 @@ TypeId Ping6::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::Ping6")
.SetParent<Application>()
.SetGroupName("Applications")
.AddConstructor<Ping6>()
.AddAttribute ("MaxPackets",
"The maximum number of packets the application will send",
+1 -1
View File
@@ -317,7 +317,7 @@ public:
/**
* \brief Set the last RA send time. It also decrements the initial Rtr Advertisements counter.
* \param the last RA send time
* \param now the last RA send time
*/
void SetLastRaTxTime (Time now);
+1
View File
@@ -52,6 +52,7 @@ TypeId Radvd::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::Radvd")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<Radvd> ()
.AddAttribute ("AdvertisementJitter",
"Uniform variable to provide jitter between min and max values of AdvInterval",
+1
View File
@@ -62,6 +62,7 @@ SeqTsHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::SeqTsHeader")
.SetParent<Header> ()
.SetGroupName("Applications")
.AddConstructor<SeqTsHeader> ()
;
return tid;
+1
View File
@@ -44,6 +44,7 @@ UdpClient::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::UdpClient")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<UdpClient> ()
.AddAttribute ("MaxPackets",
"The maximum number of packets the application will send",
@@ -40,6 +40,7 @@ UdpEchoClient::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::UdpEchoClient")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<UdpEchoClient> ()
.AddAttribute ("MaxPackets",
"The maximum number of packets the application will send",
@@ -43,6 +43,7 @@ UdpEchoServer::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::UdpEchoServer")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<UdpEchoServer> ()
.AddAttribute ("Port", "Port on which we listen for incoming packets.",
UintegerValue (9),
+1
View File
@@ -46,6 +46,7 @@ UdpServer::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::UdpServer")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<UdpServer> ()
.AddAttribute ("Port",
"Port on which we listen for incoming packets.",
@@ -62,6 +62,7 @@ UdpTraceClient::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::UdpTraceClient")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<UdpTraceClient> ()
.AddAttribute ("RemoteAddress",
"The destination Address of the outbound packets",
+1
View File
@@ -37,6 +37,7 @@ V4Ping::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::V4Ping")
.SetParent<Application> ()
.SetGroupName("Applications")
.AddConstructor<V4Ping> ()
.AddAttribute ("Remote",
"The address of the machine we want to ping.",
+1
View File
@@ -31,6 +31,7 @@ class Node;
class AttributeValue;
/**
* \ingroup bridge
* \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging)
*/
class BridgeHelper
+1
View File
@@ -30,6 +30,7 @@ BridgeChannel::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::BridgeChannel")
.SetParent<Channel> ()
.SetGroupName("Bridge")
.AddConstructor<BridgeChannel> ()
;
return tid;
+21 -1
View File
@@ -36,10 +36,18 @@ namespace ns3 {
class BridgeChannel : public Channel
{
public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void);
BridgeChannel ();
virtual ~BridgeChannel ();
/**
* Adds a channel to the bridged pool
* \param bridgedChannel the channel to add to the pool
*/
void AddChannel (Ptr<Channel> bridgedChannel);
// virtual methods implementation, from Channel
@@ -48,10 +56,22 @@ public:
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
BridgeChannel (const BridgeChannel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
BridgeChannel &operator = (const BridgeChannel &);
std::vector< Ptr<Channel> > m_bridgedChannels;
std::vector< Ptr<Channel> > m_bridgedChannels; //!< pool of bridged channels
};
+4 -1
View File
@@ -36,6 +36,7 @@ BridgeNetDevice::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::BridgeNetDevice")
.SetParent<NetDevice> ()
.SetGroupName("Bridge")
.AddConstructor<BridgeNetDevice> ()
.AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit",
UintegerValue (1500),
@@ -398,11 +399,13 @@ BridgeNetDevice::SendFrom (Ptr<Packet> packet, const Address& src, const Address
// data was not unicast or no state has been learned for that mac
// address => flood through all ports.
Ptr<Packet> pktCopy;
for (std::vector< Ptr<NetDevice> >::iterator iter = m_ports.begin ();
iter != m_ports.end (); iter++)
{
pktCopy = packet->Copy ();
Ptr<NetDevice> port = *iter;
port->SendFrom (packet, src, dest, protocolNumber);
port->SendFrom (pktCopy, src, dest, protocolNumber);
}
return true;
+84 -13
View File
@@ -65,12 +65,17 @@ class Node;
class BridgeNetDevice : public NetDevice
{
public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void);
BridgeNetDevice ();
virtual ~BridgeNetDevice ();
/**
* \brief Add a 'port' to a bridge device
* \param bridgePort the NetDevice to add
*
* This method adds a new bridge port to a BridgeNetDevice, so that
* the new bridge port NetDevice becomes part of the bridge and L2
@@ -84,8 +89,18 @@ public:
*/
void AddBridgePort (Ptr<NetDevice> bridgePort);
/**
* \brief Gets the number of bridged 'ports', i.e., the NetDevices currently bridged.
*
* \return the number of bridged ports.
*/
uint32_t GetNBridgePorts (void) const;
/**
* \brief Gets the n-th bridged port.
* \param n the port index
* \return the n-th bridged NetDevice
*/
Ptr<NetDevice> GetBridgePort (uint32_t n) const;
// inherited from NetDevice base class.
@@ -117,36 +132,92 @@ public:
protected:
virtual void DoDispose (void);
/**
* \brief Receives a packet from one bridged port.
* \param device the originating port
* \param packet the received packet
* \param protocol the packet protocol (e.g., Ethertype)
* \param source the packet source
* \param destination the packet destination
* \param packetType the packet type (e.g., host, broadcast, etc.)
*/
void ReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet> packet, uint16_t protocol,
Address const &source, Address const &destination, PacketType packetType);
/**
* \brief Forwards a unicast packet
* \param incomingPort the packet incoming port
* \param packet the packet
* \param protocol the packet protocol (e.g., Ethertype)
* \param src the packet source
* \param dst the packet destination
*/
void ForwardUnicast (Ptr<NetDevice> incomingPort, Ptr<const Packet> packet,
uint16_t protocol, Mac48Address src, Mac48Address dst);
/**
* \brief Forwards a broadcast or a multicast packet
* \param incomingPort the packet incoming port
* \param packet the packet
* \param protocol the packet protocol (e.g., Ethertype)
* \param src the packet source
* \param dst the packet destination
*/
void ForwardBroadcast (Ptr<NetDevice> incomingPort, Ptr<const Packet> packet,
uint16_t protocol, Mac48Address src, Mac48Address dst);
/**
* \brief Learns the port a MAC address is sending from
* \param source source address
* \param port the port the source is sending from
*/
void Learn (Mac48Address source, Ptr<NetDevice> port);
/**
* \brief Gets the port associated to a source address
* \param source the source address
* \returns the port the source is associated to, or NULL if no association is known.
*/
Ptr<NetDevice> GetLearnedState (Mac48Address source);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
BridgeNetDevice (const BridgeNetDevice &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
BridgeNetDevice &operator = (const BridgeNetDevice &);
NetDevice::ReceiveCallback m_rxCallback;
NetDevice::PromiscReceiveCallback m_promiscRxCallback;
NetDevice::ReceiveCallback m_rxCallback; //!< receive callback
NetDevice::PromiscReceiveCallback m_promiscRxCallback; //!< promiscuous receive callback
Mac48Address m_address;
Time m_expirationTime; // time it takes for learned MAC state to expire
Mac48Address m_address; //!< MAC address of the NetDevice
Time m_expirationTime; //!< time it takes for learned MAC state to expire
/**
* \ingroup bridge
* Structure holding the status of an address
*/
struct LearnedState
{
Ptr<NetDevice> associatedPort;
Time expirationTime;
Ptr<NetDevice> associatedPort; //!< port associated with the address
Time expirationTime; //!< time it takes for learned MAC state to expire
};
std::map<Mac48Address, LearnedState> m_learnState;
Ptr<Node> m_node;
Ptr<BridgeChannel> m_channel;
std::vector< Ptr<NetDevice> > m_ports;
uint32_t m_ifIndex;
uint16_t m_mtu;
bool m_enableLearning;
std::map<Mac48Address, LearnedState> m_learnState; //!< Container for known address statuses
Ptr<Node> m_node; //!< node owning this NetDevice
Ptr<BridgeChannel> m_channel; //!< virtual bridged channel
std::vector< Ptr<NetDevice> > m_ports; //!< bridged ports
uint32_t m_ifIndex; //!< Interface index
uint16_t m_mtu; //!< MTU of the bridged NetDevice
bool m_enableLearning; //!< true if the bridge will learn the node status
};
} // namespace ns3
@@ -3222,10 +3222,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
'double',
[],
is_virtual=True)
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
cls.add_method('Interpolate',
'double',
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
visibility='private', is_virtual=True)
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
cls.add_method('Validate',
@@ -3222,10 +3222,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
'double',
[],
is_virtual=True)
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
cls.add_method('Interpolate',
'double',
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
visibility='private', is_virtual=True)
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
cls.add_method('Validate',
@@ -51,6 +51,7 @@ GridBuildingAllocator::GetTypeId (void)
static TypeId tid = TypeId ("ns3::GridBuildingAllocator")
.SetParent<Object> ()
.AddConstructor<GridBuildingAllocator> ()
.SetGroupName ("Buildings")
.AddAttribute ("GridWidth", "The number of objects layed out on a line.",
UintegerValue (10),
MakeUintegerAccessor (&GridBuildingAllocator::m_n),
@@ -50,7 +50,7 @@ RandomBuildingPositionAllocator::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::RandomBuildingPositionAllocator")
.SetParent<PositionAllocator> ()
.SetGroupName ("Mobility")
.SetGroupName ("Buildings")
.AddConstructor<RandomBuildingPositionAllocator> ()
.AddAttribute ("WithReplacement",
"If true, the building will be randomly selected with replacement. "
@@ -117,7 +117,7 @@ RandomRoomPositionAllocator::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::RandomRoomPositionAllocator")
.SetParent<PositionAllocator> ()
.SetGroupName ("Mobility")
.SetGroupName ("Buildings")
.AddConstructor<RandomRoomPositionAllocator> ();
return tid;
}
@@ -221,7 +221,7 @@ SameRoomPositionAllocator::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::SameRoomPositionAllocator")
.SetParent<PositionAllocator> ()
.SetGroupName ("Mobility")
.SetGroupName ("Buildings")
.AddConstructor<SameRoomPositionAllocator> ();
return tid;
}
@@ -303,7 +303,7 @@ FixedRoomPositionAllocator::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::FixedRoomPositionAllocator")
.SetParent<PositionAllocator> ()
.SetGroupName ("Mobility")
.SetGroupName ("Buildings")
.AddConstructor<SameRoomPositionAllocator> ();
return tid;
}
+1
View File
@@ -64,6 +64,7 @@ BuildingListPriv::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::BuildingListPriv")
.SetParent<Object> ()
.SetGroupName ("Buildings")
.AddAttribute ("BuildingList", "The list of all buildings created during the simulation.",
ObjectVectorValue (),
MakeObjectVectorAccessor (&BuildingListPriv::m_buildings),
+1
View File
@@ -41,6 +41,7 @@ Building::GetTypeId (void)
static TypeId tid = TypeId ("ns3::Building")
.SetParent<Object> ()
.AddConstructor<Building> ()
.SetGroupName ("Buildings")
.AddAttribute ("NRoomsX", "The number of rooms in the X axis.",
UintegerValue (1),
MakeUintegerAccessor (&Building::GetNRoomsX, &Building::SetNRoomsX),
@@ -65,6 +65,7 @@ BuildingsPropagationLossModel::GetTypeId (void)
static TypeId tid = TypeId ("ns3::BuildingsPropagationLossModel")
.SetParent<PropagationLossModel> ()
.SetGroupName ("Buildings")
.AddAttribute ("ShadowSigmaOutdoor",
@@ -66,6 +66,7 @@ HybridBuildingsPropagationLossModel::GetTypeId (void)
.SetParent<BuildingsPropagationLossModel> ()
.AddConstructor<HybridBuildingsPropagationLossModel> ()
.SetGroupName ("Buildings")
.AddAttribute ("Frequency",
"The Frequency (default is 2.106 GHz).",
@@ -41,6 +41,7 @@ ItuR1238PropagationLossModel::GetTypeId (void)
static TypeId tid = TypeId ("ns3::ItuR1238PropagationLossModel")
.SetParent<PropagationLossModel> ()
.SetGroupName ("Buildings")
.AddAttribute ("Frequency",
"The Frequency (default is 2.106 GHz).",

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